@oiz/stzh-components 2.12.0-beta2 → 2.12.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 (195) hide show
  1. package/dist/cjs/{app-globals-b9d20033.js → app-globals-5c0c2c46.js} +2 -2
  2. package/dist/cjs/{app-globals-b9d20033.js.map → app-globals-5c0c2c46.js.map} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/stzh-actionset_4.cjs.entry.js +4 -2
  5. package/dist/cjs/stzh-actionset_4.cjs.entry.js.map +1 -1
  6. package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -1
  7. package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
  8. package/dist/cjs/stzh-chip_2.cjs.entry.js +2 -1
  9. package/dist/cjs/stzh-chip_2.cjs.entry.js.map +1 -1
  10. package/dist/cjs/stzh-components.cjs.js +2 -2
  11. package/dist/cjs/stzh-dropdown.cjs.entry.js +25 -1
  12. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  13. package/dist/cjs/stzh-link.cjs.entry.js +2 -1
  14. package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-menu_2.cjs.entry.js +2 -1
  16. package/dist/cjs/stzh-menu_2.cjs.entry.js.map +1 -1
  17. package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
  18. package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
  19. package/dist/cjs/stzh-skiplink.cjs.entry.js +2 -1
  20. package/dist/cjs/stzh-skiplink.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-upload.cjs.entry.js +8 -2
  22. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  23. package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
  24. package/dist/collection/components/stzh-button/stzh-button.js +2 -1
  25. package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
  26. package/dist/collection/components/stzh-card/stzh-card.css +3 -3
  27. package/dist/collection/components/stzh-card/stzh-card.js +3 -1
  28. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  29. package/dist/collection/components/stzh-chip/stzh-chip.js +2 -1
  30. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  31. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +45 -1
  32. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  33. package/dist/collection/components/stzh-link/stzh-link.js +2 -1
  34. package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
  35. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +2 -1
  36. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js.map +1 -1
  37. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +2 -1
  38. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
  39. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js +2 -1
  40. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js.map +1 -1
  41. package/dist/collection/components/stzh-upload/stzh-upload.css +1 -1
  42. package/dist/collection/components/stzh-upload/stzh-upload.js +3 -3
  43. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  44. package/dist/collection/libraries/dropzone/dropzone-amd-module.js +7 -1
  45. package/dist/collection/libraries/dropzone/dropzone.js +7 -1
  46. package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
  47. package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
  48. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +4 -1
  49. package/dist/collection/libraries/tom-select/cjs/tom-select.js +4 -1
  50. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +4 -1
  51. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +4 -1
  52. package/dist/collection/libraries/tom-select/esm/tom-select.js +4 -1
  53. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +4 -1
  54. package/dist/collection/libraries/tom-select/js/tom-select.base.js +4 -1
  55. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +30 -30
  56. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +4 -1
  57. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +17 -17
  58. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +4 -1
  59. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +2 -2
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/stzh-actionset2.js.map +1 -1
  62. package/dist/components/stzh-button2.js +2 -1
  63. package/dist/components/stzh-button2.js.map +1 -1
  64. package/dist/components/stzh-card2.js +4 -2
  65. package/dist/components/stzh-card2.js.map +1 -1
  66. package/dist/components/stzh-chip2.js +2 -1
  67. package/dist/components/stzh-chip2.js.map +1 -1
  68. package/dist/components/stzh-dropdown2.js +27 -2
  69. package/dist/components/stzh-dropdown2.js.map +1 -1
  70. package/dist/components/stzh-link2.js +2 -1
  71. package/dist/components/stzh-link2.js.map +1 -1
  72. package/dist/components/stzh-menu-item2.js +2 -1
  73. package/dist/components/stzh-menu-item2.js.map +1 -1
  74. package/dist/components/stzh-progressbar-item2.js +2 -1
  75. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  76. package/dist/components/stzh-skiplink.js +2 -1
  77. package/dist/components/stzh-skiplink.js.map +1 -1
  78. package/dist/components/stzh-upload.js +8 -2
  79. package/dist/components/stzh-upload.js.map +1 -1
  80. package/dist/esm/{app-globals-0cf2577d.js → app-globals-bfc779f0.js} +2 -2
  81. package/dist/esm/{app-globals-0cf2577d.js.map → app-globals-bfc779f0.js.map} +1 -1
  82. package/dist/esm/loader.js +2 -2
  83. package/dist/esm/stzh-actionset_4.entry.js +4 -2
  84. package/dist/esm/stzh-actionset_4.entry.js.map +1 -1
  85. package/dist/esm/stzh-badge_3.entry.js +2 -1
  86. package/dist/esm/stzh-badge_3.entry.js.map +1 -1
  87. package/dist/esm/stzh-chip_2.entry.js +2 -1
  88. package/dist/esm/stzh-chip_2.entry.js.map +1 -1
  89. package/dist/esm/stzh-components.js +2 -2
  90. package/dist/esm/stzh-dropdown.entry.js +25 -1
  91. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  92. package/dist/esm/stzh-link.entry.js +2 -1
  93. package/dist/esm/stzh-link.entry.js.map +1 -1
  94. package/dist/esm/stzh-menu_2.entry.js +2 -1
  95. package/dist/esm/stzh-menu_2.entry.js.map +1 -1
  96. package/dist/esm/stzh-progressbar-item.entry.js +2 -1
  97. package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
  98. package/dist/esm/stzh-skiplink.entry.js +2 -1
  99. package/dist/esm/stzh-skiplink.entry.js.map +1 -1
  100. package/dist/esm/stzh-upload.entry.js +8 -2
  101. package/dist/esm/stzh-upload.entry.js.map +1 -1
  102. package/dist/esm-es5/{app-globals-0cf2577d.js → app-globals-bfc779f0.js} +2 -2
  103. package/dist/esm-es5/{app-globals-0cf2577d.js.map → app-globals-bfc779f0.js.map} +1 -1
  104. package/dist/esm-es5/loader.js +1 -1
  105. package/dist/esm-es5/loader.js.map +1 -1
  106. package/dist/esm-es5/stzh-actionset_4.entry.js +1 -1
  107. package/dist/esm-es5/stzh-actionset_4.entry.js.map +1 -1
  108. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  109. package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
  110. package/dist/esm-es5/stzh-chip_2.entry.js +1 -1
  111. package/dist/esm-es5/stzh-chip_2.entry.js.map +1 -1
  112. package/dist/esm-es5/stzh-components.js +1 -1
  113. package/dist/esm-es5/stzh-components.js.map +1 -1
  114. package/dist/esm-es5/stzh-dropdown.entry.js +3 -3
  115. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  116. package/dist/esm-es5/stzh-link.entry.js +1 -1
  117. package/dist/esm-es5/stzh-link.entry.js.map +1 -1
  118. package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
  119. package/dist/esm-es5/stzh-menu_2.entry.js.map +1 -1
  120. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  121. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  122. package/dist/esm-es5/stzh-skiplink.entry.js +1 -1
  123. package/dist/esm-es5/stzh-skiplink.entry.js.map +1 -1
  124. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  125. package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
  126. package/dist/stzh-components/{p-7873a639.entry.js → p-01e9b3b5.entry.js} +2 -2
  127. package/dist/stzh-components/p-01e9b3b5.entry.js.map +1 -0
  128. package/dist/stzh-components/{p-0db27707.entry.js → p-03fc4d3d.entry.js} +2 -2
  129. package/dist/stzh-components/p-03fc4d3d.entry.js.map +1 -0
  130. package/dist/stzh-components/{p-f91187c8.entry.js → p-11a57dcd.entry.js} +3 -3
  131. package/dist/stzh-components/p-11a57dcd.entry.js.map +1 -0
  132. package/dist/stzh-components/{p-3ab3a5a7.system.entry.js → p-1a420f1c.system.entry.js} +2 -2
  133. package/dist/stzh-components/p-1a420f1c.system.entry.js.map +1 -0
  134. package/dist/stzh-components/{p-42e25ae1.system.entry.js → p-3048d3ea.system.entry.js} +2 -2
  135. package/dist/stzh-components/p-3048d3ea.system.entry.js.map +1 -0
  136. package/dist/stzh-components/p-4206f3e1.system.entry.js +9 -0
  137. package/dist/stzh-components/p-4206f3e1.system.entry.js.map +1 -0
  138. package/dist/stzh-components/{p-af33b013.entry.js → p-4488789b.entry.js} +2 -2
  139. package/dist/stzh-components/p-4488789b.entry.js.map +1 -0
  140. package/dist/stzh-components/{p-9d0fedfe.system.entry.js → p-710d15c1.system.entry.js} +2 -2
  141. package/dist/stzh-components/p-710d15c1.system.entry.js.map +1 -0
  142. package/dist/stzh-components/{p-6233fc4f.system.js → p-9035fa3b.system.js} +2 -2
  143. package/dist/stzh-components/{p-6233fc4f.system.js.map → p-9035fa3b.system.js.map} +1 -1
  144. package/dist/stzh-components/{p-68feffea.entry.js → p-919e700b.entry.js} +2 -2
  145. package/dist/stzh-components/p-919e700b.entry.js.map +1 -0
  146. package/dist/stzh-components/{p-d5ee8b1a.entry.js → p-a0d3ec11.entry.js} +2 -2
  147. package/dist/stzh-components/p-a0d3ec11.entry.js.map +1 -0
  148. package/dist/stzh-components/{p-188dd49d.system.entry.js → p-aa0660d8.system.entry.js} +2 -2
  149. package/dist/stzh-components/p-aa0660d8.system.entry.js.map +1 -0
  150. package/dist/stzh-components/{p-54a1fdcc.system.entry.js → p-b19c3193.system.entry.js} +2 -2
  151. package/dist/stzh-components/p-b19c3193.system.entry.js.map +1 -0
  152. package/dist/stzh-components/{p-f73af272.entry.js → p-c70b4f1b.entry.js} +2 -2
  153. package/dist/stzh-components/p-c70b4f1b.entry.js.map +1 -0
  154. package/dist/stzh-components/{p-135d2e40.system.entry.js → p-d80b87dd.system.entry.js} +2 -2
  155. package/dist/stzh-components/p-d80b87dd.system.entry.js.map +1 -0
  156. package/dist/stzh-components/{p-b3d76f2a.system.entry.js → p-df045b3b.system.entry.js} +2 -2
  157. package/dist/stzh-components/p-df045b3b.system.entry.js.map +1 -0
  158. package/dist/stzh-components/{p-7c2aa5e8.entry.js → p-dfa8f780.entry.js} +2 -2
  159. package/dist/stzh-components/p-dfa8f780.entry.js.map +1 -0
  160. package/dist/stzh-components/{p-b2b9d87e.js → p-ea2fd8f8.js} +2 -2
  161. package/dist/stzh-components/{p-b2b9d87e.js.map → p-ea2fd8f8.js.map} +1 -1
  162. package/dist/stzh-components/{p-509f90d0.system.entry.js → p-ee4f0a17.system.entry.js} +2 -2
  163. package/dist/stzh-components/p-ee4f0a17.system.entry.js.map +1 -0
  164. package/dist/stzh-components/{p-ae0e530e.system.js → p-eed26372.system.js} +2 -2
  165. package/dist/stzh-components/{p-ae0e530e.system.js.map → p-eed26372.system.js.map} +1 -1
  166. package/dist/stzh-components/{p-0164f9d1.entry.js → p-f63cc727.entry.js} +2 -2
  167. package/dist/stzh-components/p-f63cc727.entry.js.map +1 -0
  168. package/dist/stzh-components/stzh-components.esm.js +1 -1
  169. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  170. package/dist/stzh-components/stzh-components.js +1 -1
  171. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +4 -0
  172. package/dist/types/components/stzh-upload/stzh-upload.d.ts +5 -1
  173. package/dist/types/components.d.ts +16 -4
  174. package/dist/types/libraries/tom-select/types/defaults.d.ts +1 -0
  175. package/dist/types/libraries/tom-select/types/types/settings.d.ts +1 -0
  176. package/package.json +1 -1
  177. package/dist/stzh-components/p-0164f9d1.entry.js.map +0 -1
  178. package/dist/stzh-components/p-0db27707.entry.js.map +0 -1
  179. package/dist/stzh-components/p-135d2e40.system.entry.js.map +0 -1
  180. package/dist/stzh-components/p-188dd49d.system.entry.js.map +0 -1
  181. package/dist/stzh-components/p-3ab3a5a7.system.entry.js.map +0 -1
  182. package/dist/stzh-components/p-42e25ae1.system.entry.js.map +0 -1
  183. package/dist/stzh-components/p-509f90d0.system.entry.js.map +0 -1
  184. package/dist/stzh-components/p-54a1fdcc.system.entry.js.map +0 -1
  185. package/dist/stzh-components/p-68feffea.entry.js.map +0 -1
  186. package/dist/stzh-components/p-7873a639.entry.js.map +0 -1
  187. package/dist/stzh-components/p-7c2aa5e8.entry.js.map +0 -1
  188. package/dist/stzh-components/p-97704eb0.system.entry.js +0 -9
  189. package/dist/stzh-components/p-97704eb0.system.entry.js.map +0 -1
  190. package/dist/stzh-components/p-9d0fedfe.system.entry.js.map +0 -1
  191. package/dist/stzh-components/p-af33b013.entry.js.map +0 -1
  192. package/dist/stzh-components/p-b3d76f2a.system.entry.js.map +0 -1
  193. package/dist/stzh-components/p-d5ee8b1a.entry.js.map +0 -1
  194. package/dist/stzh-components/p-f73af272.entry.js.map +0 -1
  195. package/dist/stzh-components/p-f91187c8.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-dropdown.js","sourceRoot":"","sources":["../../../../src/components/stzh-dropdown/stzh-dropdown.tsx"],"names":[],"mappings":"AAA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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() 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 /** 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 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 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 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 = 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,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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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"]}
@@ -92,7 +92,8 @@ export class StzhLink {
92
92
  }
93
93
  componentDidRender() {
94
94
  requestAnimationFrame(() => {
95
- this.link.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
95
+ var _a;
96
+ (_a = this.link) === null || _a === void 0 ? void 0 : _a.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
96
97
  });
97
98
  }
98
99
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-link.js","sourceRoot":"","sources":["../../../../src/components/stzh-link/stzh-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,IAAI,EACJ,MAAM,EACN,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;IAyGX,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,EAAE,CAAC;OACjB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Fragment,\n Element,\n h,\n Prop,\n Method,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhLinkFocusEvent,\n StzhLinkBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" | \"inherit\" = \"default\";\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\" = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Focus link */\n @Method()\n async setFocus() {\n this.link.focus();\n }\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\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-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\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-link\",\n originalEvent: event\n });\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--size-${this.size}`]: !!this.size,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-link.js","sourceRoot":"","sources":["../../../../src/components/stzh-link/stzh-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,CAAC,EACD,IAAI,EACJ,MAAM,EACN,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;IAyGX,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,EAAE,CAAC;OACjB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MACtC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;MAE3B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE;QACzC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;MACvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,WAAW;QACtB,aAAa,EAAE,KAAK;OACrB,CAAC,CAAC;IACL,CAAC,CAAA;IAEO,WAAM,GAAG,CAAC,KAAiB,EAAE,EAAE;MACrC,MAAM,SAAS,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LinkBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\n/**\n * @slot - Slot for text content\n * @slot icon - Slot for icon element\n */\n@Component({\n tag: \"stzh-link\",\n styleUrl: \"stzh-link.scss\",\n scoped: true\n})\nexport class StzhLink {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Icon Position */\n @Prop({ reflect: true }) iconPosition: \"left\" | \"right\" = \"left\";\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" | \"inherit\" = \"default\";\n\n /** href attribute of the link */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string = \"\";\n\n /** Download attribute of link (if `href` used) */\n @Prop() download: string;\n\n /** type of the button, if used as button (if no href used) */\n @Prop() type: \"button\" | \"submit\" | \"reset\" = \"button\";\n\n /** Variant style */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" = \"default\";\n\n /** Whether the link is full width */\n @Prop({ reflect: true }) fullwidth: boolean = false;\n\n /** Text alignment */\n @Prop({ reflect: true }) textAlign: \"left\" | \"center\" | \"right\" | \"space-between\" | \"default\" = \"default\";\n\n /** Badge text */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\" = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Badge position */\n @Prop({ reflect: true }) badgePosition: \"icon\" | \"link\" = \"icon\";\n\n /** Disabled status */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Active status */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Whether only an icon is used inside the link */\n @Prop({ reflect: true }) iconOnly: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Aria expanded of link/button */\n @Prop({ reflect: true, attribute: \"a11y-expanded\" }) a11yExpanded: boolean;\n\n /** Aria disabled of link/button */\n @Prop({ reflect: true, attribute: \"a11y-disabled\" }) a11yDisabled: boolean;\n\n /** Aria controls of link/button */\n @Prop({ attribute: \"a11y-controls\" }) a11yControls: string;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhLinkElement;\n\n /** Focus link */\n @Method()\n async setFocus() {\n this.link.focus();\n }\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhLinkFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhLinkBlurEvent>;\n\n private link: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\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-link\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\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-link\",\n originalEvent: event\n });\n }\n\n private renderIcon(): HTMLInputElement {\n return (\n <div class=\"stzh-link__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-link__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n );\n }\n\n private renderContent(): HTMLDivElement {\n return (\n <div class=\"stzh-link__text\">\n {this.rel && this.rel.includes('external') && <div class=\"stzh-link__vhidden\">{this.localization.$globals.externalLinkLabel}</div>}\n {this.download && <div class=\"stzh-link__vhidden\">{this.localization.$globals.downloadLinkLabel}</div>}\n <div ref={(el) => (this.text = el as HTMLDivElement)}>{this.label ? this.label : <slot></slot>}</div>\n </div>\n );\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-link__inner\">\n {this.iconPosition === \"left\" && this.renderIcon()}\n {this.renderContent()}\n {this.iconPosition === \"right\" && this.renderIcon()}\n </div>\n {(this.badge || this.badgeEmpty) && !iconUsed &&\n <stzh-badge class=\"stzh-link__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </Fragment>\n );\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"link\");\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const iconUsed = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-link\": true,\n \"stzh-link--has-icon\": iconUsed,\n \"stzh-link--has-icon-only\": this.iconOnly,\n \"stzh-link--has-badge\": !!this.badge,\n \"stzh-link--is-fullwidth\": this.fullwidth,\n \"stzh-link--is-disabled\": this.disabled,\n \"stzh-link--is-active\": this.active,\n [`stzh-link--badge-position-${this.badgePosition}`]: !!this.badgePosition,\n [`stzh-link--align-${this.textAlign}`]: !!this.textAlign,\n [`stzh-link--size-${this.size}`]: !!this.size,\n [`stzh-link--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n download={this.download}\n rel={this.rel}\n target={this.target}\n class={classes}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.link = el as HTMLButtonElement)}\n class={classes}\n type={this.type}\n disabled={this.disabled}\n accessKey={this.linkAccesskey}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n aria-disabled={typeof this.a11yDisabled !== \"undefined\"\n ? (this.a11yDisabled ? \"true\" : \"false\") : null}\n aria-expanded={typeof this.a11yExpanded !== \"undefined\"\n ? (this.a11yExpanded ? \"true\" : \"false\") : null}\n aria-controls={this.a11yControls || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
@@ -56,7 +56,8 @@ export class StzhMenuItem {
56
56
  }
57
57
  componentDidRender() {
58
58
  requestAnimationFrame(() => {
59
- this.menuItem.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
59
+ var _a;
60
+ (_a = this.menuItem) === null || _a === void 0 ? void 0 : _a.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
60
61
  });
61
62
  }
62
63
  renderInner(iconUsed) {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-menu-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-menu-item/stzh-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;GAGG;AAMH,MAAM,OAAO,YAAY;;IAuDf,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,EAAE,CAAC;OACjB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MACtC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;MAE3B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE;QACzC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;MACvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,gBAAgB;QAC3B,aAAa,EAAE,KAAK;OACrB,CAAC,CAAC;IACL,CAAC,CAAA;IAEO,WAAM,GAAG,CAAC,KAAiB,EAAE,EAAE;MACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE;QACvC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC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,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,IAElB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CACpB,CAEN,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Method,\n Element,\n Fragment,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhMenuItemFocusEvent,\n StzhMenuItemBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for any content\n * @slot icon - Slot for `stzh-icon` element\n */\n@Component({\n tag: \"stzh-menu-item\",\n styleUrl: \"stzh-menu-item.scss\",\n scoped: true\n})\nexport class StzhMenuItem {\n /** Badge (only displayed if `icon` property or icon slot is used) */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\" = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhMenuItemElement;\n\n /** Focus menu item */\n @Method()\n async setFocus() {\n this.menuItem.focus();\n }\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhMenuItemFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhMenuItemBlurEvent>;\n\n private menuItem: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n\n private focusedByInput: boolean = false;\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-menu-item\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\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-menu-item\",\n originalEvent: event\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.menuItem.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n {iconUsed &&\n <div class=\"stzh-menu-item__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-menu-item__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-menu-item__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n }\n <div\n ref={(el) => (this.text = el as HTMLDivElement)}\n class=\"stzh-menu-item__text\"\n >\n {this.label ? this.label : <slot></slot>}\n </div>\n </Fragment>\n );\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-menu-item\": true,\n \"stzh-menu-item--has-icon\": iconUsed,\n \"stzh-menu-item--has-badge\": !!this.badge,\n \"stzh-menu-item--is-disabled\": this.disabled,\n \"stzh-menu-item--is-active\": this.active\n };\n\n return (\n <Host role=\"menuitem\" tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.menuItem = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.menuItem = el as HTMLButtonElement)}\n class={classes}\n type=\"button\"\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-menu-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-menu-item/stzh-menu-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;;GAGG;AAMH,MAAM,OAAO,YAAY;;IAuDf,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,QAAQ,EAAE,CAAC;OACjB;MAED,IAAI,CAAC,cAAc,GAAG,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ventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhMenuItemFocusEvent,\n StzhMenuItemBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\n\n/**\n * @slot - Slot for any content\n * @slot icon - Slot for `stzh-icon` element\n */\n@Component({\n tag: \"stzh-menu-item\",\n styleUrl: \"stzh-menu-item.scss\",\n scoped: true\n})\nexport class StzhMenuItem {\n /** Badge (only displayed if `icon` property or icon slot is used) */\n @Prop() badge: string = \"\";\n\n /** Badge type */\n @Prop({ reflect: true }) badgeType: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\" = \"default\";\n\n /** Whether badge should be displayed empty */\n @Prop({ reflect: true }) badgeEmpty: boolean = false;\n\n /** Whether the button is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether the button is active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string = \"\";\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** `href` if the button should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhMenuItemElement;\n\n /** Focus menu item */\n @Method()\n async setFocus() {\n this.menuItem.focus();\n }\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhMenuItemFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhMenuItemBlurEvent>;\n\n private menuItem: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLDivElement;\n\n private focusedByInput: boolean = false;\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-menu-item\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\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-menu-item\",\n originalEvent: event\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.menuItem?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(iconUsed: boolean): DocumentFragment {\n return (\n <Fragment>\n {iconUsed &&\n <div class=\"stzh-menu-item__icon-wrapper\">\n {this.icon ?\n <stzh-icon class=\"stzh-menu-item__icon\" name={this.icon}></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n {(this.badge || this.badgeEmpty) &&\n <stzh-badge class=\"stzh-menu-item__badge\" label={this.badge} type={this.badgeType}></stzh-badge>\n }\n </div>\n }\n <div\n ref={(el) => (this.text = el as HTMLDivElement)}\n class=\"stzh-menu-item__text\"\n >\n {this.label ? this.label : <slot></slot>}\n </div>\n </Fragment>\n );\n }\n\n render() {\n const iconUsed: boolean = hasSlot(this.element, \"icon\") || !!this.icon;\n const classes = {\n \"stzh-menu-item\": true,\n \"stzh-menu-item--has-icon\": iconUsed,\n \"stzh-menu-item--has-badge\": !!this.badge,\n \"stzh-menu-item--is-disabled\": this.disabled,\n \"stzh-menu-item--is-active\": this.active\n };\n\n return (\n <Host role=\"menuitem\" tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n {this.href ?\n <a\n ref={(el) => (this.menuItem = el as HTMLAnchorElement)}\n href={this.disabled ? null : this.href}\n target={this.target}\n class={classes}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </a>\n :\n <button\n ref={(el) => (this.menuItem = el as HTMLButtonElement)}\n class={classes}\n type=\"button\"\n disabled={this.disabled}\n aria-label={this.a11yLabel || null}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner(iconUsed)}\n </button>\n }\n </Host>\n );\n }\n}\n"]}
@@ -32,7 +32,8 @@ export class StzhProgressbarItem {
32
32
  }
33
33
  componentDidRender() {
34
34
  requestAnimationFrame(() => {
35
- this.button.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
35
+ var _a;
36
+ (_a = this.button) === null || _a === void 0 ? void 0 : _a.setAttribute("s-object-id", this.analyticsId || this.text.innerText);
36
37
  });
37
38
  }
38
39
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-progressbar-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-progressbar-item/stzh-progressbar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB;;GAEG;AAMH,MAAM,OAAO,mBAAmB;;IAuCtB,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MACtC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,uBAAuB;QAClC,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC;OACpF,CAAC,CAAC;IACL,CAAC,CAAA;IAEO,kBAAa,GAAG,CAAC,KAAiB,EAAE,EAAE;MAC5C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,SAAS,EAAE,uBAAuB;QAClC,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IA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Component,\n Host,\n h,\n Prop,\n Element,\n Fragment,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhProgressbarItemClickEvent,\n StzhProgressbarItemDottedClickEvent\n} from '../../index';\n\n/**\n * @slot - Slot for label (or use label prop)\n */\n@Component({\n tag: \"stzh-progressbar-item\",\n styleUrl: \"stzh-progressbar-item.scss\",\n scoped: true\n})\nexport class StzhProgressbarItem {\n @Prop({ reflect: true }) label: string;\n\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Prop({ reflect: true }) first: boolean = false;\n\n @Prop({ reflect: true }) last: boolean = false;\n\n @Prop({ reflect: true }) passed: boolean = false;\n\n @Prop({ reflect: true }) current: boolean = false;\n\n @Prop({ reflect: true }) hide: boolean = false;\n\n @Prop({ reflect: true }) dotted: boolean = false;\n\n @Prop({ reflect: true }) step: number = 1;\n\n @Prop({ reflect: true }) icon: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhProgressbarItemClickEvent>;\n\n /** Dotted click event */\n @Event() stzhDottedClick: EventEmitter<StzhProgressbarItemDottedClickEvent>;\n\n @Element() element: HTMLStzhProgressbarItemElement;\n\n private button: HTMLButtonElement;\n private text: HTMLElement;\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-progressbar-item\",\n originalEvent: event,\n index: Array.prototype.indexOf.call(this.element.parentNode.children, this.element),\n });\n }\n\n private onDottedClick = (event: MouseEvent) => {\n this.stzhDottedClick.emit({\n component: \"stzh-progressbar-item\",\n originalEvent: event,\n index: Array.prototype.indexOf.call(this.element.parentNode.children, this.element),\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.button.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const classes = {\n \"stzh-progressbar-item\": true,\n \"stzh-progressbar-item--first\": this.first,\n \"stzh-progressbar-item--last\": this.last,\n \"stzh-progressbar-item--passed\": this.passed,\n \"stzh-progressbar-item--current\": this.current,\n \"stzh-progressbar-item--hide\": this.hide,\n \"stzh-progressbar-item--dotted\": this.dotted,\n \"stzh-progressbar-item--has-icon\": !!this.icon,\n \"stzh-progressbar-item--is-disabled\": this.disabled\n };\n\n const dotted = (\n <button\n class=\"stzh-progressbar-item__dotted\"\n onClick={this.onDottedClick}\n >\n <stzh-icon class=\"stzh-progressbar-item__dotted-icon\" name=\"more-horizontal\"></stzh-icon>\n </button>\n );\n\n return (\n <Host role=\"listitem\">\n <div class={classes}>\n {this.last && this.dotted && dotted}\n <button\n ref={(el) => (this.button = el as HTMLButtonElement)}\n class=\"stzh-progressbar-item__button\"\n aria-pressed={this.current ? \"true\" : \"false\"}\n disabled={(this.dotted && this.first) || this.disabled}\n onClick={this.onClick}\n >\n <span class=\"stzh-progressbar-item__number-block\">\n {this.icon\n ?\n <stzh-icon class=\"stzh-progressbar-item__user-icon\" name={this.icon}></stzh-icon>\n :\n <Fragment>\n <span class=\"stzh-progressbar-item__number\">{this.step}</span>\n {this.passed &&\n <stzh-icon class=\"stzh-progressbar-item__icon\" name=\"checkmark\"></stzh-icon>\n }\n </Fragment>\n }\n </span>\n <span\n ref={(el) => (this.text = el as HTMLElement)}\n class=\"stzh-progressbar-item__label-block\"\n >\n {this.label ? this.label : <slot></slot>}\n </span>\n </button>\n {this.first && this.dotted && dotted}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-progressbar-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-progressbar-item/stzh-progressbar-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EAEN,MAAM,eAAe,CAAC;AAOvB;;GAEG;AAMH,MAAM,OAAO,mBAAmB;;IAuCtB,YAAO,GAAG,C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AAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,eAAa,CACnC,CACA;QACR,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,MAAM,CAChC,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Fragment,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhProgressbarItemClickEvent,\n StzhProgressbarItemDottedClickEvent\n} from '../../index';\n\n/**\n * @slot - Slot for label (or use label prop)\n */\n@Component({\n tag: \"stzh-progressbar-item\",\n styleUrl: \"stzh-progressbar-item.scss\",\n scoped: true\n})\nexport class StzhProgressbarItem {\n @Prop({ reflect: true }) label: string;\n\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @Prop({ reflect: true }) first: boolean = false;\n\n @Prop({ reflect: true }) last: boolean = false;\n\n @Prop({ reflect: true }) passed: boolean = false;\n\n @Prop({ reflect: true }) current: boolean = false;\n\n @Prop({ reflect: true }) hide: boolean = false;\n\n @Prop({ reflect: true }) dotted: boolean = false;\n\n @Prop({ reflect: true }) step: number = 1;\n\n @Prop({ reflect: true }) icon: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhProgressbarItemClickEvent>;\n\n /** Dotted click event */\n @Event() stzhDottedClick: EventEmitter<StzhProgressbarItemDottedClickEvent>;\n\n @Element() element: HTMLStzhProgressbarItemElement;\n\n private button: HTMLButtonElement;\n private text: HTMLElement;\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-progressbar-item\",\n originalEvent: event,\n index: Array.prototype.indexOf.call(this.element.parentNode.children, this.element),\n });\n }\n\n private onDottedClick = (event: MouseEvent) => {\n this.stzhDottedClick.emit({\n component: \"stzh-progressbar-item\",\n originalEvent: event,\n index: Array.prototype.indexOf.call(this.element.parentNode.children, this.element),\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.button?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n render() {\n const classes = {\n \"stzh-progressbar-item\": true,\n \"stzh-progressbar-item--first\": this.first,\n \"stzh-progressbar-item--last\": this.last,\n \"stzh-progressbar-item--passed\": this.passed,\n \"stzh-progressbar-item--current\": this.current,\n \"stzh-progressbar-item--hide\": this.hide,\n \"stzh-progressbar-item--dotted\": this.dotted,\n \"stzh-progressbar-item--has-icon\": !!this.icon,\n \"stzh-progressbar-item--is-disabled\": this.disabled\n };\n\n const dotted = (\n <button\n class=\"stzh-progressbar-item__dotted\"\n onClick={this.onDottedClick}\n >\n <stzh-icon class=\"stzh-progressbar-item__dotted-icon\" name=\"more-horizontal\"></stzh-icon>\n </button>\n );\n\n return (\n <Host role=\"listitem\">\n <div class={classes}>\n {this.last && this.dotted && dotted}\n <button\n ref={(el) => (this.button = el as HTMLButtonElement)}\n class=\"stzh-progressbar-item__button\"\n aria-pressed={this.current ? \"true\" : \"false\"}\n disabled={(this.dotted && this.first) || this.disabled}\n onClick={this.onClick}\n >\n <span class=\"stzh-progressbar-item__number-block\">\n {this.icon\n ?\n <stzh-icon class=\"stzh-progressbar-item__user-icon\" name={this.icon}></stzh-icon>\n :\n <Fragment>\n <span class=\"stzh-progressbar-item__number\">{this.step}</span>\n {this.passed &&\n <stzh-icon class=\"stzh-progressbar-item__icon\" name=\"checkmark\"></stzh-icon>\n }\n </Fragment>\n }\n </span>\n <span\n ref={(el) => (this.text = el as HTMLElement)}\n class=\"stzh-progressbar-item__label-block\"\n >\n {this.label ? this.label : <slot></slot>}\n </span>\n </button>\n {this.first && this.dotted && dotted}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -53,7 +53,8 @@ export class StzhSkiplink {
53
53
  }
54
54
  componentDidRender() {
55
55
  requestAnimationFrame(() => {
56
- this.link.setAttribute("s-object-id", this.analyticsId || this.label || this.text.innerText);
56
+ var _a;
57
+ (_a = this.link) === null || _a === void 0 ? void 0 : _a.setAttribute("s-object-id", this.analyticsId || this.label || this.text.innerText);
57
58
  });
58
59
  }
59
60
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-skiplink.js","sourceRoot":"","sources":["../../../../src/components/stzh-skiplink/stzh-skiplink.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,MAAM,EACN,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,OAAO,GACR,MAAM,eAAe,CAAC;AAOvB;;GAEG;AAMH,MAAM,OAAO,YAAY;;IA2Cf,mBAAc,GAAY,KAAK,CAAC;IAEhC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;OACnB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MACtC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;MAE3B,8BAA8B;MAC9B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE;QACzC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,OAAO,CAAC,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IAAI,EACf,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,KAAK,EAAE,IAAI,CAAC,SAAS,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM;QAEnB,WAAK,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAoB,CAAC,IACjD,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,eAAa,CACpC,CACJ,CACC,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n Listen,\n h,\n Prop,\n State,\n Event,\n EventEmitter,\n Element,\n} from \"@stencil/core\";\n\nimport {\n StzhSkiplinkFocusEvent,\n StzhSkiplinkBlurEvent,\n} from \"../../index\";\n\n/**\n * @slot - Slot for any text content\n */\n@Component({\n tag: \"stzh-skiplink\",\n styleUrl: \"stzh-skiplink.scss\",\n scoped: true\n})\nexport class StzhSkiplink {\n /** Label */\n @Prop() label: string = \"\";\n\n /** href for linking to e.g. id of an element to skip to */\n @Prop() href: string;\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** Link title for description e.g. how to use skiplink with access key ([ALT + 1]) */\n @Prop() linkTitle: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /** Whether the skiplink is currently focused */\n @State() focused: boolean = false;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhSkiplinkFocusEvent>;\n\n /** Blur event */\n @Event() stzhBlur: EventEmitter<StzhSkiplinkBlurEvent>;\n\n @Element() element: HTMLStzhSkiplinkElement;\n\n @Listen('focusin')\n focusinHandler() {\n this.focused = true;\n }\n\n @Listen('focusout')\n focusoutHandler() {\n this.focused = false;\n }\n\n private link: HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n // dispatch native focus event\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n\n // dispatch own focus event for updating flyingfocus position correctly\n this.stzhFocus.emit({\n component: \"stzh-skiplink\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n\n this.stzhBlur.emit({\n component: \"stzh-skiplink\",\n originalEvent: event\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link.setAttribute(\"s-object-id\", this.analyticsId || this.label || this.text.innerText);\n });\n }\n\n render() {\n return (\n <Host focused={this.focused} tabindex=\"-1\" onFocus={this.onRootFocus}>\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n class=\"stzh-skiplink\"\n href={this.href}\n accessKey={this.linkAccesskey}\n title={this.linkTitle}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n <div ref={(el) => (this.text = el as HTMLDivElement)}>\n {this.label ? this.label : <slot></slot>}\n </div>\n </a>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-skiplink.js","sourceRoot":"","sources":["../../../../src/components/stzh-skiplink/stzh-skiplink.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,MAAM,EACN,CAAC,EACD,IAAI,E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\n Element,\n} from \"@stencil/core\";\n\nimport {\n StzhSkiplinkFocusEvent,\n StzhSkiplinkBlurEvent,\n} from \"../../index\";\n\n/**\n * @slot - Slot for any text content\n */\n@Component({\n tag: \"stzh-skiplink\",\n styleUrl: \"stzh-skiplink.scss\",\n scoped: true\n})\nexport class StzhSkiplink {\n /** Label */\n @Prop() label: string = \"\";\n\n /** href for linking to e.g. id of an element to skip to */\n @Prop() href: string;\n\n /** Access key of link (usually a number e.g. 1) */\n @Prop() linkAccesskey: string;\n\n /** Link title for description e.g. how to use skiplink with access key ([ALT + 1]) */\n @Prop() linkTitle: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /** Whether the skiplink is currently focused */\n @State() focused: boolean = false;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhSkiplinkFocusEvent>;\n\n /** Blur event */\n @Event() stzhBlur: EventEmitter<StzhSkiplinkBlurEvent>;\n\n @Element() element: HTMLStzhSkiplinkElement;\n\n @Listen('focusin')\n focusinHandler() {\n this.focused = true;\n }\n\n @Listen('focusout')\n focusoutHandler() {\n this.focused = false;\n }\n\n private link: HTMLAnchorElement;\n private text: HTMLDivElement;\n private focusedByInput: boolean = false;\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.link.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n // dispatch native focus event\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n\n // dispatch own focus event for updating flyingfocus position correctly\n this.stzhFocus.emit({\n component: \"stzh-skiplink\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n\n this.stzhBlur.emit({\n component: \"stzh-skiplink\",\n originalEvent: event\n });\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.link?.setAttribute(\"s-object-id\", this.analyticsId || this.label || this.text.innerText);\n });\n }\n\n render() {\n return (\n <Host focused={this.focused} tabindex=\"-1\" onFocus={this.onRootFocus}>\n <a\n ref={(el) => (this.link = el as HTMLAnchorElement)}\n class=\"stzh-skiplink\"\n href={this.href}\n accessKey={this.linkAccesskey}\n title={this.linkTitle}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n <div ref={(el) => (this.text = el as HTMLDivElement)}>\n {this.label ? this.label : <slot></slot>}\n </div>\n </a>\n </Host>\n );\n }\n}\n"]}
@@ -313,7 +313,7 @@ stzh-upload .stzh-fylingfocus-focused::-moz-focus-inner {
313
313
  padding-left: var(--stzh-space-medium);
314
314
  padding-right: var(--stzh-space-small);
315
315
  }
