@rocketspark/domain-checker 1.0.3 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.nvmrc +1 -1
  2. package/build/141.index.js +1 -1
  3. package/build/147.index.js +1 -1
  4. package/build/167.index.js +2 -2
  5. package/build/167.index.js.map +1 -1
  6. package/build/17.index.js +1 -1
  7. package/build/194.index.js +1 -1
  8. package/build/208.index.js +1 -1
  9. package/build/237.index.js +1 -1
  10. package/build/245.index.js +1 -1
  11. package/build/278.index.js +1 -1
  12. package/build/386.index.js +1 -1
  13. package/build/404.index.js +1 -1
  14. package/build/420.index.js +1 -1
  15. package/build/514.index.js +1 -1
  16. package/build/524.index.js +1 -1
  17. package/build/542.index.js +1 -1
  18. package/build/551.index.js +1 -1
  19. package/build/567.index.js +1 -1
  20. package/build/571.index.js +1 -1
  21. package/build/572.index.js +1 -1
  22. package/build/584.index.js +1 -1
  23. package/build/588.index.js +1 -1
  24. package/build/598.index.js +1 -1
  25. package/build/60.index.js +1 -1
  26. package/build/616.index.js +1 -1
  27. package/build/631.index.js +1 -1
  28. package/build/643.index.js +1 -1
  29. package/build/654.index.js +1 -1
  30. package/build/66.index.js +1 -1
  31. package/build/697.index.js +1 -1
  32. package/build/714.index.js +1 -1
  33. package/build/717.index.js +1 -1
  34. package/build/795.index.js +2 -2
  35. package/build/795.index.js.map +1 -1
  36. package/build/8.index.js +1 -1
  37. package/build/808.index.js +1 -1
  38. package/build/810.index.js +1 -1
  39. package/build/833.index.js +1 -1
  40. package/build/835.index.js +2 -2
  41. package/build/835.index.js.map +1 -1
  42. package/build/847.index.js +1 -1
  43. package/build/853.index.js +1 -1
  44. package/build/871.index.js +1 -1
  45. package/build/890.index.js +1 -1
  46. package/build/899.index.js +1 -1
  47. package/build/938.index.js +1 -1
  48. package/build/964.index.js +1 -1
  49. package/build/970.index.js +1 -1
  50. package/build/984.index.js +1 -1
  51. package/build/993.index.js +1 -1
  52. package/build/css/index.css +1 -1
  53. package/build/index.js +2 -2
  54. package/build/index.js.map +1 -1
  55. package/build/types/index.d.ts +1 -1
  56. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"795.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CAC1C,EAECG,EAAY,CAACC,EAAIC,EAAYC,KAC/B,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IAC/B,GAAIT,EAAcS,GAAM,CACpB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACbL,GAAiB,GAErBH,EAAUQ,IAAW,CACzB,KAECL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAC9EN,GAAiB,GAEjBA,IACAZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAAYnB,GAChB,EAEEoB,EAAuB,CAACC,EAAkBC,EAAWC,EAAWC,GAAU,MAEvEF,IAAaC,GAAeC,GACJ,OAArBH,IACAA,EAAiBI,MAAMC,QAAU,QACjC9B,YAAW,WACPyB,EAAiBI,MAAME,QAAU,GACrC,GAAG,KAEX,C,+NC3CJ,MAAMC,EACF,WAAAC,CAAYC,EAAQC,EAAQC,EAAS,KAAMC,EAAU,IACjDC,KAAKJ,OAASA,EACdI,KAAKH,OAASA,EACdG,KAAKF,OAASA,EACdE,KAAKD,QAAUA,EACfC,KAAKC,QAAWC,GAAa,KACzBA,EAASF,KAAK,CAEtB,CACA,OAAAlC,GACI,OAAOkC,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AAM,YAAa,GAIhDA,KAAKgL,QAAS,CAClB,CACA,SAAAC,GACIjL,KAAK+K,UAAUlI,KAAK7C,KAAKgL,OAC7B,CACA,MAAAvK,GACI,OAAQ,IAAAF,GAAE,EAAAqD,EAAM,CAAE/E,IAAK,2CAA4C2B,MAAO,CAClE,OAAUR,KAAKgL,UACd,IAAAzK,GAAE,aAAc,CAAE1B,IAAK,2CAA4CuG,KAAM,IAAK,IAAA7E,GAAE,OAAQ,CAAE1B,IAAK,8CAC5G,CACA,MAAIgC,GAAO,OAAO,IAAA+E,GAAW5F,KAAO,CACpC,mBAAWwJ,GAAa,MAAO,CAC3B,OAAU,CAAC,aACZ,GAEPsB,EAAWvL,MAzBW,sO","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/helpers-16362640.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-dropdown_5.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-def1ecaa.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-16362640.js.map","import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, f as forceUpdate } from './index-def1ecaa.js';\nimport { s as showCharacterCounter } from './helpers-16362640.js';\n\nclass Item {\n constructor(_value, _label, _style = null, _prefix = '') {\n this._value = _value;\n this._label = _label;\n this._style = _style;\n this._prefix = _prefix;\n this.onClick = (callback) => () => {\n callback(this);\n };\n }\n element() {\n return this._el;\n }\n value() {\n return this._value;\n }\n label() {\n return this._label;\n }\n prefixDisplay() {\n return this._prefix !== '' ? h(\"span\", { class: \"dropdown__prefix\" },\n \" \",\n this._prefix,\n \" / \") : '';\n }\n render(callback, selectedItem, isSelectMany) {\n return h(\"div\", { key: this.value(), ref: el => this._el = el, class: {\n 'dropdown__item': true,\n 'dropdown__item--selected': selectedItem,\n 'dropdown__item--select-many': isSelectMany,\n }, \"data-value\": this.value(), onClick: this.onClick(callback) }, isSelectMany ? (h(\"rs-checkbox\", { checked: selectedItem, style: {\n pointerEvents: 'none',\n } },\n this.prefixDisplay(),\n \" \",\n this._label)) : (h(\"rs-caption\", { style: Object.assign(Object.assign({}, this._style), { overflow: 'hidden', textOverflow: 'ellipsis' }) },\n this.prefixDisplay(),\n this._label)));\n }\n}\n\nconst rsDropdownCss = \"*{box-sizing:border-box;margin:0}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);background:var(--rs-color-white);cursor:pointer}.is-small .selected__container{padding:8px 12px}.is-large .selected__container{padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\\\"\\\";position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__prefix{color:var(--rs-color-grey-300)}.is-large .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.is-small .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd;position:relative}.dropdown__search-icon{position:absolute;top:50%;left:12px;transform:translateY(-50%);color:var(--rs-color-grey-300);z-index:1}.dropdown__search input{width:100%;padding:10px 10px 10px 40px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected:not(.dropdown__item--select-many),.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}\";\nconst RsDropdownStyle0 = rsDropdownCss;\n\nconst RsDropdown = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsChange = createEvent(this, \"rsChange\", 7);\n this.showDropdown = createEvent(this, \"showDropdown\", 7);\n this.hideDropdown = createEvent(this, \"hideDropdown\", 7);\n /**\n * The value of the selected items value key\n */\n this.value = null;\n /**\n * The items to display in the dropdown\n */\n this.items = [];\n /**\n * The type of dropdown to display\n */\n this.type = 'selectOne';\n /**\n * The size of the dropdown\n */\n this.size = 'large';\n /**\n * The max height of the dropdown items container\n */\n this.maxHeight = '300px';\n /**\n * Whether the dropdown is searchable\n */\n this.searchable = false;\n /**\n * The default text to display when a dropdown is rendered\n */\n this.placeholder = 'Choose an option';\n /**\n * If set, selects the corresponding item by default\n */\n this.selectedIndex = null;\n /**\n * If set, sets the max width of the dropdown container, px or % value\n */\n this.maxWidth = null;\n this.selectedItem = null;\n this.selectedItems = [];\n this.filterText = '';\n this.toggleDropdown = () => {\n var _a, _b;\n if (this._items.length === 0 && !this.hasActionTop) {\n return;\n }\n this.$container.classList.toggle('is-open');\n if (this.$container.classList.contains('is-open')) {\n this.showDropdown.emit();\n this.$itemContainer.scrollTop = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.element().offsetTop) - this.$itemContainer.offsetTop - ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.element().offsetHeight);\n }\n else {\n this.hideDropdown.emit();\n }\n };\n this.filterItems = (e) => {\n this.filterText = e.target.value;\n };\n this.selectItem = (item) => {\n if (this.type === 'selectOne') {\n this.selectedItem = item;\n this.value = item.value();\n this.closeDropdown();\n this.rsChange.emit(item.value());\n }\n else if (this.type === 'selectMany') {\n if (this.selectedItems.some((selected) => selected.value() == item.value())) {\n this.selectedItems = this.selectedItems.filter((selected) => selected.value() != item.value());\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n else {\n this.selectedItems = [...this.selectedItems, item]; // Can't use .push() or rerender won't happen\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n }\n };\n }\n async clear() {\n this.selectedItem = null;\n this.selectedItems = [];\n }\n render() {\n return h(Host, { key: '453ebe995d8af778d3e00d69e16f611485190817', tabindex: 0 }, h(\"div\", { key: '99cc4e291745a53cc6bfec98512bd26e31ded81a', class: `container is-${this.size}`, ref: el => this.$container = el }, h(\"div\", { key: '4ca92a7f28d201c34c1327f8afef34b4db1318a3', class: \"selected__container\", onClick: this.toggleDropdown }, this.renderSelected()), h(\"div\", { key: 'ad7370913dc6371935905c030a72ed81180b3eed', class: \"dropdown__container\", style: {\n maxWidth: this.maxWidth,\n } }, this.searchable ? this.renderSearch() : null, this.hasActionTop ? this.renderAction('top') : null, h(\"div\", { key: '5508779a331e8cf3345f9891f4e460dc6b835e7c', class: \"dropdown__items\", ref: el => this.$itemContainer = el, style: {\n maxHeight: this.maxHeight,\n } }, this.renderItems()))));\n }\n componentWillLoad() {\n this.hasActionTop = !!this.el.querySelector('[slot=\"action-top\"]');\n }\n componentWillRender() {\n var _a, _b, _c;\n let items;\n if (typeof this.items === 'string') {\n items = JSON.parse(this.items);\n }\n else {\n items = this.items;\n }\n this._items = items.map((item) => new Item(item.value, item.label, item.style, item.prefix));\n if (this.selectedItem === null && this.selectedIndex !== null) {\n this.selectedItem = (_a = this._items[this.selectedIndex]) !== null && _a !== void 0 ? _a : null;\n }\n if (this.value !== null) {\n if (this.type === 'selectOne') {\n const selected = (_b = this._items.find((item) => item.value() == this.value)) !== null && _b !== void 0 ? _b : null; // '==' required to support numeric values\n if (((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value()) !== (selected === null || selected === void 0 ? void 0 : selected.value())) {\n this.selectedItem = selected;\n }\n }\n else if (this.type === 'selectMany') {\n this.value = typeof this.value === 'string' ? JSON.parse(this.value) : this.value;\n this.selectedItems = this._items.filter((item) => this.value.includes(item.value()));\n }\n }\n }\n componentDidLoad() {\n window.addEventListener('mousedown', (e) => {\n if (e.composedPath().includes(this.el)) {\n return;\n }\n this.closeDropdown();\n });\n if (this.size === 'large') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '42px');\n }\n if (this.size === 'small') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '32px');\n }\n }\n renderSelected() {\n var _a;\n let label = this.placeholder;\n if (this.type === 'selectOne') {\n label = (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label();\n }\n else if (this.type === 'selectMany') {\n const labels = this.selectedItems.map((item) => item.label());\n if (labels.length === 1) {\n label = labels[0];\n }\n else if (labels.length > 1) {\n label = `${labels.slice(0, -1).join(', ')} & ${labels.slice(-1)}`;\n }\n }\n const content = label !== null && label !== void 0 ? label : this.placeholder;\n if (this.size === 'large') {\n return h(\"rs-content\", { class: \"dropdown__selected\", body: 2 }, content);\n }\n if (this.size === 'small') {\n return h(\"rs-caption\", { class: \"dropdown__selected\" }, content);\n }\n throw new Error(`Invalid size ${this.size}`);\n }\n renderItems() {\n if (this._items.length === 0) {\n return null;\n }\n const filtered = this._items\n .filter((item) => item.label().toLowerCase().includes(this.filterText.toLowerCase()));\n if (filtered.length === 0) {\n return h(\"div\", { class: \"dropdown__item dropdown__item--no-results\" }, \"No results found\");\n }\n return filtered.map((item) => {\n var _a;\n let isSelected = false;\n if (this.type === 'selectOne') {\n isSelected = item.value() == ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value());\n }\n else if (this.type === 'selectMany') {\n isSelected = this.selectedItems.some((selected) => selected.value() == item.value());\n }\n return item.render(this.selectItem, isSelected, this.type === 'selectMany');\n });\n }\n renderSearch() {\n return h(\"div\", { class: \"dropdown__search\" }, h(\"rs-icon\", { class: \"dropdown__search-icon\", name: \"search\" }), h(\"input\", { type: \"text\", onInput: this.filterItems }));\n }\n renderAction(position) {\n return h(\"div\", { class: `dropdown__action dropdown__action--${position}` }, h(\"slot\", { name: `action-${position}` }));\n }\n closeDropdown() {\n this.$container.classList.remove('is-open');\n }\n get el() { return getElement(this); }\n};\nRsDropdown.style = RsDropdownStyle0;\n\nconst inputCss = \".sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot=\\\"start\\\"]{margin-right:10px}.sc-rs-input-s>[slot=\\\"end\\\"]{margin-left:10px}\";\nconst RsInputStyle0 = inputCss;\n\nconst Input = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsInput = createEvent(this, \"rsInput\", 7);\n this.rsKeyDown = createEvent(this, \"rsKeyDown\", 7);\n this.rsInputChanged = createEvent(this, \"rsInputChanged\", 7);\n this.rsInputNoFocus = createEvent(this, \"rsInputNoFocus\", 7);\n this.rsInputFocus = createEvent(this, \"rsInputFocus\", 7);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n this.didBlurAfterEdit = false;\n this.hasStartSlot = false;\n this.hasEndSlot = false;\n /**\n * Checks if the input has focus or not.\n * Any changes on this property will cause the render function to be called again\n */\n this.hasFocus = false; // initially, input field will have no focus\n /**\n * Character counter.\n * Used for updating the text above the input field.\n */\n this.charsLeft = 0;\n /**\n * Possible values are: date, email, number, password, search, tel, text, url, time.\n * The type of control to display.\n */\n this.type = 'text';\n /**\n * The value of the input field.\n */\n this.value = '';\n /**\n * (optional)\n * Puts the input field in a disabled state.\n */\n this.disabled = false;\n /**\n * (optional)\n * Puts the input in a readonly state.\n */\n this.readonly = false;\n /**\n * If true, value will be cleared after focus upon edit.\n */\n this.clearOnEdit = false;\n /**\n * If true, an icon will appear in the input when there's a value. Clicking the icon clears the input.\n */\n this.clearInput = false;\n /**\n * If true, the user must enter a value before submitting the form.\n */\n this.required = false;\n /**\n * Hides the max number of characters and the character counter text above the input field.\n */\n this.hideMax = false;\n /**\n * (hard max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they won't be able to type anything in the input field anymore.\n */\n this.hardLimit = null;\n /**\n * (soft max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they will still be able to type something in the input field.\n * Character counter above the input field will display.\n */\n this.softLimit = null;\n /**\n * Sets the input field to an error state - border will change to red.\n */\n this.hasError = false;\n /**\n * Sets the alignment of the text inside the input field\n */\n this.textAlign = 'left';\n /**\n * Sets the size of the input field\n * @protected\n */\n this.size = 'default';\n /**\n * The function which gets called when user enters something in the input field\n * @param ev - event\n */\n this.onInput = (ev) => {\n const input = ev.target;\n if (input !== null) {\n this.value = input.value || '';\n }\n this.rsInput.emit(ev);\n };\n /**\n * The function which gets called when input is in focus\n */\n this.onFocus = () => {\n this.hasFocus = true; // this element has focus now\n this.focusChanged();\n this.emitRsItem(); // emit change in style - should have the primary color when on focus\n this.rsInputFocus.emit(); // emit input focus event\n };\n /**\n * The function which gets called when focus on the input changes\n */\n this.focusChanged = () => {\n if (!this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n };\n /**\n * The function which gets called id we want to clear value on edit\n */\n this.shouldClearOnEdit = () => {\n const { type, clearOnEdit } = this;\n return (clearOnEdit === undefined) ? type === 'password' : clearOnEdit;\n };\n /**\n * The function which gets called when the user presses a key\n */\n this.onKeyDown = (ev) => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n }\n this.didBlurAfterEdit = false;\n this.rsKeyDown.emit(ev);\n };\n /**\n * The function which gets called when we want to clear the value\n */\n this.clearTextInput = (ev) => {\n if (this.clearInput !== undefined &&\n !this.readonly &&\n !this.disabled &&\n ev !== undefined) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n this.value = '';\n /**\n * This is needed for clearOnEdit\n * Otherwise the value will not be cleared\n * if user is inside the input\n */\n if (this.nativeElement !== null) {\n this.nativeElement.value = '';\n }\n };\n /**\n * The function which gets called when input gets out of focus\n */\n this.onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n this.emitRsItem();\n this.rsInputNoFocus.emit();\n };\n }\n /**\n * Watch for any changes on the `disabled` property.\n */\n disabledChanged() {\n this.emitRsItem(); // disabled changed, emit change in styling\n }\n /**\n * Watch for any changes on the `value` property.\n */\n valueChanged() {\n this.emitRsItem(); // value changed, emit change in styling\n this.changeMaxLengthText();\n this.rsInputChanged.emit({ value: this.value == null ? this.value : this.value.toString() }); // emit change in input\n }\n hasErrorChanged() {\n this.emitRsItem();\n }\n /**\n * A method for re-rendering the input component\n */\n async update() {\n forceUpdate(this.el);\n }\n /**\n * A method for setting focus on the specified input field.\n */\n async setFocus() {\n if (this.nativeElement !== null) {\n this.nativeElement.focus(); // set focus\n }\n }\n /**\n * A method for getting the native `<input>` element used\n */\n getInputElement() {\n return Promise.resolve(this.nativeElement);\n }\n /**\n * Get the input's value\n */\n getValue() {\n return this.value || '';\n }\n /**\n * Check if the input has value\n */\n hasValue() {\n return this.getValue().length > 0;\n }\n /**\n * Emits `rsItem` event when the styles of the input change\n */\n emitRsItem() {\n this.rsItem.emit({\n 'input': true,\n 'interactive': true,\n 'has-focus': this.hasFocus,\n 'has-value': this.hasValue(),\n 'has-placeholder': this.placeholder !== null,\n 'has-error': this.hasError,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'interactive-disabled': this.disabled,\n 'input-has-start-slot': this.hasStartSlot,\n 'input-has-end-slot': this.hasEndSlot,\n 'input-chars-over-max': this.charsLeft < 0,\n 'input-is-required': this.required\n });\n }\n /**\n * As the user types something in the input field, if soft max is set, then we show a character counter above the input field.\n * This function is for updating the text above the input field.\n */\n changeMaxLengthText() {\n if ((this.softLimit !== null && this.softLimit > 0) && !this.hideMax) {\n const valueLength = this.value.length; // the number of characters the user entered\n this.charsLeft = this.softLimit - valueLength;\n const maxLengthText = this.el.querySelector('.max-length');\n if (maxLengthText !== null) {\n // if no. of characters entered by the user is over the set max characters\n if (this.charsLeft < 0) {\n maxLengthText.innerHTML = `${Math.abs(this.charsLeft)} over`;\n this.el.classList.add('input-chars-over-max');\n // if no. of characters entered by the user is NOT over the set max character\n }\n else {\n maxLengthText.innerHTML = `${this.charsLeft} left`;\n this.el.classList.remove('input-chars-over-max');\n }\n }\n }\n }\n dataAttributes() {\n return Object.keys(this.el.dataset).reduce((acc, key) => {\n acc[`data-${key}`] = this.el.dataset[key];\n return acc;\n }, {});\n }\n /**\n * This gets called once just after the component gets fully loaded\n * and after the first render occurred.\n */\n componentDidLoad() {\n if ((this.softLimit !== undefined || this.hardLimit !== undefined)) {\n const maxLength = this.el.querySelector('.max-length');\n showCharacterCounter(maxLength, this.hardLimit, this.softLimit, this.hideMax);\n this.changeMaxLengthText(); // the char count should reflect the initial value's char count\n }\n }\n connectedCallback() {\n this.hasStartSlot = this.el.querySelector('[slot=\"start\"]') !== null;\n this.hasEndSlot = this.el.querySelector('[slot=\"end\"]') !== null;\n this.emitRsItem();\n }\n /**\n * This renders the component\n */\n render() {\n const value = this.getValue();\n let maxLengthText = null;\n if ((this.hardLimit || this.softLimit) && !this.hideMax) {\n const maxLength = this.hardLimit || this.softLimit;\n maxLengthText = (h(\"span\", { key: '43796315f9cf5aee0f1416f9638c6023d18f371c', class: \"max-length\" }, maxLength, \" max\"));\n }\n return (h(Host, { key: 'ac76f2196206d4fc99a05f5c6a64ec5590f1e065', class: {\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'has-placeholder': this.placeholder !== null,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'chars-over-max': this.charsLeft < 0,\n 'has-error': this.hasError,\n [`text-align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true\n } }, maxLengthText, h(\"div\", { key: '549979b3c5ab691fcfa702fb43863db80835e6c1', class: \"rs-input__inner\" }, h(\"slot\", { key: 'f6fb85cf6533e447c22a7a2f615a721dcbeee5bb', name: \"start\" }), h(\"input\", Object.assign({ key: 'bcba32b735ac871b9ffbcd9c07c74f4d27bd50f5' }, this.dataAttributes(), { class: \"native-input\", ref: input => this.nativeElement = input, disabled: this.disabled, readonly: this.readonly, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, placeholder: this.placeholder, type: this.type, required: this.required, name: this.name, maxlength: this.hardLimit, min: this.min, max: this.max, value: value })), h(\"slot\", { key: '248265fc89456303f1a3ab57ed1d053e5248f35e', name: \"end\" }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"],\n \"hasError\": [\"hasErrorChanged\"]\n }; }\n};\nInput.style = RsInputStyle0;\n\nconst labelCss = \"rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}\";\nconst RsLabelStyle0 = labelCss;\n\nconst Label = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n /**\n * (optional)\n * Possible values are: primary or grey.\n */\n this.color = 'grey';\n /**\n * Possible values are: floating or fixed.\n * This determines where and how the label behaves inside an item\n */\n this.position = 'floating';\n }\n emitRsItem() {\n this.rsItem.emit({\n [`label-${this.position}`]: this.position !== null,\n 'has-label': true\n });\n }\n /**\n * This renders the component\n */\n render() {\n const position = this.position;\n this.emitRsItem();\n return (h(Host, { key: 'db0eb178ea17a5c03e6fcdb44d4ff1a2d260a98d', class: {\n [`label-${position}`]: position !== null,\n }, style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(\"slot\", { key: 'a82d3d4145672252fca96c96ef4292922a0f3646' })));\n }\n get el() { return getElement(this); }\n};\nLabel.style = RsLabelStyle0;\n\nconst toggleCss = \".toggle{display:block;padding:4px;background:var(--rs-color-select-background);box-shadow:inset 0 0 0 1px var(--rs-color-select-secondary);border-radius:4px;height:42px;box-sizing:border-box}.toggle__items{display:flex;flex-direction:row;position:relative;gap:4px}.active-tab{position:absolute;height:calc(100%);background:var(--rs-color-white);z-index:1;transition:left 0.15s ease-out;border-radius:2px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border), 0 1px 5px 0 rgb(195 213 226 / 0.62)}\";\nconst RsToggleStyle0 = toggleCss;\n\nconst Toggle = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.toggle = createEvent(this, \"toggle\", 7);\n this.currentPosition = 0;\n this.hasMovedActiveTab = false;\n this.renderToggleBar = () => {\n this.toggleItems = this.host.querySelectorAll('rs-toggle-item');\n this.activeTabElement.style.width = `calc(${(100 / this.toggleItems.length)}%)`;\n this.toggleItems.forEach((item, position) => {\n if (item.getAttribute('active') !== null) {\n this.moveActiveTab(position);\n }\n item.addEventListener('click', () => {\n if (this.currentPosition === position) {\n return;\n }\n this.moveActiveTab(position);\n this.removeAllActiveProp();\n item.setAttribute('active', 'true');\n this.emitToggleEvent();\n });\n item.addEventListener('activeSet', (e) => {\n if (e.detail) {\n this.moveActiveTab(position);\n }\n });\n });\n if (!this.hasMovedActiveTab) {\n this.moveActiveTab(0);\n }\n };\n }\n /**\n * Set the current active state of the toggle\n */\n async setActivePosition(position = 0) {\n this.removeAllActiveProp();\n this.moveActiveTab(position);\n this.emitToggleEvent();\n }\n removeAllActiveProp() {\n this.toggleItems.forEach(item => {\n item.removeAttribute('active');\n });\n }\n moveActiveTab(position) {\n this.activeTabElement.style.left = `calc(${(100 / this.toggleItems.length * position)}%)`;\n this.currentPosition = position;\n this.hasMovedActiveTab = true;\n }\n emitToggleEvent() {\n this.toggle.emit({ value: this.currentPosition, target: this.toggleItems[this.currentPosition] });\n }\n componentDidRender() {\n this.renderToggleBar();\n }\n render() {\n return (h(Host, { key: 'cdbdd9f9c8418f51bd7409429a57f036e06ece61' }, h(\"div\", { key: 'd614a83d569477128581b2e366c30de92faddac0', class: 'toggle' }, h(\"div\", { key: '2f2b50e33c7da270bb2826325c4c5c6ed8fa00da', class: 'toggle__items' }, h(\"slot\", { key: '8a675ed2c0e6558da3fdd3c149ff3df61c1df75d', onSlotchange: this.renderToggleBar }), h(\"div\", { key: 'e0b0d5d8a17106514f20c77aaa861b7f6b63fd9e', ref: el => this.activeTabElement = el, class: 'active-tab' })))));\n }\n get host() { return getElement(this); }\n};\nToggle.style = RsToggleStyle0;\n\nconst toggleItemCss = \":host{box-sizing:border-box;display:flex;padding:7px;text-align:center;z-index:2;cursor:pointer;user-select:none;flex:1 1 0;line-height:initial;justify-content:center;align-items:center;height:34px}:host(.active){cursor:default}\";\nconst RsToggleItemStyle0 = toggleItemCss;\n\nconst ToggleItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.activeSet = createEvent(this, \"activeSet\", 7);\n /**\n * If true, this item will be marked as active in the toggle\n */\n this.active = false;\n }\n setActive() {\n this.activeSet.emit(this.active);\n }\n render() {\n return (h(Host, { key: 'ea934495cbd83ebf06b2c0becc8db1a1f9ddd2f4', class: {\n 'active': this.active\n } }, h(\"rs-content\", { key: '127f1a8018cbdba9a91a90e2a5428dbe716aee70', body: 2 }, h(\"slot\", { key: '2c234c0a501c7d33cdf18aedf3d5cdc4cbc536e2' }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"active\": [\"setActive\"]\n }; }\n};\nToggleItem.style = RsToggleItemStyle0;\n\nexport { RsDropdown as rs_dropdown, Input as rs_input, Label as rs_label, Toggle as rs_toggle, ToggleItem as rs_toggle_item };\n\n//# sourceMappingURL=rs-dropdown_5.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","Item","constructor","_value","_label","_style","_prefix","this","onClick","callback","_el","value","label","prefixDisplay","h","class","render","selectedItem","isSelectMany","ref","el","checked","pointerEvents","assign","overflow","textOverflow","RsDropdown","hostRef","r","rsChange","c","showDropdown","hideDropdown","items","type","size","maxHeight","searchable","placeholder","selectedIndex","maxWidth","selectedItems","filterText","toggleDropdown","_a","_b","_items","hasActionTop","$container","classList","toggle","contains","emit","$itemContainer","scrollTop","offsetTop","offsetHeight","filterItems","e","selectItem","item","closeDropdown","some","selected","filter","map","clear","H","tabindex","renderSelected","renderSearch","renderAction","renderItems","componentWillLoad","querySelector","componentWillRender","_c","JSON","parse","prefix","find","includes","componentDidLoad","window","addEventListener","composedPath","setProperty","labels","slice","join","content","body","Error","filtered","isSelected","name","onInput","position","remove","g","Input","rsInput","rsKeyDown","rsInputChanged","rsInputNoFocus","rsInputFocus","rsItem","didBlurAfterEdit","hasStartSlot","hasEndSlot","hasFocus","charsLeft","disabled","readonly","clearOnEdit","clearInput","required","hasError","textAlign","input","onFocus","focusChanged","emitRsItem","hasValue","shouldClearOnEdit","onKeyDown","clearTextInput","preventDefault","stopPropagation","nativeElement","onBlur","disabledChanged","valueChanged","changeMaxLengthText","toString","hasErrorChanged","update","setFocus","focus","getInputElement","Promise","resolve","getValue","valueLength","maxLengthText","innerHTML","Math","abs","add","dataAttributes","dataset","reduce","acc","maxLength","s","connectedCallback","maxlength","min","max","watchers","Label","color","Toggle","currentPosition","hasMovedActiveTab","renderToggleBar","toggleItems","host","querySelectorAll","activeTabElement","width","getAttribute","moveActiveTab","removeAllActiveProp","setAttribute","emitToggleEvent","setActivePosition","removeAttribute","left","componentDidRender","onSlotchange","ToggleItem","activeSet","active","setActive"],"sourceRoot":""}
