@oiz/stzh-components 3.6.0-beta2 → 3.6.0-beta4
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.
- package/dist/cjs/{app-globals-be1ca13c.js → app-globals-f1bf0bed.js} +2 -2
- package/dist/cjs/{app-globals-be1ca13c.js.map → app-globals-f1bf0bed.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stzh-components.cjs.js +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +16 -8
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +16 -8
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-a16a72e5.js → p-3f254548.js} +17 -9
- package/dist/components/p-3f254548.js.map +1 -0
- package/dist/components/{p-7cc4b88f.js → p-4508550a.js} +3 -3
- package/dist/components/{p-7cc4b88f.js.map → p-4508550a.js.map} +1 -1
- package/dist/components/{p-5a04123b.js → p-aa3fc1b5.js} +2 -2
- package/dist/components/{p-5a04123b.js.map → p-aa3fc1b5.js.map} +1 -1
- package/dist/components/stzh-amount.js +1 -1
- package/dist/components/stzh-appointments.js +3 -3
- package/dist/components/stzh-calendar.js +1 -1
- package/dist/components/stzh-datatable.js +1 -1
- package/dist/components/stzh-datepicker.js +1 -1
- package/dist/components/stzh-dropdown.js +1 -1
- package/dist/components/stzh-monthyearpicker.js +1 -1
- package/dist/components/stzh-panorama.js +1 -1
- package/dist/components/stzh-poilist.js +1 -1
- package/dist/components/stzh-search.js +1 -1
- package/dist/components/stzh-timepicker.js +1 -1
- package/dist/esm/{app-globals-48ba5185.js → app-globals-1b7d8e4f.js} +2 -2
- package/dist/esm/{app-globals-48ba5185.js.map → app-globals-1b7d8e4f.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stzh-components.js +1 -1
- package/dist/esm/stzh-dropdown.entry.js +16 -8
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/stzh-components/{p-193d694c.js → p-9b909077.js} +2 -2
- package/dist/stzh-components/{p-26c37e1c.entry.js → p-b6d653c5.entry.js} +2 -2
- package/dist/stzh-components/p-b6d653c5.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/package.json +3 -3
- package/dist/components/p-a16a72e5.js.map +0 -1
- package/dist/stzh-components/p-26c37e1c.entry.js.map +0 -1
- /package/dist/stzh-components/{p-193d694c.js.map → p-9b909077.js.map} +0 -0
|
@@ -480,9 +480,17 @@ export class StzhDropdown {
|
|
|
480
480
|
this.tomSelect = new TomSelect(this.select, tomSelectOptions);
|
|
481
481
|
if (!this.openOnFocus) {
|
|
482
482
|
// we still want to enable opening the dropdown by click
|
|
483
|
-
this.tomSelect.control.addEventListener("click", () => {
|
|
483
|
+
this.tomSelect.control.addEventListener("click", (event) => {
|
|
484
|
+
try {
|
|
485
|
+
event.preventDefault(); // Ensure this works without error
|
|
486
|
+
}
|
|
487
|
+
catch (_a) {
|
|
488
|
+
console.log('preventDefault failed');
|
|
489
|
+
}
|
|
484
490
|
this.tomSelect.open();
|
|
485
|
-
}
|
|
491
|
+
},
|
|
492
|
+
// passive false, otherwise angular wrapper will cause error
|
|
493
|
+
{ passive: false });
|
|
486
494
|
}
|
|
487
495
|
if (this.open) {
|
|
488
496
|
this.show();
|
|
@@ -520,18 +528,18 @@ export class StzhDropdown {
|
|
|
520
528
|
[`stzh-dropdown--size-${this.size}`]: !!this.size,
|
|
521
529
|
[`stzh-dropdown--${this.variant}`]: !!this.variant,
|
|
522
530
|
};
|
|
523
|
-
return (h(Host, { key: '
|
|
531
|
+
return (h(Host, { key: '58aa56d1ca27f5e0d9d12a47c630ac8137a12c2e', "is-invalid": this.invalid || errorUsed, tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, h("div", { key: 'c1be5709c6c9254ecb16b4ba9966f6388fa48b0f', class: classes, ref: (el) => (this.rootElement = el) }, h("div", { key: 'e53a8da47a55ea7c5650fe9c8ead7f6c99c06c70', class: "stzh-dropdown__wrapper" }, h("label", { key: 'a239ce7cc60f3d6583145eb58b51eac4b57f44ea', id: `${this.dropdownId}-label`, class: {
|
|
524
532
|
"stzh-dropdown__label": true,
|
|
525
533
|
"no-label-truncate": this.noLabelTruncate,
|
|
526
|
-
}, htmlFor: this.dropdownId }, this.label ? this.label : h("slot", { name: "label" }), !this.hideOptional && (h("span", { key: '
|
|
534
|
+
}, htmlFor: this.dropdownId }, this.label ? this.label : h("slot", { name: "label" }), !this.hideOptional && (h("span", { key: 'ead8f56e430c5e32cea5703fef7910652235577e', class: "stzh-dropdown__marker" }, h("span", { key: 'd992c5c32a8cfcc50c69c1d39b1fda7711253b8a', class: "stzh-dropdown__marker-symbol", "aria-hidden": "true" }, this.required
|
|
527
535
|
? this.localization.$globals.requiredFieldMarker
|
|
528
|
-
: this.localization.$globals.optionalFieldMarker), h("span", { key: '
|
|
536
|
+
: this.localization.$globals.optionalFieldMarker), h("span", { key: '268d111ebc8a7ed7d113bfd344a271743b361b02', class: "stzh-dropdown__marker-text" }, this.required
|
|
529
537
|
? this.localization.$globals.requiredFieldText
|
|
530
|
-
: this.localization.$globals.optionalFieldText)))), h("div", { key: '
|
|
538
|
+
: this.localization.$globals.optionalFieldText)))), h("div", { key: '597f08cbdecf4babe97696973c03fe05e6d446f4', class: "stzh-dropdown__field-wrapper" }, h("select", { key: 'c3005bdf6e9af41b2c7870fd759641bb827bd887', id: this.dropdownId, class: "stzh-dropdown__select", ref: (el) => (this.select = el), multiple: this.multiple, name: this.name, disabled: this.disabled, "aria-labelledby": `${this.dropdownId}-label ${this.dropdownId}-not-loading ${this.dropdownId}-no-results ${this.hideOptional &&
|
|
531
539
|
this.required &&
|
|
532
|
-
`${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}` }, h("slot", { key: '
|
|
540
|
+
`${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}` }, h("slot", { key: '0ec2afcf4ca56223b64813ea367665197031e020' })), this.inline && this.label && (h("div", { key: 'ecf2e2c05a521d8f34272b3f767338c262321249', class: "stzh-dropdown__sizer" }, this.label)), h("div", { key: '56ac67d5cfdc773827ecc2790fc7b5b77594d9c0', class: "stzh-dropdown__icon-angle-wrapper" }, this.iconAngle ? (h("stzh-icon", { name: this.iconAngle, class: "stzh-dropdown__icon-angle" })) : (h("slot", { name: "icon-angle" }))), h("div", { key: 'b9b57cf8a1af00ebe78656b912fdc4da6ea71869', class: "stzh-dropdown__icon-wrapper" }, this.icon ? (h("stzh-icon", { class: "stzh-dropdown__icon", name: this.icon })) : (h("slot", { name: "icon" }))), this.hideOptional && this.required && (h("div", { key: 'dc1628f3429df00408acd962e0c6cf1817bdd645', id: `${this.dropdownId}-required`, class: "stzh-dropdown__vhidden" }, this.localization.$globals.requiredFieldText)), this.invalid && (h("div", { key: '011a973ecc417d2a92806801a8db483de75a37f0', id: `${this.dropdownId}-invalid`, class: "stzh-dropdown__vhidden" }, this.localization.$globals.invalidFieldText)))), h("div", { key: '43b89f15d72ecc01df191baf05f1292d2ffe1e11', class: "stzh-dropdown__dropdown-wrapper", ref: (el) => (this.dropdownWrapperElement = el) }), (((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 ||
|
|
533
541
|
this.description ||
|
|
534
|
-
this.descriptionLong) && (h(StzhInputDescription, { key: '
|
|
542
|
+
this.descriptionLong) && (h(StzhInputDescription, { key: '385cb1aed8f46106f0bcef6cec03ba8c5d603bf2', classPrefix: "stzh-dropdown", id: `${this.dropdownId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel })))));
|
|
535
543
|
}
|
|
536
544
|
static get is() { return "stzh-dropdown"; }
|
|
537
545
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-dropdown.js","sourceRoot":"","sources":["../../../../src/components/stzh-dropdown/stzh-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAmB5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,SAAS,MAAM,8CAA8C,CAAC;AACrE,OAAO,qBAAqB,MAAM,gEAAgE,CAAC;AACnG,OAAO,wBAAwB,MAAM,mEAAmE,CAAC;AACzG,OAAO,sBAAsB,MAAM,iEAAiE,CAAC;AACrG,OAAO,0BAA0B,MAAM,sEAAsE,CAAC;AAE9G,MAAM,sBAAsB,GAAG,UAAU,eAAe;IACtD,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAiC,CAAC;QACrD,IAAI,KAAK;YAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAE/C,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;AACzD,SAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,CAAC;AAC/D,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC;AAC3D,SAAS,CAAC,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Method,\n Event,\n EventEmitter,\n Listen,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport {\n StzhDropdownSize,\n StzhDropdownOption,\n StzhDropdownChangeEvent,\n StzhDropdownItemAddEvent,\n StzhDropdownItemRemoveEvent,\n StzhDropdownOptionAddEvent,\n StzhDropdownOptionRemoveEvent,\n StzhDropdownOpenEvent,\n StzhDropdowCloseEvent,\n StzhDropdownFocusEvent,\n StzhDropdownBlurEvent,\n StzhDropdowInitEvent,\n} from \"../../index\";\n\nimport { StzhDropdownLocalizedText } from \"./stzh-dropdown.localization\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport TomSelect from \"../../libraries/tom-select/esm/tom-select.js\";\nimport TomSelectRemoveButton from \"../../libraries/tom-select/esm/plugins/remove_button/plugin.js\";\nimport TomSelectCheckboxOptions from \"../../libraries/tom-select/esm/plugins/checkbox_options/plugin.js\";\nimport TomSelectInputAutogrow from \"../../libraries/tom-select/esm/plugins/input_autogrow/plugin.js\";\nimport TomSelectNoBackspaceDelete from \"../../libraries/tom-select/esm/plugins/no_backspace_delete/plugin.js\";\n\nconst TomSelectInputReadonly = function (_plugin_options) {\n const self = this;\n\n self.on(\"initialize\", () => {\n const input = self.control_input as HTMLInputElement;\n if (input) input.readOnly = true;\n });\n};\n\nconst CLASS_FILLED = \"stzh-dropdown--is-filled\";\nconst CLASS_FOCUS = \"stzh-dropdown--has-focus\";\n\nTomSelect.define(\"remove_button\", TomSelectRemoveButton);\nTomSelect.define(\"checkbox_options\", TomSelectCheckboxOptions);\nTomSelect.define(\"input_autogrow\", TomSelectInputAutogrow);\nTomSelect.define(\"no_backspace_delete\", TomSelectNoBackspaceDelete);\nTomSelect.define(\"input_readonly\", TomSelectInputReadonly);\n\nlet dropdownCounter = 0;\n\n/**\n * @slot label - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot icon - Slot for left icon\n * @slot icon-angle - Slot for angle icon\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-dropdown\",\n styleUrl: \"stzh-dropdown.scss\",\n})\nexport class StzhDropdown {\n /** Available options */\n @Prop() options: StzhDropdownOption[] | string;\n private _options: StzhDropdownOption[];\n\n /**\n * Option groups that options will be bucketed into.\n * Make sure each object in the array has a property named whatever `optgroupValueField` is set to.\n */\n @Prop() optgroups: any[] | string;\n private _optgroups: any[];\n\n /**\n * Set selected options. Can be array set with JS or as JSON string.\n * To get the current (user) selected options, use `getItems` method.\n */\n @Prop({ mutable: true }) items: string[] | string;\n private _items: string[];\n\n /**\n * Default items (used by reset)\n */\n @Prop({ mutable: true }) defaultItems: string[];\n\n /**\n * An array of property names to analyze when filtering options.\n * Weights can be given to each field to improve search result:\n * `[{\"field\":\"text\",\"weight\":2},{\"field\":\"text2\",\"weight\":0.5}]`\n */\n @Prop() searchField: string[] | string = [\"text\"];\n private _searchField: string[];\n\n /** Whether multiple items option can be selected */\n @Prop({ reflect: true }) multiple: boolean = false;\n\n /** Show inline (auto width) */\n @Prop({ reflect: true }) inline: boolean = false;\n\n /** Don't wrap words when using inline (auto width) */\n @Prop({ reflect: true }) noWrap: boolean = false;\n\n /** The max number of options to display in the dropdown. Set to `null` for an unlimited number of options. */\n @Prop() maxOptions: number | null = null;\n\n /** When searching for multiple terms (separated by space), this is the operator used. Can be 'and' or 'or' */\n @Prop() searchConjunction: \"and\" | \"or\" = \"and\";\n\n /** Transform applied to input value before e.g. search is executed */\n @Prop() transformLoadQuery: \"trim\" | \"trim-to-single-ws\" | \"join\" | Function =\n \"trim\";\n\n /** If true, any options with a \"\" value will be treated like a normal option. This defaults to false to accommodate the common <select> practice of having the first empty option to act as a placeholder. */\n @Prop() allowEmptyOption: boolean = false;\n\n /** Show the dropdown immediately when the control receives focus. */\n @Prop() openOnFocus: boolean = true;\n\n /** After a selection is made, the dropdown will remain open if in a multi-selection control or will close in a single-selection control. Setting closeAfterSelect to true will force the dropdown to close after selections are made. Setting closeAfterSelect to false will keep the dropdown open after selections are made. */\n @Prop() closeAfterSelect: boolean | null = null;\n\n /** Invoked when new options should be loaded from the server. Called with the current query string and a callback function to call with the results when they are loaded (or nothing when an error arises). */\n @Prop() load: (query: string, callback: Function) => any[] | null = null;\n\n /** Minimum of characters required to execute the `load` function */\n @Prop() minCharacters: number = 3;\n\n /** The number of milliseconds to wait before requesting options from the server or null. If null, throttling is disabled. Useful when loading options dynamically while the user types a search / filter expression. */\n @Prop() loadThrottle: number = 300;\n\n /** If true, the load function will be called upon control initialization (with an empty search). Alternatively it can be set to 'focus' to call the load function when control receives focus. */\n @Prop() preload: boolean | \"focus\" = false;\n\n /** The name of the property to render as an option / item label (not needed when custom rendering functions are defined). */\n @Prop() labelField: string = \"text\";\n\n /** The name of the property to use as the value when an item is selected. */\n @Prop() valueField: string = \"value\";\n\n /** Only used for Angular control value accessors. Use `items` property to define preselected options. */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n\n /** The name of the property to group items by. */\n @Prop() optgroupField: string = \"optgroup\";\n\n /** The name of the property to render as an option group label (not needed when custom rendering functions are defined). */\n @Prop() optgroupLabelField: string = \"label\";\n\n /** The name of the option group property that serves as its unique identifier. */\n @Prop() optgroupValueField: string = \"value\";\n\n /** If truthy, all optgroups will be displayed in the same order as they were added (by the `$order` property). Otherwise, it will order based on the score of the results in each. */\n @Prop() lockOptgroupOrder: true;\n\n /** Name of hidden select element */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Initial open state */\n @Prop() open: boolean = false;\n\n /** Current open state (readonly) */\n @Prop({ reflect: true }) isOpen: boolean = false;\n\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"plain\" | \"filter\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhDropdownSize = \"default\";\n\n /** Size variant (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhDropdownSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhDropdownSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhDropdownSize;\n\n /** Size variant (above ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhDropdownSize;\n\n /** Whether the dropdown is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Popover placement */\n @Prop({ reflect: true }) popoverPlacement:\n | \"bottom\"\n | \"bottom-end\"\n | \"bottom-center\"\n | \"top\"\n | \"top-end\"\n | \"top-center\" = \"bottom\";\n\n /** Whether to stretch popover to fullwith of parent */\n @Prop({ reflect: true }) popoverFullwidth: \"horizontal\" | \"\" = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be truncate or not */\n @Prop() noLabelTruncate: boolean = false; \n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Angle icon */\n @Prop() iconAngle: string = \"angle-down\";\n\n /** Prevent option search */\n @Prop() noSearch: boolean = false;\n\n /** Prevent backspace delete */\n @Prop() noBackspaceDelete: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Translation strings */\n @Prop() localization: StzhDropdownLocalizedText;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"options\")\n optionsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._options = JSON.parse(newValue);\n } else {\n this._options = newValue;\n }\n }\n\n @Watch(\"items\")\n itemsWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._items = JSON.parse(newValue);\n } else {\n this._items = newValue;\n }\n this.value = this._items;\n }\n\n @Watch(\"searchField\")\n searchFieldWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._searchField = JSON.parse(newValue);\n } else {\n this._searchField = newValue;\n }\n }\n\n @Watch(\"optgroups\")\n optgroupsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._optgroups = JSON.parse(newValue);\n } else {\n this._optgroups = newValue;\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Element() element: HTMLStzhDropdownElement;\n\n /**\n * Returns the value of the control.\n * If multiple items can be selected,\n * this returns an array, otherwise a string.\n */\n @Method()\n async getValue(): Promise<string | string[]> {\n return this.tomSelect.getValue();\n }\n\n /** Set new value */\n @Method()\n async setValue(newValue: string | string[], silent: boolean = false) {\n this.tomSelect.setValue(newValue, silent);\n }\n\n /** Reset loaded/cached search queries (calls from load property function) */\n @Method()\n async resetLoadedSearches() {\n this.tomSelect.loadedSearches = {};\n }\n\n /** Return loaded/cached search queries (calls from load property function) */\n @Method()\n async getLoadedSearches() {\n return this.tomSelect.loadedSearches;\n }\n\n /** Return current selected items */\n @Method()\n async getItems() {\n return this.tomSelect.items;\n }\n\n /** Load items by calling load property/function */\n @Method()\n async loadItems(query: string) {\n return this.tomSelect.load(query);\n }\n\n /** Show dropdown popover */\n @Method()\n async show() {\n return this.tomSelect.open();\n }\n\n /** Hide dropdown popover */\n @Method()\n async hide() {\n return this.tomSelect.close();\n }\n\n /** Dropdown change event */\n @Event() stzhChange: EventEmitter<StzhDropdownChangeEvent>;\n\n /** Dropdown item added event */\n @Event() stzhItemAdd: EventEmitter<StzhDropdownItemAddEvent>;\n\n /** Dropdown item removed event */\n @Event() stzhItemRemove: EventEmitter<StzhDropdownItemRemoveEvent>;\n\n /** Dropdown option added event */\n @Event() stzhOptionAdd: EventEmitter<StzhDropdownOptionAddEvent>;\n\n /** Dropdown option removed event */\n @Event() stzhOptionRemove: EventEmitter<StzhDropdownOptionRemoveEvent>;\n\n /** Dropdown open event */\n @Event() stzhOpen: EventEmitter<StzhDropdownOpenEvent>;\n\n /** Dropdown close event */\n @Event() stzhClose: EventEmitter<StzhDropdowCloseEvent>;\n\n /** Dropdown focus event */\n @Event() stzhFocus: EventEmitter<StzhDropdownFocusEvent>;\n\n /** Dropdown blur event */\n @Event() stzhBlur: EventEmitter<StzhDropdownBlurEvent>;\n\n /** Dropdown focus event */\n @Event() stzhInit: EventEmitter<StzhDropdowInitEvent>;\n\n private tomSelect: TomSelect;\n private select: HTMLSelectElement;\n private rootElement: HTMLElement;\n private dropdownWrapperElement: HTMLElement;\n private dropdownId: string;\n private focusedByInput: boolean = false;\n\n private updateFilled() {\n if (this._items?.length > 0) {\n this.rootElement.classList.add(CLASS_FILLED);\n this.element.setAttribute(\"is-filled\", \"true\");\n } else {\n this.rootElement.classList.remove(CLASS_FILLED);\n this.element.removeAttribute(\"is-filled\");\n }\n }\n\n private handleReset = () => {\n this.items = [...this.defaultItems];\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.tomSelect.focus();\n }\n\n this.focusedByInput = false;\n };\n\n async componentWillLoad() {\n this.dropdownId = `stzh-dropdown-${dropdownCounter++}`;\n\n this.optionsWatcher(this.options);\n this.optgroupsWatcher(this.optgroups);\n this.itemsWatcher(this.items);\n this.searchFieldWatcher(this.searchField);\n this.errorWatcher(this.error);\n\n this.defaultItems = this.defaultItems || this._items;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(\n this.element,\n \"dropdown\"\n );\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return [\"isOpen\", \"value\"].includes(prop) === false;\n }\n\n async componentWillUpdate() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n }\n\n async componentDidRender() {\n if (this.tomSelect) {\n return;\n }\n\n const plugins = {};\n\n if (this.noSearch) {\n plugins[\"input_readonly\"] = {};\n } else {\n plugins[\"input_autogrow\"] = {};\n }\n\n if (this.noBackspaceDelete) {\n plugins[\"no_backspace_delete\"] = {};\n }\n\n if (this.multiple) {\n plugins[\"checkbox_options\"] = {};\n }\n\n if (this.multiple || this.variant === \"filter\") {\n plugins[\"remove_button\"] = {\n title: this.localization.removeButtonTitle,\n label:\n '<stzh-icon name=\"close-big\" class=\"stzh-dropdown__remove-icon\"></stzh-icon>',\n };\n }\n\n const tomSelectOptions: any = {\n dropdownParent: this.dropdownWrapperElement,\n openDisplay: \"flex\",\n plugins,\n maxItems: this.multiple ? null : 1,\n maxOptions: this.maxOptions,\n items: this._items,\n optgroups: this._optgroups,\n searchField: this._searchField,\n searchConjunction: this.searchConjunction,\n allowEmptyOption: this.allowEmptyOption,\n closeAfterSelect:\n this.closeAfterSelect !== null ? this.closeAfterSelect : !this.multiple,\n labelField: this.labelField,\n valueField: this.valueField,\n optgroupField: this.optgroupField,\n optgroupLabelField: this.optgroupLabelField,\n optgroupValueField: this.optgroupValueField,\n lockOptgroupOrder: this.lockOptgroupOrder,\n load: this.load,\n transformLoadQuery: (inputValue: string) => {\n if (typeof this.transformLoadQuery === \"function\") {\n return this.transformLoadQuery(inputValue);\n } else if (this.transformLoadQuery === \"join\") {\n const lastQueries = Array.from(this.tomSelect.controlChildren()).map(\n (element: HTMLElement) => element.innerText\n );\n\n return (\n (lastQueries.length > 0\n ? lastQueries.join(\" \") + (inputValue ? \" \" : \"\")\n : \"\") + inputValue.replace(/\\s\\s+/g, \" \")\n );\n } else if (this.transformLoadQuery === \"trim-to-single-ws\") {\n return inputValue.replace(/\\s\\s+/g, \" \");\n } else {\n return inputValue.trim();\n }\n },\n shouldLoad: (query: string) => {\n return query.length >= this.minCharacters;\n },\n loadThrottle: this.loadThrottle,\n preload: this.preload,\n openOnFocus: this.openOnFocus,\n loadingClass: \"is-loading\",\n hideSelected: false,\n duplicates: false,\n delimiter: \",\",\n copyClassesToDropdown: false,\n hidePlaceholder: null,\n // if you want the user to be able to add own items enable this option\n // (but checkbox_options plugin throws an error and would need a fix first)\n // create: function(input, callback) {\n // callback({ value: input, text: input });\n // },\n // createOnBlur: false,\n // createFilter: null,\n // persist: false,\n render: {\n option: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__option\">\n <span class=\"stzh-dropdown__option-title\">\n ${escape(data[this.labelField])}\n </span>\n <stzh-icon name=\"checkmark\" class=\"stzh-dropdown__option-check\"></stzh-icon>\n </div>\n `;\n },\n item: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__item\">\n ${escape(data[this.labelField])}\n </div>\n `;\n },\n option_create: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__create\">\n ${this.localization.create.replace(\n /\\{x\\}/gi,\n escape(data.input)\n )}…\n </div>\n `;\n },\n no_results: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__no-results\" id=\"${\n this.dropdownId\n }-no-results\">\n ${this.localization.noResults.replace(\n /\\{x\\}/gi,\n escape(data.input)\n )}\n </div>`;\n },\n not_loading:\n this.load === null\n ? null\n : (_data, escape) => {\n return `\n <div class=\"stzh-dropdown__not-loading\" id=\"${\n this.dropdownId\n }-not-loading\">\n ${this.localization.notLoading.replace(\n /\\{x\\}/gi,\n escape(this.minCharacters.toString())\n )}\n </div>\n `;\n },\n optgroup: (data) => {\n let optgroup = document.createElement(\"div\");\n optgroup.className = \"stzh-dropdown__optgroup\";\n optgroup.appendChild(data.options);\n return optgroup;\n },\n optgroup_header: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__optgroup-header\">\n ${escape(data.label)}\n </div>\n `;\n },\n loading: () => {\n return `\n <div class=\"stzh-dropdown__loader\">\n <stzh-loader></stzh-loader>\n </div>\n `;\n },\n dropdown: () => {\n return `<div class=\"stzh-dropdown__dropdown\"></div>`;\n },\n },\n onChange: (value) => {\n this._items = this.tomSelect.items;\n this.updateFilled();\n this.value = this.multiple ? this._items : this._items[0];\n this.stzhChange.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onItemAdd: (value) => {\n this._items = this.tomSelect.items;\n this.stzhItemAdd.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onItemRemove: (value) => {\n this._items = this.tomSelect.items;\n this.stzhItemRemove.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onOptionAdd: (value) => {\n this._options = this.tomSelect.options;\n this.updateFilled();\n\n this.stzhOptionAdd.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onOptionRemove: (value) => {\n this._options = this.tomSelect.options;\n this.updateFilled();\n\n this.stzhOptionRemove.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onDropdownOpen: () => {\n this.isOpen = true;\n this.stzhOpen.emit({\n component: \"stzh-dropdown\",\n });\n },\n onDropdownClose: () => {\n this.isOpen = false;\n this.stzhClose.emit({\n component: \"stzh-dropdown\",\n });\n },\n onFocus: () => {\n this.focusedByInput = true;\n\n if (this.tomSelect.load && this.preload === \"focus\") {\n // to be able to execute load function again, we reset loaded searches\n this.resetLoadedSearches();\n\n // if results have been preloaded before, load them now directly with load function\n if (this.tomSelect.wrapper.classList.contains(\"preloaded\")) {\n // since tomSelect.preload() doesn't call tomSelect.shouldCall() method internally (to check for minCharacters),\n // we will also not call it (this.tomSelect.settings.shouldLoad.call(this.tomSelect, ''))\n this.tomSelect.load(\"\");\n }\n }\n\n this.rootElement.classList.add(CLASS_FOCUS);\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-dropdown\",\n originalEvent: {\n target: this.tomSelect.control,\n },\n });\n },\n onBlur: () => {\n this.rootElement.classList.remove(CLASS_FOCUS);\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-dropdown\",\n });\n },\n onInitialize: () => {\n this.stzhInit.emit({\n component: \"stzh-dropdown\",\n });\n },\n onLoad: () => {\n this._options = this.tomSelect.options;\n },\n };\n\n if (this._options) {\n tomSelectOptions.options = this._options;\n }\n\n if (this._optgroups) {\n tomSelectOptions.optgroups = this._optgroups;\n }\n\n if (this._items) {\n tomSelectOptions.items = this._items;\n }\n\n this.updateFilled();\n this.tomSelect = new TomSelect(this.select, tomSelectOptions);\n\n if (!this.openOnFocus) {\n // we still want to enable opening the dropdown by click\n this.tomSelect.control.addEventListener(\"click\", () => {\n this.tomSelect.open();\n });\n }\n\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const descriptionUsed =\n hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed =\n hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-dropdown\": true,\n \"stzh-dropdown--is-inline\": this.inline,\n \"stzh-dropdown--has-no-wrap\": this.noWrap,\n \"stzh-dropdown--is-multiple\": this.multiple,\n \"stzh-dropdown--is-disabled\": this.disabled,\n \"stzh-dropdown--is-required\": this.required,\n \"stzh-dropdown--is-invalid\": this.invalid || errorUsed,\n [CLASS_FILLED]: this._items && this._items.length > 0,\n \"stzh-dropdown--has-icon\": iconUsed,\n \"stzh-dropdown--has-description\": descriptionUsed,\n \"stzh-dropdown--has-description-long\": descriptionLongUsed,\n \"stzh-dropdown--has-error\": errorUsed,\n \"stzh-dropdown--has-no-search\": this.noSearch,\n \"stzh-dropdown--has-label-hidden\": this.labelHidden,\n [`stzh-dropdown--popover-placement-${this.popoverPlacement}`]:\n !!this.popoverPlacement,\n [`stzh-dropdown--popover-fullwidth-${this.popoverFullwidth}`]:\n !!this.popoverFullwidth,\n [`stzh-dropdown--size-${this.size}`]: !!this.size,\n [`stzh-dropdown--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n >\n <div\n class={classes}\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-dropdown__wrapper\">\n <label\n id={`${this.dropdownId}-label`}\n class={{\n \"stzh-dropdown__label\": true,\n \"no-label-truncate\": this.noLabelTruncate,\n }}\n htmlFor={this.dropdownId}\n >\n {this.label ? this.label : <slot name=\"label\"></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-dropdown__marker\">\n <span class=\"stzh-dropdown__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-dropdown__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n\n <div class=\"stzh-dropdown__field-wrapper\">\n {/* tom-select replaces this select with an combobox.\n Since it doesn't support aria-(describedby/required/invalid),\n we write necessary status information in the aria-labelledby */}\n <select\n id={this.dropdownId}\n class=\"stzh-dropdown__select\"\n ref={(el) => (this.select = el as HTMLSelectElement)}\n multiple={this.multiple}\n name={this.name}\n disabled={this.disabled}\n aria-labelledby={`${this.dropdownId}-label ${\n this.dropdownId\n }-not-loading ${this.dropdownId}-no-results ${\n this.hideOptional &&\n this.required &&\n `${this.dropdownId}-required`\n } ${this.invalid && `${this.dropdownId}-invalid`} ${\n this.dropdownId\n }-description ${this.a11yDescribedby}`}\n >\n <slot></slot>\n </select>\n\n {this.inline && this.label && (\n <div class=\"stzh-dropdown__sizer\">{this.label}</div>\n )}\n\n <div class=\"stzh-dropdown__icon-angle-wrapper\">\n {this.iconAngle ? (\n <stzh-icon\n name={this.iconAngle}\n class=\"stzh-dropdown__icon-angle\"\n ></stzh-icon>\n ) : (\n <slot name=\"icon-angle\"></slot>\n )}\n </div>\n\n <div class=\"stzh-dropdown__icon-wrapper\">\n {this.icon ? (\n <stzh-icon\n class=\"stzh-dropdown__icon\"\n name={this.icon}\n ></stzh-icon>\n ) : (\n <slot name=\"icon\"></slot>\n )}\n </div>\n\n {this.hideOptional && this.required && (\n <div\n id={`${this.dropdownId}-required`}\n class=\"stzh-dropdown__vhidden\"\n >\n {this.localization.$globals.requiredFieldText}\n </div>\n )}\n\n {this.invalid && (\n <div\n id={`${this.dropdownId}-invalid`}\n class=\"stzh-dropdown__vhidden\"\n >\n {this.localization.$globals.invalidFieldText}\n </div>\n )}\n </div>\n </div>\n\n <div\n class=\"stzh-dropdown__dropdown-wrapper\"\n ref={(el) => (this.dropdownWrapperElement = el as HTMLDivElement)}\n ></div>\n\n {(this._error?.length > 0 ||\n this.description ||\n this.descriptionLong) && (\n <StzhInputDescription\n classPrefix=\"stzh-dropdown\"\n id={`${this.dropdownId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={\n this.localization.$globals.moreInfoButtonLabel\n }\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-dropdown.js","sourceRoot":"","sources":["../../../../src/components/stzh-dropdown/stzh-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,CAAC,EACD,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAmB5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,SAAS,MAAM,8CAA8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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Prop,\n h,\n Element,\n Watch,\n Method,\n Event,\n EventEmitter,\n Listen,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport {\n StzhDropdownSize,\n StzhDropdownOption,\n StzhDropdownChangeEvent,\n StzhDropdownItemAddEvent,\n StzhDropdownItemRemoveEvent,\n StzhDropdownOptionAddEvent,\n StzhDropdownOptionRemoveEvent,\n StzhDropdownOpenEvent,\n StzhDropdowCloseEvent,\n StzhDropdownFocusEvent,\n StzhDropdownBlurEvent,\n StzhDropdowInitEvent,\n} from \"../../index\";\n\nimport { StzhDropdownLocalizedText } from \"./stzh-dropdown.localization\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport TomSelect from \"../../libraries/tom-select/esm/tom-select.js\";\nimport TomSelectRemoveButton from \"../../libraries/tom-select/esm/plugins/remove_button/plugin.js\";\nimport TomSelectCheckboxOptions from \"../../libraries/tom-select/esm/plugins/checkbox_options/plugin.js\";\nimport TomSelectInputAutogrow from \"../../libraries/tom-select/esm/plugins/input_autogrow/plugin.js\";\nimport TomSelectNoBackspaceDelete from \"../../libraries/tom-select/esm/plugins/no_backspace_delete/plugin.js\";\n\nconst TomSelectInputReadonly = function (_plugin_options) {\n const self = this;\n\n self.on(\"initialize\", () => {\n const input = self.control_input as HTMLInputElement;\n if (input) input.readOnly = true;\n });\n};\n\nconst CLASS_FILLED = \"stzh-dropdown--is-filled\";\nconst CLASS_FOCUS = \"stzh-dropdown--has-focus\";\n\nTomSelect.define(\"remove_button\", TomSelectRemoveButton);\nTomSelect.define(\"checkbox_options\", TomSelectCheckboxOptions);\nTomSelect.define(\"input_autogrow\", TomSelectInputAutogrow);\nTomSelect.define(\"no_backspace_delete\", TomSelectNoBackspaceDelete);\nTomSelect.define(\"input_readonly\", TomSelectInputReadonly);\n\nlet dropdownCounter = 0;\n\n/**\n * @slot label - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot icon - Slot for left icon\n * @slot icon-angle - Slot for angle icon\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-dropdown\",\n styleUrl: \"stzh-dropdown.scss\",\n})\nexport class StzhDropdown {\n /** Available options */\n @Prop() options: StzhDropdownOption[] | string;\n private _options: StzhDropdownOption[];\n\n /**\n * Option groups that options will be bucketed into.\n * Make sure each object in the array has a property named whatever `optgroupValueField` is set to.\n */\n @Prop() optgroups: any[] | string;\n private _optgroups: any[];\n\n /**\n * Set selected options. Can be array set with JS or as JSON string.\n * To get the current (user) selected options, use `getItems` method.\n */\n @Prop({ mutable: true }) items: string[] | string;\n private _items: string[];\n\n /**\n * Default items (used by reset)\n */\n @Prop({ mutable: true }) defaultItems: string[];\n\n /**\n * An array of property names to analyze when filtering options.\n * Weights can be given to each field to improve search result:\n * `[{\"field\":\"text\",\"weight\":2},{\"field\":\"text2\",\"weight\":0.5}]`\n */\n @Prop() searchField: string[] | string = [\"text\"];\n private _searchField: string[];\n\n /** Whether multiple items option can be selected */\n @Prop({ reflect: true }) multiple: boolean = false;\n\n /** Show inline (auto width) */\n @Prop({ reflect: true }) inline: boolean = false;\n\n /** Don't wrap words when using inline (auto width) */\n @Prop({ reflect: true }) noWrap: boolean = false;\n\n /** The max number of options to display in the dropdown. Set to `null` for an unlimited number of options. */\n @Prop() maxOptions: number | null = null;\n\n /** When searching for multiple terms (separated by space), this is the operator used. Can be 'and' or 'or' */\n @Prop() searchConjunction: \"and\" | \"or\" = \"and\";\n\n /** Transform applied to input value before e.g. search is executed */\n @Prop() transformLoadQuery: \"trim\" | \"trim-to-single-ws\" | \"join\" | Function =\n \"trim\";\n\n /** If true, any options with a \"\" value will be treated like a normal option. This defaults to false to accommodate the common <select> practice of having the first empty option to act as a placeholder. */\n @Prop() allowEmptyOption: boolean = false;\n\n /** Show the dropdown immediately when the control receives focus. */\n @Prop() openOnFocus: boolean = true;\n\n /** After a selection is made, the dropdown will remain open if in a multi-selection control or will close in a single-selection control. Setting closeAfterSelect to true will force the dropdown to close after selections are made. Setting closeAfterSelect to false will keep the dropdown open after selections are made. */\n @Prop() closeAfterSelect: boolean | null = null;\n\n /** Invoked when new options should be loaded from the server. Called with the current query string and a callback function to call with the results when they are loaded (or nothing when an error arises). */\n @Prop() load: (query: string, callback: Function) => any[] | null = null;\n\n /** Minimum of characters required to execute the `load` function */\n @Prop() minCharacters: number = 3;\n\n /** The number of milliseconds to wait before requesting options from the server or null. If null, throttling is disabled. Useful when loading options dynamically while the user types a search / filter expression. */\n @Prop() loadThrottle: number = 300;\n\n /** If true, the load function will be called upon control initialization (with an empty search). Alternatively it can be set to 'focus' to call the load function when control receives focus. */\n @Prop() preload: boolean | \"focus\" = false;\n\n /** The name of the property to render as an option / item label (not needed when custom rendering functions are defined). */\n @Prop() labelField: string = \"text\";\n\n /** The name of the property to use as the value when an item is selected. */\n @Prop() valueField: string = \"value\";\n\n /** Only used for Angular control value accessors. Use `items` property to define preselected options. */\n @Prop({ mutable: true }) value: string | string[] = \"\";\n\n /** The name of the property to group items by. */\n @Prop() optgroupField: string = \"optgroup\";\n\n /** The name of the property to render as an option group label (not needed when custom rendering functions are defined). */\n @Prop() optgroupLabelField: string = \"label\";\n\n /** The name of the option group property that serves as its unique identifier. */\n @Prop() optgroupValueField: string = \"value\";\n\n /** If truthy, all optgroups will be displayed in the same order as they were added (by the `$order` property). Otherwise, it will order based on the score of the results in each. */\n @Prop() lockOptgroupOrder: true;\n\n /** Name of hidden select element */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Initial open state */\n @Prop() open: boolean = false;\n\n /** Current open state (readonly) */\n @Prop({ reflect: true }) isOpen: boolean = false;\n\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"plain\" | \"filter\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: StzhDropdownSize = \"default\";\n\n /** Size variant (above small breakpoint) */\n @Prop({ reflect: true }) sizeSmall: StzhDropdownSize;\n\n /** Size variant (above medium breakpoint) */\n @Prop({ reflect: true }) sizeMedium: StzhDropdownSize;\n\n /** Size variant (above large breakpoint) */\n @Prop({ reflect: true }) sizeLarge: StzhDropdownSize;\n\n /** Size variant (above ultra breakpoint) */\n @Prop({ reflect: true }) sizeUltra: StzhDropdownSize;\n\n /** Whether the dropdown is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Popover placement */\n @Prop({ reflect: true }) popoverPlacement:\n | \"bottom\"\n | \"bottom-end\"\n | \"bottom-center\"\n | \"top\"\n | \"top-end\"\n | \"top-center\" = \"bottom\";\n\n /** Whether to stretch popover to fullwith of parent */\n @Prop({ reflect: true }) popoverFullwidth: \"horizontal\" | \"\" = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be truncate or not */\n @Prop() noLabelTruncate: boolean = false;\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Angle icon */\n @Prop() iconAngle: string = \"angle-down\";\n\n /** Prevent option search */\n @Prop() noSearch: boolean = false;\n\n /** Prevent backspace delete */\n @Prop() noBackspaceDelete: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form to hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Translation strings */\n @Prop() localization: StzhDropdownLocalizedText;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"options\")\n optionsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._options = JSON.parse(newValue);\n } else {\n this._options = newValue;\n }\n }\n\n @Watch(\"items\")\n itemsWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._items = JSON.parse(newValue);\n } else {\n this._items = newValue;\n }\n this.value = this._items;\n }\n\n @Watch(\"searchField\")\n searchFieldWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._searchField = JSON.parse(newValue);\n } else {\n this._searchField = newValue;\n }\n }\n\n @Watch(\"optgroups\")\n optgroupsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._optgroups = JSON.parse(newValue);\n } else {\n this._optgroups = newValue;\n }\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n @Element() element: HTMLStzhDropdownElement;\n\n /**\n * Returns the value of the control.\n * If multiple items can be selected,\n * this returns an array, otherwise a string.\n */\n @Method()\n async getValue(): Promise<string | string[]> {\n return this.tomSelect.getValue();\n }\n\n /** Set new value */\n @Method()\n async setValue(newValue: string | string[], silent: boolean = false) {\n this.tomSelect.setValue(newValue, silent);\n }\n\n /** Reset loaded/cached search queries (calls from load property function) */\n @Method()\n async resetLoadedSearches() {\n this.tomSelect.loadedSearches = {};\n }\n\n /** Return loaded/cached search queries (calls from load property function) */\n @Method()\n async getLoadedSearches() {\n return this.tomSelect.loadedSearches;\n }\n\n /** Return current selected items */\n @Method()\n async getItems() {\n return this.tomSelect.items;\n }\n\n /** Load items by calling load property/function */\n @Method()\n async loadItems(query: string) {\n return this.tomSelect.load(query);\n }\n\n /** Show dropdown popover */\n @Method()\n async show() {\n return this.tomSelect.open();\n }\n\n /** Hide dropdown popover */\n @Method()\n async hide() {\n return this.tomSelect.close();\n }\n\n /** Dropdown change event */\n @Event() stzhChange: EventEmitter<StzhDropdownChangeEvent>;\n\n /** Dropdown item added event */\n @Event() stzhItemAdd: EventEmitter<StzhDropdownItemAddEvent>;\n\n /** Dropdown item removed event */\n @Event() stzhItemRemove: EventEmitter<StzhDropdownItemRemoveEvent>;\n\n /** Dropdown option added event */\n @Event() stzhOptionAdd: EventEmitter<StzhDropdownOptionAddEvent>;\n\n /** Dropdown option removed event */\n @Event() stzhOptionRemove: EventEmitter<StzhDropdownOptionRemoveEvent>;\n\n /** Dropdown open event */\n @Event() stzhOpen: EventEmitter<StzhDropdownOpenEvent>;\n\n /** Dropdown close event */\n @Event() stzhClose: EventEmitter<StzhDropdowCloseEvent>;\n\n /** Dropdown focus event */\n @Event() stzhFocus: EventEmitter<StzhDropdownFocusEvent>;\n\n /** Dropdown blur event */\n @Event() stzhBlur: EventEmitter<StzhDropdownBlurEvent>;\n\n /** Dropdown focus event */\n @Event() stzhInit: EventEmitter<StzhDropdowInitEvent>;\n\n private tomSelect: TomSelect;\n private select: HTMLSelectElement;\n private rootElement: HTMLElement;\n private dropdownWrapperElement: HTMLElement;\n private dropdownId: string;\n private focusedByInput: boolean = false;\n\n private updateFilled() {\n if (this._items?.length > 0) {\n this.rootElement.classList.add(CLASS_FILLED);\n this.element.setAttribute(\"is-filled\", \"true\");\n } else {\n this.rootElement.classList.remove(CLASS_FILLED);\n this.element.removeAttribute(\"is-filled\");\n }\n }\n\n private handleReset = () => {\n this.items = [...this.defaultItems];\n };\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.tomSelect.focus();\n }\n\n this.focusedByInput = false;\n };\n\n async componentWillLoad() {\n this.dropdownId = `stzh-dropdown-${dropdownCounter++}`;\n\n this.optionsWatcher(this.options);\n this.optgroupsWatcher(this.optgroups);\n this.itemsWatcher(this.items);\n this.searchFieldWatcher(this.searchField);\n this.errorWatcher(this.error);\n\n this.defaultItems = this.defaultItems || this._items;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(\n this.element,\n \"dropdown\"\n );\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return [\"isOpen\", \"value\"].includes(prop) === false;\n }\n\n async componentWillUpdate() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n }\n\n async componentDidRender() {\n if (this.tomSelect) {\n return;\n }\n\n const plugins = {};\n\n if (this.noSearch) {\n plugins[\"input_readonly\"] = {};\n } else {\n plugins[\"input_autogrow\"] = {};\n }\n\n if (this.noBackspaceDelete) {\n plugins[\"no_backspace_delete\"] = {};\n }\n\n if (this.multiple) {\n plugins[\"checkbox_options\"] = {};\n }\n\n if (this.multiple || this.variant === \"filter\") {\n plugins[\"remove_button\"] = {\n title: this.localization.removeButtonTitle,\n label:\n '<stzh-icon name=\"close-big\" class=\"stzh-dropdown__remove-icon\"></stzh-icon>',\n };\n }\n\n const tomSelectOptions: any = {\n dropdownParent: this.dropdownWrapperElement,\n openDisplay: \"flex\",\n plugins,\n maxItems: this.multiple ? null : 1,\n maxOptions: this.maxOptions,\n items: this._items,\n optgroups: this._optgroups,\n searchField: this._searchField,\n searchConjunction: this.searchConjunction,\n allowEmptyOption: this.allowEmptyOption,\n closeAfterSelect:\n this.closeAfterSelect !== null ? this.closeAfterSelect : !this.multiple,\n labelField: this.labelField,\n valueField: this.valueField,\n optgroupField: this.optgroupField,\n optgroupLabelField: this.optgroupLabelField,\n optgroupValueField: this.optgroupValueField,\n lockOptgroupOrder: this.lockOptgroupOrder,\n load: this.load,\n transformLoadQuery: (inputValue: string) => {\n if (typeof this.transformLoadQuery === \"function\") {\n return this.transformLoadQuery(inputValue);\n } else if (this.transformLoadQuery === \"join\") {\n const lastQueries = Array.from(this.tomSelect.controlChildren()).map(\n (element: HTMLElement) => element.innerText\n );\n\n return (\n (lastQueries.length > 0\n ? lastQueries.join(\" \") + (inputValue ? \" \" : \"\")\n : \"\") + inputValue.replace(/\\s\\s+/g, \" \")\n );\n } else if (this.transformLoadQuery === \"trim-to-single-ws\") {\n return inputValue.replace(/\\s\\s+/g, \" \");\n } else {\n return inputValue.trim();\n }\n },\n shouldLoad: (query: string) => {\n return query.length >= this.minCharacters;\n },\n loadThrottle: this.loadThrottle,\n preload: this.preload,\n openOnFocus: this.openOnFocus,\n loadingClass: \"is-loading\",\n hideSelected: false,\n duplicates: false,\n delimiter: \",\",\n copyClassesToDropdown: false,\n hidePlaceholder: null,\n // if you want the user to be able to add own items enable this option\n // (but checkbox_options plugin throws an error and would need a fix first)\n // create: function(input, callback) {\n // callback({ value: input, text: input });\n // },\n // createOnBlur: false,\n // createFilter: null,\n // persist: false,\n render: {\n option: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__option\">\n <span class=\"stzh-dropdown__option-title\">\n ${escape(data[this.labelField])}\n </span>\n <stzh-icon name=\"checkmark\" class=\"stzh-dropdown__option-check\"></stzh-icon>\n </div>\n `;\n },\n item: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__item\">\n ${escape(data[this.labelField])}\n </div>\n `;\n },\n option_create: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__create\">\n ${this.localization.create.replace(\n /\\{x\\}/gi,\n escape(data.input)\n )}…\n </div>\n `;\n },\n no_results: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__no-results\" id=\"${\n this.dropdownId\n }-no-results\">\n ${this.localization.noResults.replace(\n /\\{x\\}/gi,\n escape(data.input)\n )}\n </div>`;\n },\n not_loading:\n this.load === null\n ? null\n : (_data, escape) => {\n return `\n <div class=\"stzh-dropdown__not-loading\" id=\"${\n this.dropdownId\n }-not-loading\">\n ${this.localization.notLoading.replace(\n /\\{x\\}/gi,\n escape(this.minCharacters.toString())\n )}\n </div>\n `;\n },\n optgroup: (data) => {\n let optgroup = document.createElement(\"div\");\n optgroup.className = \"stzh-dropdown__optgroup\";\n optgroup.appendChild(data.options);\n return optgroup;\n },\n optgroup_header: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__optgroup-header\">\n ${escape(data.label)}\n </div>\n `;\n },\n loading: () => {\n return `\n <div class=\"stzh-dropdown__loader\">\n <stzh-loader></stzh-loader>\n </div>\n `;\n },\n dropdown: () => {\n return `<div class=\"stzh-dropdown__dropdown\"></div>`;\n },\n },\n onChange: (value) => {\n this._items = this.tomSelect.items;\n this.updateFilled();\n this.value = this.multiple ? this._items : this._items[0];\n this.stzhChange.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onItemAdd: (value) => {\n this._items = this.tomSelect.items;\n this.stzhItemAdd.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onItemRemove: (value) => {\n this._items = this.tomSelect.items;\n this.stzhItemRemove.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onOptionAdd: (value) => {\n this._options = this.tomSelect.options;\n this.updateFilled();\n\n this.stzhOptionAdd.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onOptionRemove: (value) => {\n this._options = this.tomSelect.options;\n this.updateFilled();\n\n this.stzhOptionRemove.emit({\n component: \"stzh-dropdown\",\n value,\n });\n },\n onDropdownOpen: () => {\n this.isOpen = true;\n this.stzhOpen.emit({\n component: \"stzh-dropdown\",\n });\n },\n onDropdownClose: () => {\n this.isOpen = false;\n this.stzhClose.emit({\n component: \"stzh-dropdown\",\n });\n },\n onFocus: () => {\n this.focusedByInput = true;\n\n if (this.tomSelect.load && this.preload === \"focus\") {\n // to be able to execute load function again, we reset loaded searches\n this.resetLoadedSearches();\n\n // if results have been preloaded before, load them now directly with load function\n if (this.tomSelect.wrapper.classList.contains(\"preloaded\")) {\n // since tomSelect.preload() doesn't call tomSelect.shouldCall() method internally (to check for minCharacters),\n // we will also not call it (this.tomSelect.settings.shouldLoad.call(this.tomSelect, ''))\n this.tomSelect.load(\"\");\n }\n }\n\n this.rootElement.classList.add(CLASS_FOCUS);\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-dropdown\",\n originalEvent: {\n target: this.tomSelect.control,\n },\n });\n },\n onBlur: () => {\n this.rootElement.classList.remove(CLASS_FOCUS);\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false,\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-dropdown\",\n });\n },\n onInitialize: () => {\n this.stzhInit.emit({\n component: \"stzh-dropdown\",\n });\n },\n onLoad: () => {\n this._options = this.tomSelect.options;\n },\n };\n\n if (this._options) {\n tomSelectOptions.options = this._options;\n }\n\n if (this._optgroups) {\n tomSelectOptions.optgroups = this._optgroups;\n }\n\n if (this._items) {\n tomSelectOptions.items = this._items;\n }\n\n this.updateFilled();\n this.tomSelect = new TomSelect(this.select, tomSelectOptions);\n\n if (!this.openOnFocus) {\n // we still want to enable opening the dropdown by click\n this.tomSelect.control.addEventListener(\n \"click\",\n (event) => {\n try {\n event.preventDefault(); // Ensure this works without error\n } catch {console.log('preventDefault failed')}\n this.tomSelect.open();\n },\n // passive false, otherwise angular wrapper will cause error\n { passive: false }\n );\n }\n\n if (this.open) {\n this.show();\n }\n }\n\n disconnectedCallback() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const descriptionUsed =\n hasSlot(this.element, \"description\") || !!this.description;\n const descriptionLongUsed =\n hasSlot(this.element, \"description-long\") || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, \"error\") || this._error?.length > 0;\n\n const classes = {\n \"stzh-dropdown\": true,\n \"stzh-dropdown--is-inline\": this.inline,\n \"stzh-dropdown--has-no-wrap\": this.noWrap,\n \"stzh-dropdown--is-multiple\": this.multiple,\n \"stzh-dropdown--is-disabled\": this.disabled,\n \"stzh-dropdown--is-required\": this.required,\n \"stzh-dropdown--is-invalid\": this.invalid || errorUsed,\n [CLASS_FILLED]: this._items && this._items.length > 0,\n \"stzh-dropdown--has-icon\": iconUsed,\n \"stzh-dropdown--has-description\": descriptionUsed,\n \"stzh-dropdown--has-description-long\": descriptionLongUsed,\n \"stzh-dropdown--has-error\": errorUsed,\n \"stzh-dropdown--has-no-search\": this.noSearch,\n \"stzh-dropdown--has-label-hidden\": this.labelHidden,\n [`stzh-dropdown--popover-placement-${this.popoverPlacement}`]:\n !!this.popoverPlacement,\n [`stzh-dropdown--popover-fullwidth-${this.popoverFullwidth}`]:\n !!this.popoverFullwidth,\n [`stzh-dropdown--size-${this.size}`]: !!this.size,\n [`stzh-dropdown--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host\n is-invalid={this.invalid || errorUsed}\n tabindex={this.disabled ? null : \"-1\"}\n onFocus={this.onRootFocus}\n >\n <div\n class={classes}\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-dropdown__wrapper\">\n <label\n id={`${this.dropdownId}-label`}\n class={{\n \"stzh-dropdown__label\": true,\n \"no-label-truncate\": this.noLabelTruncate,\n }}\n htmlFor={this.dropdownId}\n >\n {this.label ? this.label : <slot name=\"label\"></slot>}\n {!this.hideOptional && (\n <span class=\"stzh-dropdown__marker\">\n <span class=\"stzh-dropdown__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker}\n </span>\n <span class=\"stzh-dropdown__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText}\n </span>\n </span>\n )}\n </label>\n\n <div class=\"stzh-dropdown__field-wrapper\">\n {/* tom-select replaces this select with an combobox.\n Since it doesn't support aria-(describedby/required/invalid),\n we write necessary status information in the aria-labelledby */}\n <select\n id={this.dropdownId}\n class=\"stzh-dropdown__select\"\n ref={(el) => (this.select = el as HTMLSelectElement)}\n multiple={this.multiple}\n name={this.name}\n disabled={this.disabled}\n aria-labelledby={`${this.dropdownId}-label ${\n this.dropdownId\n }-not-loading ${this.dropdownId}-no-results ${\n this.hideOptional &&\n this.required &&\n `${this.dropdownId}-required`\n } ${this.invalid && `${this.dropdownId}-invalid`} ${\n this.dropdownId\n }-description ${this.a11yDescribedby}`}\n >\n <slot></slot>\n </select>\n\n {this.inline && this.label && (\n <div class=\"stzh-dropdown__sizer\">{this.label}</div>\n )}\n\n <div class=\"stzh-dropdown__icon-angle-wrapper\">\n {this.iconAngle ? (\n <stzh-icon\n name={this.iconAngle}\n class=\"stzh-dropdown__icon-angle\"\n ></stzh-icon>\n ) : (\n <slot name=\"icon-angle\"></slot>\n )}\n </div>\n\n <div class=\"stzh-dropdown__icon-wrapper\">\n {this.icon ? (\n <stzh-icon\n class=\"stzh-dropdown__icon\"\n name={this.icon}\n ></stzh-icon>\n ) : (\n <slot name=\"icon\"></slot>\n )}\n </div>\n\n {this.hideOptional && this.required && (\n <div\n id={`${this.dropdownId}-required`}\n class=\"stzh-dropdown__vhidden\"\n >\n {this.localization.$globals.requiredFieldText}\n </div>\n )}\n\n {this.invalid && (\n <div\n id={`${this.dropdownId}-invalid`}\n class=\"stzh-dropdown__vhidden\"\n >\n {this.localization.$globals.invalidFieldText}\n </div>\n )}\n </div>\n </div>\n\n <div\n class=\"stzh-dropdown__dropdown-wrapper\"\n ref={(el) => (this.dropdownWrapperElement = el as HTMLDivElement)}\n ></div>\n\n {(this._error?.length > 0 ||\n this.description ||\n this.descriptionLong) && (\n <StzhInputDescription\n classPrefix=\"stzh-dropdown\"\n id={`${this.dropdownId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={\n this.localization.$globals.moreInfoButtonLabel\n }\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
package/dist/components/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOp
|
|
|
2
2
|
export { S as StzhSocialmediastreamItemActionVariant, V as VBZ, t as tc } from './p-f5779736.js';
|
|
3
3
|
|
|
4
4
|
const name = "@oiz/stzh-components";
|
|
5
|
-
const version = "3.6.0-
|
|
5
|
+
const version = "3.6.0-beta4";
|
|
6
6
|
|
|
7
7
|
const packageName = name.substring(name.indexOf('/')+1);
|
|
8
8
|
// let focused = false;
|
|
@@ -5384,9 +5384,17 @@ const StzhDropdown = /*@__PURE__*/ proxyCustomElement(class StzhDropdown extends
|
|
|
5384
5384
|
this.tomSelect = new TomSelect(this.select, tomSelectOptions);
|
|
5385
5385
|
if (!this.openOnFocus) {
|
|
5386
5386
|
// we still want to enable opening the dropdown by click
|
|
5387
|
-
this.tomSelect.control.addEventListener("click", () => {
|
|
5387
|
+
this.tomSelect.control.addEventListener("click", (event) => {
|
|
5388
|
+
try {
|
|
5389
|
+
event.preventDefault(); // Ensure this works without error
|
|
5390
|
+
}
|
|
5391
|
+
catch (_a) {
|
|
5392
|
+
console.log('preventDefault failed');
|
|
5393
|
+
}
|
|
5388
5394
|
this.tomSelect.open();
|
|
5389
|
-
}
|
|
5395
|
+
},
|
|
5396
|
+
// passive false, otherwise angular wrapper will cause error
|
|
5397
|
+
{ passive: false });
|
|
5390
5398
|
}
|
|
5391
5399
|
if (this.open) {
|
|
5392
5400
|
this.show();
|
|
@@ -5424,18 +5432,18 @@ const StzhDropdown = /*@__PURE__*/ proxyCustomElement(class StzhDropdown extends
|
|
|
5424
5432
|
[`stzh-dropdown--size-${this.size}`]: !!this.size,
|
|
5425
5433
|
[`stzh-dropdown--${this.variant}`]: !!this.variant,
|
|
5426
5434
|
};
|
|
5427
|
-
return (h(Host, { key: '
|
|
5435
|
+
return (h(Host, { key: '58aa56d1ca27f5e0d9d12a47c630ac8137a12c2e', "is-invalid": this.invalid || errorUsed, tabindex: this.disabled ? null : "-1", onFocus: this.onRootFocus }, h("div", { key: 'c1be5709c6c9254ecb16b4ba9966f6388fa48b0f', class: classes, ref: (el) => (this.rootElement = el) }, h("div", { key: 'e53a8da47a55ea7c5650fe9c8ead7f6c99c06c70', class: "stzh-dropdown__wrapper" }, h("label", { key: 'a239ce7cc60f3d6583145eb58b51eac4b57f44ea', id: `${this.dropdownId}-label`, class: {
|
|
5428
5436
|
"stzh-dropdown__label": true,
|
|
5429
5437
|
"no-label-truncate": this.noLabelTruncate,
|
|
5430
|
-
}, htmlFor: this.dropdownId }, this.label ? this.label : h("slot", { name: "label" }), !this.hideOptional && (h("span", { key: '
|
|
5438
|
+
}, htmlFor: this.dropdownId }, this.label ? this.label : h("slot", { name: "label" }), !this.hideOptional && (h("span", { key: 'ead8f56e430c5e32cea5703fef7910652235577e', class: "stzh-dropdown__marker" }, h("span", { key: 'd992c5c32a8cfcc50c69c1d39b1fda7711253b8a', class: "stzh-dropdown__marker-symbol", "aria-hidden": "true" }, this.required
|
|
5431
5439
|
? this.localization.$globals.requiredFieldMarker
|
|
5432
|
-
: this.localization.$globals.optionalFieldMarker), h("span", { key: '
|
|
5440
|
+
: this.localization.$globals.optionalFieldMarker), h("span", { key: '268d111ebc8a7ed7d113bfd344a271743b361b02', class: "stzh-dropdown__marker-text" }, this.required
|
|
5433
5441
|
? this.localization.$globals.requiredFieldText
|
|
5434
|
-
: this.localization.$globals.optionalFieldText)))), h("div", { key: '
|
|
5442
|
+
: this.localization.$globals.optionalFieldText)))), h("div", { key: '597f08cbdecf4babe97696973c03fe05e6d446f4', class: "stzh-dropdown__field-wrapper" }, h("select", { key: 'c3005bdf6e9af41b2c7870fd759641bb827bd887', id: this.dropdownId, class: "stzh-dropdown__select", ref: (el) => (this.select = el), multiple: this.multiple, name: this.name, disabled: this.disabled, "aria-labelledby": `${this.dropdownId}-label ${this.dropdownId}-not-loading ${this.dropdownId}-no-results ${this.hideOptional &&
|
|
5435
5443
|
this.required &&
|
|
5436
|
-
`${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}` }, h("slot", { key: '
|
|
5444
|
+
`${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}` }, h("slot", { key: '0ec2afcf4ca56223b64813ea367665197031e020' })), this.inline && this.label && (h("div", { key: 'ecf2e2c05a521d8f34272b3f767338c262321249', class: "stzh-dropdown__sizer" }, this.label)), h("div", { key: '56ac67d5cfdc773827ecc2790fc7b5b77594d9c0', class: "stzh-dropdown__icon-angle-wrapper" }, this.iconAngle ? (h("stzh-icon", { name: this.iconAngle, class: "stzh-dropdown__icon-angle" })) : (h("slot", { name: "icon-angle" }))), h("div", { key: 'b9b57cf8a1af00ebe78656b912fdc4da6ea71869', class: "stzh-dropdown__icon-wrapper" }, this.icon ? (h("stzh-icon", { class: "stzh-dropdown__icon", name: this.icon })) : (h("slot", { name: "icon" }))), this.hideOptional && this.required && (h("div", { key: 'dc1628f3429df00408acd962e0c6cf1817bdd645', id: `${this.dropdownId}-required`, class: "stzh-dropdown__vhidden" }, this.localization.$globals.requiredFieldText)), this.invalid && (h("div", { key: '011a973ecc417d2a92806801a8db483de75a37f0', id: `${this.dropdownId}-invalid`, class: "stzh-dropdown__vhidden" }, this.localization.$globals.invalidFieldText)))), h("div", { key: '43b89f15d72ecc01df191baf05f1292d2ffe1e11', class: "stzh-dropdown__dropdown-wrapper", ref: (el) => (this.dropdownWrapperElement = el) }), (((_b = this._error) === null || _b === void 0 ? void 0 : _b.length) > 0 ||
|
|
5437
5445
|
this.description ||
|
|
5438
|
-
this.descriptionLong) && (h(StzhInputDescription, { key: '
|
|
5446
|
+
this.descriptionLong) && (h(StzhInputDescription, { key: '385cb1aed8f46106f0bcef6cec03ba8c5d603bf2', classPrefix: "stzh-dropdown", id: `${this.dropdownId}-description`, error: this._error, description: this.description, descriptionLong: this.descriptionLong, descriptionLongTitle: this.descriptionLongTitle, descriptionLongUsed: descriptionLongUsed, moreInfoButtonLabel: this.localization.$globals.moreInfoButtonLabel })))));
|
|
5439
5447
|
}
|
|
5440
5448
|
get element() { return this; }
|
|
5441
5449
|
static get watchers() { return {
|
|
@@ -5546,4 +5554,4 @@ function defineCustomElement() {
|
|
|
5546
5554
|
|
|
5547
5555
|
export { StzhDropdown as S, defineCustomElement as d };
|
|
5548
5556
|
|
|
5549
|
-
//# sourceMappingURL=p-
|
|
5557
|
+
//# sourceMappingURL=p-3f254548.js.map
|