316
- .stzh-upload__preview:not(.dz-error):last-child, .stzh-upload__errors:last-child .stzh-upload__preview:last-child {
316
+ .stzh-upload__preview:not(.dz-error):last-child, .stzh-upload:has(.stzh-upload__previews:empty) .stzh-upload__errors .stzh-upload__preview:last-child {
317
317
  border-bottom: 0.0625rem solid var(--stzh-base-border-color);
318
318
  }
319
319
  .stzh-upload__errors .stzh-upload__preview:first-child, .stzh-upload__errors:empty + .stzh-upload__previews > .stzh-upload__preview {
@@ -986,15 +986,15 @@ export class StzhUpload {
986
986
  "type": "unknown",
987
987
  "mutable": false,
988
988
  "complexType": {
989
- "original": "object | null",
990
- "resolved": "object",
989
+ "original": "object\n | ((Dropzone: any) => { [key: string]: string })\n | null",
990
+ "resolved": "((Dropzone: any) => { [key: string]: string; }) | object",
991
991
  "references": {}
992
992
  },
993
993
  "required": false,
994
994
  "optional": false,
995
995
  "docs": {
996
996
  "tags": [],
997
- "text": "An optional object to send additional headers to the server. Eg:\n`{ \"My-Awesome-Header\": \"header value\" }`"
997
+ "text": "An optional object to send additional headers to the server. Eg:\n`{ \"My-Awesome-Header\": \"header value\" }`\n\nCan also be set as function returning the headers object dynamically."
998
998
  },
999
999
  "defaultValue": "null"
1000
1000
  },