1
+ {"version":3,"file":"795.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CAC1C,EAECG,EAAY,CAACC,EAAIC,EAAYC,KAC/B,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IAC/B,GAAIT,EAAcS,GAAM,CACpB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACbL,GAAiB,GAErBH,EAAUQ,IAAW,CACzB,KAECL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAC9EN,GAAiB,GAEjBA,IACAZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAAYnB,GAChB,EAEEoB,EAAuB,CAACC,EAAkBC,EAAWC,EAAWC,GAAU,MAEvEF,IAAaC,GAAeC,GACJ,OAArBH,IACAA,EAAiBI,MAAMC,QAAU,QACjC9B,YAAW,WACPyB,EAAiBI,MAAME,QAAU,GACrC,GAAG,KAEX,C,+NC3CJ,MAAMC,EACF,WAAAC,CAAYC,EAAQC,EAA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KAAKmK,kBAClF,CACA,kBAAAgB,GACInL,KAAKqK,iBACT,CACA,MAAA5J,GACI,OAAQ,IAAAF,GAAE,EAAA0D,EAAM,CAAEpF,IAAK,6CAA8C,IAAA0B,GAAE,MAAO,CAAE1B,IAAK,2CAA4C2B,MAAO,WAAY,IAAAD,GAAE,MAAO,CAAE1B,IAAK,2CAA4C2B,MAAO,kBAAmB,IAAAD,GAAE,OAAQ,CAAE1B,IAAK,2CAA4CuM,aAAcpL,KAAKqK,mBAAoB,IAAA9J,GAAE,MAAO,CAAE1B,IAAK,2CAA4C+B,IAAKC,GAAMb,KAAKyK,iBAAmB5J,EAAIL,MAAO,iBAC5b,CACA,QAAI+J,GAAS,OAAO,IAAApE,GAAWnG,KAAO,GAE1CkK,EAAO3K,MAjEW,qfAmElB,MAGM8L,EAAa,MACf,WAAA1L,CAAYyB,IACR,IAAAC,GAAiBrB,KAAMoB,GACvBpB,KAAKsL,WAAY,IAAA/J,GAAYvB,KAAM,YAAa,GAIhDA,KAAKuL,QAAS,CAClB,CACA,SAAAC,GACIxL,KAAKsL,UAAUxI,KAAK9C,KAAKuL,OAC7B,CACA,MAAA9K,GACI,OAAQ,IAAAF,GAAE,EAAA0D,EAAM,CAAEpF,IAAK,2CAA4C2B,MAAO,CAClE,OAAUR,KAAKuL,UACd,IAAAhL,GAAE,aAAc,CAAE1B,IAAK,2CAA4C4G,KAAM,IAAK,IAAAlF,GAAE,OAAQ,CAAE1B,IAAK,8CAC5G,CACA,MAAIgC,GAAO,OAAO,IAAAsF,GAAWnG,KAAO,CACpC,mBAAW+J,GAAa,MAAO,CAC3B,OAAU,CAAC,aACZ,GAEPsB,EAAW9L,MAzBW,sO","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/helpers-16362640.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-dropdown_5.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-def1ecaa.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-16362640.js.map","import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, f as forceUpdate } from './index-def1ecaa.js';\nimport { s as showCharacterCounter } from './helpers-16362640.js';\n\nclass Item {\n constructor(_value, _label, _style = null, _prefix = '') {\n this._value = _value;\n this._label = _label;\n this._style = _style;\n this._prefix = _prefix;\n this.onClick = (callback) => () => {\n callback(this);\n };\n }\n element() {\n return this._el;\n }\n value() {\n return this._value;\n }\n label() {\n return this._label;\n }\n prefixDisplay() {\n return this._prefix !== '' ? h(\"span\", { class: \"dropdown__prefix\" },\n \" \",\n this._prefix,\n \" / \") : '';\n }\n render(callback, selectedItem, isSelectMany) {\n return h(\"div\", { key: this.value(), ref: el => this._el = el, class: {\n 'dropdown__item': true,\n 'dropdown__item--selected': selectedItem,\n 'dropdown__item--select-many': isSelectMany,\n }, \"data-value\": this.value(), onClick: this.onClick(callback) }, isSelectMany ? (h(\"rs-checkbox\", { checked: selectedItem, style: {\n pointerEvents: 'none',\n } },\n this.prefixDisplay(),\n \" \",\n this._label)) : (h(\"rs-caption\", { style: Object.assign(Object.assign({}, this._style), { overflow: 'hidden', textOverflow: 'ellipsis' }) },\n this.prefixDisplay(),\n this._label)));\n }\n}\n\nconst rsDropdownCss = \"*{box-sizing:border-box;margin:0}select{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;z-index:1}@media only screen and (width > 740px){select{display:none}}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);background:var(--rs-color-white);cursor:pointer}.is-small .selected__container{padding:8px 12px}.is-large .selected__container{padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\\\"\\\";position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__prefix{color:var(--rs-color-grey-300)}.is-large .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.is-small .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd;position:relative}.dropdown__search-icon{position:absolute;top:50%;left:12px;transform:translateY(-50%);color:var(--rs-color-grey-300);z-index:1}.dropdown__search input{width:100%;padding:10px 10px 10px 40px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected:not(.dropdown__item--select-many),.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}\";\nconst RsDropdownStyle0 = rsDropdownCss;\n\nconst RsDropdown = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsChange = createEvent(this, \"rsChange\", 7);\n this.showDropdown = createEvent(this, \"showDropdown\", 7);\n this.hideDropdown = createEvent(this, \"hideDropdown\", 7);\n /**\n * The value of the selected items value key\n */\n this.value = null;\n /**\n * The items to display in the dropdown\n */\n this.items = [];\n /**\n * The type of dropdown to display\n */\n this.type = 'selectOne';\n /**\n * The size of the dropdown\n */\n this.size = 'large';\n /**\n * The max height of the dropdown items container\n */\n this.maxHeight = '300px';\n /**\n * Whether the dropdown is searchable\n */\n this.searchable = false;\n /**\n * The default text to display when a dropdown is rendered\n */\n this.placeholder = 'Choose an option';\n /**\n * If set, selects the corresponding item by default\n */\n this.selectedIndex = null;\n /**\n * If set, sets the max width of the dropdown container, px or % value\n */\n this.maxWidth = null;\n /**\n * If true, uses the native <select> dropdown on mobile devices\n */\n this.useNativeMobile = false;\n this.selectedItem = null;\n this.selectedItems = [];\n this.filterText = '';\n this.toggleDropdown = () => {\n var _a, _b;\n if (this._items.length === 0 && !this.hasActionTop) {\n return;\n }\n this.$container.classList.toggle('is-open');\n if (this.$container.classList.contains('is-open')) {\n this.showDropdown.emit();\n this.$itemContainer.scrollTop = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.element().offsetTop) - this.$itemContainer.offsetTop - ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.element().offsetHeight);\n }\n else {\n this.hideDropdown.emit();\n }\n };\n this.filterItems = (e) => {\n this.filterText = e.target.value;\n };\n this.selectItem = (item) => {\n if (this.type === 'selectOne') {\n this.selectedItem = item;\n this.value = item.value();\n this.closeDropdown();\n this.rsChange.emit(item.value());\n }\n else if (this.type === 'selectMany') {\n if (this.selectedItems.some((selected) => selected.value() == item.value())) {\n this.selectedItems = this.selectedItems.filter((selected) => selected.value() != item.value());\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n else {\n this.selectedItems = [...this.selectedItems, item]; // Can't use .push() or rerender won't happen\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n }\n };\n this.selectNative = (e) => {\n const select = e.target;\n const foundItem = this._items.find(item => item.value() === select.value);\n if (foundItem) {\n this.selectItem(foundItem);\n }\n };\n }\n async clear() {\n this.selectedItem = null;\n this.selectedItems = [];\n }\n render() {\n return h(Host, { key: 'b0e58f29d6f5622605f1d47b638ba0e7871ad382', tabindex: 0 }, h(\"div\", { key: '9358df898e13e7db20f0c94153b23e38a085f54f', class: `container is-${this.size}`, ref: el => this.$container = el }, this.useNativeMobile && this.renderNative(), h(\"div\", { key: 'd8a74c0da213a1c01ab5b9281d8651991d503690', class: \"selected__container\", onClick: this.toggleDropdown }, this.renderSelected()), h(\"div\", { key: '8aa59931cfd66313843f876477c44911ae851097', class: \"dropdown__container\", style: {\n maxWidth: this.maxWidth,\n } }, this.searchable ? this.renderSearch() : null, this.hasActionTop ? this.renderAction('top') : null, h(\"div\", { key: 'aa366c617799971b5899f19b81ff2bc100e0fe4e', class: \"dropdown__items\", ref: el => this.$itemContainer = el, style: {\n maxHeight: this.maxHeight,\n } }, this.renderItems()))));\n }\n componentWillLoad() {\n this.hasActionTop = !!this.el.querySelector('[slot=\"action-top\"]');\n }\n componentWillRender() {\n var _a, _b, _c;\n let items;\n if (typeof this.items === 'string') {\n items = JSON.parse(this.items);\n }\n else {\n items = this.items;\n }\n this._items = items.map((item) => new Item(item.value, item.label, item.style, item.prefix));\n if (this.selectedItem === null && this.selectedIndex !== null) {\n this.selectedItem = (_a = this._items[this.selectedIndex]) !== null && _a !== void 0 ? _a : null;\n }\n if (this.value !== null) {\n if (this.type === 'selectOne') {\n const selected = (_b = this._items.find((item) => item.value() == this.value)) !== null && _b !== void 0 ? _b : null; // '==' required to support numeric values\n if (((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value()) !== (selected === null || selected === void 0 ? void 0 : selected.value())) {\n this.selectedItem = selected;\n }\n }\n else if (this.type === 'selectMany') {\n this.value = typeof this.value === 'string' ? JSON.parse(this.value) : this.value;\n this.selectedItems = this._items.filter((item) => this.value.includes(item.value()));\n }\n }\n }\n componentDidLoad() {\n window.addEventListener('mousedown', (e) => {\n if (e.composedPath().includes(this.el)) {\n return;\n }\n this.closeDropdown();\n });\n if (this.size === 'large') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '42px');\n }\n if (this.size === 'small') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '32px');\n }\n }\n renderSelected() {\n var _a;\n let label = this.placeholder;\n if (this.type === 'selectOne') {\n label = (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label();\n }\n else if (this.type === 'selectMany') {\n const labels = this.selectedItems.map((item) => item.label());\n if (labels.length === 1) {\n label = labels[0];\n }\n else if (labels.length > 1) {\n label = `${labels.slice(0, -1).join(', ')} & ${labels.slice(-1)}`;\n }\n }\n const content = label !== null && label !== void 0 ? label : this.placeholder;\n if (this.size === 'large') {\n return h(\"rs-content\", { class: \"dropdown__selected\", body: 2 }, content);\n }\n if (this.size === 'small') {\n return h(\"rs-caption\", { class: \"dropdown__selected\" }, content);\n }\n throw new Error(`Invalid size ${this.size}`);\n }\n renderItems() {\n if (this._items.length === 0) {\n return null;\n }\n const filtered = this._items\n .filter((item) => item.label().toLowerCase().includes(this.filterText.toLowerCase()));\n if (filtered.length === 0) {\n return h(\"div\", { class: \"dropdown__item dropdown__item--no-results\" }, \"No results found\");\n }\n return filtered.map((item) => {\n var _a;\n let isSelected = false;\n if (this.type === 'selectOne') {\n isSelected = item.value() == ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value());\n }\n else if (this.type === 'selectMany') {\n isSelected = this.selectedItems.some((selected) => selected.value() == item.value());\n }\n return item.render(this.selectItem, isSelected, this.type === 'selectMany');\n });\n }\n renderSearch() {\n return h(\"div\", { class: \"dropdown__search\" }, h(\"rs-icon\", { class: \"dropdown__search-icon\", name: \"search\" }), h(\"input\", { type: \"text\", onInput: this.filterItems }));\n }\n renderAction(position) {\n return h(\"div\", { class: `dropdown__action dropdown__action--${position}` }, h(\"slot\", { name: `action-${position}` }));\n }\n renderNative() {\n return h(\"select\", { onChange: this.selectNative }, this._items.map(i => h(\"option\", { key: i.value(), value: i.value() }, i.label())));\n }\n closeDropdown() {\n this.$container.classList.remove('is-open');\n }\n get el() { return getElement(this); }\n};\nRsDropdown.style = RsDropdownStyle0;\n\nconst inputCss = \".sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot=\\\"start\\\"]{margin-right:10px}.sc-rs-input-s>[slot=\\\"end\\\"]{margin-left:10px}\";\nconst RsInputStyle0 = inputCss;\n\nconst Input = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsInput = createEvent(this, \"rsInput\", 7);\n this.rsKeyDown = createEvent(this, \"rsKeyDown\", 7);\n this.rsInputChanged = createEvent(this, \"rsInputChanged\", 7);\n this.rsInputNoFocus = createEvent(this, \"rsInputNoFocus\", 7);\n this.rsInputFocus = createEvent(this, \"rsInputFocus\", 7);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n this.didBlurAfterEdit = false;\n this.hasStartSlot = false;\n this.hasEndSlot = false;\n /**\n * Checks if the input has focus or not.\n * Any changes on this property will cause the render function to be called again\n */\n this.hasFocus = false; // initially, input field will have no focus\n /**\n * Character counter.\n * Used for updating the text above the input field.\n */\n this.charsLeft = 0;\n /**\n * Possible values are: date, email, number, password, search, tel, text, url, time.\n * The type of control to display.\n */\n this.type = 'text';\n /**\n * The value of the input field.\n */\n this.value = '';\n /**\n * (optional)\n * Puts the input field in a disabled state.\n */\n this.disabled = false;\n /**\n * (optional)\n * Puts the input in a readonly state.\n */\n this.readonly = false;\n /**\n * If true, value will be cleared after focus upon edit.\n */\n this.clearOnEdit = false;\n /**\n * If true, an icon will appear in the input when there's a value. Clicking the icon clears the input.\n */\n this.clearInput = false;\n /**\n * If true, the user must enter a value before submitting the form.\n */\n this.required = false;\n /**\n * Hides the max number of characters and the character counter text above the input field.\n */\n this.hideMax = false;\n /**\n * (hard max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they won't be able to type anything in the input field anymore.\n */\n this.hardLimit = null;\n /**\n * (soft max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they will still be able to type something in the input field.\n * Character counter above the input field will display.\n */\n this.softLimit = null;\n /**\n * Sets the input field to an error state - border will change to red.\n */\n this.hasError = false;\n /**\n * Sets the alignment of the text inside the input field\n */\n this.textAlign = 'left';\n /**\n * Sets the size of the input field\n * @protected\n */\n this.size = 'default';\n /**\n * The function which gets called when user enters something in the input field\n * @param ev - event\n */\n this.onInput = (ev) => {\n const input = ev.target;\n if (input !== null) {\n this.value = input.value || '';\n }\n this.rsInput.emit(ev);\n };\n /**\n * The function which gets called when input is in focus\n */\n this.onFocus = () => {\n this.hasFocus = true; // this element has focus now\n this.focusChanged();\n this.emitRsItem(); // emit change in style - should have the primary color when on focus\n this.rsInputFocus.emit(); // emit input focus event\n };\n /**\n * The function which gets called when focus on the input changes\n */\n this.focusChanged = () => {\n if (!this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n };\n /**\n * The function which gets called id we want to clear value on edit\n */\n this.shouldClearOnEdit = () => {\n const { type, clearOnEdit } = this;\n return (clearOnEdit === undefined) ? type === 'password' : clearOnEdit;\n };\n /**\n * The function which gets called when the user presses a key\n */\n this.onKeyDown = (ev) => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n }\n this.didBlurAfterEdit = false;\n this.rsKeyDown.emit(ev);\n };\n /**\n * The function which gets called when we want to clear the value\n */\n this.clearTextInput = (ev) => {\n if (this.clearInput !== undefined &&\n !this.readonly &&\n !this.disabled &&\n ev !== undefined) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n this.value = '';\n /**\n * This is needed for clearOnEdit\n * Otherwise the value will not be cleared\n * if user is inside the input\n */\n if (this.nativeElement !== null) {\n this.nativeElement.value = '';\n }\n };\n /**\n * The function which gets called when input gets out of focus\n */\n this.onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n this.emitRsItem();\n this.rsInputNoFocus.emit();\n };\n }\n /**\n * Watch for any changes on the `disabled` property.\n */\n disabledChanged() {\n this.emitRsItem(); // disabled changed, emit change in styling\n }\n /**\n * Watch for any changes on the `value` property.\n */\n valueChanged() {\n this.emitRsItem(); // value changed, emit change in styling\n this.changeMaxLengthText();\n this.rsInputChanged.emit({ value: this.value == null ? this.value : this.value.toString() }); // emit change in input\n }\n hasErrorChanged() {\n this.emitRsItem();\n }\n /**\n * A method for re-rendering the input component\n */\n async update() {\n forceUpdate(this.el);\n }\n /**\n * A method for setting focus on the specified input field.\n */\n async setFocus() {\n if (this.nativeElement !== null) {\n this.nativeElement.focus(); // set focus\n }\n }\n /**\n * A method for getting the native `<input>` element used\n */\n getInputElement() {\n return Promise.resolve(this.nativeElement);\n }\n /**\n * Get the input's value\n */\n getValue() {\n return this.value || '';\n }\n /**\n * Check if the input has value\n */\n hasValue() {\n return this.getValue().length > 0;\n }\n /**\n * Emits `rsItem` event when the styles of the input change\n */\n emitRsItem() {\n this.rsItem.emit({\n 'input': true,\n 'interactive': true,\n 'has-focus': this.hasFocus,\n 'has-value': this.hasValue(),\n 'has-placeholder': this.placeholder !== null,\n 'has-error': this.hasError,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'interactive-disabled': this.disabled,\n 'input-has-start-slot': this.hasStartSlot,\n 'input-has-end-slot': this.hasEndSlot,\n 'input-chars-over-max': this.charsLeft < 0,\n 'input-is-required': this.required\n });\n }\n /**\n * As the user types something in the input field, if soft max is set, then we show a character counter above the input field.\n * This function is for updating the text above the input field.\n */\n changeMaxLengthText() {\n if ((this.softLimit !== null && this.softLimit > 0) && !this.hideMax) {\n const valueLength = this.value.length; // the number of characters the user entered\n this.charsLeft = this.softLimit - valueLength;\n const maxLengthText = this.el.querySelector('.max-length');\n if (maxLengthText !== null) {\n // if no. of characters entered by the user is over the set max characters\n if (this.charsLeft < 0) {\n maxLengthText.innerHTML = `${Math.abs(this.charsLeft)} over`;\n this.el.classList.add('input-chars-over-max');\n // if no. of characters entered by the user is NOT over the set max character\n }\n else {\n maxLengthText.innerHTML = `${this.charsLeft} left`;\n this.el.classList.remove('input-chars-over-max');\n }\n }\n }\n }\n dataAttributes() {\n return Object.keys(this.el.dataset).reduce((acc, key) => {\n acc[`data-${key}`] = this.el.dataset[key];\n return acc;\n }, {});\n }\n /**\n * This gets called once just after the component gets fully loaded\n * and after the first render occurred.\n */\n componentDidLoad() {\n if ((this.softLimit !== undefined || this.hardLimit !== undefined)) {\n const maxLength = this.el.querySelector('.max-length');\n showCharacterCounter(maxLength, this.hardLimit, this.softLimit, this.hideMax);\n this.changeMaxLengthText(); // the char count should reflect the initial value's char count\n }\n }\n connectedCallback() {\n this.hasStartSlot = this.el.querySelector('[slot=\"start\"]') !== null;\n this.hasEndSlot = this.el.querySelector('[slot=\"end\"]') !== null;\n this.emitRsItem();\n }\n /**\n * This renders the component\n */\n render() {\n const value = this.getValue();\n let maxLengthText = null;\n if ((this.hardLimit || this.softLimit) && !this.hideMax) {\n const maxLength = this.hardLimit || this.softLimit;\n maxLengthText = (h(\"span\", { key: '43796315f9cf5aee0f1416f9638c6023d18f371c', class: \"max-length\" }, maxLength, \" max\"));\n }\n return (h(Host, { key: 'ac76f2196206d4fc99a05f5c6a64ec5590f1e065', class: {\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'has-placeholder': this.placeholder !== null,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'chars-over-max': this.charsLeft < 0,\n 'has-error': this.hasError,\n [`text-align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true\n } }, maxLengthText, h(\"div\", { key: '549979b3c5ab691fcfa702fb43863db80835e6c1', class: \"rs-input__inner\" }, h(\"slot\", { key: 'f6fb85cf6533e447c22a7a2f615a721dcbeee5bb', name: \"start\" }), h(\"input\", Object.assign({ key: 'bcba32b735ac871b9ffbcd9c07c74f4d27bd50f5' }, this.dataAttributes(), { class: \"native-input\", ref: input => this.nativeElement = input, disabled: this.disabled, readonly: this.readonly, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, placeholder: this.placeholder, type: this.type, required: this.required, name: this.name, maxlength: this.hardLimit, min: this.min, max: this.max, value: value })), h(\"slot\", { key: '248265fc89456303f1a3ab57ed1d053e5248f35e', name: \"end\" }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"],\n \"hasError\": [\"hasErrorChanged\"]\n }; }\n};\nInput.style = RsInputStyle0;\n\nconst labelCss = \"rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}\";\nconst RsLabelStyle0 = labelCss;\n\nconst Label = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n /**\n * (optional)\n * Possible values are: primary or grey.\n */\n this.color = 'grey';\n /**\n * Possible values are: floating or fixed.\n * This determines where and how the label behaves inside an item\n */\n this.position = 'floating';\n }\n emitRsItem() {\n this.rsItem.emit({\n [`label-${this.position}`]: this.position !== null,\n 'has-label': true\n });\n }\n /**\n * This renders the component\n */\n render() {\n const position = this.position;\n this.emitRsItem();\n return (h(Host, { key: 'db0eb178ea17a5c03e6fcdb44d4ff1a2d260a98d', class: {\n [`label-${position}`]: position !== null,\n }, style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(\"slot\", { key: 'a82d3d4145672252fca96c96ef4292922a0f3646' })));\n }\n get el() { return getElement(this); }\n};\nLabel.style = RsLabelStyle0;\n\nconst toggleCss = \".toggle{display:block;padding:4px;background:var(--rs-color-select-background);box-shadow:inset 0 0 0 1px var(--rs-color-select-secondary);border-radius:4px;height:42px;box-sizing:border-box}.toggle__items{display:flex;flex-direction:row;position:relative;gap:4px}.active-tab{position:absolute;height:calc(100%);background:var(--rs-color-white);z-index:1;transition:left 0.15s ease-out;border-radius:2px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border), 0 1px 5px 0 rgb(195 213 226 / 0.62)}\";\nconst RsToggleStyle0 = toggleCss;\n\nconst Toggle = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.toggle = createEvent(this, \"toggle\", 7);\n this.currentPosition = 0;\n this.hasMovedActiveTab = false;\n this.renderToggleBar = () => {\n this.toggleItems = this.host.querySelectorAll('rs-toggle-item');\n this.activeTabElement.style.width = `calc(${(100 / this.toggleItems.length)}%)`;\n this.toggleItems.forEach((item, position) => {\n if (item.getAttribute('active') !== null) {\n this.moveActiveTab(position);\n }\n item.addEventListener('click', () => {\n if (this.currentPosition === position) {\n return;\n }\n this.moveActiveTab(position);\n this.removeAllActiveProp();\n item.setAttribute('active', 'true');\n this.emitToggleEvent();\n });\n item.addEventListener('activeSet', (e) => {\n if (e.detail) {\n this.moveActiveTab(position);\n }\n });\n });\n if (!this.hasMovedActiveTab) {\n this.moveActiveTab(0);\n }\n };\n }\n /**\n * Set the current active state of the toggle\n */\n async setActivePosition(position = 0) {\n this.removeAllActiveProp();\n this.moveActiveTab(position);\n this.emitToggleEvent();\n }\n removeAllActiveProp() {\n this.toggleItems.forEach(item => {\n item.removeAttribute('active');\n });\n }\n moveActiveTab(position) {\n this.activeTabElement.style.left = `calc(${(100 / this.toggleItems.length * position)}%)`;\n this.currentPosition = position;\n this.hasMovedActiveTab = true;\n }\n emitToggleEvent() {\n this.toggle.emit({ value: this.currentPosition, target: this.toggleItems[this.currentPosition] });\n }\n componentDidRender() {\n this.renderToggleBar();\n }\n render() {\n return (h(Host, { key: 'cdbdd9f9c8418f51bd7409429a57f036e06ece61' }, h(\"div\", { key: 'd614a83d569477128581b2e366c30de92faddac0', class: 'toggle' }, h(\"div\", { key: '2f2b50e33c7da270bb2826325c4c5c6ed8fa00da', class: 'toggle__items' }, h(\"slot\", { key: '8a675ed2c0e6558da3fdd3c149ff3df61c1df75d', onSlotchange: this.renderToggleBar }), h(\"div\", { key: 'e0b0d5d8a17106514f20c77aaa861b7f6b63fd9e', ref: el => this.activeTabElement = el, class: 'active-tab' })))));\n }\n get host() { return getElement(this); }\n};\nToggle.style = RsToggleStyle0;\n\nconst toggleItemCss = \":host{box-sizing:border-box;display:flex;padding:7px;text-align:center;z-index:2;cursor:pointer;user-select:none;flex:1 1 0;line-height:initial;justify-content:center;align-items:center;height:34px}:host(.active){cursor:default}\";\nconst RsToggleItemStyle0 = toggleItemCss;\n\nconst ToggleItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.activeSet = createEvent(this, \"activeSet\", 7);\n /**\n * If true, this item will be marked as active in the toggle\n */\n this.active = false;\n }\n setActive() {\n this.activeSet.emit(this.active);\n }\n render() {\n return (h(Host, { key: 'ea934495cbd83ebf06b2c0becc8db1a1f9ddd2f4', class: {\n 'active': this.active\n } }, h(\"rs-content\", { key: '127f1a8018cbdba9a91a90e2a5428dbe716aee70', body: 2 }, h(\"slot\", { key: '2c234c0a501c7d33cdf18aedf3d5cdc4cbc536e2' }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"active\": [\"setActive\"]\n }; }\n};\nToggleItem.style = RsToggleItemStyle0;\n\nexport { RsDropdown as rs_dropdown, Input as rs_input, Label as rs_label, Toggle as rs_toggle, ToggleItem as rs_toggle_item };\n\n//# sourceMappingURL=rs-dropdown_5.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","Item","constructor","_value","_label","_style","_prefix","this","onClick","callback","_el","value","label","prefixDisplay","h","class","render","selectedItem","isSelectMany","ref","el","checked","pointerEvents","assign","overflow","textOverflow","RsDropdown","hostRef","r","rsChange","c","showDropdown","hideDropdown","items","type","size","maxHeight","searchable","placeholder","selectedIndex","maxWidth","useNativeMobile","selectedItems","filterText","toggleDropdown","_a","_b","_items","hasActionTop","$container","classList","toggle","contains","emit","$itemContainer","scrollTop","offsetTop","offsetHeight","filterItems","e","selectItem","item","closeDropdown","some","selected","filter","map","selectNative","select","foundItem","find","clear","H","tabindex","renderNative","renderSelected","renderSearch","renderAction","renderItems","componentWillLoad","querySelector","componentWillRender","_c","JSON","parse","prefix","includes","componentDidLoad","window","addEventListener","composedPath","setProperty","labels","slice","join","content","body","Error","filtered","isSelected","name","onInput","position","onChange","i","remove","g","Input","rsInput","rsKeyDown","rsInputChanged","rsInputNoFocus","rsInputFocus","rsItem","didBlurAfterEdit","hasStartSlot","hasEndSlot","hasFocus","charsLeft","disabled","readonly","clearOnEdit","clearInput","required","hasError","textAlign","input","onFocus","focusChanged","emitRsItem","hasValue","shouldClearOnEdit","onKeyDown","clearTextInput","preventDefault","stopPropagation","nativeElement","onBlur","disabledChanged","valueChanged","changeMaxLengthText","toString","hasErrorChanged","update","setFocus","focus","getInputElement","Promise","resolve","getValue","valueLength","maxLengthText","innerHTML","Math","abs","add","dataAttributes","dataset","reduce","acc","maxLength","s","connectedCallback","maxlength","min","max","watchers","Label","color","Toggle","currentPosition","hasMovedActiveTab","renderToggleBar","toggleItems","host","querySelectorAll","activeTabElement","width","getAttribute","moveActiveTab","removeAllActiveProp","setAttribute","emitToggleEvent","setActivePosition","removeAttribute","left","componentDidRender","onSlotchange","ToggleItem","activeSet","active","setActive"],"sourceRoot":""}
package/build/8.index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -9,5 +9,5 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  *
11
11
  */
