@oiz/stzh-components 2.12.0 → 2.13.0

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 (115) hide show
  1. package/dist/cjs/{app-globals-5c0c2c46.js → app-globals-9e469998.js} +2 -2
  2. package/dist/cjs/{app-globals-5c0c2c46.js.map → app-globals-9e469998.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/stzh-components.cjs.js +2 -2
  5. package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
  6. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-dropdown.cjs.entry.js +12 -3
  8. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-input.cjs.entry.js +2 -2
  10. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  11. package/dist/cjs/stzh-upload.cjs.entry.js +8 -0
  12. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  13. package/dist/collection/assets/i18n/de.json +2 -2
  14. package/dist/collection/assets/i18n/en.json +2 -2
  15. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +1 -0
  16. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +10 -2
  17. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  18. package/dist/collection/components/stzh-input/stzh-input.css +6 -0
  19. package/dist/collection/components/stzh-input/stzh-input.js +4 -4
  20. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  21. package/dist/collection/components/stzh-upload/stzh-upload.js +12 -0
  22. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  23. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +4 -3
  24. package/dist/collection/libraries/tom-select/cjs/tom-select.js +4 -3
  25. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +4 -3
  26. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +4 -3
  27. package/dist/collection/libraries/tom-select/esm/tom-select.js +4 -3
  28. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +4 -3
  29. package/dist/collection/libraries/tom-select/js/tom-select.base.js +4 -3
  30. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +16 -16
  31. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +4 -3
  32. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +3 -3
  33. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +4 -3
  34. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +30 -30
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/stzh-datalist-item2.js +1 -1
  37. package/dist/components/stzh-datalist-item2.js.map +1 -1
  38. package/dist/components/stzh-dropdown2.js +12 -3
  39. package/dist/components/stzh-dropdown2.js.map +1 -1
  40. package/dist/components/stzh-input2.js +3 -3
  41. package/dist/components/stzh-input2.js.map +1 -1
  42. package/dist/components/stzh-upload.js +10 -0
  43. package/dist/components/stzh-upload.js.map +1 -1
  44. package/dist/esm/{app-globals-bfc779f0.js → app-globals-27a24a34.js} +2 -2
  45. package/dist/esm/{app-globals-bfc779f0.js.map → app-globals-27a24a34.js.map} +1 -1
  46. package/dist/esm/loader.js +2 -2
  47. package/dist/esm/stzh-components.js +2 -2
  48. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  49. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  50. package/dist/esm/stzh-dropdown.entry.js +12 -3
  51. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  52. package/dist/esm/stzh-input.entry.js +2 -2
  53. package/dist/esm/stzh-input.entry.js.map +1 -1
  54. package/dist/esm/stzh-upload.entry.js +8 -0
  55. package/dist/esm/stzh-upload.entry.js.map +1 -1
  56. package/dist/esm-es5/{app-globals-bfc779f0.js → app-globals-27a24a34.js} +2 -2
  57. package/dist/esm-es5/loader.js +1 -1
  58. package/dist/esm-es5/loader.js.map +1 -1
  59. package/dist/esm-es5/stzh-components.js +1 -1
  60. package/dist/esm-es5/stzh-components.js.map +1 -1
  61. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  62. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  63. package/dist/esm-es5/stzh-dropdown.entry.js +2 -2
  64. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  65. package/dist/esm-es5/stzh-input.entry.js +1 -1
  66. package/dist/esm-es5/stzh-input.entry.js.map +1 -1
  67. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  68. package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
  69. package/dist/stzh-components/assets/i18n/de.json +2 -2
  70. package/dist/stzh-components/assets/i18n/en.json +2 -2
  71. package/dist/stzh-components/{p-aa9975e6.entry.js → p-24d82258.entry.js} +2 -2
  72. package/dist/stzh-components/p-24d82258.entry.js.map +1 -0
  73. package/dist/stzh-components/{p-11a57dcd.entry.js → p-2653562a.entry.js} +6 -6
  74. package/dist/stzh-components/p-2653562a.entry.js.map +1 -0
  75. package/dist/stzh-components/{p-4206f3e1.system.entry.js → p-376b64c8.system.entry.js} +5 -5
  76. package/dist/stzh-components/p-376b64c8.system.entry.js.map +1 -0
  77. package/dist/stzh-components/p-651140ac.system.js +2 -0
  78. package/dist/stzh-components/{p-eed26372.system.js.map → p-651140ac.system.js.map} +1 -1
  79. package/dist/stzh-components/{p-ea2fd8f8.js → p-77585f2e.js} +2 -2
  80. package/dist/stzh-components/p-990141f4.entry.js +2 -0
  81. package/dist/stzh-components/p-990141f4.entry.js.map +1 -0
  82. package/dist/stzh-components/p-c1f89d5c.system.entry.js +2 -0
  83. package/dist/stzh-components/p-c1f89d5c.system.entry.js.map +1 -0
  84. package/dist/stzh-components/{p-4488789b.entry.js → p-c90cf7f4.entry.js} +2 -2
  85. package/dist/stzh-components/p-c90cf7f4.entry.js.map +1 -0
  86. package/dist/stzh-components/{p-9035fa3b.system.js → p-cb34f6b6.system.js} +2 -2
  87. package/dist/stzh-components/{p-b19c3193.system.entry.js → p-cf18eff2.system.entry.js} +2 -2
  88. package/dist/stzh-components/p-cf18eff2.system.entry.js.map +1 -0
  89. package/dist/stzh-components/{p-2d88c544.system.entry.js → p-e6444356.system.entry.js} +2 -2
  90. package/dist/stzh-components/p-e6444356.system.entry.js.map +1 -0
  91. package/dist/stzh-components/stzh-components.esm.js +1 -1
  92. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  93. package/dist/stzh-components/stzh-components.js +1 -1
  94. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +1 -1
  95. package/dist/types/components/stzh-input/stzh-input.d.ts +1 -1
  96. package/dist/types/components/stzh-upload/stzh-upload.d.ts +2 -0
  97. package/dist/types/components.d.ts +4 -4
  98. package/dist/types/libraries/tom-select/types/defaults.d.ts +1 -0
  99. package/dist/types/libraries/tom-select/types/types/settings.d.ts +1 -0
  100. package/dist/vscode-data.json +7537 -0
  101. package/package.json +1 -1
  102. package/dist/stzh-components/p-11a57dcd.entry.js.map +0 -1
  103. package/dist/stzh-components/p-2d88c544.system.entry.js.map +0 -1
  104. package/dist/stzh-components/p-4206f3e1.system.entry.js.map +0 -1
  105. package/dist/stzh-components/p-4488789b.entry.js.map +0 -1
  106. package/dist/stzh-components/p-4ad49ece.entry.js +0 -2
  107. package/dist/stzh-components/p-4ad49ece.entry.js.map +0 -1
  108. package/dist/stzh-components/p-a0b350c2.system.entry.js +0 -2
  109. package/dist/stzh-components/p-a0b350c2.system.entry.js.map +0 -1
  110. package/dist/stzh-components/p-aa9975e6.entry.js.map +0 -1
  111. package/dist/stzh-components/p-b19c3193.system.entry.js.map +0 -1
  112. package/dist/stzh-components/p-eed26372.system.js +0 -2
  113. /package/dist/esm-es5/{app-globals-bfc779f0.js.map → app-globals-27a24a34.js.map} +0 -0
  114. /package/dist/stzh-components/{p-ea2fd8f8.js.map → p-77585f2e.js.map} +0 -0
  115. /package/dist/stzh-components/{p-9035fa3b.system.js.map → p-cb34f6b6.system.js.map} +0 -0
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "$formatsIso": {
38
38
  "dateInput": {
39
- "format": "{Y}.{m}.{d}",
40
- "parse": "^(?<Y>\\d{4}).(?<m>\\d{1,2}).(?<d>\\d{1,2})$"
39
+ "format": "{Y}-{m}-{d}",
40
+ "parse": "^(?<Y>\\d{4})-(?<m>\\d{1,2})-(?<d>\\d{1,2})$"
41
41
  }
42
42
  },
43
43
  "$formatsLegacy": {
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "$formatsIso": {
38
38
  "dateInput": {
39
- "format": "{Y}.{m}.{d}",
40
- "parse": "^(?<Y>\\d{4}).(?<m>\\d{1,2}).(?<d>\\d{1,2})$"
39
+ "format": "{Y}-{m}-{d}",
40
+ "parse": "^(?<Y>\\d{4})-(?<m>\\d{1,2})-(?<d>\\d{1,2})$"
41
41
  }
42
42
  },
43
43
  "$formatsLegacy": {
@@ -310,6 +310,7 @@
310
310
  }
311
311
  .stzh-datalist-item--direction-vertical .stzh-datalist-item__meta {
312
312
  flex-direction: column;
313
+ align-items: flex-start;
313
314
  }
314
315
  .stzh-datalist-item--direction-horizontal, .stzh-datalist-item--direction-horizontal + .stzh-datalist-item__nested {
315
316
  display: contents;
@@ -252,6 +252,14 @@ export class StzhDropdown {
252
252
  if (typeof this.transformLoadQuery === "function") {
253
253
  return this.transformLoadQuery(inputValue);
254
254
  }
255
+ else if (this.transformLoadQuery === "join") {
256
+ const lastQueries = Array.from(this.tomSelect.controlChildren())
257
+ .map((element) => element.innerText);
258
+ return (lastQueries.length > 0
259
+ ? lastQueries.join(" ") + (inputValue ? " " : "")
260
+ : "")
261
+ + inputValue.replace(/\s\s+/g, ' ');
262
+ }
255
263
  else if (this.transformLoadQuery === "trim-to-single-ws") {
256
264
  return inputValue.replace(/\s\s+/g, ' ');
257
265
  }
@@ -674,8 +682,8 @@ export class StzhDropdown {
674
682
  "type": "string",
675
683
  "mutable": false,
676
684
  "complexType": {
677
- "original": "\"trim\" | \"trim-to-single-ws\" | Function",
678
- "resolved": "\"trim\" | \"trim-to-single-ws\" | Function",
685
+ "original": "\"trim\" | \"trim-to-single-ws\" | \"join\" | Function",
686
+ "resolved": "\"join\" | \"trim\" | \"trim-to-single-ws\" | Function",
679
687
  "references": {
680
688
  "Function": {
681
689
  "location": "global",
@@ -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,EAEN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAkB5C,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;EACtD,MAAM,IAAI,GAAG,IAAI,CAAC;EAElB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;IACzB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAiC,CAAC;IACrD,IAAI,KAAK;MAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;EACnC,CAAC,CAAC,CAAA;AACJ,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,CA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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} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport {\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 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 * 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 /** 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\" | Function = \"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 /** 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\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Whether the dropdown is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Popover placement */\n @Prop({ reflect: true }) popoverPlacement: \"bottom\" | \"bottom-end\" | \"bottom-center\" | \"top\" | \"top-end\" | \"top-center\" = \"bottom\";\n\n /** Label */\n @Prop() label: string = \"\";\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 /** Show text in label depending if field is optional/required */\n @Prop({ reflect: true }) showMarker: 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 /** 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 @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 }\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 this.invalid = this._error.length > 0;\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 /** Focus select */\n @Method()\n async setFocus() {\n this.tomSelect.focus();\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 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 } else {\n this.rootElement.classList.remove(CLASS_FILLED);\n }\n }\n\n private reset = () => {\n this.items = [];\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\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 if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"dropdown\");\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return [\"isOpen\"].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 plugins[\"remove_button\"] = {\n title: this.localization.removeButtonTitle,\n label: '<stzh-icon name=\"close\" class=\"stzh-dropdown__remove-icon\"></stzh-icon>'\n };\n }\n\n const tomSelectOptions: any = {\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: this.closeAfterSelect !== null\n ? this.closeAfterSelect\n : !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 === \"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 <stzh-icon name=\"checkmark\" class=\"stzh-dropdown__option-check\"></stzh-icon>\n <span class=\"stzh-dropdown__option-title\">\n ${escape(data[this.labelField])}\n </span>\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(/\\{x\\}/gi, escape(data.input))}&hellip;\n </div>\n `;\n },\n no_results: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__no-results\" id=\"${this.dropdownId}-no-results\">\n ${this.localization.noResults.replace(/\\{x\\}/gi, escape(data.input))}\n </div>`;\n },\n not_loading: this.load === null ? null : (_data, escape) => {\n return `\n <div class=\"stzh-dropdown__not-loading\" id=\"${this.dropdownId}-not-loading\">\n ${this.localization.notLoading.replace(/\\{x\\}/gi, escape(this.minCharacters.toString()))}\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\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.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 connectedCallback() {\n this.element?.closest('form')?.addEventListener('reset', this.reset);\n }\n\n disconnectedCallback() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n\n this.element?.closest('form')?.removeEventListener('reset', this.reset);\n }\n\n render() {\n const iconUsed = hasSlot(this.element, 'icon') || !!this.icon;\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-dropdown\": true,\n \"stzh-dropdown--is-inline\": this.inline,\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,\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-fixed-label\": window?.stzhComponents?.labels === \"fixed\",\n \"stzh-dropdown--has-label-hidden\": this.labelHidden,\n [`stzh-dropdown--popover-placement-${this.popoverPlacement}`]: !!this.popoverPlacement,\n [`stzh-dropdown--size-${this.size}`]: !!this.size,\n [`stzh-dropdown--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div\n class={classes}\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\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 ${this.dropdownId}-not-loading ${this.dropdownId}-no-results ${!this.showMarker && this.required && `${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}`}\n >\n <slot></slot>\n </select>\n\n {/* <div class=\"stzh-dropdown__sizer\">\n {this.placeholder}\n </div> */}\n\n <div class=\"stzh-dropdown__icon-angle-wrapper\">\n {this.iconAngle ?\n <stzh-icon name={this.iconAngle} class=\"stzh-dropdown__icon-angle\"></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 class=\"stzh-dropdown__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n </div>\n\n <label\n id={`${this.dropdownId}-label`}\n class=\"stzh-dropdown__label\"\n htmlFor={this.dropdownId}\n >\n {this.label ? this.label : <slot name=\"label\"></slot>}\n {this.showMarker &&\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 }\n </span>\n <span class=\"stzh-dropdown__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {!this.showMarker && this.required &&\n <div id={`${this.dropdownId}-required`} class=\"stzh-dropdown__vhidden\">\n {this.localization.$globals.requiredFieldText}\n </div>\n }\n\n {this.invalid &&\n <div id={`${this.dropdownId}-invalid`} class=\"stzh-dropdown__vhidden\">\n {this.localization.$globals.invalidFieldText}\n </div>\n }\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-dropdown\"\n id={`${this.dropdownId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\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,EAEN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAkB5C,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;EACtD,MAAM,IAAI,GAAG,IAAI,CAAC;EAElB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;IACzB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAiC,CAAC;IACrD,IAAI,KAAK;MAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;EACnC,CAAC,CA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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} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\nimport {\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 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 * 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 /** 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 = \"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 /** 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\" = \"default\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Whether the dropdown is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Popover placement */\n @Prop({ reflect: true }) popoverPlacement: \"bottom\" | \"bottom-end\" | \"bottom-center\" | \"top\" | \"top-end\" | \"top-center\" = \"bottom\";\n\n /** Label */\n @Prop() label: string = \"\";\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 /** Show text in label depending if field is optional/required */\n @Prop({ reflect: true }) showMarker: 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 /** 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 @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 }\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 this.invalid = this._error.length > 0;\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 /** Focus select */\n @Method()\n async setFocus() {\n this.tomSelect.focus();\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 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 } else {\n this.rootElement.classList.remove(CLASS_FILLED);\n }\n }\n\n private reset = () => {\n this.items = [];\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\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 if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"dropdown\");\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return [\"isOpen\"].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 plugins[\"remove_button\"] = {\n title: this.localization.removeButtonTitle,\n label: '<stzh-icon name=\"close\" class=\"stzh-dropdown__remove-icon\"></stzh-icon>'\n };\n }\n\n const tomSelectOptions: any = {\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: this.closeAfterSelect !== null\n ? this.closeAfterSelect\n : !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())\n .map((element: HTMLElement) => element.innerText);\n\n return (lastQueries.length > 0\n ? lastQueries.join(\" \") + (inputValue ? \" \" : \"\")\n : \"\")\n + inputValue.replace(/\\s\\s+/g, ' ');\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 <stzh-icon name=\"checkmark\" class=\"stzh-dropdown__option-check\"></stzh-icon>\n <span class=\"stzh-dropdown__option-title\">\n ${escape(data[this.labelField])}\n </span>\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(/\\{x\\}/gi, escape(data.input))}&hellip;\n </div>\n `;\n },\n no_results: (data, escape) => {\n return `\n <div class=\"stzh-dropdown__no-results\" id=\"${this.dropdownId}-no-results\">\n ${this.localization.noResults.replace(/\\{x\\}/gi, escape(data.input))}\n </div>`;\n },\n not_loading: this.load === null ? null : (_data, escape) => {\n return `\n <div class=\"stzh-dropdown__not-loading\" id=\"${this.dropdownId}-not-loading\">\n ${this.localization.notLoading.replace(/\\{x\\}/gi, escape(this.minCharacters.toString()))}\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\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.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 connectedCallback() {\n this.element?.closest('form')?.addEventListener('reset', this.reset);\n }\n\n disconnectedCallback() {\n if (this.tomSelect) {\n this.tomSelect.destroy();\n this.tomSelect = null;\n }\n\n this.element?.closest('form')?.removeEventListener('reset', this.reset);\n }\n\n render() {\n const iconUsed = hasSlot(this.element, 'icon') || !!this.icon;\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-dropdown\": true,\n \"stzh-dropdown--is-inline\": this.inline,\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,\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-fixed-label\": window?.stzhComponents?.labels === \"fixed\",\n \"stzh-dropdown--has-label-hidden\": this.labelHidden,\n [`stzh-dropdown--popover-placement-${this.popoverPlacement}`]: !!this.popoverPlacement,\n [`stzh-dropdown--size-${this.size}`]: !!this.size,\n [`stzh-dropdown--${this.variant}`]: !!this.variant\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div\n class={classes}\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\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 ${this.dropdownId}-not-loading ${this.dropdownId}-no-results ${!this.showMarker && this.required && `${this.dropdownId}-required`} ${this.invalid && `${this.dropdownId}-invalid`} ${this.dropdownId}-description ${this.a11yDescribedby}`}\n >\n <slot></slot>\n </select>\n\n {/* <div class=\"stzh-dropdown__sizer\">\n {this.placeholder}\n </div> */}\n\n <div class=\"stzh-dropdown__icon-angle-wrapper\">\n {this.iconAngle ?\n <stzh-icon name={this.iconAngle} class=\"stzh-dropdown__icon-angle\"></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 class=\"stzh-dropdown__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n </div>\n\n <label\n id={`${this.dropdownId}-label`}\n class=\"stzh-dropdown__label\"\n htmlFor={this.dropdownId}\n >\n {this.label ? this.label : <slot name=\"label\"></slot>}\n {this.showMarker &&\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 }\n </span>\n <span class=\"stzh-dropdown__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n\n {!this.showMarker && this.required &&\n <div id={`${this.dropdownId}-required`} class=\"stzh-dropdown__vhidden\">\n {this.localization.$globals.requiredFieldText}\n </div>\n }\n\n {this.invalid &&\n <div id={`${this.dropdownId}-invalid`} class=\"stzh-dropdown__vhidden\">\n {this.localization.$globals.invalidFieldText}\n </div>\n }\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-dropdown\"\n id={`${this.dropdownId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -134,6 +134,12 @@
134
134
  --padding: var(--stzh-space-xsmall) var(--stzh-space-medium);
135
135
  width: 100%;
136
136
  }
137
+ :host[type=hidden] {
138
+ position: absolute;
139
+ top: -624.9375rem;
140
+ left: -624.9375rem;
141
+ visibility: hidden;
142
+ }
137
143
 
138
144
  :host ::slotted([slot=button-right]),
139
145
  .stzh-input__button-right {
@@ -136,7 +136,7 @@ export class StzhInput {
136
136
  }
137
137
  typeWatcher(newValue) {
138
138
  const types = [
139
- "text", "search", "password", "email", "url", "tel", "number"
139
+ "text", "search", "password", "email", "url", "tel", "number", "hidden"
140
140
  ];
141
141
  if (!this.multiline && !types.includes(newValue)) {
142
142
  throw new Error(`Type ${newValue} not supported`);
@@ -268,8 +268,8 @@ export class StzhInput {
268
268
  "type": "string",
269
269
  "mutable": false,
270
270
  "complexType": {
271
- "original": "\"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\"",
272
- "resolved": "\"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
271
+ "original": "\"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\"",
272
+ "resolved": "\"email\" | \"hidden\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"url\"",
273
273
  "references": {}
274
274
  },
275
275
  "required": false,
@@ -279,7 +279,7 @@ export class StzhInput {
279
279
  "text": "If input field, this defines the type (if `search`, a search icon will be displayed)"
280
280
  },
281
281
  "attribute": "type",
282
- "reflect": false,
282
+ "reflect": true,
283
283
  "defaultValue": "\"text\""
284
284
  },
285
285
  "step": {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-input.js","sourceRoot":"","sources":["../../../../src/components/stzh-input/stzh-input.tsx"],"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Host,\n Event,\n EventEmitter,\n State,\n Method,\n Element,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhInputChangeEvent,\n StzhInputChangedEvent,\n StzhInputFocusEvent,\n StzhInputBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop() type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" = \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\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 /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\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 /** Whether the input is filled or not */\n @State() filled: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Focus input field */\n @Method()\n async setFocus() {\n this.input.focus();\n }\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n this.filled = newValue !== \"\";\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 this.invalid = this._error.length > 0;\n }\n\n @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\n \"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\"\n ];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n\n private onClearClick = (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\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-input\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\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-input\",\n originalEvent: event\n });\n }\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={(el) => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={(el) => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.type}\n name={this.name}\n value={this.value}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, 'button-right');\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\": buttonRightSlotUsed\n || this.type === \"search\"\n || (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--has-fixed-label\": window?.stzhComponents?.labels === \"fixed\",\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n <label class=\"stzh-input__label\" htmlFor={this.inputId}>\n {this.label ? this.label : <slot></slot>}\n {this.showMarker &&\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n {this.clearable || this.type === \"search\"\n ?\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.disabled || this.readonly || !this.filled ? \"search\" : \"close-circle\"}\n icon-only\n variant=\"input\"\n onClick={this.onClearClick}\n disabled={this.disabled || this.readonly || !this.filled}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n :\n <slot name=\"button-right\"></slot>\n }\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-input.js","sourceRoot":"","sources":["../../../../src/components/stzh-input/stzh-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,KAAK,EAEL,KAAK,EACL,MAAM,EACN,OAAO,EACP,CAAC,EACD,KAAK,EACN,MAAM,eAAe,CAAC;AASvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;;GAMG;AAMH,MAAM,OAAO,SAAS;;IA0JZ,mBAAc,GAAY,KAAK,CAAC;IAEhC,iBAAY,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC3C,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;MAChB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;MAEnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE,YAAY;QACvB,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QACpB,SAAS,EAAE,YAAY;QAC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,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Host,\n Event,\n EventEmitter,\n State,\n Method,\n Element,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhInputChangeEvent,\n StzhInputChangedEvent,\n StzhInputFocusEvent,\n StzhInputBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"./stzh-input-description\";\n\nlet inputCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n * @slot button-right - Slot for right button\n */\n@Component({\n tag: \"stzh-input\",\n styleUrl: \"stzh-input.scss\",\n scoped: true\n})\nexport class StzhInput {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the input is a textarea or an input field */\n @Prop() multiline: boolean = false;\n\n /** Rows attribute if input element is textarea */\n @Prop() rows: number;\n\n /** If input field, this defines the type (if `search`, a search icon will be displayed) */\n @Prop({ reflect: true }) type: \"text\" | \"search\" | \"password\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"hidden\" = \"text\";\n\n /** If input type is number, this will be the step size */\n @Prop() step: number = 1;\n\n /** If input type is number, this will be the minimum step number */\n @Prop() min: number;\n\n /** If input type is number, this will be the maximum step number */\n @Prop() max: number;\n\n /** If input type is number and this property is true, this will show the spin buttons on hover/focus */\n @Prop({ reflect: true }) showSpin: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether clearable button is showing when input field has value and is enabled (button-right slot not usable anymore when true) */\n @Prop({ reflect: true }) clearable: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Minimum of characters */\n @Prop() minlength: number;\n\n /** Maxlength of characters */\n @Prop() maxlength: number;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\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 /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Specify inputmode.\n * See [MDN](https://developer.mozilla.org/de/docs/Web/HTML/Global_attributes/inputmode) for possible values\n */\n @Prop() inputmode: string;\n\n /**\n * Specify what the user agent has to provide as automated assistance.\n * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for possible values\n */\n @Prop() autocomplete: string = \"on\";\n\n /** Whether autocomplete should be turned off */\n @Prop() noAutocomplete: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Whether label should be visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\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 /** Whether the input is filled or not */\n @State() filled: boolean;\n\n @Element() element: HTMLStzhInputElement;\n\n /** Focus input field */\n @Method()\n async setFocus() {\n this.input.focus();\n }\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhInputChangeEvent>;\n\n /** Input changed event */\n @Event() stzhChanged: EventEmitter<StzhInputChangedEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhInputFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhInputBlurEvent>;\n\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n this.filled = newValue !== \"\";\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 this.invalid = this._error.length > 0;\n }\n\n @Watch(\"type\")\n typeWatcher(newValue: string) {\n const types = [\n \"text\", \"search\", \"password\", \"email\", \"url\", \"tel\", \"number\", \"hidden\"\n ];\n\n if (!this.multiline && !types.includes(newValue)) {\n throw new Error(`Type ${newValue} not supported`);\n }\n }\n\n private input: HTMLInputElement | HTMLTextAreaElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n\n private onClearClick = (event: MouseEvent) => {\n this.value = \"\";\n this.input.focus();\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onInput = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChange.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onChange = (event: InputEvent) => {\n this.value = this.input.value;\n\n this.stzhChanged.emit({\n component: \"stzh-input\",\n originalEvent: event,\n value: this.value\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\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-input\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n // fixes weird bug where autofill selection doesn't get removed\n this.input.value = this.input.value;\n\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-input\",\n originalEvent: event\n });\n }\n\n private renderTextarea(): HTMLTextAreaElement {\n return (\n <textarea\n class=\"stzh-input__input stzh-input__input--textarea\"\n ref={(el) => (this.input = el as HTMLTextAreaElement)}\n id={this.inputId}\n name={this.name}\n value={this.value}\n rows={this.rows}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ></textarea>\n );\n }\n\n private renderInput(): HTMLInputElement {\n return (\n <input\n class=\"stzh-input__input stzh-input__input--input\"\n ref={(el) => (this.input = el as HTMLInputElement)}\n id={this.inputId}\n type={this.type}\n name={this.name}\n value={this.value}\n min={this.min}\n max={this.max}\n step={this.step}\n inputmode={this.inputmode}\n disabled={this.disabled}\n readonly={this.readonly}\n minlength={this.minlength}\n maxlength={this.maxlength}\n autocomplete={this.noAutocomplete ? \"off\" : this.autocomplete}\n aria-autocomplete={this.noAutocomplete ? \"none\" : undefined}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n onChange={this.onChange}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n );\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-input-${inputCounter++}`;\n this.typeWatcher(this.type);\n this.valueWatcher(this.value);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"input\");\n }\n }\n\n render() {\n const buttonRightSlotUsed = hasSlot(this.element, 'button-right');\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n const classes = {\n \"stzh-input\": true,\n \"stzh-input--has-button-right\": buttonRightSlotUsed\n || this.type === \"search\"\n || (this.clearable && this.filled && !this.readonly && !this.disabled),\n \"stzh-input--has-description\": descriptionUsed,\n \"stzh-input--has-description-long\": descriptionLongUsed,\n \"stzh-input--has-error\": errorUsed,\n \"stzh-input--has-spin\": this.showSpin,\n \"stzh-input--is-invalid\": this.invalid,\n \"stzh-input--is-disabled\": this.disabled,\n \"stzh-input--is-readonly\": this.readonly,\n \"stzh-input--is-required\": this.required,\n \"stzh-input--is-filled\": this.filled,\n \"stzh-input--is-clearable\": this.clearable,\n \"stzh-input--has-fixed-label\": window?.stzhComponents?.labels === \"fixed\",\n \"stzh-input--has-label-hidden\": this.labelHidden,\n [`stzh-input--size-${this.size}`]: !!this.size,\n [`stzh-input--type-${this.type}`]: !!this.type,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <div class=\"stzh-input__field-wrapper\">\n {this.multiline ? this.renderTextarea() : this.renderInput()}\n <label class=\"stzh-input__label\" htmlFor={this.inputId}>\n {this.label ? this.label : <slot></slot>}\n {this.showMarker &&\n <span class=\"stzh-input__marker\">\n <span class=\"stzh-input__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-input__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </label>\n {this.clearable || this.type === \"search\"\n ?\n <stzh-button\n class=\"stzh-input__button-right\"\n icon={this.disabled || this.readonly || !this.filled ? \"search\" : \"close-circle\"}\n icon-only\n variant=\"input\"\n onClick={this.onClearClick}\n disabled={this.disabled || this.readonly || !this.filled}\n a11yLabel={this.localization.$globals.clearButtonLabel}\n aria-controls={this.inputId}\n ></stzh-button>\n :\n <slot name=\"button-right\"></slot>\n }\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-input\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -83,6 +83,12 @@ export class StzhUpload {
83
83
  this.hiddenInputContainer = undefined;
84
84
  this.localization = undefined;
85
85
  }
86
+ maxFilesWatcher(newMaxFiles) {
87
+ this.dropzone.options.maxFiles = newMaxFiles;
88
+ }
89
+ maxFilesizeWatcher(newMaxFilesize) {
90
+ this.dropzone.options.maxFilesize = newMaxFilesize;
91
+ }
86
92
  existingFilesWatcher(newValue) {
87
93
  if (typeof newValue === "string") {
88
94
  this._existingFiles = JSON.parse(newValue);
@@ -1554,6 +1560,12 @@ export class StzhUpload {
1554
1560
  static get elementRef() { return "element"; }
1555
1561
  static get watchers() {
1556
1562
  return [{
1563
+ "propName": "maxFiles",
1564
+ "methodName": "maxFilesWatcher"
1565
+ }, {
1566
+ "propName": "maxFilesize",
1567
+ "methodName": "maxFilesizeWatcher"
1568
+ }, {
1557
1569
  "propName": "existingFiles",
1558
1570
  "methodName": "existingFilesWatcher"
1559
1571
  }, {