diff --git a/bridge/src/select25.tsx b/bridge/src/select25.tsx index ac89a689..e91cf11b 100644 --- a/bridge/src/select25.tsx +++ b/bridge/src/select25.tsx @@ -19,6 +19,7 @@ enum StoreKeys { interface BaseSelectOptions { containerStyle?: string; containerClass?: string; + placeholder?: string; tabIndex?: number; valueContent?: DataItemRenderer; resultContent?: DataItemRenderer; @@ -44,7 +45,6 @@ interface SingleSelectOptions extends BaseSelectOptions { label?: string; value: DataItem; allowClear?: boolean; - placeholder?: string; } const BASE_DEFAULT_OPTIONS = { @@ -107,6 +107,7 @@ class MultiSelectWrapper extends Component< { } public render(props, state) { - const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel } = props; + const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel, placeholder } = props; const { open, loading, @@ -186,6 +186,7 @@ export class MultiSelect extends AbstractSelect { onInput={this.onSearchInput} onKeyDown={this.onSearchKeyDown} onFocus={this.onSearchFocus} + placeholder={placeholder} />
diff --git a/dev/index.html b/dev/index.html index 8422293c..994a9813 100644 --- a/dev/index.html +++ b/dev/index.html @@ -115,6 +115,7 @@ document.getElementById('countries1'), { valuesLabel: "Selected Countries", comboboxLabel: "Add Country", + placeholder: "Add Country", minimumCharacters: 2, query: query, quiet: 100, diff --git a/dist/select25.js b/dist/select25.js index 77876763..bed5212c 100644 --- a/dist/select25.js +++ b/dist/select25.js @@ -15,7 +15,7 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Bundle of select2 - * Generated: 2019-06-27 + * Generated: 2019-07-17 * Version: 5.0.0-snapshot * Dependencies: * @@ -24,5 +24,5 @@ * preact -- 10.0.0-beta.3 */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).select25={})}(this,function(e){"use strict";var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function t(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return(C=Object.assign||function(e){for(var t,n=1,o=arguments.length;na[0]&&t[1]=o),p=c?W():void 0,d=f;f.updateState([e,{loading:c,results:{active:-1,page:0,results:void 0,showLoadMoreResults:!1,showMinimumCharactersError:!c,showNoSearchResultsFound:!1,token:p},search:r}],function(){if(t&&t(),c){var e=function(){return h(f,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,u(r,0,p)];case 1:return(t=e.sent()).token!==d.state.results.token?[2]:(n=t.values||[],!i&&0=l.top&&u.bottom>l.bottom&&(c=u.bottom-l.bottom,s.scrollTop=s.scrollTop+c)}}},pe);function pe(e){var n=ue.call(this,e)||this;return n.onResultClicked=function(t){return function(e){n.props.onResultClicked(t,e)}},n.onMouseMove=function(t){return function(e){n.lastMouseClientX===e.clientX&&n.lastMouseClientY===e.clientY||(n.lastMouseClientX=e.clientX,n.lastMouseClientY=e.clientY,n.props.onMouseMove(t,e))}},n.onScroll=function(){if(n.props.showLoadMoreResults){var e=n.loadMore.current;"hidden"!==function(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return o.bottomn.bottom?"hidden":o.top=n.top&&o.bottom>n.bottom?"partial-bottom":"visible"}(n.container.current,e)&&n.props.onLoadMore()}},n.container={},n.loadMore={},n}var de,fe=N({},G,{values:[]}),he=(t(ve,de=$),ve.prototype.componentWillMount=function(){m()},ve.prototype.render=function(e,t){var n,o,u=this,r=e.values,s=e.tabIndex,a=e.minimumCharacters,i=e.valuesLabel,l=e.comboboxLabel,c=t.open,p=t.loading,d=t.focused,f=t.search,h=t.values,v=h.active,m=h.selected,g=t.results,y=this.dictionary,_=q(ie.control,ie.multi,((n={})[ie.open]=c,n),((o={})[ie.focused]=d,o));e.containerClass&&0a[0]&&t[1]=o),p=c?W():void 0,d=f;f.updateState([e,{loading:c,results:{active:-1,page:0,results:void 0,showLoadMoreResults:!1,showMinimumCharactersError:!c,showNoSearchResultsFound:!1,token:p},search:r}],function(){if(t&&t(),c){var e=function(){return h(f,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,u(r,0,p)];case 1:return(t=e.sent()).token!==d.state.results.token?[2]:(n=t.values||[],!i&&0=l.top&&u.bottom>l.bottom&&(c=u.bottom-l.bottom,s.scrollTop=s.scrollTop+c)}}},pe);function pe(e){var n=ue.call(this,e)||this;return n.onResultClicked=function(t){return function(e){n.props.onResultClicked(t,e)}},n.onMouseMove=function(t){return function(e){n.lastMouseClientX===e.clientX&&n.lastMouseClientY===e.clientY||(n.lastMouseClientX=e.clientX,n.lastMouseClientY=e.clientY,n.props.onMouseMove(t,e))}},n.onScroll=function(){if(n.props.showLoadMoreResults){var e=n.loadMore.current;"hidden"!==function(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return o.bottomn.bottom?"hidden":o.top=n.top&&o.bottom>n.bottom?"partial-bottom":"visible"}(n.container.current,e)&&n.props.onLoadMore()}},n.container={},n.loadMore={},n}var de,fe=N({},G,{values:[]}),he=(t(ve,de=$),ve.prototype.componentWillMount=function(){m()},ve.prototype.render=function(e,t){var n,o,u=this,r=e.values,s=e.tabIndex,a=e.minimumCharacters,i=e.valuesLabel,l=e.comboboxLabel,c=e.placeholder,p=t.open,d=t.loading,f=t.focused,h=t.search,v=t.values,m=v.active,g=v.selected,y=t.results,_=this.dictionary,b=q(ie.control,ie.multi,((n={})[ie.open]=p,n),((o={})[ie.focused]=f,o));e.containerClass&&0= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","var n,l,u,t,i,r,f={},e=[],o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function c(n,l){for(var u in l)n[u]=l[u];return n}function s(n){var l=n.parentNode;l&&l.removeChild(n)}function a(n,l,u){var t,i,r,f,e=arguments;if(l=c({},l),arguments.length>3)for(u=[u],t=3;t2&&(l.children=e.slice.call(arguments,2)),h(n.type,l,l.key||n.key,l.ref||n.ref)}function L(n){var l={},u={__c:\"__cC\"+r++,__p:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,i=this;return this.getChildContext||(t=[],this.getChildContext=function(){return l[u.__c]=i,l},this.shouldComponentUpdate=function(n){t.some(function(l){l.__P&&(l.context=n.value,b(l))})},this.sub=function(n){t.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t.splice(t.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Consumer.contextType=u,u}n={},d.prototype.setState=function(n,l){var u=this.__s!==this.state&&this.__s||(this.__s=c({},this.state));(\"function\"!=typeof n||(n=n(u,this.props)))&&c(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),b(this))},d.prototype.forceUpdate=function(n){var l,u,t,i=this.__v,r=this.__v.__e,f=this.__P;f&&(l=!1!==n,u=[],t=N(f,i,c({},i),this.__n,void 0!==f.ownerSVGElement,null,u,l,null==r?m(i):r),$(u,i),t!=r&&w(i)),n&&n()},d.prototype.render=p,l=[],u=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,t=/[A-Z]/g,i=\"http://www.w3.org/1999/xlink\",r=0;export{D as render,H as hydrate,a as createElement,a as h,p as Fragment,v as createRef,d as Component,I as cloneElement,L as createContext,_ as toChildArray,O as _unmount,n as options};\n//# sourceMappingURL=preact.module.js.map\n","export function initialize() {\n if (document.getElementById('s25-live')) {\n return;\n }\n\n const live = document.createElement('div');\n live.setAttribute('id', 's25-live');\n live.setAttribute('class', 's25-offscreen s25-live');\n document.body.appendChild(live);\n\n const assertive = document.createElement('div');\n assertive.setAttribute('id', 's25-live-assertive');\n assertive.setAttribute('role', 'log');\n assertive.setAttribute('aria-live', 'assertive');\n assertive.setAttribute('aria-relevant', 'additions');\n live.appendChild(assertive);\n\n const polite = document.createElement('div');\n polite.setAttribute('id', 's25-live-polite');\n polite.setAttribute('role', 'log');\n polite.setAttribute('aria-live', 'polite');\n polite.setAttribute('aria-relevant', 'additions');\n live.appendChild(polite);\n}\n\nexport function assertively(message: string) {\n add(message, document.getElementById('s25-live-assertive')!);\n}\n\nexport function politely(message: string) {\n add(message, document.getElementById('s25-live-polite')!);\n}\n\nfunction add(message: string, container: HTMLElement) {\n const node = document.createElement('div');\n node.appendChild(document.createTextNode(message));\n container.appendChild(node);\n\n // clean up old nodes\n\n let collection = document.getElementById('s25-live-assertive')!;\n while (collection.firstChild && collection.firstChild !== node) {\n collection.removeChild(collection.firstChild);\n }\n collection = document.getElementById('s25-live-polite')!;\n while (collection.firstChild && collection.firstChild !== node) {\n collection.removeChild(collection.firstChild);\n }\n}\n","export interface Dictionary {\n valueAdded(itemLabel: string): string;\n noSearchResults(): string;\n searchResultsLoading(): string;\n removeButtonTitle(): string;\n clearButtonTitle(): string;\n minimumCharactersMessage(len: number, min: number): string;\n multiSelectInstructions(): string;\n}\n\nconst EN_US: Dictionary = {\n noSearchResults() {\n return 'No results available';\n },\n\n searchResultsLoading() {\n return 'Loading...';\n },\n\n removeButtonTitle() {\n return 'Remove selected values';\n },\n\n clearButtonTitle() {\n return 'Clear selection';\n },\n\n valueAdded(itemLabel: string) {\n return itemLabel + ' added';\n },\n\n minimumCharactersMessage(len: number, min: number) {\n const delta = min - len;\n return 'Please enter ' + delta + ' more character' + (delta > 1 ? 's' : '');\n },\n\n multiSelectInstructions(): string {\n return \"Items can be removed from this list box by selecting them and activating 'Remove selected values' button. Items can be added by selecting them in the adjacent combobox.\";\n }\n};\n\nconst dictionaries = new Map();\ndictionaries.set('en_us', EN_US);\n\nexport function getDictionary(dict?: string | undefined): Dictionary {\n const fallback: Dictionary = dictionaries.get('en_us') as Dictionary;\n\n if (!dict) {\n return fallback;\n }\n\n if (typeof dict === 'string') {\n const instance = dictionaries.get(dict);\n return instance ? instance : fallback;\n } else {\n return dict;\n }\n}\n","import { ComponentChild } from 'preact';\n\nexport function extend(...params: object[]) {\n for (let i = 1; i < arguments.length; i++) {\n for (const key in arguments[i]) {\n if (arguments[i].hasOwnProperty(key)) {\n if (typeof arguments[0][key] === 'object' && typeof arguments[i][key] === 'object') {\n extend(arguments[0][key], arguments[i][key]);\n } else {\n arguments[0][key] = arguments[i][key];\n }\n }\n }\n }\n return arguments[0];\n}\n\nexport type DeepPartial = {\n [P in keyof T]?: T[P] extends Array\n ? Array>\n : T[P] extends ReadonlyArray\n ? ReadonlyArray>\n : DeepPartial\n};\n\nexport const merge = (target: T, sources: Array>): T => {\n if (!sources.length) {\n return target;\n }\n const source = sources.shift();\n if (source === undefined) {\n return merge(target, sources);\n }\n\n if (isMergebleObject(target) && isMergebleObject(source)) {\n Object.keys(source).forEach((key: string) => {\n if (isMergebleObject(source[key])) {\n if (!target[key]) {\n target[key] = {};\n }\n merge(target[key], [source[key]]);\n } else {\n target[key] = source[key];\n }\n });\n }\n\n return merge(target, sources);\n};\n\nconst isObject = (item: any): boolean => {\n return item !== null && typeof item === 'object';\n};\n\nconst isMergebleObject = (item): boolean => {\n return isObject(item) && !Array.isArray(item);\n};\n\nexport function cn(...values: any) {\n const classes: string[] = [];\n const hasOwnProperty = {}.hasOwnProperty;\n\n for (const value of values) {\n if (typeof value === 'string') {\n classes.push(value);\n } else if (typeof value === 'object') {\n for (const key in value as object) {\n if (hasOwnProperty.call(value, key) && value[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nexport enum Key {\n // https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight',\n Space = ' ',\n Enter = 'Enter',\n Tab = 'Tab',\n Home = 'Home',\n End = 'End',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n Backspace = 'Backspace',\n Delete = 'Delete',\n Clear = 'Clear',\n Escape = 'Escape',\n // IE 11\n Down = 'Down',\n Up = 'Up',\n Spacebar = 'Spacebar',\n Left = 'Left',\n Right = 'Right'\n}\n\nexport const uuid = (() => {\n let counter = 0;\n return () => 's25-' + counter++;\n})();\n\nexport function throttle(delay: number, callback: () => void): () => void {\n let timeout: number | undefined;\n return () => {\n if (timeout !== undefined) {\n window.clearTimeout(timeout);\n timeout = undefined;\n } else {\n timeout = window.setTimeout(() => {\n callback();\n timeout = undefined;\n }, delay);\n }\n };\n}\n\n// @ts-ignore\nexport function debounce(quiet: number, delegate: (...args: any[]) => void, that: object) {\n const args = Array.from(arguments);\n if (quiet <= 0) {\n return () => {\n delegate.apply(that, args);\n };\n } else {\n let timeout: number | undefined;\n return () => {\n if (timeout) {\n window.clearTimeout(timeout);\n }\n timeout = window.setTimeout(() => {\n timeout = undefined;\n delegate.apply(that, args);\n }, quiet);\n };\n }\n}\n\nexport function getScrollParents(el: HTMLElement): EventTarget[] {\n const style = window.getComputedStyle(el);\n const elementPosition = style.position;\n if (elementPosition === 'fixed') {\n return [el];\n }\n\n const parents: Array = [];\n let parent = el.parentElement;\n\n while (parent && parent.nodeType === 1) {\n const css = window.getComputedStyle(parent);\n if (/(overlay|scroll|auto)/.test(css.overflow + ' ' + css.overflowX + ' ' + css.overflowY)) {\n if (elementPosition !== 'absolute' || ['relative', 'fixed', 'absolute'].indexOf(css.position || '') >= 0) {\n parents.push(parent);\n }\n }\n parent = parent.parentElement;\n }\n\n if (el.ownerDocument) {\n parents.push(el.ownerDocument.body);\n }\n\n // iframe\n if (el.ownerDocument !== document && el.ownerDocument && el.ownerDocument.defaultView) {\n parents.push(el.ownerDocument.defaultView);\n }\n\n parents.push(window);\n return parents;\n}\n\nexport function calculateVerticalVisibility(\n container: HTMLElement,\n element: HTMLElement\n): 'hidden' | 'partial-top' | 'partial-bottom' | 'visible' {\n const c = container.getBoundingClientRect();\n const e = element.getBoundingClientRect();\n\n if (e.bottom < c.top) {\n // above the fold\n return 'hidden';\n }\n\n if (e.top > c.bottom) {\n // below the fold\n return 'hidden';\n }\n\n if (e.top < c.top && e.bottom <= c.bottom) {\n return 'partial-top';\n }\n\n if (e.top >= c.top && e.bottom > c.bottom) {\n return 'partial-bottom';\n }\n\n return 'visible';\n}\n\nexport type MouseEventListener = (event: MouseEvent) => void;\nexport type KeyboardEventListener = (event: KeyboardEvent) => void;\nexport type EventListener = (event: Event) => void;\nexport type FocusEventListener = (event: FocusEvent) => void;\n\n/** helper that makes it easier to declare a scope inside a jsx block */\nexport function scope(delegate: () => ComponentChild) {\n return delegate();\n}\n","import { Component, ComponentChild, h, h as createElement } from 'preact';\nimport * as announce from './announce';\nimport { Dictionary, getDictionary } from './dictionary';\nimport { DeepPartial, Key, merge, uuid } from './util';\nconst forceImportOfH = h;\n\ntype ToString = (item: any) => string;\n\nexport type DataItemRenderer = (string) | ((item: any, h: typeof createElement) => ComponentChild);\n\nexport type QueryFunction = (search: string, page: number, token: string) => Promise;\n\nexport interface DataItem {\n id: any;\n text: string;\n}\n\nexport interface QueryResult {\n values: DataItem[];\n more: boolean;\n token: string;\n}\n\nexport interface ResultListState {\n results: any[];\n token: string;\n active: number;\n page: number;\n\n showMinimumCharactersError: boolean;\n showNoSearchResultsFound: boolean;\n showLoadMoreResults: boolean;\n}\nexport interface State {\n search: string;\n results: ResultListState;\n loading: boolean;\n open: boolean;\n focused: boolean;\n}\n\nexport interface Props {\n containerStyle?: string;\n containerClass?: string;\n tabIndex?: number;\n valueContent?: DataItemRenderer;\n resultContent?: DataItemRenderer;\n\n query: QueryFunction;\n quiet?: number;\n allowDuplicates?: boolean;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n}\n\nfunction MarkupRenderer({ markup }) {\n return
;\n}\n\nexport const DEFAULT_PROPS: Partial = {\n allowDuplicates: false,\n minimumCharacters: 0,\n quiet: 50,\n tabIndex: 0\n};\n\nexport abstract class AbstractSelect

extends Component {\n private searchTimeout: number | undefined;\n protected namespace: string;\n\n constructor(props: P) {\n super(props);\n this.searchTimeout = undefined;\n this.namespace = uuid();\n // @ts-ignore\n this.state = {\n focused: false,\n loading: false,\n open: false,\n results: {\n active: -1,\n page: 0,\n results: undefined, // TODO rename to values\n token: null,\n\n showLoadMoreResults: false,\n showMinimumCharactersError: false,\n showNoSearchResultsFound: false\n },\n search: ''\n };\n }\n\n public getItemId = (item: DataItem): string => {\n return item.id;\n };\n\n public getItemLabel = (item: DataItem): string => {\n const label = item.text;\n return item.text;\n };\n\n public renderValue = (item: DataItem): ComponentChild => {\n return this.renderItem(item, 'valueContent');\n };\n\n public renderResult = (item: DataItem): ComponentChild => {\n return this.renderItem(item, 'resultContent');\n };\n\n private renderItem = (item: DataItem, rendererName: (keyof Props) & DataItemRenderer): ComponentChild => {\n const renderer = this.props[rendererName] as DataItemRenderer;\n if (renderer) {\n if (typeof renderer === 'function') {\n const render = renderer(item, createElement);\n if (typeof render === 'string') {\n return ;\n } else {\n return render;\n }\n } else {\n return ;\n }\n } else {\n return ;\n }\n };\n\n get dictionary(): Dictionary {\n const dict = this.props.dictionary;\n if (dict) {\n if (typeof dict === 'string') {\n return getDictionary(dict);\n } else {\n return dict as Dictionary;\n }\n } else {\n return getDictionary();\n }\n }\n\n protected updateState(update: DeepPartial | Array>, callback?: () => void) {\n const state = merge(this.state, Array.isArray(update) ? update : [update]);\n this.setState(state, callback);\n }\n\n public search = (query, selectedValues, start?: DeepPartial, callback?: () => void) => {\n const dictionary = this.dictionary;\n const { minimumCharacters, allowDuplicates, quiet, query: queryFunc } = this.props;\n\n const current = this.state.results;\n\n const minimumCharactersReached = query.length >= minimumCharacters;\n const token = minimumCharactersReached ? uuid() : undefined;\n\n const control = this;\n\n this.updateState(\n // @ts-ignore\n [\n start,\n {\n loading: minimumCharactersReached,\n results: {\n active: -1,\n page: 0,\n results: undefined,\n showLoadMoreResults: false,\n showMinimumCharactersError: !minimumCharactersReached,\n showNoSearchResultsFound: false,\n token\n },\n search: query\n }\n ],\n () => {\n if (callback) {\n callback();\n }\n\n if (!minimumCharactersReached) {\n // todo - throttle this announcement?\n announce.politely(dictionary.minimumCharactersMessage(query.length, minimumCharacters!));\n return;\n }\n\n // todo - throttle this announcement?\n // announce.politely(dictionary.searchResultsLoading());\n\n const execute = async () => {\n try {\n const result = await queryFunc(query, 0, token!);\n if (result.token !== control.state.results.token) {\n // this is a stale result, ignore\n return;\n }\n\n let values = result.values || [];\n if (!allowDuplicates && values.length > 0 && selectedValues.length > 0) {\n const ids = new Set();\n selectedValues.forEach(v => ids.add(control.getItemId(v)));\n values = values.filter(v => !ids.has(control.getItemId(v)));\n }\n\n if (values.length < 1) {\n announce.politely(dictionary.noSearchResults());\n }\n\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n active: values.length > 0 ? 0 : -1,\n page: 0,\n results: values,\n showLoadMoreResults: result.more,\n showNoSearchResultsFound: values.length < 1\n }\n });\n } catch (e) {\n // @ts-ignore\n control.updateState({ loading: false });\n }\n };\n\n if (quiet && quiet > 0) {\n if (control.searchTimeout) {\n window.clearTimeout(control.searchTimeout);\n }\n control.searchTimeout = window.setTimeout(execute, quiet);\n } else {\n execute();\n }\n }\n );\n };\n\n public loadMore() {\n const {\n loading,\n search: query,\n results: { page }\n } = this.state;\n const dict = this.dictionary;\n const { query: queryFunc } = this.props;\n const control = this;\n\n if (loading) {\n return;\n }\n\n const token = uuid();\n const nextPage = page + 1;\n\n this.updateState(\n // @ts-ignore\n {\n loading: true,\n results: {\n token\n }\n },\n async () => {\n // TODO throttle?\n // announce.politely(dict.searchResultsLoading());\n\n try {\n const result = await queryFunc(query, nextPage, token);\n\n const current = control.state.results;\n\n if (result.token !== current.token) {\n // this is a stale result, ignore\n return;\n }\n\n if (result.values && result.values.length > 0) {\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n page: nextPage,\n results: current.results.concat(result.values),\n showLoadMoreResults: result.more\n }\n });\n } else {\n announce.politely(dict.noSearchResults());\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n showLoadMoreResults: false\n }\n });\n }\n } catch (e) {\n // @ts-ignore\n control.updateState({ loading: false });\n }\n }\n );\n }\n\n protected handleResultNavigationKeyDown(event: KeyboardEvent): boolean {\n switch (event.key) {\n case Key.ArrowUp:\n case Key.Up:\n this.selectPreviousSearchResult();\n event.preventDefault();\n return true;\n case Key.ArrowDown:\n case Key.Down:\n this.selectNextSearchResult();\n event.preventDefault();\n return true;\n }\n return false;\n }\n\n protected selectNextSearchResult() {\n const { active, results } = this.state.results;\n if (results && active < results.length - 1) {\n // @ts-ignore\n this.updateState({ results: { active: active + 1 } });\n }\n }\n\n protected selectPreviousSearchResult() {\n const { active } = this.state.results;\n if (active > 0) {\n // @ts-ignore\n this.updateState({ results: { active: active - 1 } });\n }\n }\n\n protected getSelectedSearchResult() {\n const { results, active } = this.state.results;\n return results[active];\n }\n\n protected selectSearchResult(index: number) {\n const { active } = this.state.results;\n if (active !== index) {\n // @ts-ignore\n this.updateState({ results: { active: index } });\n }\n }\n\n protected hasSearchResults() {\n const results = this.state.results.results;\n return results && results.length > 0;\n }\n}\n","import { Component, ComponentChild, Fragment, h, RefObject, render } from 'preact';\nimport { getScrollParents, MouseEventListener, throttle } from './util';\n\nclass ContextProvider extends Component<{ context: any }> {\n public getChildContext() {\n return this.props.context;\n }\n public render() {\n return this.props.children;\n }\n}\n\nfunction Portal({ vnode, container }): null {\n // @ts-ignore\n const wrap = {vnode};\n render(wrap, container);\n return null;\n}\n\nfunction createPortal(vnode, container): ComponentChild {\n return h(Portal, { vnode, container });\n}\n\ninterface Props {\n controlRef: RefObject;\n dropdownRef: RefObject;\n class?: string;\n onClick?: MouseEventListener;\n onMouseDown?: MouseEventListener;\n onFocusOut?: EventListener;\n}\n\nexport class Dropdown extends Component {\n private container?: HTMLElement;\n private scrollParents?: EventTarget[];\n private throttledPosition;\n\n constructor(props) {\n super(props);\n this.throttledPosition = throttle(50, this.position.bind(this));\n }\n\n public componentWillMount() {\n this.container = document.createElement('div');\n if (this.props.class) {\n this.container.className = this.props.class;\n }\n\n /*\n this container needs to be able to receive focus so we can tell\n it is not leaving the control - we consider dropdown part of the control\n */\n this.container.tabIndex = -1;\n if (this.props.onClick) {\n this.container.addEventListener('click', this.props.onClick);\n }\n if (this.props.onMouseDown) {\n this.container.addEventListener('mousedown', this.props.onMouseDown);\n }\n if (this.props.onFocusOut) {\n this.container.addEventListener('focusout', this.props.onFocusOut);\n }\n document.body.appendChild(this.container);\n }\n\n public componentDidMount() {\n this.props.dropdownRef.current = this.container;\n this.scrollParents = getScrollParents(this.props.controlRef.current!);\n this.scrollParents.forEach(parent => {\n ['resize', 'scroll', 'touchmove'].forEach(event => {\n parent.addEventListener(event, this.throttledPosition);\n });\n });\n this.position();\n }\n\n public componentWillUnmount() {\n if (this.scrollParents) {\n this.scrollParents.forEach(parent => {\n ['resize', 'scroll', 'touchmove'].forEach(event => {\n parent.removeEventListener(event, this.throttledPosition);\n });\n });\n delete this.scrollParents;\n this.scrollParents = undefined;\n }\n\n this.props.dropdownRef.current = undefined;\n this.container!.parentElement!.removeChild(this.container!);\n }\n\n public componentDidUpdate() {\n this.position();\n }\n\n public render(props) {\n return createPortal({this.props.children}, this.container!);\n }\n\n private position() {\n const control = this.props.controlRef.current!;\n const rect = control.getBoundingClientRect();\n const style = `top: ${rect.top + rect.height + window.pageYOffset}px;\n left: ${rect.left + window.pageXOffset}px;\n width: ${rect.width}px;`;\n this.container!.setAttribute('style', style);\n }\n}\n","import { FunctionComponent, h } from 'preact';\n\nconst forceImportOfH = h;\n\ninterface Props {\n width: number;\n height: number;\n}\n\nexport const Toggle: FunctionComponent = ({ height, width }) => {\n const viewBox = '0 0 ' + width + ' ' + height;\n return (\n \n \n \n );\n};\nToggle.displayName = 'Toggle';\n\nexport const Remove: FunctionComponent = ({ width, height }) => {\n const viewBox = '0 0 ' + width + ' ' + height;\n return (\n \n \n \n );\n};\nRemove.displayName = 'Remove';\n","export const enum style {\n control = 's25-control',\n content = 's25-content',\n single = 's25-single',\n multi = 's25-multi',\n body = 's25-body',\n focused = 's25-focused',\n active = 's25-active',\n live = 's25-live',\n multiValues = 's25-multi-values',\n value = 's25-value',\n item = 's25-item',\n selected = 's25-selected',\n toggle = 's25-toggle',\n remove = 's25-remove',\n open = 's25-open',\n label = 's25-label',\n search = 's25-search',\n offscreen = 's25-offscreen',\n searchContainer = 's25-search-container',\n dropdown = 's25-dropdown',\n searchResults = 's25-search-results',\n options = 's25-options',\n noSearchResults = 's25-no-search-results',\n searchResultsMessage = 's25-search-results-message',\n searchResultsLoading = 's25-search-results-loading',\n searchResultsMinimumError = 's25-search-results-minimum-error',\n hiddenAccessible = 's25-hidden-accessible',\n hidden = 's25-hidden',\n placeholder = 's25-placeholder',\n scroll = 's25-scroll'\n}\n","import { Component, ComponentChild, createRef, h, RefObject } from 'preact';\nimport { Dictionary } from './dictionary';\nimport { style } from './style';\nimport { calculateVerticalVisibility, cn } from './util';\n\nconst forceImportOfH = h;\n\n// TODO if upon render loading is visible signal loadmore\n\ninterface Props {\n // TODO consistenly call search a query\n namespace: string;\n search: string;\n listboxDomId?: string;\n results: any[];\n token: string;\n active: number;\n page: number;\n loading: boolean;\n\n itemLabel: (item: any) => string;\n renderItem: (item: any) => ComponentChild;\n\n dictionary: Dictionary;\n minimumCharacters: number;\n\n showMinimumCharactersError: boolean;\n showNoSearchResultsFound: boolean;\n showLoadMoreResults: boolean;\n\n onResultClicked: (result: any, event: MouseEvent) => void;\n onMouseMove: (index: any, event: MouseEvent) => void;\n onLoadMore: () => void;\n}\n\nexport class ResultList extends Component {\n private container: RefObject;\n private lastMouseClientX?: number;\n private lastMouseClientY?: number;\n private loadMore: RefObject;\n constructor(props) {\n super(props);\n this.container = createRef();\n this.loadMore = createRef();\n }\n\n private getResultDomId(index: number) {\n return this.props.namespace + index;\n }\n\n public render(props, state, context) {\n const { dictionary, minimumCharacters, showLoadMoreResults, results } = props;\n const query = this.props.search;\n\n return (\n

\n \n {props.loading && (\n
\n {dictionary.searchResultsLoading()}\n
\n )}\n {props.showNoSearchResultsFound && (\n
\n {dictionary.noSearchResults()}\n
\n )}\n {props.showMinimumCharactersError && (\n
\n {dictionary.minimumCharactersMessage(query.length, minimumCharacters)}\n
\n )}\n {results && results.length > 0 && (\n = 0 ? this.getResultDomId(props.active) : undefined}\n >\n {results.map((result, index) => {\n const label = props.itemLabel(result);\n const render = props.renderItem(result);\n const active = props.active === index;\n const css = cn(style.item, {\n [style.active]: active\n });\n const id = this.getResultDomId(index);\n return (\n \n
{render}
\n
\n );\n })}\n
\n )}\n {props.showLoadMoreResults && (\n \n {dictionary.searchResultsLoading()}\n \n )}\n \n \n );\n }\n\n private onResultClicked = (result: any) => (event: MouseEvent) => {\n this.props.onResultClicked(result, event);\n };\n\n private onMouseMove = (index: number) => (event: MouseEvent) => {\n if (this.lastMouseClientX === event.clientX && this.lastMouseClientY === event.clientY) {\n // the mouse did not move, the dropdown was scrolled instead, we do not change selected element because\n // it will be scrolled into view and mess with the scrolling of the results in the dropdown\n return;\n }\n this.lastMouseClientX = event.clientX;\n this.lastMouseClientY = event.clientY;\n\n this.props.onMouseMove(index, event);\n };\n\n private onScroll = (event: Event) => {\n if (!this.props.showLoadMoreResults) {\n return;\n }\n const more = this.loadMore.current!;\n const drop = this.container.current!;\n\n const visibility = calculateVerticalVisibility(drop, more);\n if (visibility !== 'hidden') {\n this.props.onLoadMore();\n }\n };\n\n public componentDidUpdate(prevProps: Props, prevState: Props) {\n const { active, results, showLoadMoreResults } = this.props;\n const { active: prevActive } = prevProps;\n\n if (active !== prevActive) {\n if (active >= 0 && results && results.length > 0 && active === results.length - 1 && showLoadMoreResults) {\n // last result is selected and load more is shown, make sure it is scrolled into view\n\n const drop = this.container.current!;\n const el = this.loadMore.current!;\n\n drop.scrollTop = el.offsetTop + el.offsetHeight - drop.clientHeight;\n\n // console.log(\"scrolling to see load more\");//, setting scrolltop\", drop, el, el.offsetTop - drop.clientHeight);\n } else if (active >= 0) {\n // make sure it is scrolled into view\n const id = this.getResultDomId(active);\n const el = document.getElementById(id);\n if (el != null) {\n const drop = this.container!.current!;\n const c = drop.getBoundingClientRect();\n const e = el.getBoundingClientRect();\n\n if (e.top < c.top && e.bottom <= c.bottom) {\n const delta = c.top - e.top;\n drop.scrollTop = drop.scrollTop - delta;\n }\n\n if (e.top >= c.top && e.bottom > c.bottom) {\n const delta = e.bottom - c.bottom;\n drop.scrollTop = drop.scrollTop + delta;\n }\n }\n }\n }\n }\n}\n","import { createRef, Fragment, h, RefObject } from 'preact';\nimport {\n AbstractSelect,\n DataItem,\n DEFAULT_PROPS as ABSTRACT_DEFAULT_PROPS,\n Props as SearchControllerProps,\n State as AbstractSelectState\n} from './abstract-select';\nimport * as announce from './announce';\nimport { Dropdown } from './dropdown';\nimport { Remove, Toggle } from './icons';\nimport { ResultList } from './result-list';\nimport { style } from './style';\nimport { cn, extend, Key, scope } from './util';\n\nconst forceImportOfH = h;\n\nexport interface Props extends SearchControllerProps {\n valuesLabel: string;\n comboboxLabel: string;\n values: DataItem[];\n onChange: (values: DataItem[]) => void;\n}\n\ninterface ValueListState {\n active: number;\n selected: boolean[];\n}\n\ninterface State extends AbstractSelectState {\n values: ValueListState;\n}\n\nconst DEFAULT_PROPS = extend({}, ABSTRACT_DEFAULT_PROPS, { values: [] });\n\nexport class MultiSelect extends AbstractSelect {\n private containerRef: RefObject;\n private dropdownRef: RefObject;\n private bodyRef: RefObject;\n private valuesRef: RefObject;\n private searchRef: RefObject;\n\n public static defaultProps = DEFAULT_PROPS;\n\n constructor(props) {\n super(props);\n const { values } = props;\n\n this.valuesRef = createRef();\n this.searchRef = createRef();\n this.bodyRef = createRef();\n this.containerRef = createRef();\n this.dropdownRef = createRef();\n\n this.state = extend(this.state, {\n values: {\n active: -1,\n selected: values.map(v => false)\n }\n });\n }\n\n public componentWillMount() {\n announce.initialize();\n }\n\n public render(props, state) {\n const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel } = props;\n const {\n open,\n loading,\n focused,\n search,\n values: { active, selected },\n results\n } = state;\n const dictionary = this.dictionary;\n\n let classes = cn(style.control, style.multi, { [style.open]: open }, { [style.focused]: focused });\n if (props.containerClass && props.containerClass.length > 0) {\n classes += ' ' + props.containerClass;\n }\n\n const instructionsDomId = this.namespace + '-instructions';\n const resultsDomId = this.namespace + '-results';\n const resultsNamespace = this.namespace + '-res-';\n return (\n \n \n
\n
\n {dictionary.multiSelectInstructions()}\n
\n {scope(() => {\n const activeDescendant = active >= 0 ? this.namespace + '-vl-' + active : undefined;\n if (values && values.length > 0) {\n return (\n \n {values.map((value: DataItem, index: number) => {\n const isSelected = selected[index];\n const isActive = active === index;\n const css = cn(style.item, {\n [style.selected]: isSelected,\n [style.active]: isActive\n });\n const id = this.namespace + '-vl-' + index;\n const label = this.getItemLabel(value);\n const render = this.renderValue(value);\n return (\n e.stopPropagation()}\n onClick={this.onValueClick(index)}\n >\n
{render}
\n
\n );\n })}\n \n );\n } else {\n return null;\n }\n })}\n {scope(() => {\n const disabled = !selected.find(x => x === true);\n const className = cn(style.remove, {\n [style.offscreen]: values.length < 1\n });\n return (\n \n \n \n \n \n );\n })}\n \n = 0 ? resultsNamespace + results.active : undefined}\n aria-busy={loading}\n onInput={this.onSearchInput}\n onKeyDown={this.onSearchKeyDown}\n onFocus={this.onSearchFocus}\n />\n
\n \n
\n \n \n {open && (\n \n \n \n )}\n
\n );\n }\n\n public componentDidMount() {\n const css = this.props.containerStyle;\n if (css && css.length > 0) {\n this.containerRef.current!.setAttribute('style', css);\n }\n }\n\n private onLoadMoreResults = () => {\n this.loadMore();\n };\n\n private focusSearchAndStopPropagation = (event: Event) => {\n this.searchRef.current!.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onToggleClick = (event: MouseEvent) => {\n const { open } = this.state;\n if (open) {\n this.close();\n this.searchRef.current!.focus();\n } else {\n this.search(this.state.search, this.props.values, { open: true });\n this.searchRef.current!.focus();\n }\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onBodyClick = (event: MouseEvent) => {\n if (event.target === this.bodyRef.current) {\n // if the element itself was clicked, (white space inside the body)\n this.searchRef.current!.focus();\n }\n };\n\n public onFocusIn = (event: FocusEvent) => {\n this.updateState({ focused: true });\n };\n\n public onFocusOut = (event: FocusEvent) => {\n const receiver = event.relatedTarget as Node;\n const container = this.containerRef.current!;\n const dropdown = this.dropdownRef.current!;\n const focused =\n container.contains(receiver) || (dropdown && (dropdown === receiver || dropdown.contains(receiver)));\n\n this.updateState({\n focused\n });\n if (!focused) {\n this.closeIfOpen();\n }\n };\n\n public onSearchFocus = (event: FocusEvent) => {\n const { openOnFocus } = this.props;\n const { open } = this.state;\n if (!open && openOnFocus) {\n this.search(this.searchRef.current!.value, this.props.values, { open: true });\n }\n };\n\n public onResultMouseMove = (index: number, event: MouseEvent) => {\n this.selectSearchResult(index);\n };\n\n public selectActiveResult = () => {\n this.selectResult(this.getSelectedSearchResult());\n };\n\n public selectResult = (result: any) => {\n const { values, onChange } = this.props;\n const next = values.slice();\n next.push(result);\n\n this.close();\n\n const label = this.getItemLabel(result);\n announce.politely(this.dictionary.valueAdded(label));\n\n onChange(next);\n };\n\n public toggleValue = (index: number) => {\n const {\n values: { selected }\n } = this.state;\n const next = selected.slice();\n next[index] = !next[index];\n this.updateState({ values: { selected: next, active: index } });\n };\n\n public onRemoveSelectedFocus = (event: FocusEvent) => {\n this.closeIfOpen();\n };\n\n public onRemoveSelectedClick = (event: Event) => {\n const {\n values: { selected }\n } = this.state;\n const { values, onChange } = this.props;\n const next = values.slice().filter((value, index) => !selected[index]);\n this.updateState({\n values: {\n selected: next.map(v => false)\n }\n });\n onChange(next);\n\n this.searchRef.current!.focus();\n };\n\n public onSearchInput = (event: Event) => {\n const value = (event.target as HTMLInputElement).value;\n this.search(value, this.props.values, { open: true });\n };\n\n public onSearchKeyDown = (event: KeyboardEvent) => {\n if (this.handleResultNavigationKeyDown(event)) {\n return;\n }\n\n const { open } = this.state;\n\n if (open && this.hasSearchResults) {\n switch (event.key) {\n case Key.Enter:\n this.selectActiveResult();\n event.preventDefault();\n break;\n case Key.Escape:\n if (open) {\n this.close();\n }\n event.preventDefault();\n break;\n }\n }\n };\n\n public onValueClick = (index: number) => (event: MouseEvent) => {\n this.toggleValue(index);\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onValuesFocus = (event: Event) => {\n const {\n values: { active, selected }\n } = this.state;\n const { values } = this.props;\n\n // highlight the first selected value\n if (active < 0 && values.length > 0) {\n let index = 0;\n for (let i = 0; i < selected.length; i++) {\n if (selected[i]) {\n index = i;\n break;\n }\n }\n this.updateState({ values: { active: index } });\n }\n this.closeIfOpen();\n };\n\n public closeIfOpen() {\n if (this.state.open) {\n this.close();\n }\n }\n\n public close = () => {\n this.updateState({\n open: false,\n results: { results: undefined },\n search: ''\n });\n };\n\n public onValuesBlur = (event: Event) => {\n this.updateState({ values: { active: -1 } });\n };\n\n public onValuesKeyDown = (event: KeyboardEvent) => {\n const active = this.state.values.active;\n const { values } = this.props;\n\n switch (event.key) {\n case Key.ArrowLeft:\n case Key.ArrowUp:\n case Key.Up:\n case Key.Left: {\n if (active > 0) {\n this.updateState({ values: { active: active - 1 } });\n }\n event.preventDefault();\n break;\n }\n case Key.ArrowRight:\n case Key.Right:\n case Key.ArrowDown:\n case Key.Down: {\n if (active < values.length - 1) {\n this.updateState({ values: { active: active + 1 } });\n }\n event.preventDefault();\n break;\n }\n case Key.PageDown: {\n // TODO\n event.preventDefault();\n break;\n }\n case Key.PageUp: {\n // TODO\n event.preventDefault();\n break;\n }\n case Key.Home: {\n this.updateState({ values: { active: 0 } });\n event.preventDefault();\n break;\n }\n case Key.End: {\n this.updateState({ values: { active: values.length - 1 } });\n event.preventDefault();\n break;\n }\n case Key.Space:\n case Key.Spacebar: {\n this.toggleValue(active);\n event.preventDefault();\n break;\n }\n }\n };\n\n public onDropdownClick = (event: MouseEvent) => {\n // result clicks do not make it this far because they do not propagate\n // so this click is on something other than result\n event.preventDefault();\n event.stopPropagation();\n this.searchRef.current!.focus();\n };\n\n public onResultClicked = (result: any, event: MouseEvent) => {\n this.selectResult(result);\n this.searchRef.current!.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n}\n","import { createRef, Fragment, h, RefObject } from 'preact';\nimport {\n AbstractSelect,\n DEFAULT_PROPS as ABSTRACT_DEFAULT_PROPS,\n Props as AbstractSelectProps,\n State as AbstractSelectState\n} from './abstract-select';\nimport * as announce from './announce';\nimport { Dropdown } from './dropdown';\nimport { Remove, Toggle } from './icons';\nimport { ResultList } from './result-list';\nimport { style } from './style';\nimport { cn, DeepPartial, extend, Key, scope } from './util';\n\nconst forceImportOfH = h;\n\nexport interface Props extends AbstractSelectProps {\n value: any;\n label: string;\n comboboxLabel: string;\n onChange: (value: any) => void;\n allowClear?: boolean;\n placeholder?: string;\n}\n\ninterface State extends AbstractSelectState {\n value: any;\n}\n\nconst DEFAULT_PROPS = extend({}, ABSTRACT_DEFAULT_PROPS, { allowClear: false });\n\nexport class SingleSelect extends AbstractSelect {\n private containerRef: RefObject;\n private dropdownRef: RefObject;\n private bodyRef: RefObject;\n private searchRef: RefObject;\n private valueRef: RefObject;\n\n public static defaultProps = DEFAULT_PROPS;\n\n constructor(props) {\n super(props);\n\n this.searchRef = createRef();\n this.bodyRef = createRef();\n this.containerRef = createRef();\n this.dropdownRef = createRef();\n this.valueRef = createRef();\n\n this.state = extend(this.state, { value: this.props.value });\n }\n\n public componentWillMount() {\n announce.initialize();\n }\n\n public render(props, state) {\n const { minimumCharacters, tabIndex, label, allowClear, placeholder } = props;\n const { value, open, loading, focused, search, results } = state;\n\n let classes = cn(style.control, style.single, { [style.open]: open }, { [style.focused]: focused });\n if (props.containerClass && props.containerClass.length > 0) {\n classes += ' ' + props.containerClass;\n }\n const resultsDomId = this.namespace + '-results';\n const optionDomId = this.namespace + '-val';\n const resultsNamespace = this.namespace + '-res-';\n const dictionary = this.dictionary;\n const showPlaceholder = !value && placeholder && placeholder.length > 0;\n const placeholderDomId = this.namespace + '-placeholder';\n return (\n \n \n
\n
\n )}\n {showPlaceholder && (\n
\n {placeholder}\n
\n )}\n \n {scope(() => {\n const disabled = !value;\n const clazz = cn(style.remove, { [style.offscreen]: !allowClear });\n return (\n \n \n \n \n \n );\n })}\n
\n \n
\n \n \n {open && (\n \n
\n = 0 ? resultsNamespace + results.active : undefined\n }\n aria-busy={loading}\n onInput={this.onSearchInput}\n onKeyDown={this.onSearchKeyDown}\n onFocus={this.onSearchFocus}\n />\n \n
\n \n )}\n
\n );\n }\n\n public componentDidMount() {\n const css = this.props.containerStyle;\n if (css && css.length > 0) {\n this.containerRef.current!.setAttribute('style', css);\n }\n }\n\n private onLoadMoreResults = () => {\n this.loadMore();\n };\n\n public onFocusIn = (event: FocusEvent) => {\n this.updateState({ focused: true });\n\n const { openOnFocus } = this.props;\n const { open } = this.state;\n if (!open && openOnFocus && this.searchRef.current !== document.activeElement) {\n this.open();\n }\n };\n\n public onFocusOut = (event: FocusEvent) => {\n const receiver = event.relatedTarget as Node;\n const container = this.containerRef.current;\n const dropdown = this.dropdownRef.current;\n const search = this.searchRef.current;\n\n const focused =\n container.contains(receiver) ||\n (dropdown && (dropdown === receiver || dropdown.contains(receiver))) ||\n receiver === search;\n\n if (this.state.focused !== focused) {\n this.updateState({\n focused\n });\n }\n if (!focused) {\n this.closeIfOpen();\n }\n };\n\n public closeIfOpen() {\n if (this.state.open) {\n this.close();\n }\n }\n\n public close = (state?: DeepPartial) => {\n const control = this;\n control.valueRef.current!.focus();\n this.updateState([\n state,\n {\n open: false,\n results: { results: null },\n search: ''\n }\n ]);\n };\n\n private getValueAsArray() {\n return this.state.value ? [this.state.value] : [];\n }\n\n private onContainerMouseDown = (event: MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n if (this.state.open) {\n this.close();\n } else {\n this.open();\n }\n };\n\n private open(query: string = '') {\n this.search(query, this.getValueAsArray(), { open: true }, () => {\n this.searchRef.current.focus();\n });\n }\n\n private onSearchFocus = (event: FocusEvent) => {\n this.updateState({ focused: true });\n };\n\n private onSearchInput = (event: Event) => {\n const value = (event.target as HTMLInputElement).value;\n this.search(value, this.getValueAsArray());\n };\n\n private onClearFocus = (event: FocusEvent) => {\n this.closeIfOpen();\n };\n\n private onClearClick = (event: Event) => {\n this.selectResult(undefined);\n event.preventDefault();\n event.stopPropagation();\n };\n\n private onClearMouseDown = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n public onSearchKeyDown = (event: KeyboardEvent) => {\n if (this.handleResultNavigationKeyDown(event)) {\n return;\n }\n\n const { open } = this.state;\n\n if (open && this.hasSearchResults) {\n switch (event.key) {\n case Key.Enter:\n this.selectActiveResult();\n event.preventDefault();\n event.stopPropagation();\n break;\n case Key.Escape:\n this.close();\n event.preventDefault();\n event.stopPropagation();\n break;\n case Key.Tab:\n // TODO select on tab?\n this.close();\n event.preventDefault();\n event.stopPropagation();\n }\n }\n };\n\n public selectActiveResult = () => {\n const { active } = this.state.results;\n if (active >= 0) {\n this.selectResult(this.getSelectedSearchResult());\n }\n };\n\n public selectResult = (result: any) => {\n const { onChange } = this.props;\n\n this.close({ value: result });\n\n // TODO announce?\n // const label = this.getItemLabel(result);\n\n onChange(result);\n };\n\n private onValueKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case Key.Space:\n case Key.ArrowDown:\n case Key.Down:\n this.open();\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (event.key.length === 1) {\n // focus on search which will put the printable character into the field\n this.open();\n }\n };\n\n private onDropdownMouseDown = (event: MouseEvent) => {\n this.searchRef.current.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onResultMouseMove = (index: number, event: MouseEvent) => {\n this.selectSearchResult(index);\n };\n\n public onResultClicked = (result: any, event: MouseEvent) => {\n this.selectResult(result);\n event.preventDefault();\n event.stopPropagation();\n };\n}\n","export class Store {\n private static stores = new WeakMap();\n\n private store = new Map();\n\n public get(key: string): any {\n return this.store.get(key);\n }\n public set(key: string, value: any) {\n this.store.set(key, value);\n }\n\n public static getStore(key: any): Store {\n let store = Store.stores.get(key);\n if (!store) {\n store = new Store();\n Store.stores.set(key, store);\n }\n return store;\n }\n\n public static hasStore(key: any) {\n return Store.stores.has(key);\n }\n\n public static removeStore(key: any) {\n Store.stores.delete(key);\n }\n}\n","/** jsx:pragma h */\nimport { Component, h, render } from 'preact';\nimport { DataItem, DataItemRenderer, QueryFunction } from '../../control/src/abstract-select';\nimport { Dictionary } from '../../control/src/dictionary';\nimport { MultiSelect } from '../../control/src/multi-select';\nimport '../../control/src/select25.scss';\nimport { SingleSelect } from '../../control/src/single-select';\nimport { extend } from '../../control/src/util';\nimport { Ajax, createQueryFromAjax } from './ajax';\nimport { createQueryFromData, DataFunction } from './data';\nimport { Store } from './store';\n\nconst forceImportOfH = h;\n\nenum StoreKeys {\n targetElement = 'te'\n}\n\ninterface BaseSelectOptions {\n containerStyle?: string;\n containerClass?: string;\n tabIndex?: number;\n valueContent?: DataItemRenderer;\n resultContent?: DataItemRenderer;\n query?: QueryFunction;\n data?: DataFunction;\n ajax?: Ajax;\n quiet?: number;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n}\n\ninterface MultiSelectOptions extends BaseSelectOptions {\n hiddenValue?: (values: DataItem[], options: MultiSelectOptions) => string;\n valuesLabel?: string;\n comboboxLabel?: string;\n allowDuplicates: boolean;\n values: DataItem[];\n}\n\ninterface SingleSelectOptions extends BaseSelectOptions {\n hiddenValue?: (value: DataItem, options: SingleSelectOptions) => string;\n label?: string;\n value: DataItem;\n allowClear?: boolean;\n placeholder?: string;\n}\n\nconst BASE_DEFAULT_OPTIONS = {\n dictionary: 'en_us',\n minimumCharacters: 0,\n openOnFocus: false\n};\n\nconst DEFAULT_MULTI_SELECT_OPTIONS = extend({}, BASE_DEFAULT_OPTIONS, {\n hiddenValue: (values: DataItem[], options: MultiSelectOptions) => {\n if (values && values.length > 0) {\n return values.map(item => item.id).join(',');\n } else {\n return '';\n }\n }\n});\n\nconst DEFAULT_SINGLE_SELECT_OPTIONS = extend({}, BASE_DEFAULT_OPTIONS, {\n allowClear: false,\n hiddenValue: (value: DataItem, options: SingleSelectOptions) => {\n if (value) {\n return value.id;\n } else {\n return '';\n }\n }\n});\n\nfunction triggerOnChange(element: HTMLElement, data: any) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent('change', false, true);\n event[data] = data;\n element.dispatchEvent(event);\n}\n\nclass MultiSelectWrapper extends Component<\n {\n element: HTMLInputElement;\n options: MultiSelectOptions;\n },\n { values?: DataItem[] }\n> {\n constructor(props) {\n super(props);\n this.state = { values: props.options.values || [] };\n }\n\n public componentDidUpdate() {\n this.setHiddenValue(this.state.values);\n }\n\n public componentDidMount() {\n this.setHiddenValue(this.state.values);\n }\n\n public render(props, state, context) {\n const opts = this.props.options;\n return (\n \n );\n }\n\n public onChange = (values: any[]) => {\n this.setState({ values });\n this.setHiddenValue(values);\n triggerOnChange(this.props.element, values);\n };\n\n private setHiddenValue(values: any) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(values, options);\n }\n}\n\nclass SingleSelectWrapper extends Component<\n {\n options: SingleSelectOptions;\n element: HTMLInputElement;\n },\n { value?: DataItem }\n> {\n constructor(props) {\n super(props);\n this.state = { value: props.options.value };\n }\n\n public componentDidMount() {\n this.setHiddenValue(this.state.value);\n }\n\n public componentDidUpdate() {\n this.setHiddenValue(this.state.value);\n }\n\n public render(props, state, context) {\n const opts = this.props.options;\n return (\n \n );\n }\n\n public onChange = (value: DataItem) => {\n this.setState({ value });\n this.setHiddenValue(value);\n triggerOnChange(this.props.element, value);\n };\n\n private setHiddenValue(value: DataItem) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(value, options);\n }\n}\n\nfunction createSingleSelect(element: HTMLInputElement, options: SingleSelectOptions) {\n options = extend({}, DEFAULT_SINGLE_SELECT_OPTIONS, options);\n fillBaseOptions(element, options);\n\n const store = Store.getStore(element);\n\n // create placeholder element into which the control will be rendered\n const parentElement = element.parentElement;\n const targetElement = document.createElement('div');\n parentElement.insertBefore(targetElement, element);\n store.set(StoreKeys.targetElement, targetElement);\n\n render(, parentElement, targetElement);\n}\n\nfunction createMultiSelect(element: HTMLInputElement, options: SingleSelectOptions) {\n options = extend({}, DEFAULT_MULTI_SELECT_OPTIONS, options);\n fillBaseOptions(element, options);\n\n const store = Store.getStore(element);\n\n // create placeholder element into which the control will be rendered\n const parentElement = element.parentElement;\n const targetElement = document.createElement('div');\n parentElement.insertBefore(targetElement, element);\n store.set(StoreKeys.targetElement, targetElement);\n\n render(, parentElement, targetElement);\n}\n\nfunction fillBaseOptions(element: HTMLInputElement, options: BaseSelectOptions) {\n if (!options.query) {\n if (options.ajax) {\n options.query = createQueryFromAjax(options.ajax);\n } else if (options.data) {\n options.query = createQueryFromData(options.data);\n }\n }\n\n if (!options.tabIndex && element.tabIndex) {\n options.tabIndex = element.tabIndex;\n }\n\n if (element.getAttribute('data-s25-container-style')) {\n let style = options.containerStyle || '';\n if (style.length > 0) {\n style += ';';\n }\n style += element.getAttribute('data-s25-container-style');\n options.containerStyle = style;\n }\n\n if (element.getAttribute('data-s25-container-class')) {\n let clazz = options.containerClass || '';\n if (clazz.length > 0) {\n clazz += ' ';\n }\n clazz += element.getAttribute('data-s25-container-class');\n options.containerClass = clazz;\n }\n}\n\nfunction destroy(element: HTMLElement) {\n if (!Store.hasStore(element)) {\n return;\n }\n const store = Store.getStore(element);\n const targetElement = store.get(StoreKeys.targetElement);\n const parentElement = element.parentElement;\n render(null, parentElement, targetElement);\n parentElement.removeChild(targetElement);\n Store.removeStore(element);\n}\n\nconst select25 = {\n createMultiSelect,\n createSingleSelect,\n destroy\n};\n\nexport { select25 };\n\ndeclare global {\n interface Window {\n select25: typeof select25;\n }\n}\n\nwindow.select25 = select25;\n","import { QueryFunction, QueryResult } from '../../control/src/abstract-select';\nimport { extend } from '../../control/src/util';\n\nexport interface Ajax {\n url: string;\n params: (term: string, page: number) => object;\n process: (data: string) => QueryResult;\n}\n\nexport function createQueryFromAjax(ajax: Ajax): QueryFunction {\n ajax = extend({}, ajax, {\n params(term: string, page: number) {\n return { term, page };\n },\n process(data: string) {\n const json = JSON.parse(data);\n return {\n more: json.more,\n values: json.values\n };\n }\n });\n\n return (term: string, page: number, token: string) => {\n return new Promise((resolve, reject) => {\n let url = ajax.url;\n const params = ajax.params(term, page);\n if (params) {\n let separator = url.indexOf('?') >= 0 ? '&' : '?';\n Object.entries(params).forEach(([key, value]) => {\n url += separator;\n separator = '&';\n url += encodeURIComponent(key) + '=' + encodeURIComponent(value);\n });\n }\n\n const request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.onload = () => {\n if (request.status >= 200 && request.status < 400) {\n const data = ajax.process(request.responseText);\n resolve({ values: data.values, more: data.more, token });\n } else {\n reject();\n }\n };\n request.onerror = reject;\n request.send();\n });\n };\n}\n","import { QueryFunction, QueryResult } from '../../control/src/abstract-select';\n\nexport interface DataParam {\n term: string;\n page: number;\n selected: any[];\n}\n\nexport interface DataResult {\n values: any[];\n more: boolean;\n}\n\nexport type DataFunction = (param: DataParam) => QueryResult;\n\nexport function createQueryFromData(callback: DataFunction): QueryFunction {\n return (term: string, page: number, token: string) => {\n return new Promise((resolve, reject) => {\n const data = callback({ term, page, selected: [] });\n resolve({ values: data.values, more: data.more, token });\n });\n };\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","l","u","o","c","parentNode","removeChild","a","r","children","defaultProps","key","ref","h","type","props","__k","__p","__b","__e","__c","vnode","context","__d","debounceRendering","k","sort","__v","forceUpdate","m","w","x","N","appendChild","nextSibling","insertBefore","O","A","isArray","C","style","setProperty","replace","test","toLowerCase","slice","addEventListener","removeEventListener","options","selected","removeAttributeNS","setAttributeNS","removeAttribute","setAttribute","event","contextType","__E","render","T","sub","state","__n","__h","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","__r","__P","getChildContext","getSnapshotBeforeUpdate","base","componentDidUpdate","nodeType","localName","document","createTextNode","createElementNS","createElement","data","childNodes","dangerouslySetInnerHTML","__html","innerHTML","multiple","keys","j","diffed","z","$","current","unmount","componentWillUnmount","getDerivedStateFromError","setState","componentDidCatch","D","ownerSVGElement","initialize","getElementById","live","assertive","polite","politely","message","container","node","collection","firstChild","add","indexOf","bind","setTimeout","dictionaries","Map","getDictionary","dict","fallback","get","instance","extend","_i","params","set","noSearchResults","searchResultsLoading","removeButtonTitle","clearButtonTitle","valueAdded","itemLabel","minimumCharactersMessage","len","min","delta","multiSelectInstructions","Key","merge","target","sources","source","shift","undefined","isMergebleObject","forEach","item","isObject","cn","values","classes","values_1","_a","join","counter","uuid","scope","delegate","MarkupRenderer","DEFAULT_PROPS","allowDuplicates","minimumCharacters","quiet","tabIndex","tslib_1.__extends","Component","AbstractSelect","dictionary","update","callback","loading","query","page","queryFunc","control","token","nextPage","updateState","results","concat","showLoadMoreResults","more","announce.politely","ArrowUp","Up","selectPreviousSearchResult","preventDefault","ArrowDown","Down","selectNextSearchResult","active","index","_super","_this","id","text","renderItem","rendererName","renderer","markup","getItemLabel","selectedValues","start","minimumCharactersReached","showMinimumCharactersError","showNoSearchResultsFound","search","execute","ids_1","Set","getItemId","filter","has","searchTimeout","window","clearTimeout","namespace","focused","open","ContextProvider","Portal","Dropdown","class","className","onClick","onMouseDown","onFocusOut","dropdownRef","scrollParents","el","elementPosition","getComputedStyle","position","parents","parent","parentElement","css","overflow","overflowX","overflowY","ownerDocument","defaultView","getScrollParents","controlRef","throttledPosition","createPortal","Fragment","rect","getBoundingClientRect","top","height","pageYOffset","left","pageXOffset","width","delay","timeout","throttle","Toggle","viewBox","focusable","displayName","Remove","ResultList","onScroll","searchResults","searchResultsMessage","searchResultsMinimumError","role","listboxDomId","getResultDomId","map","onResultClicked","onMouseMove","content","loadMore","prevProps","drop","scrollTop","offsetTop","offsetHeight","clientHeight","bottom","lastMouseClientX","clientX","lastMouseClientY","clientY","element","calculateVerticalVisibility","onLoadMore","ABSTRACT_DEFAULT_PROPS","MultiSelect","announce.initialize","valuesLabel","comboboxLabel","_c","multi","containerClass","instructionsDomId","resultsDomId","resultsNamespace","containerRef","onFocusCapture","onFocusIn","onBlurCapture","focusSearchAndStopPropagation","bodyRef","onBodyClick","offscreen","display","activeDescendant","valuesRef","multiValues","onFocus","onValuesFocus","onBlur","onValuesBlur","onKeyDown","onValuesKeyDown","isSelected","isActive","renderValue","stopPropagation","onValueClick","disabled","find","remove","onRemoveSelectedClick","onRemoveSelectedFocus","title","htmlFor","searchRef","onInput","onSearchInput","onSearchKeyDown","onSearchFocus","toggle","onToggleClick","dropdown","onDropdownClick","renderResult","onResultMouseMove","onLoadMoreResults","containerStyle","close","focus","receiver","relatedTarget","contains","closeIfOpen","openOnFocus","selectSearchResult","selectResult","getSelectedSearchResult","onChange","handleResultNavigationKeyDown","hasSearchResults","Enter","selectActiveResult","Escape","toggleValue","ArrowLeft","Left","ArrowRight","Right","PageDown","PageUp","Home","End","Space","Spacebar","allowClear","SingleSelect","placeholder","single","optionDomId","showPlaceholder","placeholderDomId","onContainerMouseDown","valueRef","onValueKeyDown","onClearClick","onClearFocus","onClearMouseDown","onDropdownMouseDown","getValueAsArray","activeElement","Tab","StoreKeys","Store","store","stores","delete","WeakMap","BASE_DEFAULT_OPTIONS","DEFAULT_MULTI_SELECT_OPTIONS","hiddenValue","DEFAULT_SINGLE_SELECT_OPTIONS","triggerOnChange","createEvent","initEvent","dispatchEvent","MultiSelectWrapper","setHiddenValue","opts","valueContent","resultContent","SingleSelectWrapper","fillBaseOptions","ajax","term","process","json","JSON","parse","url","separator_1","entries","encodeURIComponent","request","XMLHttpRequest","onload","status","responseText","onerror","send","createQueryFromAjax","createQueryFromData","getAttribute","clazz","select25","createMultiSelect","getStore","targetElement","createSingleSelect","destroy","hasStore","removeStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qMAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAGrB,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,IAAIK,EAAW,WAQlB,OAPAA,EAAWZ,OAAOa,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIZ,KADTW,EAAIG,UAAUF,GACOhB,OAAOU,UAAUL,eAAee,KAAKL,EAAGX,KAAIU,EAAEV,GAAKW,EAAEX,IAE9E,OAAOU,IAEKO,MAAMb,KAAMU,YA4BzB,SAASI,EAAUC,EAASC,EAAYC,EAAGC,GAC9C,OAAO,IAAKD,IAAMA,EAAIE,UAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,IAAW,MAAOG,GAAKL,EAAOK,IACpF,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,IAAW,MAAOG,GAAKL,EAAOK,IACvF,SAASF,EAAKI,GAAUA,EAAOC,KAAOT,EAAQQ,EAAOL,OAAS,IAAIN,EA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B,CAClD,IAAIC,EAAQ9X,EAAQ0P,gBAAkB,GACnB,EAAfoI,EAAMrd,SACNqd,GAAS,KAEbA,GAAS9I,EAAQ6I,aAAa,4BAC9B7X,EAAQ0P,eAAiBoI,OAgB3BC,GAAW,CACbC,kBA5DJ,SAA2BhJ,EAA2BhP,GAElDyW,GAAgBzH,EADhBhP,EAAU2E,EAAO,GAAIiR,GAA8B5V,IAGnD,IAAMuV,EAAQD,GAAM2C,SAASjJ,GAGvBpD,EAAgBoD,EAAQpD,cACxBsM,EAAgBpW,SAASG,cAAc,OAC7C2J,EAAczM,aAAa+Y,EAAelJ,GAC1CuG,EAAMzQ,IAAIuQ,GAAU6C,cAAeA,GAEnCzX,EAAO5C,EAACsY,IAAmBnH,QAASA,EAAShP,QAASA,IAAa4L,EAAesM,IAiDlFC,mBA5EJ,SAA4BnJ,EAA2BhP,GAEnDyW,GAAgBzH,EADhBhP,EAAU2E,EAAO,GAAImR,GAA+B9V,IAGpD,IAAMuV,EAAQD,GAAM2C,SAASjJ,GAGvBpD,EAAgBoD,EAAQpD,cACxBsM,EAAgBpW,SAASG,cAAc,OAC7C2J,EAAczM,aAAa+Y,EAAelJ,GAC1CuG,EAAMzQ,IAAIuQ,GAAU6C,cAAeA,GAEnCzX,EAAO5C,EAAC2Y,IAAoBxH,QAASA,EAAShP,QAASA,IAAa4L,EAAesM,IAiEnFE,QAfJ,SAAiBpJ,GACb,GAAKsG,GAAM+C,SAASrJ,GAApB,CAGA,IACMkJ,EADQ5C,GAAM2C,SAASjJ,GACDvK,IAAI4Q,GAAU6C,eACpCtM,EAAgBoD,EAAQpD,cAC9BnL,EAAO,KAAMmL,EAAesM,GAC5BtM,EAActO,YAAY4a,GAC1B5C,GAAMgD,YAAYtJ,MAiBtBzE,OAAOwN,SAAWA"} \ No newline at end of file +{"version":3,"file":"select25.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/preact/dist/preact.module.js","../control/src/announce.ts","../control/src/dictionary.ts","../control/src/util.ts","../control/src/abstract-select.tsx","../control/src/dropdown.tsx","../control/src/icons.tsx","../control/src/style.ts","../control/src/result-list.tsx","../control/src/multi-select.tsx","../control/src/single-select.tsx","../bridge/src/store.ts","../bridge/src/select25.tsx","../bridge/src/ajax.ts","../bridge/src/data.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","var n,l,u,t,i,r,f={},e=[],o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function c(n,l){for(var u in l)n[u]=l[u];return n}function s(n){var l=n.parentNode;l&&l.removeChild(n)}function a(n,l,u){var t,i,r,f,e=arguments;if(l=c({},l),arguments.length>3)for(u=[u],t=3;t2&&(l.children=e.slice.call(arguments,2)),h(n.type,l,l.key||n.key,l.ref||n.ref)}function L(n){var l={},u={__c:\"__cC\"+r++,__p:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,i=this;return this.getChildContext||(t=[],this.getChildContext=function(){return l[u.__c]=i,l},this.shouldComponentUpdate=function(n){t.some(function(l){l.__P&&(l.context=n.value,b(l))})},this.sub=function(n){t.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t.splice(t.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Consumer.contextType=u,u}n={},d.prototype.setState=function(n,l){var u=this.__s!==this.state&&this.__s||(this.__s=c({},this.state));(\"function\"!=typeof n||(n=n(u,this.props)))&&c(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),b(this))},d.prototype.forceUpdate=function(n){var l,u,t,i=this.__v,r=this.__v.__e,f=this.__P;f&&(l=!1!==n,u=[],t=N(f,i,c({},i),this.__n,void 0!==f.ownerSVGElement,null,u,l,null==r?m(i):r),$(u,i),t!=r&&w(i)),n&&n()},d.prototype.render=p,l=[],u=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,t=/[A-Z]/g,i=\"http://www.w3.org/1999/xlink\",r=0;export{D as render,H as hydrate,a as createElement,a as h,p as Fragment,v as createRef,d as Component,I as cloneElement,L as createContext,_ as toChildArray,O as _unmount,n as options};\n//# sourceMappingURL=preact.module.js.map\n","export function initialize() {\n if (document.getElementById('s25-live')) {\n return;\n }\n\n const live = document.createElement('div');\n live.setAttribute('id', 's25-live');\n live.setAttribute('class', 's25-offscreen s25-live');\n document.body.appendChild(live);\n\n const assertive = document.createElement('div');\n assertive.setAttribute('id', 's25-live-assertive');\n assertive.setAttribute('role', 'log');\n assertive.setAttribute('aria-live', 'assertive');\n assertive.setAttribute('aria-relevant', 'additions');\n live.appendChild(assertive);\n\n const polite = document.createElement('div');\n polite.setAttribute('id', 's25-live-polite');\n polite.setAttribute('role', 'log');\n polite.setAttribute('aria-live', 'polite');\n polite.setAttribute('aria-relevant', 'additions');\n live.appendChild(polite);\n}\n\nexport function assertively(message: string) {\n add(message, document.getElementById('s25-live-assertive')!);\n}\n\nexport function politely(message: string) {\n add(message, document.getElementById('s25-live-polite')!);\n}\n\nfunction add(message: string, container: HTMLElement) {\n const node = document.createElement('div');\n node.appendChild(document.createTextNode(message));\n container.appendChild(node);\n\n // clean up old nodes\n\n let collection = document.getElementById('s25-live-assertive')!;\n while (collection.firstChild && collection.firstChild !== node) {\n collection.removeChild(collection.firstChild);\n }\n collection = document.getElementById('s25-live-polite')!;\n while (collection.firstChild && collection.firstChild !== node) {\n collection.removeChild(collection.firstChild);\n }\n}\n","export interface Dictionary {\n valueAdded(itemLabel: string): string;\n noSearchResults(): string;\n searchResultsLoading(): string;\n removeButtonTitle(): string;\n clearButtonTitle(): string;\n minimumCharactersMessage(len: number, min: number): string;\n multiSelectInstructions(): string;\n}\n\nconst EN_US: Dictionary = {\n noSearchResults() {\n return 'No results available';\n },\n\n searchResultsLoading() {\n return 'Loading...';\n },\n\n removeButtonTitle() {\n return 'Remove selected values';\n },\n\n clearButtonTitle() {\n return 'Clear selection';\n },\n\n valueAdded(itemLabel: string) {\n return itemLabel + ' added';\n },\n\n minimumCharactersMessage(len: number, min: number) {\n const delta = min - len;\n return 'Please enter ' + delta + ' more character' + (delta > 1 ? 's' : '');\n },\n\n multiSelectInstructions(): string {\n return \"Items can be removed from this list box by selecting them and activating 'Remove selected values' button. Items can be added by selecting them in the adjacent combobox.\";\n }\n};\n\nconst dictionaries = new Map();\ndictionaries.set('en_us', EN_US);\n\nexport function getDictionary(dict?: string | undefined): Dictionary {\n const fallback: Dictionary = dictionaries.get('en_us') as Dictionary;\n\n if (!dict) {\n return fallback;\n }\n\n if (typeof dict === 'string') {\n const instance = dictionaries.get(dict);\n return instance ? instance : fallback;\n } else {\n return dict;\n }\n}\n","import { ComponentChild } from 'preact';\n\nexport function extend(...params: object[]) {\n for (let i = 1; i < arguments.length; i++) {\n for (const key in arguments[i]) {\n if (arguments[i].hasOwnProperty(key)) {\n if (typeof arguments[0][key] === 'object' && typeof arguments[i][key] === 'object') {\n extend(arguments[0][key], arguments[i][key]);\n } else {\n arguments[0][key] = arguments[i][key];\n }\n }\n }\n }\n return arguments[0];\n}\n\nexport type DeepPartial = {\n [P in keyof T]?: T[P] extends Array\n ? Array>\n : T[P] extends ReadonlyArray\n ? ReadonlyArray>\n : DeepPartial\n};\n\nexport const merge = (target: T, sources: Array>): T => {\n if (!sources.length) {\n return target;\n }\n const source = sources.shift();\n if (source === undefined) {\n return merge(target, sources);\n }\n\n if (isMergebleObject(target) && isMergebleObject(source)) {\n Object.keys(source).forEach((key: string) => {\n if (isMergebleObject(source[key])) {\n if (!target[key]) {\n target[key] = {};\n }\n merge(target[key], [source[key]]);\n } else {\n target[key] = source[key];\n }\n });\n }\n\n return merge(target, sources);\n};\n\nconst isObject = (item: any): boolean => {\n return item !== null && typeof item === 'object';\n};\n\nconst isMergebleObject = (item): boolean => {\n return isObject(item) && !Array.isArray(item);\n};\n\nexport function cn(...values: any) {\n const classes: string[] = [];\n const hasOwnProperty = {}.hasOwnProperty;\n\n for (const value of values) {\n if (typeof value === 'string') {\n classes.push(value);\n } else if (typeof value === 'object') {\n for (const key in value as object) {\n if (hasOwnProperty.call(value, key) && value[key]) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(' ');\n}\n\nexport enum Key {\n // https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight',\n Space = ' ',\n Enter = 'Enter',\n Tab = 'Tab',\n Home = 'Home',\n End = 'End',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n Backspace = 'Backspace',\n Delete = 'Delete',\n Clear = 'Clear',\n Escape = 'Escape',\n // IE 11\n Down = 'Down',\n Up = 'Up',\n Spacebar = 'Spacebar',\n Left = 'Left',\n Right = 'Right'\n}\n\nexport const uuid = (() => {\n let counter = 0;\n return () => 's25-' + counter++;\n})();\n\nexport function throttle(delay: number, callback: () => void): () => void {\n let timeout: number | undefined;\n return () => {\n if (timeout !== undefined) {\n window.clearTimeout(timeout);\n timeout = undefined;\n } else {\n timeout = window.setTimeout(() => {\n callback();\n timeout = undefined;\n }, delay);\n }\n };\n}\n\n// @ts-ignore\nexport function debounce(quiet: number, delegate: (...args: any[]) => void, that: object) {\n const args = Array.from(arguments);\n if (quiet <= 0) {\n return () => {\n delegate.apply(that, args);\n };\n } else {\n let timeout: number | undefined;\n return () => {\n if (timeout) {\n window.clearTimeout(timeout);\n }\n timeout = window.setTimeout(() => {\n timeout = undefined;\n delegate.apply(that, args);\n }, quiet);\n };\n }\n}\n\nexport function getScrollParents(el: HTMLElement): EventTarget[] {\n const style = window.getComputedStyle(el);\n const elementPosition = style.position;\n if (elementPosition === 'fixed') {\n return [el];\n }\n\n const parents: Array = [];\n let parent = el.parentElement;\n\n while (parent && parent.nodeType === 1) {\n const css = window.getComputedStyle(parent);\n if (/(overlay|scroll|auto)/.test(css.overflow + ' ' + css.overflowX + ' ' + css.overflowY)) {\n if (elementPosition !== 'absolute' || ['relative', 'fixed', 'absolute'].indexOf(css.position || '') >= 0) {\n parents.push(parent);\n }\n }\n parent = parent.parentElement;\n }\n\n if (el.ownerDocument) {\n parents.push(el.ownerDocument.body);\n }\n\n // iframe\n if (el.ownerDocument !== document && el.ownerDocument && el.ownerDocument.defaultView) {\n parents.push(el.ownerDocument.defaultView);\n }\n\n parents.push(window);\n return parents;\n}\n\nexport function calculateVerticalVisibility(\n container: HTMLElement,\n element: HTMLElement\n): 'hidden' | 'partial-top' | 'partial-bottom' | 'visible' {\n const c = container.getBoundingClientRect();\n const e = element.getBoundingClientRect();\n\n if (e.bottom < c.top) {\n // above the fold\n return 'hidden';\n }\n\n if (e.top > c.bottom) {\n // below the fold\n return 'hidden';\n }\n\n if (e.top < c.top && e.bottom <= c.bottom) {\n return 'partial-top';\n }\n\n if (e.top >= c.top && e.bottom > c.bottom) {\n return 'partial-bottom';\n }\n\n return 'visible';\n}\n\nexport type MouseEventListener = (event: MouseEvent) => void;\nexport type KeyboardEventListener = (event: KeyboardEvent) => void;\nexport type EventListener = (event: Event) => void;\nexport type FocusEventListener = (event: FocusEvent) => void;\n\n/** helper that makes it easier to declare a scope inside a jsx block */\nexport function scope(delegate: () => ComponentChild) {\n return delegate();\n}\n","import { Component, ComponentChild, h, h as createElement } from 'preact';\nimport * as announce from './announce';\nimport { Dictionary, getDictionary } from './dictionary';\nimport { DeepPartial, Key, merge, uuid } from './util';\nconst forceImportOfH = h;\n\ntype ToString = (item: any) => string;\n\nexport type DataItemRenderer = (string) | ((item: any, h: typeof createElement) => ComponentChild);\n\nexport type QueryFunction = (search: string, page: number, token: string) => Promise;\n\nexport interface DataItem {\n id: any;\n text: string;\n}\n\nexport interface QueryResult {\n values: DataItem[];\n more: boolean;\n token: string;\n}\n\nexport interface ResultListState {\n results: any[];\n token: string;\n active: number;\n page: number;\n\n showMinimumCharactersError: boolean;\n showNoSearchResultsFound: boolean;\n showLoadMoreResults: boolean;\n}\nexport interface State {\n search: string;\n results: ResultListState;\n loading: boolean;\n open: boolean;\n focused: boolean;\n}\n\nexport interface Props {\n containerStyle?: string;\n containerClass?: string;\n tabIndex?: number;\n valueContent?: DataItemRenderer;\n resultContent?: DataItemRenderer;\n\n query: QueryFunction;\n quiet?: number;\n allowDuplicates?: boolean;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n}\n\nfunction MarkupRenderer({ markup }) {\n return
;\n}\n\nexport const DEFAULT_PROPS: Partial = {\n allowDuplicates: false,\n minimumCharacters: 0,\n quiet: 50,\n tabIndex: 0\n};\n\nexport abstract class AbstractSelect

extends Component {\n private searchTimeout: number | undefined;\n protected namespace: string;\n\n constructor(props: P) {\n super(props);\n this.searchTimeout = undefined;\n this.namespace = uuid();\n // @ts-ignore\n this.state = {\n focused: false,\n loading: false,\n open: false,\n results: {\n active: -1,\n page: 0,\n results: undefined, // TODO rename to values\n token: null,\n\n showLoadMoreResults: false,\n showMinimumCharactersError: false,\n showNoSearchResultsFound: false\n },\n search: ''\n };\n }\n\n public getItemId = (item: DataItem): string => {\n return item.id;\n };\n\n public getItemLabel = (item: DataItem): string => {\n const label = item.text;\n return item.text;\n };\n\n public renderValue = (item: DataItem): ComponentChild => {\n return this.renderItem(item, 'valueContent');\n };\n\n public renderResult = (item: DataItem): ComponentChild => {\n return this.renderItem(item, 'resultContent');\n };\n\n private renderItem = (item: DataItem, rendererName: (keyof Props) & DataItemRenderer): ComponentChild => {\n const renderer = this.props[rendererName] as DataItemRenderer;\n if (renderer) {\n if (typeof renderer === 'function') {\n const render = renderer(item, createElement);\n if (typeof render === 'string') {\n return ;\n } else {\n return render;\n }\n } else {\n return ;\n }\n } else {\n return ;\n }\n };\n\n get dictionary(): Dictionary {\n const dict = this.props.dictionary;\n if (dict) {\n if (typeof dict === 'string') {\n return getDictionary(dict);\n } else {\n return dict as Dictionary;\n }\n } else {\n return getDictionary();\n }\n }\n\n protected updateState(update: DeepPartial | Array>, callback?: () => void) {\n const state = merge(this.state, Array.isArray(update) ? update : [update]);\n this.setState(state, callback);\n }\n\n public search = (query, selectedValues, start?: DeepPartial, callback?: () => void) => {\n const dictionary = this.dictionary;\n const { minimumCharacters, allowDuplicates, quiet, query: queryFunc } = this.props;\n\n const current = this.state.results;\n\n const minimumCharactersReached = query.length >= minimumCharacters;\n const token = minimumCharactersReached ? uuid() : undefined;\n\n const control = this;\n\n this.updateState(\n // @ts-ignore\n [\n start,\n {\n loading: minimumCharactersReached,\n results: {\n active: -1,\n page: 0,\n results: undefined,\n showLoadMoreResults: false,\n showMinimumCharactersError: !minimumCharactersReached,\n showNoSearchResultsFound: false,\n token\n },\n search: query\n }\n ],\n () => {\n if (callback) {\n callback();\n }\n\n if (!minimumCharactersReached) {\n // todo - throttle this announcement?\n announce.politely(dictionary.minimumCharactersMessage(query.length, minimumCharacters!));\n return;\n }\n\n // todo - throttle this announcement?\n // announce.politely(dictionary.searchResultsLoading());\n\n const execute = async () => {\n try {\n const result = await queryFunc(query, 0, token!);\n if (result.token !== control.state.results.token) {\n // this is a stale result, ignore\n return;\n }\n\n let values = result.values || [];\n if (!allowDuplicates && values.length > 0 && selectedValues.length > 0) {\n const ids = new Set();\n selectedValues.forEach(v => ids.add(control.getItemId(v)));\n values = values.filter(v => !ids.has(control.getItemId(v)));\n }\n\n if (values.length < 1) {\n announce.politely(dictionary.noSearchResults());\n }\n\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n active: values.length > 0 ? 0 : -1,\n page: 0,\n results: values,\n showLoadMoreResults: result.more,\n showNoSearchResultsFound: values.length < 1\n }\n });\n } catch (e) {\n // @ts-ignore\n control.updateState({ loading: false });\n }\n };\n\n if (quiet && quiet > 0) {\n if (control.searchTimeout) {\n window.clearTimeout(control.searchTimeout);\n }\n control.searchTimeout = window.setTimeout(execute, quiet);\n } else {\n execute();\n }\n }\n );\n };\n\n public loadMore() {\n const {\n loading,\n search: query,\n results: { page }\n } = this.state;\n const dict = this.dictionary;\n const { query: queryFunc } = this.props;\n const control = this;\n\n if (loading) {\n return;\n }\n\n const token = uuid();\n const nextPage = page + 1;\n\n this.updateState(\n // @ts-ignore\n {\n loading: true,\n results: {\n token\n }\n },\n async () => {\n // TODO throttle?\n // announce.politely(dict.searchResultsLoading());\n\n try {\n const result = await queryFunc(query, nextPage, token);\n\n const current = control.state.results;\n\n if (result.token !== current.token) {\n // this is a stale result, ignore\n return;\n }\n\n if (result.values && result.values.length > 0) {\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n page: nextPage,\n results: current.results.concat(result.values),\n showLoadMoreResults: result.more\n }\n });\n } else {\n announce.politely(dict.noSearchResults());\n // @ts-ignore\n control.updateState({\n loading: false,\n results: {\n showLoadMoreResults: false\n }\n });\n }\n } catch (e) {\n // @ts-ignore\n control.updateState({ loading: false });\n }\n }\n );\n }\n\n protected handleResultNavigationKeyDown(event: KeyboardEvent): boolean {\n switch (event.key) {\n case Key.ArrowUp:\n case Key.Up:\n this.selectPreviousSearchResult();\n event.preventDefault();\n return true;\n case Key.ArrowDown:\n case Key.Down:\n this.selectNextSearchResult();\n event.preventDefault();\n return true;\n }\n return false;\n }\n\n protected selectNextSearchResult() {\n const { active, results } = this.state.results;\n if (results && active < results.length - 1) {\n // @ts-ignore\n this.updateState({ results: { active: active + 1 } });\n }\n }\n\n protected selectPreviousSearchResult() {\n const { active } = this.state.results;\n if (active > 0) {\n // @ts-ignore\n this.updateState({ results: { active: active - 1 } });\n }\n }\n\n protected getSelectedSearchResult() {\n const { results, active } = this.state.results;\n return results[active];\n }\n\n protected selectSearchResult(index: number) {\n const { active } = this.state.results;\n if (active !== index) {\n // @ts-ignore\n this.updateState({ results: { active: index } });\n }\n }\n\n protected hasSearchResults() {\n const results = this.state.results.results;\n return results && results.length > 0;\n }\n}\n","import { Component, ComponentChild, Fragment, h, RefObject, render } from 'preact';\nimport { getScrollParents, MouseEventListener, throttle } from './util';\n\nclass ContextProvider extends Component<{ context: any }> {\n public getChildContext() {\n return this.props.context;\n }\n public render() {\n return this.props.children;\n }\n}\n\nfunction Portal({ vnode, container }): null {\n // @ts-ignore\n const wrap = {vnode};\n render(wrap, container);\n return null;\n}\n\nfunction createPortal(vnode, container): ComponentChild {\n return h(Portal, { vnode, container });\n}\n\ninterface Props {\n controlRef: RefObject;\n dropdownRef: RefObject;\n class?: string;\n onClick?: MouseEventListener;\n onMouseDown?: MouseEventListener;\n onFocusOut?: EventListener;\n}\n\nexport class Dropdown extends Component {\n private container?: HTMLElement;\n private scrollParents?: EventTarget[];\n private throttledPosition;\n\n constructor(props) {\n super(props);\n this.throttledPosition = throttle(50, this.position.bind(this));\n }\n\n public componentWillMount() {\n this.container = document.createElement('div');\n if (this.props.class) {\n this.container.className = this.props.class;\n }\n\n /*\n this container needs to be able to receive focus so we can tell\n it is not leaving the control - we consider dropdown part of the control\n */\n this.container.tabIndex = -1;\n if (this.props.onClick) {\n this.container.addEventListener('click', this.props.onClick);\n }\n if (this.props.onMouseDown) {\n this.container.addEventListener('mousedown', this.props.onMouseDown);\n }\n if (this.props.onFocusOut) {\n this.container.addEventListener('focusout', this.props.onFocusOut);\n }\n document.body.appendChild(this.container);\n }\n\n public componentDidMount() {\n this.props.dropdownRef.current = this.container;\n this.scrollParents = getScrollParents(this.props.controlRef.current!);\n this.scrollParents.forEach(parent => {\n ['resize', 'scroll', 'touchmove'].forEach(event => {\n parent.addEventListener(event, this.throttledPosition);\n });\n });\n this.position();\n }\n\n public componentWillUnmount() {\n if (this.scrollParents) {\n this.scrollParents.forEach(parent => {\n ['resize', 'scroll', 'touchmove'].forEach(event => {\n parent.removeEventListener(event, this.throttledPosition);\n });\n });\n delete this.scrollParents;\n this.scrollParents = undefined;\n }\n\n this.props.dropdownRef.current = undefined;\n this.container!.parentElement!.removeChild(this.container!);\n }\n\n public componentDidUpdate() {\n this.position();\n }\n\n public render(props) {\n return createPortal({this.props.children}, this.container!);\n }\n\n private position() {\n const control = this.props.controlRef.current!;\n const rect = control.getBoundingClientRect();\n const style = `top: ${rect.top + rect.height + window.pageYOffset}px;\n left: ${rect.left + window.pageXOffset}px;\n width: ${rect.width}px;`;\n this.container!.setAttribute('style', style);\n }\n}\n","import { FunctionComponent, h } from 'preact';\n\nconst forceImportOfH = h;\n\ninterface Props {\n width: number;\n height: number;\n}\n\nexport const Toggle: FunctionComponent = ({ height, width }) => {\n const viewBox = '0 0 ' + width + ' ' + height;\n return (\n \n \n \n );\n};\nToggle.displayName = 'Toggle';\n\nexport const Remove: FunctionComponent = ({ width, height }) => {\n const viewBox = '0 0 ' + width + ' ' + height;\n return (\n \n \n \n );\n};\nRemove.displayName = 'Remove';\n","export const enum style {\n control = 's25-control',\n content = 's25-content',\n single = 's25-single',\n multi = 's25-multi',\n body = 's25-body',\n focused = 's25-focused',\n active = 's25-active',\n live = 's25-live',\n multiValues = 's25-multi-values',\n value = 's25-value',\n item = 's25-item',\n selected = 's25-selected',\n toggle = 's25-toggle',\n remove = 's25-remove',\n open = 's25-open',\n label = 's25-label',\n search = 's25-search',\n offscreen = 's25-offscreen',\n searchContainer = 's25-search-container',\n dropdown = 's25-dropdown',\n searchResults = 's25-search-results',\n options = 's25-options',\n noSearchResults = 's25-no-search-results',\n searchResultsMessage = 's25-search-results-message',\n searchResultsLoading = 's25-search-results-loading',\n searchResultsMinimumError = 's25-search-results-minimum-error',\n hiddenAccessible = 's25-hidden-accessible',\n hidden = 's25-hidden',\n placeholder = 's25-placeholder',\n scroll = 's25-scroll'\n}\n","import { Component, ComponentChild, createRef, h, RefObject } from 'preact';\nimport { Dictionary } from './dictionary';\nimport { style } from './style';\nimport { calculateVerticalVisibility, cn } from './util';\n\nconst forceImportOfH = h;\n\n// TODO if upon render loading is visible signal loadmore\n\ninterface Props {\n // TODO consistenly call search a query\n namespace: string;\n search: string;\n listboxDomId?: string;\n results: any[];\n token: string;\n active: number;\n page: number;\n loading: boolean;\n\n itemLabel: (item: any) => string;\n renderItem: (item: any) => ComponentChild;\n\n dictionary: Dictionary;\n minimumCharacters: number;\n\n showMinimumCharactersError: boolean;\n showNoSearchResultsFound: boolean;\n showLoadMoreResults: boolean;\n\n onResultClicked: (result: any, event: MouseEvent) => void;\n onMouseMove: (index: any, event: MouseEvent) => void;\n onLoadMore: () => void;\n}\n\nexport class ResultList extends Component {\n private container: RefObject;\n private lastMouseClientX?: number;\n private lastMouseClientY?: number;\n private loadMore: RefObject;\n constructor(props) {\n super(props);\n this.container = createRef();\n this.loadMore = createRef();\n }\n\n private getResultDomId(index: number) {\n return this.props.namespace + index;\n }\n\n public render(props, state, context) {\n const { dictionary, minimumCharacters, showLoadMoreResults, results } = props;\n const query = this.props.search;\n\n return (\n

\n \n {props.loading && (\n
\n {dictionary.searchResultsLoading()}\n
\n )}\n {props.showNoSearchResultsFound && (\n
\n {dictionary.noSearchResults()}\n
\n )}\n {props.showMinimumCharactersError && (\n
\n {dictionary.minimumCharactersMessage(query.length, minimumCharacters)}\n
\n )}\n {results && results.length > 0 && (\n = 0 ? this.getResultDomId(props.active) : undefined}\n >\n {results.map((result, index) => {\n const label = props.itemLabel(result);\n const render = props.renderItem(result);\n const active = props.active === index;\n const css = cn(style.item, {\n [style.active]: active\n });\n const id = this.getResultDomId(index);\n return (\n \n
{render}
\n
\n );\n })}\n \n )}\n {props.showLoadMoreResults && (\n \n {dictionary.searchResultsLoading()}\n \n )}\n \n \n );\n }\n\n private onResultClicked = (result: any) => (event: MouseEvent) => {\n this.props.onResultClicked(result, event);\n };\n\n private onMouseMove = (index: number) => (event: MouseEvent) => {\n if (this.lastMouseClientX === event.clientX && this.lastMouseClientY === event.clientY) {\n // the mouse did not move, the dropdown was scrolled instead, we do not change selected element because\n // it will be scrolled into view and mess with the scrolling of the results in the dropdown\n return;\n }\n this.lastMouseClientX = event.clientX;\n this.lastMouseClientY = event.clientY;\n\n this.props.onMouseMove(index, event);\n };\n\n private onScroll = (event: Event) => {\n if (!this.props.showLoadMoreResults) {\n return;\n }\n const more = this.loadMore.current!;\n const drop = this.container.current!;\n\n const visibility = calculateVerticalVisibility(drop, more);\n if (visibility !== 'hidden') {\n this.props.onLoadMore();\n }\n };\n\n public componentDidUpdate(prevProps: Props, prevState: Props) {\n const { active, results, showLoadMoreResults } = this.props;\n const { active: prevActive } = prevProps;\n\n if (active !== prevActive) {\n if (active >= 0 && results && results.length > 0 && active === results.length - 1 && showLoadMoreResults) {\n // last result is selected and load more is shown, make sure it is scrolled into view\n\n const drop = this.container.current!;\n const el = this.loadMore.current!;\n\n drop.scrollTop = el.offsetTop + el.offsetHeight - drop.clientHeight;\n\n // console.log(\"scrolling to see load more\");//, setting scrolltop\", drop, el, el.offsetTop - drop.clientHeight);\n } else if (active >= 0) {\n // make sure it is scrolled into view\n const id = this.getResultDomId(active);\n const el = document.getElementById(id);\n if (el != null) {\n const drop = this.container!.current!;\n const c = drop.getBoundingClientRect();\n const e = el.getBoundingClientRect();\n\n if (e.top < c.top && e.bottom <= c.bottom) {\n const delta = c.top - e.top;\n drop.scrollTop = drop.scrollTop - delta;\n }\n\n if (e.top >= c.top && e.bottom > c.bottom) {\n const delta = e.bottom - c.bottom;\n drop.scrollTop = drop.scrollTop + delta;\n }\n }\n }\n }\n }\n}\n","import { createRef, Fragment, h, RefObject } from 'preact';\nimport {\n AbstractSelect,\n DataItem,\n DEFAULT_PROPS as ABSTRACT_DEFAULT_PROPS,\n Props as SearchControllerProps,\n State as AbstractSelectState\n} from './abstract-select';\nimport * as announce from './announce';\nimport { Dropdown } from './dropdown';\nimport { Remove, Toggle } from './icons';\nimport { ResultList } from './result-list';\nimport { style } from './style';\nimport { cn, extend, Key, scope } from './util';\n\nconst forceImportOfH = h;\n\nexport interface Props extends SearchControllerProps {\n valuesLabel: string;\n comboboxLabel: string;\n values: DataItem[];\n onChange: (values: DataItem[]) => void;\n}\n\ninterface ValueListState {\n active: number;\n selected: boolean[];\n}\n\ninterface State extends AbstractSelectState {\n values: ValueListState;\n}\n\nconst DEFAULT_PROPS = extend({}, ABSTRACT_DEFAULT_PROPS, { values: [] });\n\nexport class MultiSelect extends AbstractSelect {\n private containerRef: RefObject;\n private dropdownRef: RefObject;\n private bodyRef: RefObject;\n private valuesRef: RefObject;\n private searchRef: RefObject;\n\n public static defaultProps = DEFAULT_PROPS;\n\n constructor(props) {\n super(props);\n const { values } = props;\n\n this.valuesRef = createRef();\n this.searchRef = createRef();\n this.bodyRef = createRef();\n this.containerRef = createRef();\n this.dropdownRef = createRef();\n\n this.state = extend(this.state, {\n values: {\n active: -1,\n selected: values.map(v => false)\n }\n });\n }\n\n public componentWillMount() {\n announce.initialize();\n }\n\n public render(props, state) {\n const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel, placeholder } = props;\n const {\n open,\n loading,\n focused,\n search,\n values: { active, selected },\n results\n } = state;\n const dictionary = this.dictionary;\n\n let classes = cn(style.control, style.multi, { [style.open]: open }, { [style.focused]: focused });\n if (props.containerClass && props.containerClass.length > 0) {\n classes += ' ' + props.containerClass;\n }\n\n const instructionsDomId = this.namespace + '-instructions';\n const resultsDomId = this.namespace + '-results';\n const resultsNamespace = this.namespace + '-res-';\n return (\n \n \n
\n
\n {dictionary.multiSelectInstructions()}\n
\n {scope(() => {\n const activeDescendant = active >= 0 ? this.namespace + '-vl-' + active : undefined;\n if (values && values.length > 0) {\n return (\n \n {values.map((value: DataItem, index: number) => {\n const isSelected = selected[index];\n const isActive = active === index;\n const css = cn(style.item, {\n [style.selected]: isSelected,\n [style.active]: isActive\n });\n const id = this.namespace + '-vl-' + index;\n const label = this.getItemLabel(value);\n const render = this.renderValue(value);\n return (\n e.stopPropagation()}\n onClick={this.onValueClick(index)}\n >\n
{render}
\n
\n );\n })}\n \n );\n } else {\n return null;\n }\n })}\n {scope(() => {\n const disabled = !selected.find(x => x === true);\n const className = cn(style.remove, {\n [style.offscreen]: values.length < 1\n });\n return (\n \n \n \n \n \n );\n })}\n \n = 0 ? resultsNamespace + results.active : undefined}\n aria-busy={loading}\n onInput={this.onSearchInput}\n onKeyDown={this.onSearchKeyDown}\n onFocus={this.onSearchFocus}\n placeholder={placeholder}\n />\n
\n \n
\n \n \n {open && (\n \n \n \n )}\n
\n );\n }\n\n public componentDidMount() {\n const css = this.props.containerStyle;\n if (css && css.length > 0) {\n this.containerRef.current!.setAttribute('style', css);\n }\n }\n\n private onLoadMoreResults = () => {\n this.loadMore();\n };\n\n private focusSearchAndStopPropagation = (event: Event) => {\n this.searchRef.current!.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onToggleClick = (event: MouseEvent) => {\n const { open } = this.state;\n if (open) {\n this.close();\n this.searchRef.current!.focus();\n } else {\n this.search(this.state.search, this.props.values, { open: true });\n this.searchRef.current!.focus();\n }\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onBodyClick = (event: MouseEvent) => {\n if (event.target === this.bodyRef.current) {\n // if the element itself was clicked, (white space inside the body)\n this.searchRef.current!.focus();\n }\n };\n\n public onFocusIn = (event: FocusEvent) => {\n this.updateState({ focused: true });\n };\n\n public onFocusOut = (event: FocusEvent) => {\n const receiver = event.relatedTarget as Node;\n const container = this.containerRef.current!;\n const dropdown = this.dropdownRef.current!;\n const focused =\n container.contains(receiver) || (dropdown && (dropdown === receiver || dropdown.contains(receiver)));\n\n this.updateState({\n focused\n });\n if (!focused) {\n this.closeIfOpen();\n }\n };\n\n public onSearchFocus = (event: FocusEvent) => {\n const { openOnFocus } = this.props;\n const { open } = this.state;\n if (!open && openOnFocus) {\n this.search(this.searchRef.current!.value, this.props.values, { open: true });\n }\n };\n\n public onResultMouseMove = (index: number, event: MouseEvent) => {\n this.selectSearchResult(index);\n };\n\n public selectActiveResult = () => {\n this.selectResult(this.getSelectedSearchResult());\n };\n\n public selectResult = (result: any) => {\n const { values, onChange } = this.props;\n const next = values.slice();\n next.push(result);\n\n this.close();\n\n const label = this.getItemLabel(result);\n announce.politely(this.dictionary.valueAdded(label));\n\n onChange(next);\n };\n\n public toggleValue = (index: number) => {\n const {\n values: { selected }\n } = this.state;\n const next = selected.slice();\n next[index] = !next[index];\n this.updateState({ values: { selected: next, active: index } });\n };\n\n public onRemoveSelectedFocus = (event: FocusEvent) => {\n this.closeIfOpen();\n };\n\n public onRemoveSelectedClick = (event: Event) => {\n const {\n values: { selected }\n } = this.state;\n const { values, onChange } = this.props;\n const next = values.slice().filter((value, index) => !selected[index]);\n this.updateState({\n values: {\n selected: next.map(v => false)\n }\n });\n onChange(next);\n\n this.searchRef.current!.focus();\n };\n\n public onSearchInput = (event: Event) => {\n const value = (event.target as HTMLInputElement).value;\n this.search(value, this.props.values, { open: true });\n };\n\n public onSearchKeyDown = (event: KeyboardEvent) => {\n if (this.handleResultNavigationKeyDown(event)) {\n return;\n }\n\n const { open } = this.state;\n\n if (open && this.hasSearchResults) {\n switch (event.key) {\n case Key.Enter:\n this.selectActiveResult();\n event.preventDefault();\n break;\n case Key.Escape:\n if (open) {\n this.close();\n }\n event.preventDefault();\n break;\n }\n }\n };\n\n public onValueClick = (index: number) => (event: MouseEvent) => {\n this.toggleValue(index);\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onValuesFocus = (event: Event) => {\n const {\n values: { active, selected }\n } = this.state;\n const { values } = this.props;\n\n // highlight the first selected value\n if (active < 0 && values.length > 0) {\n let index = 0;\n for (let i = 0; i < selected.length; i++) {\n if (selected[i]) {\n index = i;\n break;\n }\n }\n this.updateState({ values: { active: index } });\n }\n this.closeIfOpen();\n };\n\n public closeIfOpen() {\n if (this.state.open) {\n this.close();\n }\n }\n\n public close = () => {\n this.updateState({\n open: false,\n results: { results: undefined },\n search: ''\n });\n };\n\n public onValuesBlur = (event: Event) => {\n this.updateState({ values: { active: -1 } });\n };\n\n public onValuesKeyDown = (event: KeyboardEvent) => {\n const active = this.state.values.active;\n const { values } = this.props;\n\n switch (event.key) {\n case Key.ArrowLeft:\n case Key.ArrowUp:\n case Key.Up:\n case Key.Left: {\n if (active > 0) {\n this.updateState({ values: { active: active - 1 } });\n }\n event.preventDefault();\n break;\n }\n case Key.ArrowRight:\n case Key.Right:\n case Key.ArrowDown:\n case Key.Down: {\n if (active < values.length - 1) {\n this.updateState({ values: { active: active + 1 } });\n }\n event.preventDefault();\n break;\n }\n case Key.PageDown: {\n // TODO\n event.preventDefault();\n break;\n }\n case Key.PageUp: {\n // TODO\n event.preventDefault();\n break;\n }\n case Key.Home: {\n this.updateState({ values: { active: 0 } });\n event.preventDefault();\n break;\n }\n case Key.End: {\n this.updateState({ values: { active: values.length - 1 } });\n event.preventDefault();\n break;\n }\n case Key.Space:\n case Key.Spacebar: {\n this.toggleValue(active);\n event.preventDefault();\n break;\n }\n }\n };\n\n public onDropdownClick = (event: MouseEvent) => {\n // result clicks do not make it this far because they do not propagate\n // so this click is on something other than result\n event.preventDefault();\n event.stopPropagation();\n this.searchRef.current!.focus();\n };\n\n public onResultClicked = (result: any, event: MouseEvent) => {\n this.selectResult(result);\n this.searchRef.current!.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n}\n","import { createRef, Fragment, h, RefObject } from 'preact';\nimport {\n AbstractSelect,\n DEFAULT_PROPS as ABSTRACT_DEFAULT_PROPS,\n Props as AbstractSelectProps,\n State as AbstractSelectState\n} from './abstract-select';\nimport * as announce from './announce';\nimport { Dropdown } from './dropdown';\nimport { Remove, Toggle } from './icons';\nimport { ResultList } from './result-list';\nimport { style } from './style';\nimport { cn, DeepPartial, extend, Key, scope } from './util';\n\nconst forceImportOfH = h;\n\nexport interface Props extends AbstractSelectProps {\n value: any;\n label: string;\n comboboxLabel: string;\n onChange: (value: any) => void;\n allowClear?: boolean;\n placeholder?: string;\n}\n\ninterface State extends AbstractSelectState {\n value: any;\n}\n\nconst DEFAULT_PROPS = extend({}, ABSTRACT_DEFAULT_PROPS, { allowClear: false });\n\nexport class SingleSelect extends AbstractSelect {\n private containerRef: RefObject;\n private dropdownRef: RefObject;\n private bodyRef: RefObject;\n private searchRef: RefObject;\n private valueRef: RefObject;\n\n public static defaultProps = DEFAULT_PROPS;\n\n constructor(props) {\n super(props);\n\n this.searchRef = createRef();\n this.bodyRef = createRef();\n this.containerRef = createRef();\n this.dropdownRef = createRef();\n this.valueRef = createRef();\n\n this.state = extend(this.state, { value: this.props.value });\n }\n\n public componentWillMount() {\n announce.initialize();\n }\n\n public render(props, state) {\n const { minimumCharacters, tabIndex, label, allowClear, placeholder } = props;\n const { value, open, loading, focused, search, results } = state;\n\n let classes = cn(style.control, style.single, { [style.open]: open }, { [style.focused]: focused });\n if (props.containerClass && props.containerClass.length > 0) {\n classes += ' ' + props.containerClass;\n }\n const resultsDomId = this.namespace + '-results';\n const optionDomId = this.namespace + '-val';\n const resultsNamespace = this.namespace + '-res-';\n const dictionary = this.dictionary;\n const showPlaceholder = !value && placeholder && placeholder.length > 0;\n const placeholderDomId = this.namespace + '-placeholder';\n return (\n \n \n
\n
\n )}\n {showPlaceholder && (\n
\n {placeholder}\n
\n )}\n \n {scope(() => {\n const disabled = !value;\n const clazz = cn(style.remove, { [style.offscreen]: !allowClear });\n return (\n \n \n \n \n \n );\n })}\n
\n \n
\n \n \n {open && (\n \n
\n = 0 ? resultsNamespace + results.active : undefined\n }\n aria-busy={loading}\n onInput={this.onSearchInput}\n onKeyDown={this.onSearchKeyDown}\n onFocus={this.onSearchFocus}\n />\n \n
\n \n )}\n
\n );\n }\n\n public componentDidMount() {\n const css = this.props.containerStyle;\n if (css && css.length > 0) {\n this.containerRef.current!.setAttribute('style', css);\n }\n }\n\n private onLoadMoreResults = () => {\n this.loadMore();\n };\n\n public onFocusIn = (event: FocusEvent) => {\n this.updateState({ focused: true });\n\n const { openOnFocus } = this.props;\n const { open } = this.state;\n if (!open && openOnFocus && this.searchRef.current !== document.activeElement) {\n this.open();\n }\n };\n\n public onFocusOut = (event: FocusEvent) => {\n const receiver = event.relatedTarget as Node;\n const container = this.containerRef.current;\n const dropdown = this.dropdownRef.current;\n const search = this.searchRef.current;\n\n const focused =\n container.contains(receiver) ||\n (dropdown && (dropdown === receiver || dropdown.contains(receiver))) ||\n receiver === search;\n\n if (this.state.focused !== focused) {\n this.updateState({\n focused\n });\n }\n if (!focused) {\n this.closeIfOpen();\n }\n };\n\n public closeIfOpen() {\n if (this.state.open) {\n this.close();\n }\n }\n\n public close = (state?: DeepPartial) => {\n const control = this;\n control.valueRef.current!.focus();\n this.updateState([\n state,\n {\n open: false,\n results: { results: null },\n search: ''\n }\n ]);\n };\n\n private getValueAsArray() {\n return this.state.value ? [this.state.value] : [];\n }\n\n private onContainerMouseDown = (event: MouseEvent) => {\n event.stopPropagation();\n event.preventDefault();\n if (this.state.open) {\n this.close();\n } else {\n this.open();\n }\n };\n\n private open(query: string = '') {\n this.search(query, this.getValueAsArray(), { open: true }, () => {\n this.searchRef.current.focus();\n });\n }\n\n private onSearchFocus = (event: FocusEvent) => {\n this.updateState({ focused: true });\n };\n\n private onSearchInput = (event: Event) => {\n const value = (event.target as HTMLInputElement).value;\n this.search(value, this.getValueAsArray());\n };\n\n private onClearFocus = (event: FocusEvent) => {\n this.closeIfOpen();\n };\n\n private onClearClick = (event: Event) => {\n this.selectResult(undefined);\n event.preventDefault();\n event.stopPropagation();\n };\n\n private onClearMouseDown = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n\n public onSearchKeyDown = (event: KeyboardEvent) => {\n if (this.handleResultNavigationKeyDown(event)) {\n return;\n }\n\n const { open } = this.state;\n\n if (open && this.hasSearchResults) {\n switch (event.key) {\n case Key.Enter:\n this.selectActiveResult();\n event.preventDefault();\n event.stopPropagation();\n break;\n case Key.Escape:\n this.close();\n event.preventDefault();\n event.stopPropagation();\n break;\n case Key.Tab:\n // TODO select on tab?\n this.close();\n event.preventDefault();\n event.stopPropagation();\n }\n }\n };\n\n public selectActiveResult = () => {\n const { active } = this.state.results;\n if (active >= 0) {\n this.selectResult(this.getSelectedSearchResult());\n }\n };\n\n public selectResult = (result: any) => {\n const { onChange } = this.props;\n\n this.close({ value: result });\n\n // TODO announce?\n // const label = this.getItemLabel(result);\n\n onChange(result);\n };\n\n private onValueKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case Key.Space:\n case Key.ArrowDown:\n case Key.Down:\n this.open();\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (event.key.length === 1) {\n // focus on search which will put the printable character into the field\n this.open();\n }\n };\n\n private onDropdownMouseDown = (event: MouseEvent) => {\n this.searchRef.current.focus();\n event.preventDefault();\n event.stopPropagation();\n };\n\n public onResultMouseMove = (index: number, event: MouseEvent) => {\n this.selectSearchResult(index);\n };\n\n public onResultClicked = (result: any, event: MouseEvent) => {\n this.selectResult(result);\n event.preventDefault();\n event.stopPropagation();\n };\n}\n","export class Store {\n private static stores = new WeakMap();\n\n private store = new Map();\n\n public get(key: string): any {\n return this.store.get(key);\n }\n public set(key: string, value: any) {\n this.store.set(key, value);\n }\n\n public static getStore(key: any): Store {\n let store = Store.stores.get(key);\n if (!store) {\n store = new Store();\n Store.stores.set(key, store);\n }\n return store;\n }\n\n public static hasStore(key: any) {\n return Store.stores.has(key);\n }\n\n public static removeStore(key: any) {\n Store.stores.delete(key);\n }\n}\n","/** jsx:pragma h */\nimport { Component, h, render } from 'preact';\nimport { DataItem, DataItemRenderer, QueryFunction } from '../../control/src/abstract-select';\nimport { Dictionary } from '../../control/src/dictionary';\nimport { MultiSelect } from '../../control/src/multi-select';\nimport '../../control/src/select25.scss';\nimport { SingleSelect } from '../../control/src/single-select';\nimport { extend } from '../../control/src/util';\nimport { Ajax, createQueryFromAjax } from './ajax';\nimport { createQueryFromData, DataFunction } from './data';\nimport { Store } from './store';\n\nconst forceImportOfH = h;\n\nenum StoreKeys {\n targetElement = 'te'\n}\n\ninterface BaseSelectOptions {\n containerStyle?: string;\n containerClass?: string;\n placeholder?: string;\n tabIndex?: number;\n valueContent?: DataItemRenderer;\n resultContent?: DataItemRenderer;\n query?: QueryFunction;\n data?: DataFunction;\n ajax?: Ajax;\n quiet?: number;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n}\n\ninterface MultiSelectOptions extends BaseSelectOptions {\n hiddenValue?: (values: DataItem[], options: MultiSelectOptions) => string;\n valuesLabel?: string;\n comboboxLabel?: string;\n allowDuplicates: boolean;\n values: DataItem[];\n}\n\ninterface SingleSelectOptions extends BaseSelectOptions {\n hiddenValue?: (value: DataItem, options: SingleSelectOptions) => string;\n label?: string;\n value: DataItem;\n allowClear?: boolean;\n}\n\nconst BASE_DEFAULT_OPTIONS = {\n dictionary: 'en_us',\n minimumCharacters: 0,\n openOnFocus: false\n};\n\nconst DEFAULT_MULTI_SELECT_OPTIONS = extend({}, BASE_DEFAULT_OPTIONS, {\n hiddenValue: (values: DataItem[], options: MultiSelectOptions) => {\n if (values && values.length > 0) {\n return values.map(item => item.id).join(',');\n } else {\n return '';\n }\n }\n});\n\nconst DEFAULT_SINGLE_SELECT_OPTIONS = extend({}, BASE_DEFAULT_OPTIONS, {\n allowClear: false,\n hiddenValue: (value: DataItem, options: SingleSelectOptions) => {\n if (value) {\n return value.id;\n } else {\n return '';\n }\n }\n});\n\nfunction triggerOnChange(element: HTMLElement, data: any) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent('change', false, true);\n event[data] = data;\n element.dispatchEvent(event);\n}\n\nclass MultiSelectWrapper extends Component<\n {\n element: HTMLInputElement;\n options: MultiSelectOptions;\n },\n { values?: DataItem[] }\n> {\n constructor(props) {\n super(props);\n this.state = { values: props.options.values || [] };\n }\n\n public componentDidUpdate() {\n this.setHiddenValue(this.state.values);\n }\n\n public componentDidMount() {\n this.setHiddenValue(this.state.values);\n }\n\n public render(props, state, context) {\n const opts = this.props.options;\n return (\n \n );\n }\n\n public onChange = (values: any[]) => {\n this.setState({ values });\n this.setHiddenValue(values);\n triggerOnChange(this.props.element, values);\n };\n\n private setHiddenValue(values: any) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(values, options);\n }\n}\n\nclass SingleSelectWrapper extends Component<\n {\n options: SingleSelectOptions;\n element: HTMLInputElement;\n },\n { value?: DataItem }\n> {\n constructor(props) {\n super(props);\n this.state = { value: props.options.value };\n }\n\n public componentDidMount() {\n this.setHiddenValue(this.state.value);\n }\n\n public componentDidUpdate() {\n this.setHiddenValue(this.state.value);\n }\n\n public render(props, state, context) {\n const opts = this.props.options;\n return (\n \n );\n }\n\n public onChange = (value: DataItem) => {\n this.setState({ value });\n this.setHiddenValue(value);\n triggerOnChange(this.props.element, value);\n };\n\n private setHiddenValue(value: DataItem) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(value, options);\n }\n}\n\nfunction createSingleSelect(element: HTMLInputElement, options: SingleSelectOptions) {\n options = extend({}, DEFAULT_SINGLE_SELECT_OPTIONS, options);\n fillBaseOptions(element, options);\n\n const store = Store.getStore(element);\n\n // create placeholder element into which the control will be rendered\n const parentElement = element.parentElement;\n const targetElement = document.createElement('div');\n parentElement.insertBefore(targetElement, element);\n store.set(StoreKeys.targetElement, targetElement);\n\n render(, parentElement, targetElement);\n}\n\nfunction createMultiSelect(element: HTMLInputElement, options: SingleSelectOptions) {\n options = extend({}, DEFAULT_MULTI_SELECT_OPTIONS, options);\n fillBaseOptions(element, options);\n\n const store = Store.getStore(element);\n\n // create placeholder element into which the control will be rendered\n const parentElement = element.parentElement;\n const targetElement = document.createElement('div');\n parentElement.insertBefore(targetElement, element);\n store.set(StoreKeys.targetElement, targetElement);\n\n render(, parentElement, targetElement);\n}\n\nfunction fillBaseOptions(element: HTMLInputElement, options: BaseSelectOptions) {\n if (!options.query) {\n if (options.ajax) {\n options.query = createQueryFromAjax(options.ajax);\n } else if (options.data) {\n options.query = createQueryFromData(options.data);\n }\n }\n\n if (!options.tabIndex && element.tabIndex) {\n options.tabIndex = element.tabIndex;\n }\n\n if (element.getAttribute('data-s25-container-style')) {\n let style = options.containerStyle || '';\n if (style.length > 0) {\n style += ';';\n }\n style += element.getAttribute('data-s25-container-style');\n options.containerStyle = style;\n }\n\n if (element.getAttribute('data-s25-container-class')) {\n let clazz = options.containerClass || '';\n if (clazz.length > 0) {\n clazz += ' ';\n }\n clazz += element.getAttribute('data-s25-container-class');\n options.containerClass = clazz;\n }\n}\n\nfunction destroy(element: HTMLElement) {\n if (!Store.hasStore(element)) {\n return;\n }\n const store = Store.getStore(element);\n const targetElement = store.get(StoreKeys.targetElement);\n const parentElement = element.parentElement;\n render(null, parentElement, targetElement);\n parentElement.removeChild(targetElement);\n Store.removeStore(element);\n}\n\nconst select25 = {\n createMultiSelect,\n createSingleSelect,\n destroy\n};\n\nexport { select25 };\n\ndeclare global {\n interface Window {\n select25: typeof select25;\n }\n}\n\nwindow.select25 = select25;\n","import { QueryFunction, QueryResult } from '../../control/src/abstract-select';\nimport { extend } from '../../control/src/util';\n\nexport interface Ajax {\n url: string;\n params: (term: string, page: number) => object;\n process: (data: string) => QueryResult;\n}\n\nexport function createQueryFromAjax(ajax: Ajax): QueryFunction {\n ajax = extend({}, ajax, {\n params(term: string, page: number) {\n return { term, page };\n },\n process(data: string) {\n const json = JSON.parse(data);\n return {\n more: json.more,\n values: json.values\n };\n }\n });\n\n return (term: string, page: number, token: string) => {\n return new Promise((resolve, reject) => {\n let url = ajax.url;\n const params = ajax.params(term, page);\n if (params) {\n let separator = url.indexOf('?') >= 0 ? '&' : '?';\n Object.entries(params).forEach(([key, value]) => {\n url += separator;\n separator = '&';\n url += encodeURIComponent(key) + '=' + encodeURIComponent(value);\n });\n }\n\n const request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.onload = () => {\n if (request.status >= 200 && request.status < 400) {\n const data = ajax.process(request.responseText);\n resolve({ values: data.values, more: data.more, token });\n } else {\n reject();\n }\n };\n request.onerror = reject;\n request.send();\n });\n };\n}\n","import { QueryFunction, QueryResult } from '../../control/src/abstract-select';\n\nexport interface DataParam {\n term: string;\n page: number;\n selected: any[];\n}\n\nexport interface DataResult {\n values: any[];\n more: boolean;\n}\n\nexport type DataFunction = (param: DataParam) => QueryResult;\n\nexport function createQueryFromData(callback: DataFunction): QueryFunction {\n return (term: string, page: number, token: string) => {\n return new Promise((resolve, reject) => {\n const data = callback({ term, page, selected: [] });\n resolve({ values: data.values, more: data.more, token });\n });\n };\n}\n"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","l","u","o","c","parentNode","removeChild","a","r","children","defaultProps","key","ref","h","type","props","__k","__p","__b","__e","__c","vnode","context","__d","debounceRendering","k","sort","__v","forceUpdate","m","w","x","N","appendChild","nextSibling","insertBefore","O","A","isArray","C","style","setProperty","replace","test","toLowerCase","slice","addEventListener","removeEventListener","options","selected","removeAttributeNS","setAttributeNS","removeAttribute","setAttribute","event","contextType","__E","render","T","sub","state","__n","__h","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","__r","__P","getChildContext","getSnapshotBeforeUpdate","base","componentDidUpdate","nodeType","localName","document","createTextNode","createElementNS","createElement","data","childNodes","dangerouslySetInnerHTML","__html","innerHTML","multiple","keys","j","diffed","z","$","current","unmount","componentWillUnmount","getDerivedStateFromError","setState","componentDidCatch","D","ownerSVGElement","initialize","getElementById","live","assertive","polite","politely","message","container","node","collection","firstChild","add","indexOf","bind","setTimeout","dictionaries","Map","getDictionary","dict","fallback","get","instance","extend","_i","params","set","noSearchResults","searchResultsLoading","removeButtonTitle","clearButtonTitle","valueAdded","itemLabel","minimumCharactersMessage","len","min","delta","multiSelectInstructions","Key","merge","target","sources","source","shift","undefined","isMergebleObject","forEach","item","isObject","cn","values","classes","values_1","_a","join","counter","uuid","scope","delegate","MarkupRenderer","DEFAULT_PROPS","allowDuplicates","minimumCharacters","quiet","tabIndex","tslib_1.__extends","Component","AbstractSelect","dictionary","update","callback","loading","query","page","queryFunc","control","token","nextPage","updateState","results","concat","showLoadMoreResults","more","announce.politely","ArrowUp","Up","selectPreviousSearchResult","preventDefault","ArrowDown","Down","selectNextSearchResult","active","index","_super","_this","id","text","renderItem","rendererName","renderer","markup","getItemLabel","selectedValues","start","minimumCharactersReached","showMinimumCharactersError","showNoSearchResultsFound","search","execute","ids_1","Set","getItemId","filter","has","searchTimeout","window","clearTimeout","namespace","focused","open","ContextProvider","Portal","Dropdown","class","className","onClick","onMouseDown","onFocusOut","dropdownRef","scrollParents","el","elementPosition","getComputedStyle","position","parents","parent","parentElement","css","overflow","overflowX","overflowY","ownerDocument","defaultView","getScrollParents","controlRef","throttledPosition","createPortal","Fragment","rect","getBoundingClientRect","top","height","pageYOffset","left","pageXOffset","width","delay","timeout","throttle","Toggle","viewBox","focusable","displayName","Remove","ResultList","onScroll","searchResults","searchResultsMessage","searchResultsMinimumError","role","listboxDomId","getResultDomId","map","onResultClicked","onMouseMove","content","loadMore","prevProps","drop","scrollTop","offsetTop","offsetHeight","clientHeight","bottom","lastMouseClientX","clientX","lastMouseClientY","clientY","element","calculateVerticalVisibility","onLoadMore","ABSTRACT_DEFAULT_PROPS","MultiSelect","announce.initialize","valuesLabel","comboboxLabel","placeholder","_c","multi","containerClass","instructionsDomId","resultsDomId","resultsNamespace","containerRef","onFocusCapture","onFocusIn","onBlurCapture","focusSearchAndStopPropagation","bodyRef","onBodyClick","offscreen","display","activeDescendant","valuesRef","multiValues","onFocus","onValuesFocus","onBlur","onValuesBlur","onKeyDown","onValuesKeyDown","isSelected","isActive","renderValue","stopPropagation","onValueClick","disabled","find","remove","onRemoveSelectedClick","onRemoveSelectedFocus","title","htmlFor","searchRef","onInput","onSearchInput","onSearchKeyDown","onSearchFocus","toggle","onToggleClick","dropdown","onDropdownClick","renderResult","onResultMouseMove","onLoadMoreResults","containerStyle","close","focus","receiver","relatedTarget","contains","closeIfOpen","openOnFocus","selectSearchResult","selectResult","getSelectedSearchResult","onChange","handleResultNavigationKeyDown","hasSearchResults","Enter","selectActiveResult","Escape","toggleValue","ArrowLeft","Left","ArrowRight","Right","PageDown","PageUp","Home","End","Space","Spacebar","allowClear","SingleSelect","single","optionDomId","showPlaceholder","placeholderDomId","onContainerMouseDown","valueRef","onValueKeyDown","onClearClick","onClearFocus","onClearMouseDown","onDropdownMouseDown","getValueAsArray","activeElement","Tab","StoreKeys","Store","store","stores","delete","WeakMap","BASE_DEFAULT_OPTIONS","DEFAULT_MULTI_SELECT_OPTIONS","hiddenValue","DEFAULT_SINGLE_SELECT_OPTIONS","triggerOnChange","createEvent","initEvent","dispatchEvent","MultiSelectWrapper","setHiddenValue","opts","valueContent","resultContent","SingleSelectWrapper","fillBaseOptions","ajax","term","process","json","JSON","parse","url","separator_1","entries","encodeURIComponent","request","XMLHttpRequest","onload","status","responseText","onerror","send","createQueryFromAjax","createQueryFromData","getAttribute","clazz","select25","createMultiSelect","getStore","targetElement","createSingleSelect","destroy","hasStore","removeStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qMAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAGrB,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,IAAIK,EAAW,WAQlB,OAPAA,EAAWZ,O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