12
- "use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[835],{7402:function(e,t,s){s.d(t,{d:function(){return l},i:function(){return n},s:function(){return d}});var i=s(6919);const l=(e,t=0)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(e,t,...i)}},n=(e,t,s)=>{const l=(void 0!==e.target?e.target:s).tagName.toLowerCase().replace("rs-",""),n=e.detail,d={},h=t.get(l)||{};let a=!1;Object.keys(n).forEach((e=>{if(n[e]){const t=`item-${e}`;h[t]||(a=!0),d[t]=!0}})),a||Object.keys(d).length===Object.keys(h).length||(a=!0),a&&(t.set(l,d),(0,i.f)(s))},d=(e,t,s,i=!1)=>{!t&&!s||i||null!==e&&(e.style.display="block",setTimeout((function(){e.style.opacity="1"}),150))}},1835:function(e,t,s){s.r(t),s.d(t,{rs_link_select:function(){return n}});var i=s(6919),l=s(7402);const n=class{constructor(e){(0,i.r)(this,e),this.rsLinkSelected=(0,i.c)(this,"rsLinkSelected",7),this.data={},this.heading="Add a link",this.hideRemoveLink=!1,this.selectedItem=null,this.linkLabel="Link text",this.allowExternalLinks=!1,this.items={},this.hidden=!0,this.selectedSubtype=null,this._data={},this.subtypes={},this.subtypeHasChanged=!1,this.WEBSITE_TYPE="website",this.selectType=e=>{this.selectedType!==this.types[e.detail.value]&&(this.selectedType=this.types[e.detail.value],this.resetSelectedSubtype())},this.selectSubType=e=>{this.selectedSubtype=e.detail,this.subtypeHasChanged=!0},this.selectLink=e=>{this.selectedLink=this.items[this.selectedType].find((t=>{var s;return(null!==(s=t.subType)&&void 0!==s?s:null)===this.selectedSubtype&&t.value==e.detail}))},this.updateLinkLabel=e=>{this.linkText=e.target.value},this.editWebsiteLink=()=>{this.websiteLink=this.$websiteLinkInput.value},this.handleClose=()=>{this.close(),this.reset()},this.removeLink=()=>{this.rsLinkSelected.emit({type:"",subType:null,value:null,label:null,linkText:null}),this.selectedItem=null,this.close(),this.reset()},this.cancel=()=>{this.close(),this.reset()},this.saveLink=()=>{const e=this.selectedType===this.WEBSITE_TYPE?{type:this.WEBSITE_TYPE,subType:null,value:this.websiteLink,label:this.websiteLink}:this.selectedLink;this.rsLinkSelected.emit(Object.assign(Object.assign({},e),{linkText:this.linkText})),this.close()},this.fetchData=(0,l.d)((e=>{var t;const s=null!==(t=this._data[e])&&void 0!==t?t:null;s&&fetch(s,{headers:{"X-Website-UUID":this.websiteUuid}}).then((e=>e.json())).then((({options:t})=>{this.items=Object.assign({[e]:t},this.items);const s=t.map((e=>{var t;return null!==(t=e.subType)&&void 0!==t?t:null})).filter((e=>!!e)).filter(((e,t,s)=>s.indexOf(e)===t));this.subtypes=Object.assign({[e]:s},this.subtypes),this.resetSelectedSubtype()}))}),1e3)}async open(){this.hidden=!1}async close(){this.hidden=!0}render(){return(0,i.h)("div",{key:"7cfb99819fcc0a21e67dfc4fe58f0875b79ccc06",class:"container "+(this.hidden?"is-hidden":"")},(0,i.h)("div",{key:"93f59b8f32e69d07403c337211aa1b60438fe0b0",class:"overlay"}),(0,i.h)("div",{key:"9e3eff0362d89beb61fc2b95e1a51d1d93364890",class:"inner"},(0,i.h)("div",{key:"7d8ef13cadebf199798296711107b547147161ef",class:"head"},(0,i.h)("rs-header",{key:"b1ef8965588723d3a31cf737a886a131f41a5b59",heading:"4"},this.heading),(0,i.h)("rs-icon",{key:"c13714f16c1f6d7c4e3b0e7e344dd0c181e63a2f",name:"fine-x",size:20,onClick:this.handleClose})),(0,i.h)("div",{key:"770580d00990a6720baea8d3e72e4d0428f9cefb",class:"body"},(0,i.h)("rs-toggle",{key:"fb5bb96c3841965c6e7a25bdaeaf0e27432e3f90",onToggle:this.selectType,ref:e=>this.$toggle=e},this.types.map((e=>(0,i.h)("rs-toggle-item",null,e.toUpperCase())))),this.renderTypePage(),this.renderLinkText(),(0,i.h)("div",{key:"9c57e381f6bd5b3b8c64c38240b222b5271343cf",class:"buttons"},this.renderRemoveButton(),(0,i.h)("div",{key:"a32dc6a235b9d80db0acf75f81e18dc20ef5321b",class:"buttons__spacer"}),(0,i.h)("rs-button",{key:"c62a3baf818fa6c2daee1b6caa294dd146687c6a",onClick:this.cancel,color:"grey-light"},"Cancel"),(0,i.h)("rs-button",{key:"7d42af690e77d1f1a8aaf5a25bcdccdf5d360e3a",onClick:this.saveLink},"Save link")))))}componentWillLoad(){this._data="string"==typeof this.data?JSON.parse(this.data):this.data,this.types=Object.keys(this._data),this.allowExternalLinks&&this.types.push(this.WEBSITE_TYPE),this.selectedItem&&Object.values(this.selectedItem).every((e=>!e))&&(this.selectedItem=null),this.reset()}componentWillRender(){var e;null===(e=this.$toggle)||void 0===e||e.setActivePosition(this.types.indexOf(this.selectedType)),this.hidden||this.selectedType!==this.WEBSITE_TYPE&&(this.items.hasOwnProperty(this.selectedType)||this.fetchData(this.selectedType))}componentDidLoad(){var e;null===(e=this.$toggle)||void 0===e||e.setActivePosition(this.types.indexOf(this.selectedType))}renderLinkText(){return void 0===this.linkText?null:(0,i.h)("div",{class:"link-text"},(0,i.h)("rs-label",{position:"fixed"},this.linkLabel),(0,i.h)("rs-input",{placeholder:this.linkLabel,value:this.linkText,onRsInput:this.updateLinkLabel}))}renderTypePage(){var e,t,s;if(this.selectedType===this.WEBSITE_TYPE)return this.renderWebsitePage();if(!this.items.hasOwnProperty(this.selectedType))return(0,i.h)("rs-spinner",{size:"small",color:"grey-300"});const l=null!==(e=this.subtypes[this.selectedType])&&void 0!==e?e:[],n=this.items[this.selectedType].filter((e=>null===this.selectedSubtype||e.subType===this.selectedSubtype));return(0,i.h)("div",{class:"page"},(0,i.h)("div",{class:"link-selector"},l.length>0?this.renderSubtype():null,(0,i.h)("rs-dropdown",{key:`${this.selectedType}:${null!==(t=this.selectedSubtype)&&void 0!==t?t:""}`,class:"dropdown is-primary",size:"small",placeholder:"Select an option",searchable:!0,items:n.map((e=>({label:e.label,value:e.value}))),selectedIndex:this.subtypeHasChanged?null:n.map((e=>e.value)).indexOf(null===(s=this.selectedItem)||void 0===s?void 0:s.value),onRsChange:this.selectLink})))}renderWebsitePage(){var e;return(0,i.h)("div",{class:"page"},(0,i.h)("div",{class:"link-selector"},(0,i.h)("rs-input",{placeholder:"https://www.example.com",value:(null===(e=this.selectedItem)||void 0===e?void 0:e.type)===this.WEBSITE_TYPE?this.selectedItem.value:null,onRsInput:this.editWebsiteLink,ref:e=>this.$websiteLinkInput=e})))}renderSubtype(){var e;const t=null!==(e=this.subtypes[this.selectedType])&&void 0!==e?e:[];return(0,i.h)("rs-dropdown",{key:`${this.selectedType}:subtypes`,class:"dropdown is-subtype",size:"small",items:t.map((e=>({label:e[0].toUpperCase()+e.slice(1),value:e}))),selectedIndex:t.indexOf(this.selectedSubtype),onRsChange:this.selectSubType,ref:e=>this.$subtypeDropdown=e})}reset(){var e;this.subtypeHasChanged=!1,this.resetSelectedType(),this.resetSelectedSubtype(),null===(e=this.$subtypeDropdown)||void 0===e||e.clear()}resetSelectedType(){var e;this.selectedItem?this.selectedType=this.selectedItem.type:this.selectedType=this.types[0];const t=this.types.indexOf(this.selectedType);t>-1&&(null===(e=this.$toggle)||void 0===e||e.setActivePosition(t))}resetSelectedSubtype(){var e,t,s;!this.subtypeHasChanged&&this.selectedItem&&this.selectedItem.type===this.selectedType?this.selectedSubtype=null!==(e=this.selectedItem.subType)&&void 0!==e?e:null:this.selectedSubtype=null!==(s=(null!==(t=this.subtypes[this.selectedType])&&void 0!==t?t:[])[0])&&void 0!==s?s:null}renderRemoveButton(){if(!this.hideRemoveLink)return(0,i.h)("rs-button",{onClick:this.removeLink,color:"grey-light"},"Remove link")}};n.style=":host{position:fixed;z-index:100000}*{box-sizing:border-box}.container{display:block}.container.is-hidden{display:none}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--rs-color-grey-light);opacity:0.8}.inner{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:724px;background:var(--rs-color-white);border-radius:10px;box-shadow:var(--rs-shadow-popup)}.head{display:flex;justify-content:space-between;align-items:center;padding:24px;border-bottom:1px solid var(--rs-color-light)}.head rs-icon{cursor:pointer}.body{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px;padding:24px}.body>*{width:100%}.page{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px}.page>*{width:100%}.link-selector{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px}.dropdown{z-index:1}.dropdown.is-primary{flex:1 1 100%}.dropdown.is-subtype{flex:1 1 15%}.buttons{display:flex;justify-content:space-between;align-items:center;gap:8px}.buttons__spacer{flex-grow:1}"}}]);
12
+ "use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[835],{7402:function(e,t,s){s.d(t,{d:function(){return l},i:function(){return n},s:function(){return d}});var i=s(6919);const l=(e,t=0)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(e,t,...i)}},n=(e,t,s)=>{const l=(void 0!==e.target?e.target:s).tagName.toLowerCase().replace("rs-",""),n=e.detail,d={},a=t.get(l)||{};let h=!1;Object.keys(n).forEach((e=>{if(n[e]){const t=`item-${e}`;a[t]||(h=!0),d[t]=!0}})),h||Object.keys(d).length===Object.keys(a).length||(h=!0),h&&(t.set(l,d),(0,i.f)(s))},d=(e,t,s,i=!1)=>{!t&&!s||i||null!==e&&(e.style.display="block",setTimeout((function(){e.style.opacity="1"}),150))}},1835:function(e,t,s){s.r(t),s.d(t,{rs_link_select:function(){return n}});var i=s(6919),l=s(7402);const n=class{constructor(e){(0,i.r)(this,e),this.rsLinkSelected=(0,i.c)(this,"rsLinkSelected",7),this.data={},this.heading="Add a link",this.hideRemoveLink=!1,this.selectedItem=null,this.linkLabel="Link text",this.allowExternalLinks=!1,this.items={},this.hidden=!0,this.selectedSubtype=null,this._data={},this.subtypes={},this.subtypeHasChanged=!1,this.WEBSITE_TYPE="website",this.selectType=e=>{this.selectedType!==this.types[e.detail.value]&&(this.selectedType=this.types[e.detail.value],this.resetSelectedSubtype())},this.selectSubType=e=>{this.selectedSubtype=e.detail,this.subtypeHasChanged=!0},this.selectLink=e=>{this.selectedLink=this.items[this.selectedType].find((t=>{var s;return(null!==(s=t.subType)&&void 0!==s?s:null)===this.selectedSubtype&&t.value==e.detail}))},this.updateLinkLabel=e=>{this.linkText=e.target.value},this.editWebsiteLink=()=>{this.websiteLink=this.$websiteLinkInput.value},this.handleClose=()=>{this.close(),this.reset()},this.removeLink=()=>{this.rsLinkSelected.emit({type:"",subType:null,value:null,label:null,linkText:null}),this.selectedItem=null,this.close(),this.reset()},this.cancel=()=>{this.close(),this.reset()},this.saveLink=()=>{const e=this.selectedType===this.WEBSITE_TYPE?{type:this.WEBSITE_TYPE,subType:null,value:this.websiteLink,label:this.websiteLink}:this.selectedLink;this.rsLinkSelected.emit(Object.assign(Object.assign({},e),{linkText:this.linkText})),this.close()},this.fetchData=(0,l.d)((e=>{var t;const s=null!==(t=this._data[e])&&void 0!==t?t:null;s&&fetch(s,{headers:{"X-Website-UUID":this.websiteUuid}}).then((e=>e.json())).then((({options:t})=>{this.items=Object.assign({[e]:t},this.items);const s=t.map((e=>{var t;return null!==(t=e.subType)&&void 0!==t?t:null})).filter((e=>!!e)).filter(((e,t,s)=>s.indexOf(e)===t));this.subtypes=Object.assign({[e]:s},this.subtypes),this.resetSelectedSubtype()}))}),1e3)}async open(){this.hidden=!1}async close(){this.hidden=!0}render(){return(0,i.h)("div",{key:"35cccabe5d087d9860ed953020af1e2aee74b82d",class:"container "+(this.hidden?"is-hidden":"")},(0,i.h)("div",{key:"5f6d3033bd73ba6691a6c0768ba83072f19a027b",class:"overlay"}),(0,i.h)("div",{key:"1ad324f0074cdf40cbe2ba79d05daa127e98ac1d",class:"inner"},(0,i.h)("div",{key:"3de0cf73615a6c896113c379197b185441aa1744",class:"head"},(0,i.h)("rs-header",{key:"f85ffd8de232412b254a29d08bae5ab737b3a283",heading:"4"},this.heading),(0,i.h)("rs-icon",{key:"3d4d332fc1ef9ec8575847ebe4636a14e4eb9179",name:"fine-x",size:20,onClick:this.handleClose})),(0,i.h)("div",{key:"1781791da37d0cdd5a3ccbfbe3a988ff1af29b91",class:"body"},(0,i.h)("rs-toggle",{key:"d11665d2f431dbfa46774979ba0ce2f2d39ece82",onToggle:this.selectType,ref:e=>this.$toggle=e},this.types.map((e=>(0,i.h)("rs-toggle-item",null,e.toUpperCase())))),this.renderTypePage(),this.renderLinkText(),(0,i.h)("div",{key:"fb005c4585a32175debca111e5952fcc3d0114e9",class:"buttons"},this.renderRemoveButton(),(0,i.h)("div",{key:"6010598430f56de50a582e118243a8c4ad013cb1",class:"buttons__spacer"}),(0,i.h)("rs-button",{key:"587573897c9989562525a0c493e40312a3addbfd",onClick:this.cancel,color:"grey-light"},"Cancel"),(0,i.h)("rs-button",{key:"7103cd3ecae9e70dddfa8319481cf96ad622864e",onClick:this.saveLink},"Save link")))))}componentWillLoad(){this._data="string"==typeof this.data?JSON.parse(this.data):this.data,this.types=Object.keys(this._data),this.allowExternalLinks&&this.types.push(this.WEBSITE_TYPE),this.selectedItem&&Object.values(this.selectedItem).every((e=>!e))&&(this.selectedItem=null),this.reset()}componentWillRender(){var e;null===(e=this.$toggle)||void 0===e||e.setActivePosition(this.types.indexOf(this.selectedType)),this.hidden||this.selectedType!==this.WEBSITE_TYPE&&(this.items.hasOwnProperty(this.selectedType)||this.fetchData(this.selectedType))}componentDidLoad(){var e;null===(e=this.$toggle)||void 0===e||e.setActivePosition(this.types.indexOf(this.selectedType))}renderLinkText(){return void 0===this.linkText?null:(0,i.h)("div",{class:"link-text"},(0,i.h)("rs-label",{position:"fixed"},this.linkLabel),(0,i.h)("rs-input",{placeholder:this.linkLabel,value:this.linkText,onRsInput:this.updateLinkLabel}))}renderTypePage(){var e,t,s,l;if(this.selectedType===this.WEBSITE_TYPE)return this.renderWebsitePage();if(!this.items.hasOwnProperty(this.selectedType))return(0,i.h)("rs-spinner",{size:"small",color:"grey-300"});const n=null!==(e=this.subtypes[this.selectedType])&&void 0!==e?e:[],d=this.items[this.selectedType].filter((e=>null===this.selectedSubtype||e.subType===this.selectedSubtype));return this.selectLink(new CustomEvent("rsChange",{detail:null===(t=this.selectedItem)||void 0===t?void 0:t.value})),(0,i.h)("div",{class:"page"},(0,i.h)("div",{class:"link-selector"},n.length>0?this.renderSubtype():null,(0,i.h)("rs-dropdown",{key:`${this.selectedType}:${null!==(s=this.selectedSubtype)&&void 0!==s?s:""}`,class:"dropdown is-primary",size:"small",placeholder:"Select an option",searchable:!0,items:d.map((e=>({label:e.label,value:e.value}))),selectedIndex:this.subtypeHasChanged?null:d.map((e=>e.value)).indexOf(null===(l=this.selectedItem)||void 0===l?void 0:l.value),onRsChange:this.selectLink})))}renderWebsitePage(){var e,t;return this.websiteLink=(null===(e=this.selectedItem)||void 0===e?void 0:e.type)===this.WEBSITE_TYPE?this.selectedItem.value:null,(0,i.h)("div",{class:"page"},(0,i.h)("div",{class:"link-selector"},(0,i.h)("rs-input",{placeholder:"https://www.example.com",value:(null===(t=this.selectedItem)||void 0===t?void 0:t.type)===this.WEBSITE_TYPE?this.selectedItem.value:null,onRsInput:this.editWebsiteLink,ref:e=>this.$websiteLinkInput=e})))}renderSubtype(){var e;const t=null!==(e=this.subtypes[this.selectedType])&&void 0!==e?e:[];return(0,i.h)("rs-dropdown",{key:`${this.selectedType}:subtypes`,class:"dropdown is-subtype",size:"small",items:t.map((e=>({label:e[0].toUpperCase()+e.slice(1),value:e}))),selectedIndex:t.indexOf(this.selectedSubtype),onRsChange:this.selectSubType,ref:e=>this.$subtypeDropdown=e})}reset(){var e;this.subtypeHasChanged=!1,this.resetSelectedType(),this.resetSelectedSubtype(),null===(e=this.$subtypeDropdown)||void 0===e||e.clear()}resetSelectedType(){var e;this.selectedItem?this.selectedType=this.selectedItem.type:this.selectedType=this.types[0];const t=this.types.indexOf(this.selectedType);t>-1&&(null===(e=this.$toggle)||void 0===e||e.setActivePosition(t))}resetSelectedSubtype(){var e,t,s;!this.subtypeHasChanged&&this.selectedItem&&this.selectedItem.type===this.selectedType?this.selectedSubtype=null!==(e=this.selectedItem.subType)&&void 0!==e?e:null:this.selectedSubtype=null!==(s=(null!==(t=this.subtypes[this.selectedType])&&void 0!==t?t:[])[0])&&void 0!==s?s:null}renderRemoveButton(){if(!this.hideRemoveLink)return(0,i.h)("rs-button",{onClick:this.removeLink,color:"grey-light"},"Remove link")}};n.style=":host{position:fixed;z-index:100000}*{box-sizing:border-box}.container{display:block}.container.is-hidden{display:none}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--rs-color-grey-light);opacity:0.8}.inner{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:724px;background:var(--rs-color-white);border-radius:10px;box-shadow:var(--rs-shadow-popup)}.head{display:flex;justify-content:space-between;align-items:center;padding:24px;border-bottom:1px solid var(--rs-color-light)}.head rs-icon{cursor:pointer}.body{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px;padding:24px}.body>*{width:100%}.page{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px}.page>*{width:100%}.link-selector{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px}.dropdown{z-index:1}.dropdown.is-primary{flex:1 1 100%}.dropdown.is-subtype{flex:1 1 15%}.buttons{display:flex;justify-content:space-between;align-items:center;gap:8px}.buttons__spacer{flex-grow:1}"}}]);
13
13
  //# sourceMappingURL=835.index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"835.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CAC1C,EAECG,EAAY,CAACC,EAAIC,EAAYC,KAC/B,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IAC/B,GAAIT,EAAcS,GAAM,CACpB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACbL,GAAiB,GAErBH,EAAUQ,IAAW,CACzB,KAECL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAC9EN,GAAiB,GAEjBA,IACAZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAA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ack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-link-select.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-def1ecaa.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-16362640.js.map","import { r as registerInstance, c as createEvent, h } from './index-def1ecaa.js';\nimport { d as debounce } from './helpers-16362640.js';\n\nconst rsLinkSelectCss = \":host{position:fixed;z-index:100000}*{box-sizing:border-box}.container{display:block}.container.is-hidden{display:none}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--rs-color-grey-light);opacity:0.8}.inner{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:724px;background:var(--rs-color-white);border-radius:10px;box-shadow:var(--rs-shadow-popup)}.head{display:flex;justify-content:space-between;align-items:center;padding:24px;border-bottom:1px solid var(--rs-color-light)}.head rs-icon{cursor:pointer}.body{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px;padding:24px}.body>*{width:100%}.page{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px}.page>*{width:100%}.link-selector{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px}.dropdown{z-index:1}.dropdown.is-primary{flex:1 1 100%}.dropdown.is-subtype{flex:1 1 15%}.buttons{display:flex;justify-content:space-between;align-items:center;gap:8px}.buttons__spacer{flex-grow:1}\";\nconst RsLinkSelectStyle0 = rsLinkSelectCss;\n\nconst RsLinkSelect = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsLinkSelected = createEvent(this, \"rsLinkSelected\", 7);\n /**\n * The data to be used for the link select. example: {website: 'url_endpoint', 'blog': 'url_endpoint'}\n */\n this.data = {};\n /**\n * This is the text that will be used for the popup heading\n */\n this.heading = 'Add a link';\n /**\n * Whether to show the remove link button or not\n */\n this.hideRemoveLink = false;\n /**\n * Which item to select by default\n */\n this.selectedItem = null;\n /**\n * The text that will be used as part of the link. Useful for a single popup for buttons, etc\n */\n this.linkLabel = 'Link text';\n /**\n * Whether to allow external links\n */\n this.allowExternalLinks = false;\n this.items = {};\n this.hidden = true;\n this.selectedSubtype = null;\n this._data = {};\n this.subtypes = {};\n this.subtypeHasChanged = false;\n this.WEBSITE_TYPE = 'website';\n this.selectType = (e) => {\n if (this.selectedType === this.types[e.detail.value]) {\n return;\n }\n this.selectedType = this.types[e.detail.value];\n this.resetSelectedSubtype();\n };\n this.selectSubType = (e) => {\n this.selectedSubtype = e.detail;\n this.subtypeHasChanged = true;\n };\n this.selectLink = (e) => {\n this.selectedLink = this.items[this.selectedType].find((datum) => {\n var _a;\n return ((_a = datum.subType) !== null && _a !== void 0 ? _a : null) === this.selectedSubtype &&\n datum.value == e.detail; // '==' required to support numeric values\n });\n };\n this.updateLinkLabel = (e) => {\n this.linkText = e.target.value;\n };\n this.editWebsiteLink = () => {\n this.websiteLink = this.$websiteLinkInput.value;\n };\n this.handleClose = () => {\n this.close();\n this.reset();\n };\n this.removeLink = () => {\n this.rsLinkSelected.emit({\n type: '',\n subType: null,\n value: null,\n label: null,\n linkText: null,\n });\n this.selectedItem = null;\n this.close();\n this.reset();\n };\n this.cancel = () => {\n this.close();\n this.reset();\n };\n this.saveLink = () => {\n const val = this.selectedType === this.WEBSITE_TYPE\n ? { type: this.WEBSITE_TYPE, subType: null, value: this.websiteLink, label: this.websiteLink, }\n : this.selectedLink;\n this.rsLinkSelected.emit(Object.assign(Object.assign({}, val), { linkText: this.linkText }));\n this.close();\n };\n this.fetchData = debounce((type) => {\n var _a;\n const uri = (_a = this._data[type]) !== null && _a !== void 0 ? _a : null;\n if (!uri) {\n return;\n }\n fetch(uri, {\n headers: {\n 'X-Website-UUID': this.websiteUuid,\n },\n })\n .then((res) => res.json())\n .then(({ options: data, }) => {\n this.items = Object.assign({ [type]: data }, this.items);\n const subtypeData = data\n .map((datum) => { var _a; return (_a = datum.subType) !== null && _a !== void 0 ? _a : null; })\n .filter((datum) => !!datum)\n .filter((datum, index, self) => self.indexOf(datum) === index);\n this.subtypes = Object.assign({ [type]: subtypeData }, this.subtypes);\n this.resetSelectedSubtype();\n });\n }, 1000);\n }\n async open() {\n this.hidden = false;\n }\n async close() {\n this.hidden = true;\n }\n render() {\n return h(\"div\", { key: '7cfb99819fcc0a21e67dfc4fe58f0875b79ccc06', class: `container ${this.hidden ? 'is-hidden' : ''}` }, h(\"div\", { key: '93f59b8f32e69d07403c337211aa1b60438fe0b0', class: \"overlay\" }), h(\"div\", { key: '9e3eff0362d89beb61fc2b95e1a51d1d93364890', class: \"inner\" }, h(\"div\", { key: '7d8ef13cadebf199798296711107b547147161ef', class: \"head\" }, h(\"rs-header\", { key: 'b1ef8965588723d3a31cf737a886a131f41a5b59', heading: \"4\" }, this.heading), h(\"rs-icon\", { key: 'c13714f16c1f6d7c4e3b0e7e344dd0c181e63a2f', name: \"fine-x\", size: 20, onClick: this.handleClose })), h(\"div\", { key: '770580d00990a6720baea8d3e72e4d0428f9cefb', class: \"body\" }, h(\"rs-toggle\", { key: 'fb5bb96c3841965c6e7a25bdaeaf0e27432e3f90', onToggle: this.selectType, ref: el => this.$toggle = el }, this.types.map((type) => h(\"rs-toggle-item\", null, type.toUpperCase()))), this.renderTypePage(), this.renderLinkText(), h(\"div\", { key: '9c57e381f6bd5b3b8c64c38240b222b5271343cf', class: \"buttons\" }, this.renderRemoveButton(), h(\"div\", { key: 'a32dc6a235b9d80db0acf75f81e18dc20ef5321b', class: \"buttons__spacer\" }), h(\"rs-button\", { key: 'c62a3baf818fa6c2daee1b6caa294dd146687c6a', onClick: this.cancel, color: \"grey-light\" }, \"Cancel\"), h(\"rs-button\", { key: '7d42af690e77d1f1a8aaf5a25bcdccdf5d360e3a', onClick: this.saveLink }, \"Save link\")))));\n }\n componentWillLoad() {\n this._data = typeof this.data === 'string' ? JSON.parse(this.data) : this.data;\n this.types = Object.keys(this._data);\n if (this.allowExternalLinks) {\n this.types.push(this.WEBSITE_TYPE);\n }\n if (this.selectedItem && Object.values(this.selectedItem).every((v) => !v)) {\n this.selectedItem = null;\n }\n this.reset();\n }\n componentWillRender() {\n var _a;\n (_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(this.types.indexOf(this.selectedType));\n if (this.hidden) {\n return;\n }\n if (this.selectedType === this.WEBSITE_TYPE) {\n return;\n }\n if (this.items.hasOwnProperty(this.selectedType)) {\n return;\n }\n this.fetchData(this.selectedType);\n }\n componentDidLoad() {\n var _a;\n (_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(this.types.indexOf(this.selectedType));\n }\n renderLinkText() {\n if (this.linkText === undefined) {\n return null;\n }\n return h(\"div\", { class: \"link-text\" }, h(\"rs-label\", { position: \"fixed\" }, this.linkLabel), h(\"rs-input\", { placeholder: this.linkLabel, value: this.linkText, onRsInput: this.updateLinkLabel }));\n }\n renderTypePage() {\n var _a, _b, _c;\n if (this.selectedType === this.WEBSITE_TYPE) {\n return this.renderWebsitePage();\n }\n if (!this.items.hasOwnProperty(this.selectedType)) {\n return h(\"rs-spinner\", { size: \"small\", color: \"grey-300\" });\n }\n const subtypes = (_a = this.subtypes[this.selectedType]) !== null && _a !== void 0 ? _a : [];\n const items = this.items[this.selectedType]\n .filter((datum) => this.selectedSubtype === null || datum.subType === this.selectedSubtype);\n return h(\"div\", { class: \"page\" }, h(\"div\", { class: \"link-selector\" }, subtypes.length > 0 ? this.renderSubtype() : null, h(\"rs-dropdown\", { key: `${this.selectedType}:${(_b = this.selectedSubtype) !== null && _b !== void 0 ? _b : ''}`, class: \"dropdown is-primary\", size: \"small\", placeholder: \"Select an option\", searchable: true, items: items.map((item) => ({ label: item.label, value: item.value })), selectedIndex: !this.subtypeHasChanged ? items.map((item) => item.value).indexOf((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value) : null, onRsChange: this.selectLink })));\n }\n renderWebsitePage() {\n var _a;\n return h(\"div\", { class: \"page\" }, h(\"div\", { class: \"link-selector\" }, h(\"rs-input\", { placeholder: \"https://www.example.com\", value: ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.type) === this.WEBSITE_TYPE ? this.selectedItem.value : null, onRsInput: this.editWebsiteLink, ref: el => this.$websiteLinkInput = el })));\n }\n renderSubtype() {\n var _a;\n const subtypes = (_a = this.subtypes[this.selectedType]) !== null && _a !== void 0 ? _a : [];\n return h(\"rs-dropdown\", { key: `${this.selectedType}:subtypes`, class: \"dropdown is-subtype\", size: \"small\", items: subtypes.map((subtype) => ({\n label: subtype[0].toUpperCase() + subtype.slice(1),\n value: subtype\n })), selectedIndex: subtypes.indexOf(this.selectedSubtype), onRsChange: this.selectSubType, ref: el => this.$subtypeDropdown = el });\n }\n reset() {\n var _a;\n this.subtypeHasChanged = false;\n this.resetSelectedType();\n this.resetSelectedSubtype();\n (_a = this.$subtypeDropdown) === null || _a === void 0 ? void 0 : _a.clear();\n }\n resetSelectedType() {\n var _a;\n if (this.selectedItem) {\n this.selectedType = this.selectedItem.type;\n }\n else {\n this.selectedType = this.types[0];\n }\n const typeIndex = this.types.indexOf(this.selectedType);\n typeIndex > -1 && ((_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(typeIndex));\n }\n resetSelectedSubtype() {\n var _a, _b, _c;\n if (!this.subtypeHasChanged && this.selectedItem && this.selectedItem.type === this.selectedType) {\n this.selectedSubtype = (_a = this.selectedItem.subType) !== null && _a !== void 0 ? _a : null;\n }\n else {\n this.selectedSubtype = (_c = ((_b = this.subtypes[this.selectedType]) !== null && _b !== void 0 ? _b : [])[0]) !== null && _c !== void 0 ? _c : null;\n }\n }\n renderRemoveButton() {\n if (this.hideRemoveLink) {\n return;\n }\n return (h(\"rs-button\", { onClick: this.removeLink, color: \"grey-light\" }, \"Remove link\"));\n }\n};\nRsLinkSelect.style = RsLinkSelectStyle0;\n\nexport { RsLinkSelect as rs_link_select };\n\n//# sourceMappingURL=rs-link-select.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","RsLinkSelect","constructor","hostRef","r","this","rsLinkSelected","c","data","heading","hideRemoveLink","selectedItem","linkLabel","allowExternalLinks","items","hidden","selectedSubtype","_data","subtypes","subtypeHasChanged","WEBSITE_TYPE","selectType","e","selectedType","types","value","resetSelectedSubtype","selectSubType","selectLink","selectedLink","find","datum","_a","subType","updateLinkLabel","linkText","editWebsiteLink","websiteLink","$websiteLinkInput","handleClose","close","reset","removeLink","emit","type","label","cancel","saveLink","val","assign","fetchData","d","uri","fetch","headers","websiteUuid","then","res","json","options","subtypeData","map","filter","index","self","indexOf","open","render","h","class","name","size","onClick","onToggle","ref","el","$toggle","toUpperCase","renderTypePage","renderLinkText","renderRemoveButton","color","componentWillLoad","JSON","parse","push","values","every","v","componentWillRender","setActivePosition","hasOwnProperty","componentDidLoad","position","placeholder","onRsInput","_b","_c","renderWebsitePage","renderSubtype","searchable","item","selectedIndex","onRsChange","subtype","slice","$subtypeDropdown","resetSelectedType","clear","typeIndex"],"sourceRoot":""}
