diff --git a/BANNER.txt b/BANNER.txt new file mode 100644 index 00000000..e9fe94d9 --- /dev/null +++ b/BANNER.txt @@ -0,0 +1,22 @@ +Copyright <%= moment().format('YYYY') %> Igor Vaynberg and Select2 contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Bundle of <%= pkg.name %> +Generated: <%= moment().format('YYYY-MM-DD') %> +Version: <%= pkg.version %> +Dependencies: +<% _.forEach(dependencies, function (dependency) { %> + <%= dependency.name %> -- <%= dependency.version %> +<% }) %> \ No newline at end of file diff --git a/dist/select25.css b/dist/select25.css index 43a91cea..de0a3935 100644 --- a/dist/select25.css +++ b/dist/select25.css @@ -19,8 +19,11 @@ .s25-search { font-size: 100%; line-height: 24px; + box-shadow: none; + outline: 0; } .s25-search:focus { + box-shadow: none; outline: 0; } @@ -182,6 +185,7 @@ overflow-y: auto; position: relative; box-sizing: border-box; + max-height: 175px; } .s25-dropdown .s25-options { width: 100%; diff --git a/dist/select25.js b/dist/select25.js index 9772dbe8..d2f214ce 100644 --- a/dist/select25.js +++ b/dist/select25.js @@ -1,3 +1,29 @@ +/** + * Copyright 2019 Igor Vaynberg and Select2 contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit + * persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * 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 + * Version: 5.0.0-snapshot + * Dependencies: + * + * tslib -- 1.9.3 + * + * preact -- 10.0.0-beta.3 + */ + !(function(e, t) { 'object' == typeof exports && 'undefined' != typeof module ? t(exports) @@ -199,7 +225,7 @@ var t = l(e.type, e.props, e.key, null); return (t.__e = e.__e), t; } - function x(e, t) { + function I(e, t) { (this.props = e), (this.context = t); } function s(e) { @@ -216,7 +242,7 @@ ) e.__d && e.forceUpdate(!1); } - function I(e, t, n, o, r, s, a, i) { + function x(e, t, n, o, r, s, a, i) { var l, u, c, @@ -326,7 +352,7 @@ ? (v = (c = t.__c = n.__c).__p = c.__E) : (_.prototype && _.prototype.render ? (t.__c = c = new _(m, y)) - : ((t.__c = c = new x(m, y)), (c.constructor = _), (c.render = O)), + : ((t.__c = c = new I(m, y)), (c.constructor = _), (c.render = O)), g && g.sub(c), (c.props = m), c.state || (c.state = {}), @@ -379,7 +405,7 @@ for ( null != c.getChildContext && (o = S(S({}, o), c.getChildContext())), p || null == c.getSnapshotBeforeUpdate || (h = c.getSnapshotBeforeUpdate(d, f)), - I(e, t, n, o, r, s, a, l), + x(e, t, n, o, r, s, a, l), c.base = t.__e; (u = c.__h.pop()); @@ -418,7 +444,7 @@ null == s && ((c && u && c.__html == u.__html) || (e.innerHTML = (c && c.__html) || '')), d.multiple && (e.multiple = d.multiple), - I(e, t, n, o, 'foreignObject' !== t.type && r, s, a, w), + x(e, t, n, o, 'foreignObject' !== t.type && r, s, a, w), (function(e, t, n, o) { var r, s, @@ -545,12 +571,12 @@ })(e, document.getElementById('s25-live-polite')); } (b = {}), - (x.prototype.setState = function(e, t) { + (I.prototype.setState = function(e, t) { var n = (this.__s !== this.state && this.__s) || (this.__s = S({}, this.state)); ('function' == typeof e && !(e = e(n, this.props))) || S(n, e), null != e && this.__v && (t && this.__h.push(t), s(this)); }), - (x.prototype.forceUpdate = function(e) { + (I.prototype.forceUpdate = function(e) { var t, n, o, @@ -593,7 +619,7 @@ })(r)), e && e(); }), - (x.prototype.render = k), + (I.prototype.render = k), (n = []), (r = 'function' == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout), (u = /[A-Z]/g), @@ -642,20 +668,20 @@ }); var U, B, - H = function(t, e) { + j = function(t, e) { if (!e.length) return t; var n = e.shift(); return ( void 0 === n || - (j(t) && - j(n) && + (H(t) && + H(n) && Object.keys(n).forEach(function(e) { - j(n[e]) ? (t[e] || (t[e] = {}), H(t[e], [n[e]])) : (t[e] = n[e]); + H(n[e]) ? (t[e] || (t[e] = {}), j(t[e], [n[e]])) : (t[e] = n[e]); })), - H(t, e) + j(t, e) ); }, - j = function(e) { + H = function(e) { return ( (function(e) { return null !== e && 'object' == typeof e; @@ -704,7 +730,7 @@ } var Y, G = { allowDuplicates: !1, itemId: 'id', itemLabel: 'text', minimumCharacters: 0, quiet: 50, tabIndex: 0 }, - $ = (t(J, (Y = x)), + $ = (t(J, (Y = I)), Object.defineProperty(J.prototype, 'dictionary', { get: function() { var e = this.props.dictionary; @@ -714,7 +740,7 @@ configurable: !0 }), (J.prototype.updateState = function(e, t) { - var n = H(this.state, Array.isArray(e) ? e : [e]); + var n = j(this.state, Array.isArray(e) ? e : [e]); this.setState(n, t); }), (J.prototype.loadMore = function() { @@ -926,7 +952,7 @@ ); } var Z, - Q = (t(ee, (Z = x)), + Q = (t(ee, (Z = I)), (ee.prototype.getChildContext = function() { return this.props.context; }), @@ -943,7 +969,7 @@ return f(D(Q, { context: this.context }, t), n), null; } var ne, - oe = (t(re, (ne = x)), + oe = (t(re, (ne = I)), (re.prototype.componentWillMount = function() { (this.container = document.createElement('div')), this.props.class && (this.container.className = this.props.class), @@ -1089,9 +1115,10 @@ (le.searchResultsMinimumError = 's25-search-results-minimum-error'), (le.hiddenAccessible = 's25-hidden-accessible'), (le.hidden = 's25-hidden'), - (le.placeholder = 's25-placeholder'); + (le.placeholder = 's25-placeholder'), + (le.scroll = 's25-scroll'); var ue, - ce = (t(pe, (ue = x)), + ce = (t(pe, (ue = I)), (pe.prototype.getResultDomId = function(e) { return this.props.namespace + e; }), @@ -1107,13 +1134,7 @@ { class: ie.body }, D( 'div', - { - ref: this.container, - onScroll: this.onScroll, - class: ie.searchResults, - 'aria-busy': i.loading, - style: { maxHeight: '175px' } - }, + { ref: this.container, onScroll: this.onScroll, class: ie.searchResults, 'aria-busy': i.loading }, i.loading && D( 'div', @@ -1248,27 +1269,28 @@ s = e.tabIndex, a = e.minimumCharacters, i = e.valuesLabel, - l = (e.comboboxLabel, t.open), - c = t.loading, - p = t.focused, - d = t.search, - f = t.values, - h = f.active, - v = f.selected, - m = t.results, - g = this.dictionary, - y = q(ie.control, ie.multi, (((n = {})[ie.open] = l), n), (((o = {})[ie.focused] = p), o)); - e.containerClass && 0 < e.containerClass.length && (y += ' ' + e.containerClass); - var _ = this.namespace + '-instructions', - b = this.namespace + '-results', - w = this.namespace + '-res-'; + 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 && 0 < e.containerClass.length && (_ += ' ' + e.containerClass); + var b = this.namespace + '-instructions', + w = this.namespace + '-results', + R = this.namespace + '-res-'; return D( k, null, D( 'div', { - class: y, + class: _, ref: this.containerRef, onFocusCapture: this.onFocusIn, onBlurCapture: this.onFocusOut, @@ -1280,11 +1302,11 @@ { class: q(ie.body), ref: this.bodyRef, onClick: this.onBodyClick }, D( 'div', - { id: _, class: q(ie.offscreen), style: { display: 'none' } }, - g.multiSelectInstructions() + { id: b, class: q(ie.offscreen), style: { display: 'none' } }, + y.multiSelectInstructions() ), z(function() { - var e = 0 <= h ? u.namespace + '-vl-' + h : void 0; + var e = 0 <= v ? u.namespace + '-vl-' + v : void 0; return r && 0 < r.length ? D( 'div', @@ -1297,15 +1319,15 @@ 'aria-multiselectable': 'true', 'aria-activedescendant': e, 'aria-label': i, - 'aria-describedby': _, + 'aria-describedby': b, onFocus: u.onValuesFocus, onBlur: u.onValuesBlur, onKeyDown: u.onValuesKeyDown }, r.map(function(e, t) { var n, - o = v[t], - r = h === t, + o = m[t], + r = v === t, s = q(ie.item, (((n = {})[ie.selected] = o), (n[ie.active] = r), n)), a = u.namespace + '-vl-' + t, i = u.getItemLabel(e), @@ -1331,7 +1353,7 @@ }), z(function() { var e, - t = !v.find(function(e) { + t = !m.find(function(e) { return !0 === e; }); return D( @@ -1342,26 +1364,26 @@ onFocus: u.onRemoveSelectedFocus, disabled: t, 'aria-disabled': t, - title: g.removeButtonTitle() + title: y.removeButtonTitle() }, D('span', null, D(ae, { width: 20, height: 20 })) ); }), - D('label', { htmlFor: void 0, className: ie.offscreen }, e.comboboxLabel), + D('label', { htmlFor: void 0, className: ie.offscreen }, l), D('input', { type: 'text', ref: this.searchRef, - value: d, + value: f, class: q(ie.search), role: 'combobox', 'aria-label': e.comboboxLabel, 'aria-autocomplete': 'list', 'aria-haspopup': 'true', - 'aria-owns': b, - 'aria-controls': b, - 'aria-expanded': l ? 'true' : 'false', - 'aria-activedescendant': 0 <= m.active ? w + m.active : void 0, - 'aria-busy': c, + 'aria-owns': w, + 'aria-controls': w, + 'aria-expanded': c ? 'true' : 'false', + 'aria-activedescendant': 0 <= g.active ? R + g.active : void 0, + 'aria-busy': p, onInput: this.onSearchInput, onKeyDown: this.onSearchKeyDown, onFocus: this.onSearchFocus @@ -1373,7 +1395,7 @@ ) ) ), - l && + c && D( oe, { @@ -1386,17 +1408,17 @@ ce, C( { - namespace: w, + namespace: R, minimumCharacters: a, dictionary: this.dictionary, itemLabel: this.getItemLabel, renderItem: this.renderResult, - listboxDomId: b, - search: d + listboxDomId: w, + search: f }, this.state.results, { - loading: c, + loading: p, onResultClicked: this.onResultClicked, onMouseMove: this.onResultMouseMove, onLoadMore: this.onLoadMoreResults @@ -1882,7 +1904,7 @@ n.initEvent('change', !1, !0), (n[t] = t), e.dispatchEvent(n); } var De, - ke = (t(Me, (De = x)), + ke = (t(Me, (De = I)), (Me.prototype.componentDidUpdate = function() { this.setHiddenValue(this.state.values); }), @@ -1928,8 +1950,8 @@ t ); } - var xe, - Ie = (t(Le, (xe = x)), + var Ie, + xe = (t(Le, (Ie = I)), (Le.prototype.componentDidMount = function() { this.setHiddenValue(this.state.value); }), @@ -1968,7 +1990,7 @@ }), Le); function Le(e) { - var t = xe.call(this, e) || this; + var t = Ie.call(this, e) || this; return ( (t.onChange = function(e) { t.setState({ value: e }), t.setHiddenValue(e), Se(t.props.element, e); @@ -2032,20 +2054,20 @@ }; })(t.data))), !t.tabIndex && e.tabIndex && (t.tabIndex = e.tabIndex), - e.getAttribute('s25-style')) + e.getAttribute('data-s25-container-style')) ) { var o = t.containerStyle || ''; - 0 < o.length && (o += ';'), (o += e.getAttribute('s25-style')), (t.containerStyle = o); + 0 < o.length && (o += ';'), (o += e.getAttribute('data-s25-container-style')), (t.containerStyle = o); } - if (e.getAttribute('s25-class')) { + if (e.getAttribute('data-s25-container-class')) { var r = t.containerClass || ''; - 0 < r.length && (r += ' '), (r += e.getAttribute('s25-class')), (t.containerClass = r); + 0 < r.length && (r += ' '), (r += e.getAttribute('data-s25-container-class')), (t.containerClass = r); } var s = e.parentElement, a = document.createElement('div'); s.insertBefore(a, e), n.set(be.targetElement, a), - t.multiple ? f(D(ke, { element: e, options: t }), s, a) : f(D(Ie, { element: e, options: t }), s, a); + t.multiple ? f(D(ke, { element: e, options: t }), s, a) : f(D(xe, { element: e, options: t }), s, a); }, destroy: function(e) { if (we.hasStore(e)) { diff --git a/dist/select25.js.map b/dist/select25.js.map index 7effcb7b..83746579 100644 --- a/dist/select25.js.map +++ b/dist/select25.js.map @@ -1 +1 @@ -{"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() {\r\n if (document.getElementById('s25-live')) {\r\n return;\r\n }\r\n\r\n const live = document.createElement('div');\r\n live.setAttribute('id', 's25-live');\r\n live.setAttribute('class', 's25-offscreen s25-live');\r\n document.body.appendChild(live);\r\n\r\n const assertive = document.createElement('div');\r\n assertive.setAttribute('id', 's25-live-assertive');\r\n assertive.setAttribute('role', 'log');\r\n assertive.setAttribute('aria-live', 'assertive');\r\n assertive.setAttribute('aria-relevant', 'additions');\r\n live.appendChild(assertive);\r\n\r\n const polite = document.createElement('div');\r\n polite.setAttribute('id', 's25-live-polite');\r\n polite.setAttribute('role', 'log');\r\n polite.setAttribute('aria-live', 'polite');\r\n polite.setAttribute('aria-relevant', 'additions');\r\n live.appendChild(polite);\r\n}\r\n\r\nexport function assertively(message: string) {\r\n add(message, document.getElementById('s25-live-assertive')!);\r\n}\r\n\r\nexport function politely(message: string) {\r\n add(message, document.getElementById('s25-live-polite')!);\r\n}\r\n\r\nfunction add(message: string, container: HTMLElement) {\r\n const node = document.createElement('div');\r\n node.appendChild(document.createTextNode(message));\r\n container.appendChild(node);\r\n\r\n // clean up old nodes\r\n\r\n let collection = document.getElementById('s25-live-assertive')!;\r\n while (collection.firstChild && collection.firstChild !== node) {\r\n collection.removeChild(collection.firstChild);\r\n }\r\n collection = document.getElementById('s25-live-polite')!;\r\n while (collection.firstChild && collection.firstChild !== node) {\r\n collection.removeChild(collection.firstChild);\r\n }\r\n}\r\n","export interface Dictionary {\r\n valueAdded(itemLabel: string): string;\r\n noSearchResults(): string;\r\n searchResultsLoading(): string;\r\n removeButtonTitle(): string;\r\n clearButtonTitle(): string;\r\n minimumCharactersMessage(len: number, min: number): string;\r\n multiSelectInstructions(): string;\r\n}\r\n\r\nconst EN_US: Dictionary = {\r\n noSearchResults() {\r\n return 'No results available';\r\n },\r\n\r\n searchResultsLoading() {\r\n return 'Loading...';\r\n },\r\n\r\n removeButtonTitle() {\r\n return 'Remove selected values';\r\n },\r\n\r\n clearButtonTitle() {\r\n return 'Clear selection';\r\n },\r\n\r\n valueAdded(itemLabel: string) {\r\n return itemLabel + ' added';\r\n },\r\n\r\n minimumCharactersMessage(len: number, min: number) {\r\n const delta = min - len;\r\n return 'Please enter ' + delta + ' more character' + (delta > 1 ? 's' : '');\r\n },\r\n\r\n multiSelectInstructions(): string {\r\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.\";\r\n }\r\n};\r\n\r\nconst dictionaries = new Map();\r\ndictionaries.set('en_us', EN_US);\r\n\r\nexport function getDictionary(dict?: string | undefined): Dictionary {\r\n const fallback: Dictionary = dictionaries.get('en_us') as Dictionary;\r\n\r\n if (!dict) {\r\n return fallback;\r\n }\r\n\r\n if (typeof dict === 'string') {\r\n const instance = dictionaries.get(dict);\r\n return instance ? instance : fallback;\r\n } else {\r\n return dict;\r\n }\r\n}\r\n","import { ComponentChild } from 'preact';\r\n\r\nexport function extend(...params: object[]) {\r\n for (let i = 1; i < arguments.length; i++) {\r\n for (const key in arguments[i]) {\r\n if (arguments[i].hasOwnProperty(key)) {\r\n if (typeof arguments[0][key] === 'object' && typeof arguments[i][key] === 'object') {\r\n extend(arguments[0][key], arguments[i][key]);\r\n } else {\r\n arguments[0][key] = arguments[i][key];\r\n }\r\n }\r\n }\r\n }\r\n return arguments[0];\r\n}\r\n\r\nexport type DeepPartial = {\r\n [P in keyof T]?: T[P] extends Array\r\n ? Array>\r\n : T[P] extends ReadonlyArray\r\n ? ReadonlyArray>\r\n : DeepPartial\r\n};\r\n\r\nexport const merge = (target: T, sources: Array>): T => {\r\n if (!sources.length) {\r\n return target;\r\n }\r\n const source = sources.shift();\r\n if (source === undefined) {\r\n return merge(target, sources);\r\n }\r\n\r\n if (isMergebleObject(target) && isMergebleObject(source)) {\r\n Object.keys(source).forEach((key: string) => {\r\n if (isMergebleObject(source[key])) {\r\n if (!target[key]) {\r\n target[key] = {};\r\n }\r\n merge(target[key], [source[key]]);\r\n } else {\r\n target[key] = source[key];\r\n }\r\n });\r\n }\r\n\r\n return merge(target, sources);\r\n};\r\n\r\nconst isObject = (item: any): boolean => {\r\n return item !== null && typeof item === 'object';\r\n};\r\n\r\nconst isMergebleObject = (item): boolean => {\r\n return isObject(item) && !Array.isArray(item);\r\n};\r\n\r\nexport function cn(...values: any) {\r\n const classes: string[] = [];\r\n const hasOwnProperty = {}.hasOwnProperty;\r\n\r\n for (const value of values) {\r\n if (typeof value === 'string') {\r\n classes.push(value);\r\n } else if (typeof value === 'object') {\r\n for (const key in value as object) {\r\n if (hasOwnProperty.call(value, key) && value[key]) {\r\n classes.push(key);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return classes.join(' ');\r\n}\r\n\r\nexport enum Key {\r\n // https://www.w3.org/TR/uievents-key/#named-key-attribute-values\r\n ArrowDown = 'ArrowDown',\r\n ArrowUp = 'ArrowUp',\r\n ArrowLeft = 'ArrowLeft',\r\n ArrowRight = 'ArrowRight',\r\n Space = ' ',\r\n Enter = 'Enter',\r\n Tab = 'Tab',\r\n Home = 'Home',\r\n End = 'End',\r\n PageUp = 'PageUp',\r\n PageDown = 'PageDown',\r\n Backspace = 'Backspace',\r\n Delete = 'Delete',\r\n Clear = 'Clear',\r\n Escape = 'Escape',\r\n // IE 11\r\n Down = 'Down',\r\n Up = 'Up',\r\n Spacebar = 'Spacebar',\r\n Left = 'Left',\r\n Right = 'Right'\r\n}\r\n\r\nexport const uuid = (() => {\r\n let counter = 0;\r\n return () => 's25-' + counter++;\r\n})();\r\n\r\nexport function throttle(delay: number, callback: () => void): () => void {\r\n let timeout: number | undefined;\r\n return () => {\r\n if (timeout !== undefined) {\r\n window.clearTimeout(timeout);\r\n timeout = undefined;\r\n } else {\r\n timeout = window.setTimeout(() => {\r\n callback();\r\n timeout = undefined;\r\n }, delay);\r\n }\r\n };\r\n}\r\n\r\n// @ts-ignore\r\nexport function debounce(quiet: number, delegate: (...args: any[]) => void, that: object) {\r\n const args = Array.from(arguments);\r\n if (quiet <= 0) {\r\n return () => {\r\n delegate.apply(that, args);\r\n };\r\n } else {\r\n let timeout: number | undefined;\r\n return () => {\r\n if (timeout) {\r\n window.clearTimeout(timeout);\r\n }\r\n timeout = window.setTimeout(() => {\r\n timeout = undefined;\r\n delegate.apply(that, args);\r\n }, quiet);\r\n };\r\n }\r\n}\r\n\r\nexport function getScrollParents(el: HTMLElement): EventTarget[] {\r\n const style = window.getComputedStyle(el);\r\n const elementPosition = style.position;\r\n if (elementPosition === 'fixed') {\r\n return [el];\r\n }\r\n\r\n const parents: Array = [];\r\n let parent = el.parentElement;\r\n\r\n while (parent && parent.nodeType === 1) {\r\n const css = window.getComputedStyle(parent);\r\n if (/(overlay|scroll|auto)/.test(css.overflow + ' ' + css.overflowX + ' ' + css.overflowY)) {\r\n if (elementPosition !== 'absolute' || ['relative', 'fixed', 'absolute'].indexOf(css.position || '') >= 0) {\r\n parents.push(parent);\r\n }\r\n }\r\n parent = parent.parentElement;\r\n }\r\n\r\n if (el.ownerDocument) {\r\n parents.push(el.ownerDocument.body);\r\n }\r\n\r\n // iframe\r\n if (el.ownerDocument !== document && el.ownerDocument && el.ownerDocument.defaultView) {\r\n parents.push(el.ownerDocument.defaultView);\r\n }\r\n\r\n parents.push(window);\r\n return parents;\r\n}\r\n\r\nexport function calculateVerticalVisibility(\r\n container: HTMLElement,\r\n element: HTMLElement\r\n): 'hidden' | 'partial-top' | 'partial-bottom' | 'visible' {\r\n const c = container.getBoundingClientRect();\r\n const e = element.getBoundingClientRect();\r\n\r\n if (e.bottom < c.top) {\r\n // above the fold\r\n return 'hidden';\r\n }\r\n\r\n if (e.top > c.bottom) {\r\n // below the fold\r\n return 'hidden';\r\n }\r\n\r\n if (e.top < c.top && e.bottom <= c.bottom) {\r\n return 'partial-top';\r\n }\r\n\r\n if (e.top >= c.top && e.bottom > c.bottom) {\r\n return 'partial-bottom';\r\n }\r\n\r\n return 'visible';\r\n}\r\n\r\nexport type MouseEventListener = (event: MouseEvent) => void;\r\nexport type KeyboardEventListener = (event: KeyboardEvent) => void;\r\nexport type EventListener = (event: Event) => void;\r\nexport type FocusEventListener = (event: FocusEvent) => void;\r\n\r\n/** helper that makes it easier to declare a scope inside a jsx block */\r\nexport function scope(delegate: () => ComponentChild) {\r\n return delegate();\r\n}\r\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 ItemRenderer = (string) | ((item: any, h: typeof createElement) => ComponentChild);\n\nexport type QueryFunction = (search: string, page: number, token: string) => Promise;\n\nexport interface QueryResult {\n values: any[];\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 itemId: ToString | string;\n itemLabel: ToString | string;\n valueContent?: ItemRenderer;\n resultContent?: ItemRenderer;\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 itemId: 'id',\n itemLabel: 'text',\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: any): string => {\n const id = this.props.itemId;\n if (typeof id === 'function') {\n return (id as ToString)(item);\n } else {\n return '' + item[id];\n }\n };\n\n public getItemLabel = (item: any): string => {\n const label = this.props.itemLabel;\n if (typeof label === 'function') {\n return (label as ToString)(item);\n } else {\n return '' + item[label];\n }\n };\n\n public renderValue = (item: any): ComponentChild => {\n return this.renderItem(item, 'valueContent');\n };\n\n public renderResult = (item: any): ComponentChild => {\n return this.renderItem(item, 'resultContent');\n };\n\n private renderItem = (item: any, rendererName: keyof Props): ComponentChild => {\n const renderer = this.props[rendererName] as ItemRenderer;\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';\r\nimport { getScrollParents, MouseEventListener, throttle } from './util';\r\n\r\nclass ContextProvider extends Component<{ context: any }> {\r\n public getChildContext() {\r\n return this.props.context;\r\n }\r\n public render() {\r\n return this.props.children;\r\n }\r\n}\r\n\r\nfunction Portal({ vnode, container }): null {\r\n // @ts-ignore\r\n const wrap = {vnode};\r\n render(wrap, container);\r\n return null;\r\n}\r\n\r\nfunction createPortal(vnode, container): ComponentChild {\r\n return h(Portal, { vnode, container });\r\n}\r\n\r\ninterface Props {\r\n controlRef: RefObject;\r\n dropdownRef: RefObject;\r\n class?: string;\r\n onClick?: MouseEventListener;\r\n onMouseDown?: MouseEventListener;\r\n onFocusOut?: EventListener;\r\n}\r\n\r\nexport class Dropdown extends Component {\r\n private container?: HTMLElement;\r\n private scrollParents?: EventTarget[];\r\n private throttledPosition;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.throttledPosition = throttle(50, this.position.bind(this));\r\n }\r\n\r\n public componentWillMount() {\r\n this.container = document.createElement('div');\r\n if (this.props.class) {\r\n this.container.className = this.props.class;\r\n }\r\n\r\n /*\r\n this container needs to be able to receive focus so we can tell\r\n it is not leaving the control - we consider dropdown part of the control\r\n */\r\n this.container.tabIndex = -1;\r\n if (this.props.onClick) {\r\n this.container.addEventListener('click', this.props.onClick);\r\n }\r\n if (this.props.onMouseDown) {\r\n this.container.addEventListener('mousedown', this.props.onMouseDown);\r\n }\r\n if (this.props.onFocusOut) {\r\n this.container.addEventListener('focusout', this.props.onFocusOut);\r\n }\r\n document.body.appendChild(this.container);\r\n }\r\n\r\n public componentDidMount() {\r\n this.props.dropdownRef.current = this.container;\r\n this.scrollParents = getScrollParents(this.props.controlRef.current!);\r\n this.scrollParents.forEach(parent => {\r\n ['resize', 'scroll', 'touchmove'].forEach(event => {\r\n parent.addEventListener(event, this.throttledPosition);\r\n });\r\n });\r\n this.position();\r\n }\r\n\r\n public componentWillUnmount() {\r\n if (this.scrollParents) {\r\n this.scrollParents.forEach(parent => {\r\n ['resize', 'scroll', 'touchmove'].forEach(event => {\r\n parent.removeEventListener(event, this.throttledPosition);\r\n });\r\n });\r\n delete this.scrollParents;\r\n this.scrollParents = undefined;\r\n }\r\n\r\n this.props.dropdownRef.current = undefined;\r\n this.container!.parentElement!.removeChild(this.container!);\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.position();\r\n }\r\n\r\n public render(props) {\r\n return createPortal({this.props.children}, this.container!);\r\n }\r\n\r\n private position() {\r\n const control = this.props.controlRef.current!;\r\n const rect = control.getBoundingClientRect();\r\n const style = `top: ${rect.top + rect.height + window.pageYOffset}px;\r\n left: ${rect.left + window.pageXOffset}px;\r\n width: ${rect.width}px;`;\r\n this.container!.setAttribute('style', style);\r\n }\r\n}\r\n","import { FunctionComponent, h } from 'preact';\r\n\r\nconst forceImportOfH = h;\r\n\r\ninterface Props {\r\n width: number;\r\n height: number;\r\n}\r\n\r\nexport const Toggle: FunctionComponent = ({ height, width }) => {\r\n const viewBox = '0 0 ' + width + ' ' + height;\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\nToggle.displayName = 'Toggle';\r\n\r\nexport const Remove: FunctionComponent = ({ width, height }) => {\r\n const viewBox = '0 0 ' + width + ' ' + height;\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\nRemove.displayName = 'Remove';\r\n","export const enum style {\r\n control = 's25-control',\r\n content = 's25-content',\r\n single = 's25-single',\r\n multi = 's25-multi',\r\n body = 's25-body',\r\n focused = 's25-focused',\r\n active = 's25-active',\r\n live = 's25-live',\r\n multiValues = 's25-multi-values',\r\n value = 's25-value',\r\n item = 's25-item',\r\n selected = 's25-selected',\r\n toggle = 's25-toggle',\r\n remove = 's25-remove',\r\n open = 's25-open',\r\n label = 's25-label',\r\n search = 's25-search',\r\n offscreen = 's25-offscreen',\r\n searchContainer = 's25-search-container',\r\n dropdown = 's25-dropdown',\r\n searchResults = 's25-search-results',\r\n options = 's25-options',\r\n noSearchResults = 's25-no-search-results',\r\n searchResultsMessage = 's25-search-results-message',\r\n searchResultsLoading = 's25-search-results-loading',\r\n searchResultsMinimumError = 's25-search-results-minimum-error',\r\n hiddenAccessible = 's25-hidden-accessible',\r\n hidden = 's25-hidden',\r\n placeholder = 's25-placeholder'\r\n}\r\n","import { Component, ComponentChild, createRef, h, RefObject } from 'preact';\r\nimport { Dictionary } from './dictionary';\r\nimport { style } from './style';\r\nimport { calculateVerticalVisibility, cn } from './util';\r\n\r\nconst forceImportOfH = h;\r\n\r\n// TODO if upon render loading is visible signal loadmore\r\n\r\ninterface Props {\r\n // TODO consistenly call search a query\r\n namespace: string;\r\n search: string;\r\n listboxDomId?: string;\r\n results: any[];\r\n token: string;\r\n active: number;\r\n page: number;\r\n loading: boolean;\r\n\r\n itemLabel: (item: any) => string;\r\n renderItem: (item: any) => ComponentChild;\r\n\r\n dictionary: Dictionary;\r\n minimumCharacters: number;\r\n\r\n showMinimumCharactersError: boolean;\r\n showNoSearchResultsFound: boolean;\r\n showLoadMoreResults: boolean;\r\n\r\n onResultClicked: (result: any, event: MouseEvent) => void;\r\n onMouseMove: (index: any, event: MouseEvent) => void;\r\n onLoadMore: () => void;\r\n}\r\n\r\nexport class ResultList extends Component {\r\n private container: RefObject;\r\n private lastMouseClientX?: number;\r\n private lastMouseClientY?: number;\r\n private loadMore: RefObject;\r\n constructor(props) {\r\n super(props);\r\n this.container = createRef();\r\n this.loadMore = createRef();\r\n }\r\n\r\n private getResultDomId(index: number) {\r\n return this.props.namespace + index;\r\n }\r\n\r\n public render(props, state, context) {\r\n const { dictionary, minimumCharacters, showLoadMoreResults, results } = props;\r\n const query = this.props.search;\r\n\r\n return (\r\n

\r\n \r\n {props.loading && (\r\n
\r\n {dictionary.searchResultsLoading()}\r\n
\r\n )}\r\n {props.showNoSearchResultsFound && (\r\n
\r\n {dictionary.noSearchResults()}\r\n
\r\n )}\r\n {props.showMinimumCharactersError && (\r\n
\r\n {dictionary.minimumCharactersMessage(query.length, minimumCharacters)}\r\n
\r\n )}\r\n {results && results.length > 0 && (\r\n = 0 ? this.getResultDomId(props.active) : undefined}\r\n >\r\n {results.map((result, index) => {\r\n const label = props.itemLabel(result);\r\n const render = props.renderItem(result);\r\n const active = props.active === index;\r\n const css = cn(style.item, {\r\n [style.active]: active\r\n });\r\n const id = this.getResultDomId(index);\r\n return (\r\n \r\n
{render}
\r\n
\r\n );\r\n })}\r\n \r\n )}\r\n {props.showLoadMoreResults && (\r\n \r\n {dictionary.searchResultsLoading()}\r\n \r\n )}\r\n \r\n \r\n );\r\n }\r\n\r\n private onResultClicked = (result: any) => (event: MouseEvent) => {\r\n this.props.onResultClicked(result, event);\r\n };\r\n\r\n private onMouseMove = (index: number) => (event: MouseEvent) => {\r\n if (this.lastMouseClientX === event.clientX && this.lastMouseClientY === event.clientY) {\r\n // the mouse did not move, the dropdown was scrolled instead, we do not change selected element because\r\n // it will be scrolled into view and mess with the scrolling of the results in the dropdown\r\n return;\r\n }\r\n this.lastMouseClientX = event.clientX;\r\n this.lastMouseClientY = event.clientY;\r\n\r\n this.props.onMouseMove(index, event);\r\n };\r\n\r\n private onScroll = (event: Event) => {\r\n if (!this.props.showLoadMoreResults) {\r\n return;\r\n }\r\n const more = this.loadMore.current!;\r\n const drop = this.container.current!;\r\n\r\n const visibility = calculateVerticalVisibility(drop, more);\r\n if (visibility !== 'hidden') {\r\n this.props.onLoadMore();\r\n }\r\n };\r\n\r\n public componentDidUpdate(prevProps: Props, prevState: Props) {\r\n const { active, results, showLoadMoreResults } = this.props;\r\n const { active: prevActive } = prevProps;\r\n\r\n if (active !== prevActive) {\r\n if (active >= 0 && results && results.length > 0 && active === results.length - 1 && showLoadMoreResults) {\r\n // last result is selected and load more is shown, make sure it is scrolled into view\r\n\r\n const drop = this.container.current!;\r\n const el = this.loadMore.current!;\r\n\r\n drop.scrollTop = el.offsetTop + el.offsetHeight - drop.clientHeight;\r\n\r\n // console.log(\"scrolling to see load more\");//, setting scrolltop\", drop, el, el.offsetTop - drop.clientHeight);\r\n } else if (active >= 0) {\r\n // make sure it is scrolled into view\r\n const id = this.getResultDomId(active);\r\n const el = document.getElementById(id);\r\n if (el != null) {\r\n const drop = this.container!.current!;\r\n const c = drop.getBoundingClientRect();\r\n const e = el.getBoundingClientRect();\r\n\r\n if (e.top < c.top && e.bottom <= c.bottom) {\r\n const delta = c.top - e.top;\r\n drop.scrollTop = drop.scrollTop - delta;\r\n }\r\n\r\n if (e.top >= c.top && e.bottom > c.bottom) {\r\n const delta = e.bottom - c.bottom;\r\n drop.scrollTop = drop.scrollTop + delta;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","import { createRef, Fragment, h, RefObject } from 'preact';\nimport {\n AbstractSelect,\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: any[];\n onChange: (values: any[]) => 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: any, 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';\r\nimport {\r\n AbstractSelect,\r\n DEFAULT_PROPS as ABSTRACT_DEFAULT_PROPS,\r\n Props as AbstractSelectProps,\r\n State as AbstractSelectState\r\n} from './abstract-select';\r\nimport * as announce from './announce';\r\nimport { Dropdown } from './dropdown';\r\nimport { Remove, Toggle } from './icons';\r\nimport { ResultList } from './result-list';\r\nimport { style } from './style';\r\nimport { cn, DeepPartial, extend, Key, scope } from './util';\r\n\r\nconst forceImportOfH = h;\r\n\r\nexport interface Props extends AbstractSelectProps {\r\n value: any;\r\n label: string;\r\n comboboxLabel: string;\r\n onChange: (value: any) => void;\r\n allowClear?: boolean;\r\n placeholder?: string;\r\n}\r\n\r\ninterface State extends AbstractSelectState {\r\n value: any;\r\n}\r\n\r\nconst DEFAULT_PROPS = extend({}, ABSTRACT_DEFAULT_PROPS, { allowClear: false });\r\n\r\nexport class SingleSelect extends AbstractSelect {\r\n private containerRef: RefObject;\r\n private dropdownRef: RefObject;\r\n private bodyRef: RefObject;\r\n private searchRef: RefObject;\r\n private valueRef: RefObject;\r\n\r\n public static defaultProps = DEFAULT_PROPS;\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n this.searchRef = createRef();\r\n this.bodyRef = createRef();\r\n this.containerRef = createRef();\r\n this.dropdownRef = createRef();\r\n this.valueRef = createRef();\r\n\r\n this.state = extend(this.state, { value: this.props.value });\r\n }\r\n\r\n public componentWillMount() {\r\n announce.initialize();\r\n }\r\n\r\n public render(props, state) {\r\n const { minimumCharacters, tabIndex, label, allowClear, placeholder } = props;\r\n const { value, open, loading, focused, search, results } = state;\r\n\r\n let classes = cn(style.control, style.single, { [style.open]: open }, { [style.focused]: focused });\r\n if (props.containerClass && props.containerClass.length > 0) {\r\n classes += ' ' + props.containerClass;\r\n }\r\n const resultsDomId = this.namespace + '-results';\r\n const optionDomId = this.namespace + '-val';\r\n const resultsNamespace = this.namespace + '-res-';\r\n const dictionary = this.dictionary;\r\n const showPlaceholder = !value && placeholder && placeholder.length > 0;\r\n const placeholderDomId = this.namespace + '-placeholder';\r\n return (\r\n \r\n \r\n
\r\n
\r\n )}\r\n {showPlaceholder && (\r\n
\r\n {placeholder}\r\n
\r\n )}\r\n \r\n {scope(() => {\r\n const disabled = !value;\r\n const clazz = cn(style.remove, { [style.offscreen]: !allowClear });\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n })}\r\n
\r\n \r\n
\r\n \r\n \r\n {open && (\r\n \r\n
\r\n = 0 ? resultsNamespace + results.active : undefined\r\n }\r\n aria-busy={loading}\r\n onInput={this.onSearchInput}\r\n onKeyDown={this.onSearchKeyDown}\r\n onFocus={this.onSearchFocus}\r\n />\r\n \r\n
\r\n \r\n )}\r\n
\r\n );\r\n }\r\n\r\n public componentDidMount() {\r\n const css = this.props.containerStyle;\r\n if (css && css.length > 0) {\r\n this.containerRef.current!.setAttribute('style', css);\r\n }\r\n }\r\n\r\n private onLoadMoreResults = () => {\r\n this.loadMore();\r\n };\r\n\r\n public onFocusIn = (event: FocusEvent) => {\r\n this.updateState({ focused: true });\r\n\r\n const { openOnFocus } = this.props;\r\n const { open } = this.state;\r\n if (!open && openOnFocus && this.searchRef.current !== document.activeElement) {\r\n this.open();\r\n }\r\n };\r\n\r\n public onFocusOut = (event: FocusEvent) => {\r\n const receiver = event.relatedTarget as Node;\r\n const container = this.containerRef.current;\r\n const dropdown = this.dropdownRef.current;\r\n const search = this.searchRef.current;\r\n\r\n const focused =\r\n container.contains(receiver) ||\r\n (dropdown && (dropdown === receiver || dropdown.contains(receiver))) ||\r\n receiver === search;\r\n\r\n if (this.state.focused !== focused) {\r\n this.updateState({\r\n focused\r\n });\r\n }\r\n if (!focused) {\r\n this.closeIfOpen();\r\n }\r\n };\r\n\r\n public closeIfOpen() {\r\n if (this.state.open) {\r\n this.close();\r\n }\r\n }\r\n\r\n public close = (state?: DeepPartial) => {\r\n const control = this;\r\n control.valueRef.current!.focus();\r\n this.updateState([\r\n state,\r\n {\r\n open: false,\r\n results: { results: null },\r\n search: ''\r\n }\r\n ]);\r\n };\r\n\r\n private getValueAsArray() {\r\n return this.state.value ? [this.state.value] : [];\r\n }\r\n\r\n private onContainerMouseDown = (event: MouseEvent) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n if (this.state.open) {\r\n this.close();\r\n } else {\r\n this.open();\r\n }\r\n };\r\n\r\n private open(query: string = '') {\r\n this.search(query, this.getValueAsArray(), { open: true }, () => {\r\n this.searchRef.current.focus();\r\n });\r\n }\r\n\r\n private onSearchFocus = (event: FocusEvent) => {\r\n this.updateState({ focused: true });\r\n };\r\n\r\n private onSearchInput = (event: Event) => {\r\n const value = (event.target as HTMLInputElement).value;\r\n this.search(value, this.getValueAsArray());\r\n };\r\n\r\n private onClearFocus = (event: FocusEvent) => {\r\n this.closeIfOpen();\r\n };\r\n\r\n private onClearClick = (event: Event) => {\r\n this.selectResult(undefined);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n\r\n private onClearMouseDown = (event: Event) => {\r\n event.stopPropagation();\r\n event.preventDefault();\r\n };\r\n\r\n public onSearchKeyDown = (event: KeyboardEvent) => {\r\n if (this.handleResultNavigationKeyDown(event)) {\r\n return;\r\n }\r\n\r\n const { open } = this.state;\r\n\r\n if (open && this.hasSearchResults) {\r\n switch (event.key) {\r\n case Key.Enter:\r\n this.selectActiveResult();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n break;\r\n case Key.Escape:\r\n this.close();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n break;\r\n case Key.Tab:\r\n // TODO select on tab?\r\n this.close();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n }\r\n };\r\n\r\n public selectActiveResult = () => {\r\n const { active } = this.state.results;\r\n if (active >= 0) {\r\n this.selectResult(this.getSelectedSearchResult());\r\n }\r\n };\r\n\r\n public selectResult = (result: any) => {\r\n const { onChange } = this.props;\r\n\r\n this.close({ value: result });\r\n\r\n // TODO announce?\r\n // const label = this.getItemLabel(result);\r\n\r\n onChange(result);\r\n };\r\n\r\n private onValueKeyDown = (event: KeyboardEvent) => {\r\n switch (event.key) {\r\n case Key.Space:\r\n case Key.ArrowDown:\r\n case Key.Down:\r\n this.open();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n return;\r\n }\r\n\r\n if (event.key.length === 1) {\r\n // focus on search which will put the printable character into the field\r\n this.open();\r\n }\r\n };\r\n\r\n private onDropdownMouseDown = (event: MouseEvent) => {\r\n this.searchRef.current.focus();\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n\r\n public onResultMouseMove = (index: number, event: MouseEvent) => {\r\n this.selectSearchResult(index);\r\n };\r\n\r\n public onResultClicked = (result: any, event: MouseEvent) => {\r\n this.selectResult(result);\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n}\r\n","export class Store {\r\n private static stores = new WeakMap();\r\n\r\n private store = new Map();\r\n\r\n public get(key: string): any {\r\n return this.store.get(key);\r\n }\r\n public set(key: string, value: any) {\r\n this.store.set(key, value);\r\n }\r\n\r\n public static getStore(key: any): Store {\r\n let store = Store.stores.get(key);\r\n if (!store) {\r\n store = new Store();\r\n Store.stores.set(key, store);\r\n }\r\n return store;\r\n }\r\n\r\n public static hasStore(key: any) {\r\n return Store.stores.has(key);\r\n }\r\n\r\n public static removeStore(key: any) {\r\n Store.stores.delete(key);\r\n }\r\n}\r\n","/** jsx:pragma h */\nimport { Component, h, render } from 'preact';\nimport { ItemRenderer, 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 { DataFunction, createQueryFromData } from './data';\nimport { Store } from './store';\n\nconst forceImportOfH = h;\n\nenum StoreKeys {\n targetElement = 'te'\n}\n\nexport interface Options {\n multiple: boolean;\n containerStyle?: string;\n containerClass?: string;\n hiddenValue?: (values: any, options: Options) => string;\n tabIndex?: number;\n itemId: ((item: any) => string) | string;\n itemLabel: ((item: any) => string) | string;\n valueContent?: ItemRenderer;\n resultContent?: ItemRenderer;\n query?: QueryFunction;\n data?: DataFunction;\n ajax?: Ajax;\n quiet?: number;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n\n value: any;\n values: any[];\n allowClear?: boolean;\n placeholder?: string;\n\n /** Single Select Label */\n label?: string;\n\n /** Multi Select Selected Values Listbox Label */\n valuesLabel?: string;\n /** Multi Select Add Value Combobox Label */\n comboboxLabel?: string;\n\n allowDuplicates: boolean;\n}\n\nconst DEFAULT_OPTIONS = {\n allowClear: false,\n dictionary: 'en_us',\n hiddenValue: (values: any, options: Options) => {\n const id = (item: any) => {\n if (typeof options.itemId === 'function') {\n return options.itemId(item);\n } else {\n return '' + item[options.itemId];\n }\n };\n\n if (values) {\n if (Array.isArray(values)) {\n if (values.length > 0) {\n return values.map(id).join(',');\n } else {\n return '';\n }\n } else {\n return id(values);\n }\n } else {\n return '';\n }\n },\n itemId: 'id',\n itemLabel: 'text',\n minimumCharacters: 0,\n multiple: false,\n openOnFocus: false\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: Options;\n },\n { values: any }\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: Options;\n element: HTMLInputElement;\n },\n { value: any }\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: any) => {\n this.setState({ value });\n this.setHiddenValue(value);\n triggerOnChange(this.props.element, value);\n };\n\n private setHiddenValue(value: any) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(value, options);\n }\n}\n\nfunction create(element: HTMLInputElement, options: Options) {\n // TODO make sure we are attached to hidden input\n\n const store = Store.getStore(element);\n\n options = extend({}, DEFAULT_OPTIONS, options);\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('s25-style')) {\n let style = options.containerStyle || '';\n if (style.length > 0) {\n style += ';';\n }\n style += element.getAttribute('s25-style');\n options.containerStyle = style;\n }\n\n if (element.getAttribute('s25-class')) {\n let clazz = options.containerClass || '';\n if (clazz.length > 0) {\n clazz += ' ';\n }\n clazz += element.getAttribute('s25-class');\n options.containerClass = clazz;\n }\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\n store.set(StoreKeys.targetElement, targetElement);\n\n // render the replacement\n if (options.multiple) {\n render(, parentElement, targetElement);\n } else {\n render(, parentElement, targetElement);\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 create,\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","itemId","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","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","maxHeight","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","_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","comboboxLabel","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","DEFAULT_OPTIONS","hiddenValue","triggerOnChange","createEvent","initEvent","dispatchEvent","MultiSelectWrapper","setHiddenValue","opts","valueContent","resultContent","SingleSelectWrapper","select25","getStore","ajax","term","process","json","JSON","parse","url","separator_1","entries","encodeURIComponent","request","XMLHttpRequest","onload","status","responseText","onerror","send","createQueryFromAjax","createQueryFromData","getAttribute","clazz","targetElement","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,G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W,SAASG,cAAc,OAC7C2J,EAAczM,aAAa4Y,EAAe9I,GAE1CuG,EAAM1Q,IAAIwQ,GAAUyC,cAAeA,GAG/B/X,EAAQuC,SACR9B,EAAO5C,EAACqY,IAAmBjH,QAASA,EAASjP,QAASA,IAAa4L,EAAemM,GAElFtX,EAAO5C,EAAC0Y,IAAoBtH,QAASA,EAASjP,QAASA,IAAa4L,EAAemM,IAkBvFC,QAdJ,SAAiB/I,GACb,GAAKsG,GAAM0C,SAAShJ,GAApB,CAGA,IACM8I,EADQxC,GAAMkB,SAASxH,GACDxK,IAAI6Q,GAAUyC,eACpCnM,EAAgBqD,EAAQrD,cAC9BnL,EAAO,KAAMmL,EAAemM,GAC5BnM,EAActO,YAAYya,GAC1BxC,GAAM2C,YAAYjJ,MAgBtB1E,OAAOiM,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 ItemRenderer = (string) | ((item: any, h: typeof createElement) => ComponentChild);\n\nexport type QueryFunction = (search: string, page: number, token: string) => Promise;\n\nexport interface QueryResult {\n values: any[];\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 itemId: ToString | string;\n itemLabel: ToString | string;\n valueContent?: ItemRenderer;\n resultContent?: ItemRenderer;\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 itemId: 'id',\n itemLabel: 'text',\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: any): string => {\n const id = this.props.itemId;\n if (typeof id === 'function') {\n return (id as ToString)(item);\n } else {\n return '' + item[id];\n }\n };\n\n public getItemLabel = (item: any): string => {\n const label = this.props.itemLabel;\n if (typeof label === 'function') {\n return (label as ToString)(item);\n } else {\n return '' + item[label];\n }\n };\n\n public renderValue = (item: any): ComponentChild => {\n return this.renderItem(item, 'valueContent');\n };\n\n public renderResult = (item: any): ComponentChild => {\n return this.renderItem(item, 'resultContent');\n };\n\n private renderItem = (item: any, rendererName: keyof Props): ComponentChild => {\n const renderer = this.props[rendererName] as ItemRenderer;\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 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: any[];\n onChange: (values: any[]) => 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: any, 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 { ItemRenderer, 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\nexport interface Options {\n multiple: boolean;\n containerStyle?: string;\n containerClass?: string;\n hiddenValue?: (values: any, options: Options) => string;\n tabIndex?: number;\n itemId: ((item: any) => string) | string;\n itemLabel: ((item: any) => string) | string;\n valueContent?: ItemRenderer;\n resultContent?: ItemRenderer;\n query?: QueryFunction;\n data?: DataFunction;\n ajax?: Ajax;\n quiet?: number;\n minimumCharacters?: number;\n openOnFocus?: boolean;\n dictionary?: string | Dictionary;\n\n value: any;\n values: any[];\n allowClear?: boolean;\n placeholder?: string;\n\n /** Single Select Label */\n label?: string;\n\n /** Multi Select Selected Values Listbox Label */\n valuesLabel?: string;\n /** Multi Select Add Value Combobox Label */\n comboboxLabel?: string;\n\n allowDuplicates: boolean;\n}\n\nconst DEFAULT_OPTIONS = {\n allowClear: false,\n dictionary: 'en_us',\n hiddenValue: (values: any, options: Options) => {\n const id = (item: any) => {\n if (typeof options.itemId === 'function') {\n return options.itemId(item);\n } else {\n return '' + item[options.itemId];\n }\n };\n\n if (values) {\n if (Array.isArray(values)) {\n if (values.length > 0) {\n return values.map(id).join(',');\n } else {\n return '';\n }\n } else {\n return id(values);\n }\n } else {\n return '';\n }\n },\n itemId: 'id',\n itemLabel: 'text',\n minimumCharacters: 0,\n multiple: false,\n openOnFocus: false\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: Options;\n },\n { values: any }\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: Options;\n element: HTMLInputElement;\n },\n { value: any }\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: any) => {\n this.setState({ value });\n this.setHiddenValue(value);\n triggerOnChange(this.props.element, value);\n };\n\n private setHiddenValue(value: any) {\n const { element, options } = this.props;\n element.value = options.hiddenValue(value, options);\n }\n}\n\nfunction create(element: HTMLInputElement, options: Options) {\n // TODO make sure we are attached to hidden input\n\n const store = Store.getStore(element);\n\n options = extend({}, DEFAULT_OPTIONS, options);\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 // 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\n store.set(StoreKeys.targetElement, targetElement);\n\n // render the replacement\n if (options.multiple) {\n render(, parentElement, targetElement);\n } else {\n render(, parentElement, targetElement);\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 create,\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","itemId","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","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","DEFAULT_OPTIONS","hiddenValue","triggerOnChange","createEvent","initEvent","dispatchEvent","MultiSelectWrapper","setHiddenValue","opts","valueContent","resultContent","SingleSelectWrapper","select25","getStore","ajax","term","process","json","JSON","parse","url","separator_1","entries","encodeURIComponent","request","XMLHttpRequest","onload","status","responseText","onerror","send","createQueryFromAjax","createQueryFromData","getAttribute","clazz","targetElement","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,KA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7X,EAAQ0P,gBAAkB,GACnB,EAAfmI,EAAMpd,SACNod,GAAS,KAEbA,GAAS7I,EAAQ4I,aAAa,4BAC9B5X,EAAQ0P,eAAiBmI,EAI7B,IAAMjM,EAAgBoD,EAAQpD,cACxBkM,EAAgBhW,SAASG,cAAc,OAC7C2J,EAAczM,aAAa2Y,EAAe9I,GAE1CuG,EAAMzQ,IAAIuQ,GAAUyC,cAAeA,GAG/B9X,EAAQuC,SACR9B,EAAO5C,EAACoY,IAAmBjH,QAASA,EAAShP,QAASA,IAAa4L,EAAekM,GAElFrX,EAAO5C,EAACyY,IAAoBtH,QAASA,EAAShP,QAASA,IAAa4L,EAAekM,IAkBvFC,QAdJ,SAAiB/I,GACb,GAAKsG,GAAM0C,SAAShJ,GAApB,CAGA,IACM8I,EADQxC,GAAMkB,SAASxH,GACDvK,IAAI4Q,GAAUyC,eACpClM,EAAgBoD,EAAQpD,cAC9BnL,EAAO,KAAMmL,EAAekM,GAC5BlM,EAActO,YAAYwa,GAC1BxC,GAAM2C,YAAYjJ,MAgBtBzE,OAAOgM,SAAWA"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5435d5c0..e0e8eebb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3682,6 +3682,12 @@ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, + "commenting": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/commenting/-/commenting-1.1.0.tgz", + "integrity": "sha512-YeNK4tavZwtH7jEgK1ZINXzLKm6DZdEMfsaaieOsCAN0S8vsY7UeuO3Q7d/M018EFgE+IeUAuBOKkFccBZsUZA==", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -8817,6 +8823,12 @@ } } }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -11102,6 +11114,31 @@ "inherits": "^2.0.1" } }, + "rollup": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.16.2.tgz", + "integrity": "sha512-UAZxaQvH0klYZdF+90xv9nGb+m4p8jdoaow1VL5/RzDK/gN/4CjvaMmJNcOIv1/+gtzswKhAg/467mzF0sLpAg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "^12.0.8", + "acorn": "^6.1.1" + }, + "dependencies": { + "@types/node": { + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.10.tgz", + "integrity": "sha512-LcsGbPomWsad6wmMNv7nBLw7YYYyfdYcz6xryKYQhx89c3XXan+8Q6AJ43G5XDIaklaVkK3mE4fCb0SBvMiPSQ==", + "dev": true + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + } + } + }, "rollup-plugin-babel": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", @@ -11125,6 +11162,19 @@ "rollup-pluginutils": "^2.7.0" } }, + "rollup-plugin-license": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-license/-/rollup-plugin-license-0.9.0.tgz", + "integrity": "sha512-/1PW3C1+xIeUsaSQdvRsMFu7Oqmou6ArLBy5vDfem1Yv8wEBGlJ4+izYTZn61Lq39srT+6bndK+zfYTz0CrXQQ==", + "dev": true, + "requires": { + "commenting": "1.1.0", + "lodash": "4.17.11", + "magic-string": "0.25.2", + "mkdirp": "0.5.1", + "moment": "2.24.0" + } + }, "rollup-plugin-node-resolve": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.0.1.tgz", diff --git a/package.json b/package.json index 75dfc43e..7845bed9 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,10 @@ "prettier": "^1.17.1", "pretty": "^2.0.0", "puppeteer": "^1.17.0", + "rollup": "^1.16.2", "rollup-plugin-babel": "^4.3.2", "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-license": "^0.9.0", "rollup-plugin-node-resolve": "^5.0.1", "rollup-plugin-replace": "^2.2.0", "rollup-plugin-scss": "^1.0.1", diff --git a/rollup.config.js b/rollup.config.js index 43acf0ba..f954772f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,6 +3,8 @@ import resolve from 'rollup-plugin-node-resolve'; import scss from 'rollup-plugin-scss'; import typescript from 'rollup-plugin-typescript'; import { uglify } from 'rollup-plugin-uglify'; +const license = require('rollup-plugin-license'); +const path = require('path'); export default [ // browser-friendly UMD build @@ -14,6 +16,13 @@ export default [ format: 'umd', sourcemap: true }, - plugins: [resolve(), commonjs(), typescript(), uglify(), scss()] + plugins: [ + resolve(), + commonjs(), + typescript(), + uglify(), + scss(), + license({ banner: { file: path.join(__dirname, 'BANNER.txt'), encoding: 'utf-8' } }) + ] } ];