1
+ {"version":3,"file":"835.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CAC1C,EAECG,EAAY,CAACC,EAAIC,EAAYC,KAC/B,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IAC/B,GAAIT,EAAcS,GAAM,CACpB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACbL,GAAiB,GAErBH,EAAUQ,IAAW,CACzB,KAECL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAC9EN,GAAiB,GAEjBA,IACAZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAAYnB,GAChB,EAEEoB,EAAuB,CAACC,EAAkBC,EAAWC,EAAWC,GAAU,MAEvEF,IAAaC,GAAeC,GACJ,OAArBH,IACAA,EAAiBI,MAAMC,QAAU,QACjC9B,YAAW,WACPyB,EAAiBI,MAAME,QAAU,GACrC,GAAG,KAEX,C,mGC3CJ,MAGMC,EAAe,MACjB,WAAAC,CAAYC,IACR,IAAAC,GAAiBC,KAAMF,GACvBE,KAAKC,gBAAiB,IAAAC,GAAYF,KAAM,iBAAkB,GAI1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,CACtI7D,MAAO6D,EAAQ,GAAG7B,cAAgB6B,EAAQC,MAAM,GAChDlF,MAAOiF,MACNF,cAAetF,EAAS+C,QAAQ5D,KAAKW,iBAAkByF,WAAYpG,KAAKsB,cAAe+C,IAAKC,GAAMtE,KAAKuG,iBAAmBjC,GACvI,CACA,KAAAlC,GACI,IAAIT,EACJ3B,KAAKc,mBAAoB,EACzBd,KAAKwG,oBACLxG,KAAKqB,uBAC4B,QAAhCM,EAAK3B,KAAKuG,wBAAqC,IAAP5E,GAAyBA,EAAG8E,OACzE,CACA,iBAAAD,GACI,IAAI7E,EAEA3B,KAAKM,aACLN,KAAKkB,aAAelB,KAAKM,aAAaiC,KAGtCvC,KAAKkB,aAAelB,KAAKmB,MAAM,GAEnC,MAAMuF,EAAY1G,KAAKmB,MAAMyC,QAAQ5D,KAAKkB,cAC1CwF,GAAa,IAA8B,QAAvB/E,EAAK3B,KAAKuE,eAA4B,IAAP5C,GAAyBA,EAAG0D,kBAAkBqB,GACrG,CACA,oBAAArF,GACI,IAAIM,EAAIgE,EAAIC,GACP5F,KAAKc,mBAAqBd,KAAKM,cAAgBN,KAAKM,aAAaiC,OAASvC,KAAKkB,aAChFlB,KAAKW,gBAAuD,QAApCgB,EAAK3B,KAAKM,aAAasB,eAA4B,IAAPD,EAAgBA,EAAK,KAGzF3B,KAAKW,gBAA8G,QAA3FiF,GAAkD,QAA3CD,EAAK3F,KAAKa,SAASb,KAAKkB,qBAAkC,IAAPyE,EAAgBA,EAAK,IAAI,UAAuB,IAAPC,EAAgBA,EAAK,IAExJ,CACA,kBAAAjB,GACI,IAAI3E,KAAKK,eAGT,OAAQ,IAAA0D,GAAE,YAAa,CAAEI,QAASnE,KAAKqC,WAAYuC,MAAO,cAAgB,cAC9E,GAEJhF,EAAaH,MAhOW,mlC","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/helpers-16362640.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-link-select.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-def1ecaa.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-16362640.js.map","import { r as registerInstance, c as createEvent, h } from './index-def1ecaa.js';\nimport { d as debounce } from './helpers-16362640.js';\n\nconst rsLinkSelectCss = \":host{position:fixed;z-index:100000}*{box-sizing:border-box}.container{display:block}.container.is-hidden{display:none}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--rs-color-grey-light);opacity:0.8}.inner{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:724px;background:var(--rs-color-white);border-radius:10px;box-shadow:var(--rs-shadow-popup)}.head{display:flex;justify-content:space-between;align-items:center;padding:24px;border-bottom:1px solid var(--rs-color-light)}.head rs-icon{cursor:pointer}.body{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px;padding:24px}.body>*{width:100%}.page{display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:24px}.page>*{width:100%}.link-selector{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px}.dropdown{z-index:1}.dropdown.is-primary{flex:1 1 100%}.dropdown.is-subtype{flex:1 1 15%}.buttons{display:flex;justify-content:space-between;align-items:center;gap:8px}.buttons__spacer{flex-grow:1}\";\nconst RsLinkSelectStyle0 = rsLinkSelectCss;\n\nconst RsLinkSelect = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsLinkSelected = createEvent(this, \"rsLinkSelected\", 7);\n /**\n * The data to be used for the link select. example: {website: 'url_endpoint', 'blog': 'url_endpoint'}\n */\n this.data = {};\n /**\n * This is the text that will be used for the popup heading\n */\n this.heading = \"Add a link\";\n /**\n * Whether to show the remove link button or not\n */\n this.hideRemoveLink = false;\n /**\n * Which item to select by default\n */\n this.selectedItem = null;\n /**\n * The text that will be used as part of the link. Useful for a single popup for buttons, etc\n */\n this.linkLabel = \"Link text\";\n /**\n * Whether to allow external links\n */\n this.allowExternalLinks = false;\n this.items = {};\n this.hidden = true;\n this.selectedSubtype = null;\n this._data = {};\n this.subtypes = {};\n this.subtypeHasChanged = false;\n this.WEBSITE_TYPE = \"website\";\n this.selectType = (e) => {\n if (this.selectedType === this.types[e.detail.value]) {\n return;\n }\n this.selectedType = this.types[e.detail.value];\n this.resetSelectedSubtype();\n };\n this.selectSubType = (e) => {\n this.selectedSubtype = e.detail;\n this.subtypeHasChanged = true;\n };\n this.selectLink = (e) => {\n this.selectedLink = this.items[this.selectedType].find((datum) => {\n var _a;\n return ((_a = datum.subType) !== null && _a !== void 0 ? _a : null) === this.selectedSubtype &&\n datum.value == e.detail; // '==' required to support numeric values\n });\n };\n this.updateLinkLabel = (e) => {\n this.linkText = e.target.value;\n };\n this.editWebsiteLink = () => {\n this.websiteLink = this.$websiteLinkInput.value;\n };\n this.handleClose = () => {\n this.close();\n this.reset();\n };\n this.removeLink = () => {\n this.rsLinkSelected.emit({\n type: \"\",\n subType: null,\n value: null,\n label: null,\n linkText: null\n });\n this.selectedItem = null;\n this.close();\n this.reset();\n };\n this.cancel = () => {\n this.close();\n this.reset();\n };\n this.saveLink = () => {\n const val = this.selectedType === this.WEBSITE_TYPE\n ? { type: this.WEBSITE_TYPE, subType: null, value: this.websiteLink, label: this.websiteLink }\n : this.selectedLink;\n this.rsLinkSelected.emit(Object.assign(Object.assign({}, val), { linkText: this.linkText }));\n this.close();\n };\n this.fetchData = debounce((type) => {\n var _a;\n const uri = (_a = this._data[type]) !== null && _a !== void 0 ? _a : null;\n if (!uri) {\n return;\n }\n fetch(uri, {\n headers: {\n \"X-Website-UUID\": this.websiteUuid\n }\n })\n .then((res) => res.json())\n .then(({ options: data }) => {\n this.items = Object.assign({ [type]: data }, this.items);\n const subtypeData = data\n .map((datum) => { var _a; return (_a = datum.subType) !== null && _a !== void 0 ? _a : null; })\n .filter((datum) => !!datum)\n .filter((datum, index, self) => self.indexOf(datum) === index);\n this.subtypes = Object.assign({ [type]: subtypeData }, this.subtypes);\n this.resetSelectedSubtype();\n });\n }, 1000);\n }\n /**\n * Opens the popup\n */\n async open() {\n this.hidden = false;\n }\n /**\n * Closes the popup\n */\n async close() {\n this.hidden = true;\n }\n render() {\n return h(\"div\", { key: '35cccabe5d087d9860ed953020af1e2aee74b82d', class: `container ${this.hidden ? \"is-hidden\" : \"\"}` }, h(\"div\", { key: '5f6d3033bd73ba6691a6c0768ba83072f19a027b', class: \"overlay\" }), h(\"div\", { key: '1ad324f0074cdf40cbe2ba79d05daa127e98ac1d', class: \"inner\" }, h(\"div\", { key: '3de0cf73615a6c896113c379197b185441aa1744', class: \"head\" }, h(\"rs-header\", { key: 'f85ffd8de232412b254a29d08bae5ab737b3a283', heading: \"4\" }, this.heading), h(\"rs-icon\", { key: '3d4d332fc1ef9ec8575847ebe4636a14e4eb9179', name: \"fine-x\", size: 20, onClick: this.handleClose })), h(\"div\", { key: '1781791da37d0cdd5a3ccbfbe3a988ff1af29b91', class: \"body\" }, h(\"rs-toggle\", { key: 'd11665d2f431dbfa46774979ba0ce2f2d39ece82', onToggle: this.selectType, ref: el => this.$toggle = el }, this.types.map((type) => h(\"rs-toggle-item\", null, type.toUpperCase()))), this.renderTypePage(), this.renderLinkText(), h(\"div\", { key: 'fb005c4585a32175debca111e5952fcc3d0114e9', class: \"buttons\" }, this.renderRemoveButton(), h(\"div\", { key: '6010598430f56de50a582e118243a8c4ad013cb1', class: \"buttons__spacer\" }), h(\"rs-button\", { key: '587573897c9989562525a0c493e40312a3addbfd', onClick: this.cancel, color: \"grey-light\" }, \"Cancel\"), h(\"rs-button\", { key: '7103cd3ecae9e70dddfa8319481cf96ad622864e', onClick: this.saveLink }, \"Save link\")))));\n }\n componentWillLoad() {\n this._data = typeof this.data === \"string\" ? JSON.parse(this.data) : this.data;\n this.types = Object.keys(this._data);\n if (this.allowExternalLinks) {\n this.types.push(this.WEBSITE_TYPE);\n }\n if (this.selectedItem && Object.values(this.selectedItem).every((v) => !v)) {\n this.selectedItem = null;\n }\n this.reset();\n }\n componentWillRender() {\n var _a;\n (_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(this.types.indexOf(this.selectedType));\n if (this.hidden) {\n return;\n }\n if (this.selectedType === this.WEBSITE_TYPE) {\n return;\n }\n if (this.items.hasOwnProperty(this.selectedType)) {\n return;\n }\n this.fetchData(this.selectedType);\n }\n componentDidLoad() {\n var _a;\n (_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(this.types.indexOf(this.selectedType));\n }\n renderLinkText() {\n if (this.linkText === undefined) {\n return null;\n }\n return h(\"div\", { class: \"link-text\" }, h(\"rs-label\", { position: \"fixed\" }, this.linkLabel), h(\"rs-input\", { placeholder: this.linkLabel, value: this.linkText, onRsInput: this.updateLinkLabel }));\n }\n renderTypePage() {\n var _a, _b, _c, _d;\n if (this.selectedType === this.WEBSITE_TYPE) {\n return this.renderWebsitePage();\n }\n if (!this.items.hasOwnProperty(this.selectedType)) {\n return h(\"rs-spinner\", { size: \"small\", color: \"grey-300\" });\n }\n const subtypes = (_a = this.subtypes[this.selectedType]) !== null && _a !== void 0 ? _a : [];\n const items = this.items[this.selectedType]\n .filter((datum) => this.selectedSubtype === null || datum.subType === this.selectedSubtype);\n this.selectLink(new CustomEvent('rsChange', { detail: (_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.value }));\n return h(\"div\", { class: \"page\" }, h(\"div\", { class: \"link-selector\" }, subtypes.length > 0 ? this.renderSubtype() : null, h(\"rs-dropdown\", { key: `${this.selectedType}:${(_c = this.selectedSubtype) !== null && _c !== void 0 ? _c : \"\"}`, class: \"dropdown is-primary\", size: \"small\", placeholder: \"Select an option\", searchable: true, items: items.map((item) => ({ label: item.label, value: item.value })), selectedIndex: !this.subtypeHasChanged ? items.map((item) => item.value).indexOf((_d = this.selectedItem) === null || _d === void 0 ? void 0 : _d.value) : null, onRsChange: this.selectLink })));\n }\n renderWebsitePage() {\n var _a, _b;\n this.websiteLink = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.type) === this.WEBSITE_TYPE ? this.selectedItem.value : null;\n return h(\"div\", { class: \"page\" }, h(\"div\", { class: \"link-selector\" }, h(\"rs-input\", { placeholder: \"https://www.example.com\", value: ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.type) === this.WEBSITE_TYPE ? this.selectedItem.value : null, onRsInput: this.editWebsiteLink, ref: el => this.$websiteLinkInput = el })));\n }\n renderSubtype() {\n var _a;\n const subtypes = (_a = this.subtypes[this.selectedType]) !== null && _a !== void 0 ? _a : [];\n return h(\"rs-dropdown\", { key: `${this.selectedType}:subtypes`, class: \"dropdown is-subtype\", size: \"small\", items: subtypes.map((subtype) => ({\n label: subtype[0].toUpperCase() + subtype.slice(1),\n value: subtype\n })), selectedIndex: subtypes.indexOf(this.selectedSubtype), onRsChange: this.selectSubType, ref: el => this.$subtypeDropdown = el });\n }\n reset() {\n var _a;\n this.subtypeHasChanged = false;\n this.resetSelectedType();\n this.resetSelectedSubtype();\n (_a = this.$subtypeDropdown) === null || _a === void 0 ? void 0 : _a.clear();\n }\n resetSelectedType() {\n var _a;\n // eslint-disable-next-line @stencil-community/strict-boolean-conditions\n if (this.selectedItem) {\n this.selectedType = this.selectedItem.type;\n }\n else {\n this.selectedType = this.types[0];\n }\n const typeIndex = this.types.indexOf(this.selectedType);\n typeIndex > -1 && ((_a = this.$toggle) === null || _a === void 0 ? void 0 : _a.setActivePosition(typeIndex));\n }\n resetSelectedSubtype() {\n var _a, _b, _c;\n if (!this.subtypeHasChanged && this.selectedItem && this.selectedItem.type === this.selectedType) {\n this.selectedSubtype = (_a = this.selectedItem.subType) !== null && _a !== void 0 ? _a : null;\n }\n else {\n this.selectedSubtype = (_c = ((_b = this.subtypes[this.selectedType]) !== null && _b !== void 0 ? _b : [])[0]) !== null && _c !== void 0 ? _c : null;\n }\n }\n renderRemoveButton() {\n if (this.hideRemoveLink) {\n return;\n }\n return (h(\"rs-button\", { onClick: this.removeLink, color: \"grey-light\" }, \"Remove link\"));\n }\n};\nRsLinkSelect.style = RsLinkSelectStyle0;\n\nexport { RsLinkSelect as rs_link_select };\n\n//# sourceMappingURL=rs-link-select.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","RsLinkSelect","constructor","hostRef","r","this","rsLinkSelected","c","data","heading","hideRemoveLink","selectedItem","linkLabel","allowExternalLinks","items","hidden","selectedSubtype","_data","subtypes","subtypeHasChanged","WEBSITE_TYPE","selectType","e","selectedType","types","value","resetSelectedSubtype","selectSubType","selectLink","selectedLink","find","datum","_a","subType","updateLinkLabel","linkText","editWebsiteLink","websiteLink","$websiteLinkInput","handleClose","close","reset","removeLink","emit","type","label","cancel","saveLink","val","assign","fetchData","d","uri","fetch","headers","websiteUuid","then","res","json","options","subtypeData","map","filter","index","self","indexOf","open","render","h","class","name","size","onClick","onToggle","ref","el","$toggle","toUpperCase","renderTypePage","renderLinkText","renderRemoveButton","color","componentWillLoad","JSON","parse","push","values","every","v","componentWillRender","setActivePosition","hasOwnProperty","componentDidLoad","position","placeholder","onRsInput","_b","_c","_d","renderWebsitePage","CustomEvent","renderSubtype","searchable","item","selectedIndex","onRsChange","subtype","slice","$subtypeDropdown","resetSelectedType","clear","typeIndex"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @rocketspark/domain-checker v1.0.3
3
+ * @rocketspark/domain-checker v1.0.8
4
4
  * https://github.com/rocketspark/domain-checker.git
5
5
  *
6
6
  * Copyright (c) Lee Reichardt and project contributors.