@oiz/stzh-components 2.12.0-beta2 → 2.13.0-beta1

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 (233) hide show
  1. package/dist/cjs/{app-globals-b9d20033.js → app-globals-6831ae97.js} +2 -2
  2. package/dist/cjs/{app-globals-b9d20033.js.map → app-globals-6831ae97.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-datalist_2.cjs.entry.js +1 -1
  12. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/stzh-dropdown.cjs.entry.js +37 -4
  14. package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
  15. package/dist/cjs/stzh-input.cjs.entry.js +2 -2
  16. package/dist/cjs/stzh-input.cjs.entry.js.map +1 -1
  17. package/dist/cjs/stzh-link.cjs.entry.js +2 -1
  18. package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
  19. package/dist/cjs/stzh-menu_2.cjs.entry.js +2 -1
  20. package/dist/cjs/stzh-menu_2.cjs.entry.js.map +1 -1
  21. package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
  22. package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/stzh-skiplink.cjs.entry.js +2 -1
  24. package/dist/cjs/stzh-skiplink.cjs.entry.js.map +1 -1
  25. package/dist/cjs/stzh-upload.cjs.entry.js +16 -2
  26. package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
  27. package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
  28. package/dist/collection/components/stzh-button/stzh-button.js +2 -1
  29. package/dist/collection/components/stzh-button/stzh-button.js.map +1 -1
  30. package/dist/collection/components/stzh-card/stzh-card.css +3 -3
  31. package/dist/collection/components/stzh-card/stzh-card.js +3 -1
  32. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  33. package/dist/collection/components/stzh-chip/stzh-chip.js +2 -1
  34. package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
  35. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +1 -0
  36. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +53 -1
  37. package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
  38. package/dist/collection/components/stzh-input/stzh-input.css +6 -0
  39. package/dist/collection/components/stzh-input/stzh-input.js +4 -4
  40. package/dist/collection/components/stzh-input/stzh-input.js.map +1 -1
  41. package/dist/collection/components/stzh-link/stzh-link.js +2 -1
  42. package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
  43. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js +2 -1
  44. package/dist/collection/components/stzh-menu-item/stzh-menu-item.js.map +1 -1
  45. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +2 -1
  46. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
  47. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js +2 -1
  48. package/dist/collection/components/stzh-skiplink/stzh-skiplink.js.map +1 -1
  49. package/dist/collection/components/stzh-upload/stzh-upload.css +1 -1
  50. package/dist/collection/components/stzh-upload/stzh-upload.js +15 -3
  51. package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
  52. package/dist/collection/libraries/dropzone/dropzone-amd-module.js +7 -1
  53. package/dist/collection/libraries/dropzone/dropzone.js +7 -1
  54. package/dist/collection/libraries/dropzone/min/dropzone-amd-module.min.js +1 -1
  55. package/dist/collection/libraries/dropzone/min/dropzone.min.js +1 -1
  56. package/dist/collection/libraries/tom-select/cjs/tom-select.complete.js +8 -4
  57. package/dist/collection/libraries/tom-select/cjs/tom-select.js +8 -4
  58. package/dist/collection/libraries/tom-select/cjs/tom-select.popular.js +8 -4
  59. package/dist/collection/libraries/tom-select/esm/tom-select.complete.js +8 -4
  60. package/dist/collection/libraries/tom-select/esm/tom-select.js +8 -4
  61. package/dist/collection/libraries/tom-select/esm/tom-select.popular.js +8 -4
  62. package/dist/collection/libraries/tom-select/js/tom-select.base.js +8 -4
  63. package/dist/collection/libraries/tom-select/js/tom-select.base.min.js +34 -34
  64. package/dist/collection/libraries/tom-select/js/tom-select.complete.js +8 -4
  65. package/dist/collection/libraries/tom-select/js/tom-select.complete.min.js +19 -19
  66. package/dist/collection/libraries/tom-select/js/tom-select.popular.js +8 -4
  67. package/dist/collection/libraries/tom-select/js/tom-select.popular.min.js +31 -31
  68. package/dist/components/index.js +1 -1
  69. package/dist/components/stzh-actionset2.js.map +1 -1
  70. package/dist/components/stzh-button2.js +2 -1
  71. package/dist/components/stzh-button2.js.map +1 -1
  72. package/dist/components/stzh-card2.js +4 -2
  73. package/dist/components/stzh-card2.js.map +1 -1
  74. package/dist/components/stzh-chip2.js +2 -1
  75. package/dist/components/stzh-chip2.js.map +1 -1
  76. package/dist/components/stzh-datalist-item2.js +1 -1
  77. package/dist/components/stzh-datalist-item2.js.map +1 -1
  78. package/dist/components/stzh-dropdown2.js +39 -5
  79. package/dist/components/stzh-dropdown2.js.map +1 -1
  80. package/dist/components/stzh-input2.js +3 -3
  81. package/dist/components/stzh-input2.js.map +1 -1
  82. package/dist/components/stzh-link2.js +2 -1
  83. package/dist/components/stzh-link2.js.map +1 -1
  84. package/dist/components/stzh-menu-item2.js +2 -1
  85. package/dist/components/stzh-menu-item2.js.map +1 -1
  86. package/dist/components/stzh-progressbar-item2.js +2 -1
  87. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  88. package/dist/components/stzh-skiplink.js +2 -1
  89. package/dist/components/stzh-skiplink.js.map +1 -1
  90. package/dist/components/stzh-upload.js +18 -2
  91. package/dist/components/stzh-upload.js.map +1 -1
  92. package/dist/esm/{app-globals-0cf2577d.js → app-globals-c1cfb228.js} +2 -2
  93. package/dist/esm/{app-globals-0cf2577d.js.map → app-globals-c1cfb228.js.map} +1 -1
  94. package/dist/esm/loader.js +2 -2
  95. package/dist/esm/stzh-actionset_4.entry.js +4 -2
  96. package/dist/esm/stzh-actionset_4.entry.js.map +1 -1
  97. package/dist/esm/stzh-badge_3.entry.js +2 -1
  98. package/dist/esm/stzh-badge_3.entry.js.map +1 -1
  99. package/dist/esm/stzh-chip_2.entry.js +2 -1
  100. package/dist/esm/stzh-chip_2.entry.js.map +1 -1
  101. package/dist/esm/stzh-components.js +2 -2
  102. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  103. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  104. package/dist/esm/stzh-dropdown.entry.js +37 -4
  105. package/dist/esm/stzh-dropdown.entry.js.map +1 -1
  106. package/dist/esm/stzh-input.entry.js +2 -2
  107. package/dist/esm/stzh-input.entry.js.map +1 -1
  108. package/dist/esm/stzh-link.entry.js +2 -1
  109. package/dist/esm/stzh-link.entry.js.map +1 -1
  110. package/dist/esm/stzh-menu_2.entry.js +2 -1
  111. package/dist/esm/stzh-menu_2.entry.js.map +1 -1
  112. package/dist/esm/stzh-progressbar-item.entry.js +2 -1
  113. package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
  114. package/dist/esm/stzh-skiplink.entry.js +2 -1
  115. package/dist/esm/stzh-skiplink.entry.js.map +1 -1
  116. package/dist/esm/stzh-upload.entry.js +16 -2
  117. package/dist/esm/stzh-upload.entry.js.map +1 -1
  118. package/dist/esm-es5/{app-globals-0cf2577d.js → app-globals-c1cfb228.js} +2 -2
  119. package/dist/esm-es5/loader.js +1 -1
  120. package/dist/esm-es5/loader.js.map +1 -1
  121. package/dist/esm-es5/stzh-actionset_4.entry.js +1 -1
  122. package/dist/esm-es5/stzh-actionset_4.entry.js.map +1 -1
  123. package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
  124. package/dist/esm-es5/stzh-badge_3.entry.js.map +1 -1
  125. package/dist/esm-es5/stzh-chip_2.entry.js +1 -1
  126. package/dist/esm-es5/stzh-chip_2.entry.js.map +1 -1
  127. package/dist/esm-es5/stzh-components.js +1 -1
  128. package/dist/esm-es5/stzh-components.js.map +1 -1
  129. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  130. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  131. package/dist/esm-es5/stzh-dropdown.entry.js +3 -3
  132. package/dist/esm-es5/stzh-dropdown.entry.js.map +1 -1
  133. package/dist/esm-es5/stzh-input.entry.js +1 -1
  134. package/dist/esm-es5/stzh-input.entry.js.map +1 -1
  135. package/dist/esm-es5/stzh-link.entry.js +1 -1
  136. package/dist/esm-es5/stzh-link.entry.js.map +1 -1
  137. package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
  138. package/dist/esm-es5/stzh-menu_2.entry.js.map +1 -1
  139. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  140. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  141. package/dist/esm-es5/stzh-skiplink.entry.js +1 -1
  142. package/dist/esm-es5/stzh-skiplink.entry.js.map +1 -1
  143. package/dist/esm-es5/stzh-upload.entry.js +1 -1
  144. package/dist/esm-es5/stzh-upload.entry.js.map +1 -1
  145. package/dist/stzh-components/{p-7873a639.entry.js → p-01e9b3b5.entry.js} +2 -2
  146. package/dist/stzh-components/p-01e9b3b5.entry.js.map +1 -0
  147. package/dist/stzh-components/{p-0db27707.entry.js → p-03fc4d3d.entry.js} +2 -2
  148. package/dist/stzh-components/p-03fc4d3d.entry.js.map +1 -0
  149. package/dist/stzh-components/{p-3ab3a5a7.system.entry.js → p-1a420f1c.system.entry.js} +2 -2
  150. package/dist/stzh-components/p-1a420f1c.system.entry.js.map +1 -0
  151. package/dist/stzh-components/{p-aa9975e6.entry.js → p-24d82258.entry.js} +2 -2
  152. package/dist/stzh-components/p-24d82258.entry.js.map +1 -0
  153. package/dist/stzh-components/p-2653562a.entry.js +9 -0
  154. package/dist/stzh-components/p-2653562a.entry.js.map +1 -0
  155. package/dist/stzh-components/{p-42e25ae1.system.entry.js → p-3048d3ea.system.entry.js} +2 -2
  156. package/dist/stzh-components/p-3048d3ea.system.entry.js.map +1 -0
  157. package/dist/stzh-components/p-376b64c8.system.entry.js +9 -0
  158. package/dist/stzh-components/p-376b64c8.system.entry.js.map +1 -0
  159. package/dist/stzh-components/{p-6233fc4f.system.js → p-50faf5a6.system.js} +2 -2
  160. package/dist/stzh-components/{p-9d0fedfe.system.entry.js → p-710d15c1.system.entry.js} +2 -2
  161. package/dist/stzh-components/p-710d15c1.system.entry.js.map +1 -0
  162. package/dist/stzh-components/p-8438088e.system.js +2 -0
  163. package/dist/stzh-components/{p-ae0e530e.system.js.map → p-8438088e.system.js.map} +1 -1
  164. package/dist/stzh-components/{p-b2b9d87e.js → p-8e02ecc8.js} +2 -2
  165. package/dist/stzh-components/{p-68feffea.entry.js → p-919e700b.entry.js} +2 -2
  166. package/dist/stzh-components/p-919e700b.entry.js.map +1 -0
  167. package/dist/stzh-components/p-990141f4.entry.js +2 -0
  168. package/dist/stzh-components/p-990141f4.entry.js.map +1 -0
  169. package/dist/stzh-components/{p-d5ee8b1a.entry.js → p-a0d3ec11.entry.js} +2 -2
  170. package/dist/stzh-components/p-a0d3ec11.entry.js.map +1 -0
  171. package/dist/stzh-components/{p-188dd49d.system.entry.js → p-aa0660d8.system.entry.js} +2 -2
  172. package/dist/stzh-components/p-aa0660d8.system.entry.js.map +1 -0
  173. package/dist/stzh-components/p-c1f89d5c.system.entry.js +2 -0
  174. package/dist/stzh-components/p-c1f89d5c.system.entry.js.map +1 -0
  175. package/dist/stzh-components/{p-f73af272.entry.js → p-c70b4f1b.entry.js} +2 -2
  176. package/dist/stzh-components/p-c70b4f1b.entry.js.map +1 -0
  177. package/dist/stzh-components/{p-af33b013.entry.js → p-c90cf7f4.entry.js} +2 -2
  178. package/dist/stzh-components/p-c90cf7f4.entry.js.map +1 -0
  179. package/dist/stzh-components/{p-54a1fdcc.system.entry.js → p-cf18eff2.system.entry.js} +2 -2
  180. package/dist/stzh-components/p-cf18eff2.system.entry.js.map +1 -0
  181. package/dist/stzh-components/{p-135d2e40.system.entry.js → p-d80b87dd.system.entry.js} +2 -2
  182. package/dist/stzh-components/p-d80b87dd.system.entry.js.map +1 -0
  183. package/dist/stzh-components/{p-b3d76f2a.system.entry.js → p-df045b3b.system.entry.js} +2 -2
  184. package/dist/stzh-components/p-df045b3b.system.entry.js.map +1 -0
  185. package/dist/stzh-components/{p-7c2aa5e8.entry.js → p-dfa8f780.entry.js} +2 -2
  186. package/dist/stzh-components/p-dfa8f780.entry.js.map +1 -0
  187. package/dist/stzh-components/{p-2d88c544.system.entry.js → p-e6444356.system.entry.js} +2 -2
  188. package/dist/stzh-components/p-e6444356.system.entry.js.map +1 -0
  189. package/dist/stzh-components/{p-509f90d0.system.entry.js → p-ee4f0a17.system.entry.js} +2 -2
  190. package/dist/stzh-components/p-ee4f0a17.system.entry.js.map +1 -0
  191. package/dist/stzh-components/{p-0164f9d1.entry.js → p-f63cc727.entry.js} +2 -2
  192. package/dist/stzh-components/p-f63cc727.entry.js.map +1 -0
  193. package/dist/stzh-components/stzh-components.esm.js +1 -1
  194. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  195. package/dist/stzh-components/stzh-components.js +1 -1
  196. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +4 -0
  197. package/dist/types/components/stzh-input/stzh-input.d.ts +1 -1
  198. package/dist/types/components/stzh-upload/stzh-upload.d.ts +7 -1
  199. package/dist/types/components.d.ts +18 -6
  200. package/dist/types/libraries/tom-select/types/defaults.d.ts +2 -0
  201. package/dist/types/libraries/tom-select/types/types/settings.d.ts +2 -0
  202. package/dist/vscode-data.json +7537 -0
  203. package/package.json +1 -1
  204. package/dist/stzh-components/p-0164f9d1.entry.js.map +0 -1
  205. package/dist/stzh-components/p-0db27707.entry.js.map +0 -1
  206. package/dist/stzh-components/p-135d2e40.system.entry.js.map +0 -1
  207. package/dist/stzh-components/p-188dd49d.system.entry.js.map +0 -1
  208. package/dist/stzh-components/p-2d88c544.system.entry.js.map +0 -1
  209. package/dist/stzh-components/p-3ab3a5a7.system.entry.js.map +0 -1
  210. package/dist/stzh-components/p-42e25ae1.system.entry.js.map +0 -1
  211. package/dist/stzh-components/p-4ad49ece.entry.js +0 -2
  212. package/dist/stzh-components/p-4ad49ece.entry.js.map +0 -1
  213. package/dist/stzh-components/p-509f90d0.system.entry.js.map +0 -1
  214. package/dist/stzh-components/p-54a1fdcc.system.entry.js.map +0 -1
  215. package/dist/stzh-components/p-68feffea.entry.js.map +0 -1
  216. package/dist/stzh-components/p-7873a639.entry.js.map +0 -1
  217. package/dist/stzh-components/p-7c2aa5e8.entry.js.map +0 -1
  218. package/dist/stzh-components/p-97704eb0.system.entry.js +0 -9
  219. package/dist/stzh-components/p-97704eb0.system.entry.js.map +0 -1
  220. package/dist/stzh-components/p-9d0fedfe.system.entry.js.map +0 -1
  221. package/dist/stzh-components/p-a0b350c2.system.entry.js +0 -2
  222. package/dist/stzh-components/p-a0b350c2.system.entry.js.map +0 -1
  223. package/dist/stzh-components/p-aa9975e6.entry.js.map +0 -1
  224. package/dist/stzh-components/p-ae0e530e.system.js +0 -2
  225. package/dist/stzh-components/p-af33b013.entry.js.map +0 -1
  226. package/dist/stzh-components/p-b3d76f2a.system.entry.js.map +0 -1
  227. package/dist/stzh-components/p-d5ee8b1a.entry.js.map +0 -1
  228. package/dist/stzh-components/p-f73af272.entry.js.map +0 -1
  229. package/dist/stzh-components/p-f91187c8.entry.js +0 -9
  230. package/dist/stzh-components/p-f91187c8.entry.js.map +0 -1
  231. /package/dist/esm-es5/{app-globals-0cf2577d.js.map → app-globals-c1cfb228.js.map} +0 -0
  232. /package/dist/stzh-components/{p-6233fc4f.system.js.map → p-50faf5a6.system.js.map} +0 -0
  233. /package/dist/stzh-components/{p-b2b9d87e.js.map → p-8e02ecc8.js.map} +0 -0
@@ -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;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AE,OAAO,EACd,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,gBACX,IAAI,CAAC,SAAS,IAAI,IAAI,EAClC,OAAO,EAAE,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,GA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"]}
@@ -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,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"]}
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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G,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAiB,CAAC,EAC5C,KAAK,EAAC,oCAAoC,IAEzC,IAAI,CAAC,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,E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C,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,EAAuB,CAAC,EAClD,KAAK,EAAC,eAAe,EACrB,IAAI,EAAE,IAAI,CAAC,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":"","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"]}
@@ -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 {
@@ -83,6 +83,12 @@ export class StzhUpload {
83
83
  this.hiddenInputContainer = undefined;
84
84
  this.localization = undefined;
85
85
  }
86
+ maxFilesWatcher(newMaxFiles) {
87
+ this.dropzone.options.maxFiles = newMaxFiles;
88
+ }
89
+ maxFilesizeWatcher(newMaxFilesize) {
90
+ this.dropzone.options.maxFilesize = newMaxFilesize;
91
+ }
86
92
  existingFilesWatcher(newValue) {
87
93
  if (typeof newValue === "string") {
88
94
  this._existingFiles = JSON.parse(newValue);
@@ -986,15 +992,15 @@ export class StzhUpload {
986
992
  "type": "unknown",
987
993
  "mutable": false,
988
994
  "complexType": {
989
- "original": "object | null",
990
- "resolved": "object",
995
+ "original": "object\n | ((Dropzone: any) => { [key: string]: string })\n | null",
996
+ "resolved": "((Dropzone: any) => { [key: string]: string; }) | object",
991
997
  "references": {}
992
998
  },
993
999
  "required": false,
994
1000
  "optional": false,
995
1001
  "docs": {
996
1002
  "tags": [],
997
- "text": "An optional object to send additional headers to the server. Eg:\n`{ \"My-Awesome-Header\": \"header value\" }`"
1003
+ "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
1004
  },
999
1005
  "defaultValue": "null"
1000
1006
  },
@@ -1554,6 +1560,12 @@ export class StzhUpload {
1554
1560
  static get elementRef() { return "element"; }
1555
1561
  static get watchers() {
1556
1562
  return [{
1563
+ "propName": "maxFiles",
1564
+ "methodName": "maxFilesWatcher"
1565
+ }, {
1566
+ "propName": "maxFilesize",
1567
+ "methodName": "maxFilesizeWatcher"
1568
+ }, {
1557
1569
  "propName": "existingFiles",
1558
1570
  "methodName": "existingFilesWatcher"
1559
1571
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-upload.js","sourceRoot":"","sources":["../../../../src/components/stzh-upload/stzh-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,KAAK,EAEN,MAAM,eAAe,CAAC;AAyBvB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,mCAAmC,CAAC;AAC3C,MAAM,CAAC,QAAQ,CAAC,YAAY,GAAG,KAAK,CAAC;AAErC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhUploadFilesItem,\n StzhUploadFile,\n StzhUploadFileAddedEvent,\n StzhUploadFilesAddedEvent,\n StzhUploadFileRemoveEvent,\n StzhUploadFileRemovedEvent,\n StzhUploadSendingEvent,\n StzhUploadSendingMultipleEvent,\n StzhUploadProcessingEvent,\n StzhUploadProcessingMultipleEvent,\n StzhUploadProgressEvent,\n StzhUploadProgressTotalEvent,\n StzhUploadErrorEvent,\n StzhUploadErrorMultipleEvent,\n StzhUploadSuccessEvent,\n StzhUploadSuccessMultipleEvent,\n StzhUploadCanceledEvent,\n StzhUploadCanceledMultipleEvent,\n StzhUploadCompleteEvent,\n StzhUploadCompleteMultipleEvent\n} from \"../../index\";\n\nimport { hasSlot, isStzhElement } from \"../../utils/utils\";\nimport { StzhUploadLocalizedText } from './stzh-upload.localization';\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport \"../../libraries/dropzone/dropzone\";\nwindow.Dropzone.autoDiscover = false;\n\nconst ATTR_NAME = \"data-dz-name\";\nconst ATTR_TYPE = \"data-dz-type\";\nconst ATTR_SIZE = \"data-dz-size\";\nconst ATTR_LINK = \"data-dz-link\";\nconst ATTR_EXTENSION = \"data-dz-extension\";\nconst ATTR_META_ID = \"data-dz-meta-id\";\nconst ATTR_ERROR_MESSAGE_ID = \"data-dz-error-message-id\";\nconst ATTR_PROGRESS_TEXT = \"data-dz-progress-text\";\nconst ATTR_REMOVE = \"data-dz-remove\";\n\nlet uploadCounter = 0;\nlet previewCounter = 0;\n\n// Most properties taken over from:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js\n\n// Possible events to listen to:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/dropzone.js#L17\n\n/**\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-upload\",\n styleUrl: \"stzh-upload.scss\"\n})\nexport class StzhUpload {\n /**\n * Initially pre existing files (e.g. already uploaded by the user).\n * Array of objects that must at least include `name` and `size` attribute:\n * `[{\"name\":\"file1.txt\", \"size\": 12345}, {\"name\":\"file2.txt\", \"size\": 12345}]`\n */\n @Prop() existingFiles: StzhUploadFilesItem[] | string = [];\n private _existingFiles: StzhUploadFilesItem[] = [];\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Button text */\n @Prop() button: string = \"\";\n\n /**\n * URL the files are processed to.\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */\n @Prop() url: string | Function = \"\";\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method.\n */\n @Prop() method: \"post\" | \"put\" | Function = \"post\";\n\n /**\n * Will be set on the XHRequest.\n */\n @Prop() withCredentials: boolean = false;\n\n /**\n * Whether the upload is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the upload is marked as invalid.\n */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether download functionality should be disabled. */\n @Prop() downloadDisabled: boolean = false;\n\n /** Whether download functionality should only be shown to completed files. */\n @Prop() downloadDisabledWhileProcessing: boolean = false;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * This option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n @Prop() acceptedFiles: string | null = null;\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `element.processQueue()`.\n */\n @Prop() autoProcessQueue: boolean = true;\n\n /**\n * Hide progress (bars and text).\n */\n @Prop() hideProgress: boolean = false;\n\n /**\n * Hide progress (bars) only while idle (will show them as soon as upload starts).\n * Can be used together with `autoProcessQueue`, e.g. if files are uploaded at form submit to prevent showing empty progressbar.\n */\n @Prop() hideProgressWhileIdle: boolean = false;\n\n /**\n * If not `null` defines how many files this dropzone handles. If it exceeds,\n * the event `stzhMaxfilesexceeded` will be called.\n */\n @Prop() maxFiles: number | null = null;\n\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */\n @Prop() maxFilesize: number = 25;\n\n /**\n * How many file uploads to process in parallel.\n */\n @Prop() parallelUploads: number = 2;\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `stzhSuccessMultiple`). See the events\n * documentation section for more information.\n */\n @Prop() uploadMultiple: boolean = false;\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See `chunksUploaded` prop for the callback to finalise an upload.\n */\n @Prop() chunking: boolean = false;\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n @Prop() forceChunking: boolean = false;\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n @Prop() chunkSize: number = 2 * 1024 * 1024;\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n @Prop() parallelChunkUploads: boolean = false;\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n @Prop() retryChunks: boolean = false;\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n @Prop() retryChunksLimit: number = 3;\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n @Prop() filesizeBase: number = 1024;\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n */\n @Prop() headers: object | null = null;\n\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */\n @Prop() defaultHeaders: boolean = true;\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n @Prop() accept: Function = function(_file, done) {\n return done();\n };\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n @Prop() chunksUploaded: Function = function(_file, done) {\n done();\n };\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly. Will be rendered into element by default.\n */\n @Prop() hiddenInputContainer: string | HTMLElement;\n\n /** Translation strings. */\n @Prop() localization: StzhUploadLocalizedText;\n\n @Element() element: HTMLStzhUploadElement;\n\n @Watch(\"existingFiles\")\n existingFilesWatcher(newValue: StzhUploadFilesItem[] | string) {\n if (typeof newValue === \"string\") {\n this._existingFiles = JSON.parse(newValue);\n } else {\n this._existingFiles = newValue;\n }\n }\n\n @Watch(\"disabled\")\n disabledWatcher() {\n if (!this.dropzone) {\n return;\n }\n\n if (this.disabled) {\n this.dropzone.disable();\n } else {\n this.dropzone.enable();\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 /** File added */\n @Event() stzhFileAdded: EventEmitter<StzhUploadFileAddedEvent>;\n\n /** Files added (multiple) */\n @Event() stzhFilesAdded: EventEmitter<StzhUploadFilesAddedEvent>;\n\n /** File remove (before, cancelable) */\n @Event() stzhFileRemove: EventEmitter<StzhUploadFileRemoveEvent>;\n\n /** File removed */\n @Event() stzhFileRemoved: EventEmitter<StzhUploadFileRemovedEvent>;\n\n /** Before sending file (add additional data before request if necessary) */\n @Event() stzhSending: EventEmitter<StzhUploadSendingEvent>;\n\n /** Before sending multiple files (add additional data before request if necessary) */\n @Event() stzhSendingMultiple: EventEmitter<StzhUploadSendingMultipleEvent>;\n\n /** Files starting to get processed */\n @Event() stzhProcessing: EventEmitter<StzhUploadProcessingEvent>;\n\n /** Files starting to get processed (multiple) */\n @Event() stzhProcessingMultiple: EventEmitter<StzhUploadProcessingMultipleEvent>;\n\n /** Upload file progress during upload */\n @Event() stzhProgress: EventEmitter<StzhUploadProgressEvent>;\n\n /** Upload total file progress during upload */\n @Event() stzhProgressTotal: EventEmitter<StzhUploadProgressTotalEvent>;\n\n /** File error */\n @Event() stzhError: EventEmitter<StzhUploadErrorEvent>;\n\n /** Files error (multiple files) */\n @Event() stzhErrorMultiple: EventEmitter<StzhUploadErrorMultipleEvent>;\n\n /** File successfully uploaded */\n @Event() stzhSuccess: EventEmitter<StzhUploadSuccessEvent>;\n\n /** Files successfully uploaded (multiple files) */\n @Event() stzhSuccessMultiple: EventEmitter<StzhUploadSuccessMultipleEvent>;\n\n /** Canceled file upload */\n @Event() stzhCanceled: EventEmitter<StzhUploadCanceledEvent>;\n\n /** Canceled file upload (multiple files) */\n @Event() stzhCanceledMultiple: EventEmitter<StzhUploadCanceledMultipleEvent>;\n\n /** Completed upload (successfully or with error) */\n @Event() stzhComplete: EventEmitter<StzhUploadCompleteEvent>;\n\n /** Completed upload (successfully or with error, multiple files) */\n @Event() stzhCompleteMultiple: EventEmitter<StzhUploadCompleteMultipleEvent>;\n\n @Method()\n async processQueue() {\n return this.dropzone.processQueue();\n }\n\n @Method()\n async removeFile(file, force = false) {\n return this.dropzone.removeFile(file, force);\n }\n\n @Method()\n async removeAllFiles(onlyCancelCurrentlyUploadingFiles = false, force = false) {\n return this.dropzone.removeAllFiles(onlyCancelCurrentlyUploadingFiles, force);\n }\n\n private dropzone: any;\n private dropzoneElement: HTMLElement;\n private buttonElement: HTMLStzhButtonElement;\n private clickareaElement: HTMLElement;\n private previewsElement: HTMLElement;\n private errorsElement: HTMLElement;\n private hiddenInputContainerElement: HTMLElement;\n private uploadId: string;\n\n private filesize = function(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n\n if (size > 0) {\n let units = [\"tb\", \"gb\", \"mb\", \"kb\", \"b\"];\n\n for (let i = 0; i < units.length; i++) {\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(selectedSize * 100) / 100; // Cutting of digits\n }\n\n return `<strong>${selectedSize}</strong> ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }\n\n private filePreviewId = function(file): string {\n return `${this.uploadId}-${file._id}`\n }\n\n async componentWillLoad() {\n this.uploadId = `stzh-upload-${uploadCounter++}`;\n\n this.existingFilesWatcher(this.existingFiles);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n function enableDownload(file) {\n let fileHref = file.url || '';\n\n if (file.upload) {\n fileHref = URL.createObjectURL(file);\n }\n\n if (fileHref) {\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {\n node.setAttribute(\"href\", fileHref);\n node.setAttribute(\"download\", file.name);\n\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n }\n }\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\n previewsContainer: this.previewsElement,\n url: this.url,\n method: this.method,\n withCredentials: this.withCredentials,\n clickable: [this.clickareaElement],\n acceptedFiles: this.acceptedFiles,\n accept: this.accept,\n maxFiles: this.maxFiles,\n maxFilesize: this.maxFilesize,\n filesizeBase: this.filesizeBase,\n parallelUploads: this.parallelUploads,\n uploadMultiple: this.uploadMultiple,\n autoProcessQueue: this.autoProcessQueue,\n headers: this.headers,\n defaultHeaders: this.defaultHeaders,\n chunking: this.chunking,\n chunkSize: this.chunkSize,\n chunksUploaded: this.chunksUploaded,\n forceChunking: this.forceChunking,\n parallelChunkUploads: this.parallelChunkUploads,\n retryChunks: this.retryChunks,\n retryChunksLimit: this.retryChunksLimit,\n createImageThumbnails: false,\n hiddenInputContainer: this.hiddenInputContainer ? this.hiddenInputContainer : this.hiddenInputContainerElement,\n dictFileSizeUnits: { tb: \"TiB\", gb: \"GiB\", mb: \"MiB\", kb: \"KiB\", b: \"b\" },\n dictRemoveFileConfirmation: null,\n dictMaxFilesExceeded: this.localization.maxFilesExceeded,\n dictRemoveFile: this.localization.removeFile,\n dictDeleteFile: this.localization.deleteFile,\n dictCancelUploadConfirmation: this.localization.cancelUploadConfirmation,\n dictUploadCanceled: this.localization.uploadCanceled,\n dictCancelUpload: this.localization.cancelUpload,\n dictResponseError: this.localization.responseError,\n dictInvalidFileType: this.localization.invalidFileType,\n dictFileTooBig: this.localization.fileTooBig,\n // Called when a file is added to the queue\n // Receives `file`\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594\n addedfile(file) {\n file._id = previewCounter++;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = window.Dropzone.createElement(\n this.options.previewTemplate.trim()\n );\n file.previewTemplate = file.previewElement; // Backwards compatibility\n this.previewsContainer.appendChild(file.previewElement);\n\n if (!file.size) {\n file.previewElement.classList.add(\"dz-empty\");\n }\n\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_NAME}]`)) {\n node.textContent = file.name;\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_SIZE}]`)) {\n node.innerHTML = self.filesize.call(this, file.size);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_META_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-meta`);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_ERROR_MESSAGE_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-error-message`);\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" ${ATTR_REMOVE}>\n ${this.options.dictRemoveFile}\n </a>`\n );\n file.previewElement.appendChild(file._removeLink);\n }\n\n let removeFileEvent = (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === window.Dropzone.UPLOADING) {\n return window.Dropzone.confirm(\n this.options.dictCancelUploadConfirmation,\n () => this.removeFile(file)\n );\n } else {\n if (this.options.dictRemoveFileConfirmation) {\n return window.Dropzone.confirm(\n this.options.dictRemoveFileConfirmation,\n () => this.removeFile(file)\n );\n } else {\n return this.removeFile(file);\n }\n }\n };\n\n for (let removeLink of file.previewElement.querySelectorAll(\n `[${ATTR_REMOVE}]`\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n const fileId = self.filePreviewId(file);\n\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile}`);\n removeLink.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${this.options.dictRemoveFile} ${file.name}`);\n removeLink.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n if (!self.downloadDisabled && !self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n }\n },\n // When the upload is finished, either with success or an error.\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L752\n complete(file) {\n for (let node of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {\n const hasErrorState = (file.status === \"error\");\n const removeOrDeleteLabel = hasErrorState ? this.options.dictRemoveFile : this.options.dictDeleteFile;\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${removeOrDeleteLabel} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n // move file uploads with errors to another element, so they are grouped together\n if (file.status === \"error\") {\n self.errorsElement.appendChild(file.previewElement);\n } else if (!self.downloadDisabled && self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n\n if (file._removeLink) {\n file._removeLink.innerHTML = this.options.dictRemoveFile;\n }\n\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n // Called whenever a file is removed.\n // Taken fom https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L649\n removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n\n // set focus to upload\n self.buttonElement.setFocus();\n\n return this._updateMaxFilesReachedClass();\n },\n error(file, message, xhr) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n\n if (typeof message !== \"string\" && message.error) {\n message = message.error;\n } else if (xhr) {\n if (xhr.status === 401 || xhr.status === 403) {\n message = self.localization.accessError;\n } else if (xhr.status === 413) {\n message = self.localization.fileTooBigServer;\n } else if (xhr.status === 415) {\n message = self.localization.invalidFileType;\n } else if (xhr.status >= 500) {\n message = self.localization.serverError;\n } else {\n const defaultError = self.localization.responseError\n .replace(\"{{statusCode}}\", xhr.status);\n\n message = defaultError;\n }\n }\n\n for (let node of file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")) {\n node.textContent = message;\n }\n }\n },\n previewTemplate: `\n <div class=\"stzh-upload__preview\">\n <div class=\"stzh-upload__image\">\n <img data-dz-thumbnail />\n </div>\n\n <div class=\"stzh-upload__details\">\n <div class=\"stzh-upload__info-wrapper\">\n <div class=\"stzh-upload__info-wrapper-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\n </div>\n <div class=\"stzh-upload__meta\">\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__progress\">\n <span class=\"stzh-upload__progress-bar\" data-dz-uploadprogress></span>\n </div>\n </div>\n <div class=\"stzh-upload__info-wrapper-complete\">\n <div class=\"stzh-upload__title\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__meta\" ${ATTR_META_ID}>\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__error-message\" ${ATTR_ERROR_MESSAGE_ID}>\n <span data-dz-errormessage></span>\n </div>\n </div>\n </div>\n <div class=\"stzh-upload__actions\">\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only icon=\"download\" class=\"stzh-upload__download\" ${ATTR_LINK}></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" ${ATTR_REMOVE}>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon\" name=\"delete\"></stzh-icon>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon-error\" name=\"close\"></stzh-icon>\n </stzh-button>\n </div>\n </div>\n </div>\n `\n });\n\n this.disabledWatcher();\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => this.stzhFileAdded.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"addedfiles\", (files: StzhUploadFile[]) => this.stzhFilesAdded.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"removefile\", (file: StzhUploadFile) => this.stzhFileRemove.emit({\n component: \"stzh-upload\", file\n }).defaultPrevented === false);\n\n this.dropzone.on(\"removedfile\", (file: StzhUploadFile, force: boolean) => this.stzhFileRemoved.emit({\n component: \"stzh-upload\", file, force\n }));\n\n this.dropzone.on(\"sending\", (file: StzhUploadFile, xhr: XMLHttpRequest, formData: FormData) => this.stzhSending.emit({\n component: \"stzh-upload\", file, xhr, formData\n }));\n\n this.dropzone.on(\"sendingmultiple\", (files: StzhUploadFile[], xhr: XMLHttpRequest, formData: FormData) => this.stzhSendingMultiple.emit({\n component: \"stzh-upload\", files, xhr, formData\n }));\n\n this.dropzone.on(\"processing\", (file: StzhUploadFile) => this.stzhProcessing.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"processingmultiple\", (files: StzhUploadFile[]) => this.stzhProcessingMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number, bytesSent: number) => this.stzhProgress.emit({\n component: \"stzh-upload\", file, progress, bytesSent\n }));\n\n this.dropzone.on(\"totaluploadprogress\", (totalUploadProgress: number, totalBytes: number, totalBytesSent: number) => this.stzhProgressTotal.emit({\n component: \"stzh-upload\", totalUploadProgress, totalBytes, totalBytesSent\n }));\n\n this.dropzone.on(\"error\", (file: StzhUploadFile, message: string, xhr: XMLHttpRequest) => this.stzhError.emit({\n component: \"stzh-upload\", file, message, xhr\n }));\n\n this.dropzone.on(\"errormultiple\", (files: StzhUploadFile[], message: string, xhr: XMLHttpRequest) => this.stzhErrorMultiple.emit({\n component: \"stzh-upload\", files, message, xhr\n }));\n\n this.dropzone.on(\"success\", (file: StzhUploadFile, responseText: string, event: ProgressEvent) => this.stzhSuccess.emit({\n component: \"stzh-upload\", file, responseText, event\n }));\n\n this.dropzone.on(\"successmultiple\", (files: StzhUploadFile[], responseText: string, event: ProgressEvent) => this.stzhSuccessMultiple.emit({\n component: \"stzh-upload\", files, responseText, event\n }));\n\n this.dropzone.on(\"canceled\", (file: StzhUploadFile) => this.stzhCanceled.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"canceledmultiple\", (files: StzhUploadFile[]) => this.stzhCanceledMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"complete\", (file: StzhUploadFile) => this.stzhComplete.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"completemultiple\", (files: StzhUploadFile[]) => this.stzhCompleteMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => {\n file.previewElement.querySelectorAll(`[${ATTR_NAME}]`).forEach((name: HTMLElement) => {\n name.setAttribute(\"title\", file.name);\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_TYPE}]`).forEach((type: HTMLElement) => {\n type.innerText = file.type;\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_EXTENSION}]`).forEach((extension: HTMLElement) => {\n extension.innerText = file.name.split(\".\").pop();\n })\n });\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number) => {\n file.previewElement.querySelectorAll(`[${ATTR_PROGRESS_TEXT}]`).forEach((progressText: HTMLElement) => {\n progressText.innerText = `${progress.toString()}%`;\n });\n });\n\n this._existingFiles.forEach((file) => {\n this.dropzone.displayExistingFile(file, null, null, null, null);\n });\n }\n\n disconnectedCallback() {\n if (this.dropzone) {\n this.dropzone.destroy();\n this.dropzone = null;\n }\n }\n\n render() {\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-upload\": true,\n \"stzh-upload--is-invalid\": this.invalid,\n \"stzh-upload--is-disabled\": this.disabled,\n \"stzh-upload--has-hidden-progress\": this.hideProgress,\n \"stzh-upload--has-hidden-progress-while-idle\": this.hideProgressWhileIdle,\n \"stzh-upload--has-error\": errorUsed,\n \"stzh-upload--has-instructions\": !!this.description || !!this.localization.description\n };\n\n return (\n <Host>\n <div\n class={classes}\n ref={(el) => (this.dropzoneElement = el as HTMLDivElement)}\n >\n <div ref={(el) => (this.hiddenInputContainerElement = el as HTMLElement)}></div>\n\n <div id={`${this.uploadId}-label`}>\n {this.label && <div class=\"stzh-upload__label\">{this.label}</div>}\n </div>\n\n <div\n class=\"stzh-upload__clickarea\"\n ref={(el) => (this.clickareaElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-upload__instructions\" id={`${this.uploadId}-instruction`}>\n {this.description ? this.description : this.localization.description}\n </div>\n <stzh-button\n size=\"small\"\n class=\"stzh-upload__button\"\n ref={(el) => (this.buttonElement = el as HTMLStzhButtonElement)}\n a11yDescribedby={`${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`}\n disabled={this.disabled}\n a11yControls={`${this.uploadId}-previews`}\n >\n {this.button ? this.button : this.localization.button}\n </stzh-button>\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-upload\"\n id={`${this.uploadId}-description`}\n error={this._error}\n />\n\n <div id={`${this.uploadId}-previews`}>\n <div\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n\n <div\n class=\"stzh-upload__previews dropzone-previews\"\n ref={(el) => (this.previewsElement = el as HTMLElement)}\n ></div>\n </div>\n\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-upload.js","sourceRoot":"","sources":["../../../../src/components/stzh-upload/stzh-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,KAAK,EAEN,MAAM,eA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhUploadFilesItem,\n StzhUploadFile,\n StzhUploadFileAddedEvent,\n StzhUploadFilesAddedEvent,\n StzhUploadFileRemoveEvent,\n StzhUploadFileRemovedEvent,\n StzhUploadSendingEvent,\n StzhUploadSendingMultipleEvent,\n StzhUploadProcessingEvent,\n StzhUploadProcessingMultipleEvent,\n StzhUploadProgressEvent,\n StzhUploadProgressTotalEvent,\n StzhUploadErrorEvent,\n StzhUploadErrorMultipleEvent,\n StzhUploadSuccessEvent,\n StzhUploadSuccessMultipleEvent,\n StzhUploadCanceledEvent,\n StzhUploadCanceledMultipleEvent,\n StzhUploadCompleteEvent,\n StzhUploadCompleteMultipleEvent\n} from \"../../index\";\n\nimport { hasSlot, isStzhElement } from \"../../utils/utils\";\nimport { StzhUploadLocalizedText } from './stzh-upload.localization';\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nimport \"../../libraries/dropzone/dropzone\";\nwindow.Dropzone.autoDiscover = false;\n\nconst ATTR_NAME = \"data-dz-name\";\nconst ATTR_TYPE = \"data-dz-type\";\nconst ATTR_SIZE = \"data-dz-size\";\nconst ATTR_LINK = \"data-dz-link\";\nconst ATTR_EXTENSION = \"data-dz-extension\";\nconst ATTR_META_ID = \"data-dz-meta-id\";\nconst ATTR_ERROR_MESSAGE_ID = \"data-dz-error-message-id\";\nconst ATTR_PROGRESS_TEXT = \"data-dz-progress-text\";\nconst ATTR_REMOVE = \"data-dz-remove\";\n\nlet uploadCounter = 0;\nlet previewCounter = 0;\n\n// Most properties taken over from:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js\n\n// Possible events to listen to:\n// https://github.com/dropzone/dropzone/blob/v5.9.3/src/dropzone.js#L17\n\n/**\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-upload\",\n styleUrl: \"stzh-upload.scss\"\n})\nexport class StzhUpload {\n /**\n * Initially pre existing files (e.g. already uploaded by the user).\n * Array of objects that must at least include `name` and `size` attribute:\n * `[{\"name\":\"file1.txt\", \"size\": 12345}, {\"name\":\"file2.txt\", \"size\": 12345}]`\n */\n @Prop() existingFiles: StzhUploadFilesItem[] | string = [];\n private _existingFiles: StzhUploadFilesItem[] = [];\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Button text */\n @Prop() button: string = \"\";\n\n /**\n * URL the files are processed to.\n *\n * You can also provide a function that will be called with `files` and\n * `dataBlocks` and must return the url as string.\n */\n @Prop() url: string | Function = \"\";\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method.\n */\n @Prop() method: \"post\" | \"put\" | Function = \"post\";\n\n /**\n * Will be set on the XHRequest.\n */\n @Prop() withCredentials: boolean = false;\n\n /**\n * Whether the upload is disabled or not.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the upload is marked as invalid.\n */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Whether download functionality should be disabled. */\n @Prop() downloadDisabled: boolean = false;\n\n /** Whether download functionality should only be shown to completed files. */\n @Prop() downloadDisabledWhileProcessing: boolean = false;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * This option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n @Prop() acceptedFiles: string | null = null;\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `element.processQueue()`.\n */\n @Prop() autoProcessQueue: boolean = true;\n\n /**\n * Hide progress (bars and text).\n */\n @Prop() hideProgress: boolean = false;\n\n /**\n * Hide progress (bars) only while idle (will show them as soon as upload starts).\n * Can be used together with `autoProcessQueue`, e.g. if files are uploaded at form submit to prevent showing empty progressbar.\n */\n @Prop() hideProgressWhileIdle: boolean = false;\n\n /**\n * If not `null` defines how many files this dropzone handles. If it exceeds,\n * the event `stzhMaxfilesexceeded` will be called.\n */\n @Prop() maxFiles: number | null = null;\n\n /**\n * The maximum filesize (in MiB) that is allowed to be uploaded.\n */\n @Prop() maxFilesize: number = 25;\n\n /**\n * How many file uploads to process in parallel.\n */\n @Prop() parallelUploads: number = 2;\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `stzhSuccessMultiple`). See the events\n * documentation section for more information.\n */\n @Prop() uploadMultiple: boolean = false;\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See `chunksUploaded` prop for the callback to finalise an upload.\n */\n @Prop() chunking: boolean = false;\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n @Prop() forceChunking: boolean = false;\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n @Prop() chunkSize: number = 2 * 1024 * 1024;\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n @Prop() parallelChunkUploads: boolean = false;\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n @Prop() retryChunks: boolean = false;\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n @Prop() retryChunksLimit: number = 3;\n\n /**\n * The base that is used to calculate the **displayed** filesize. You can\n * change this to 1024 if you would rather display kibibytes, mebibytes,\n * etc... 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte`\n * not `1 kilobyte`. You can change this to `1024` if you don't care about\n * validity.\n */\n @Prop() filesizeBase: number = 1024;\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n *\n * Can also be set as function returning the headers object dynamically.\n */\n @Prop() headers: object\n | ((Dropzone: any) => { [key: string]: string })\n | null\n = null;\n\n /**\n * Should the default headers be set or not?\n * Accept: application/json <- for requesting json response\n * Cache-Control: no-cache <- Request shouldnt be cached\n * X-Requested-With: XMLHttpRequest <- We sent the request via XMLHttpRequest\n */\n @Prop() defaultHeaders: boolean = true;\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n @Prop() accept: Function = function(_file, done) {\n return done();\n };\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n @Prop() chunksUploaded: Function = function(_file, done) {\n done();\n };\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n *\n * Can be a selector string, or an element directly. Will be rendered into element by default.\n */\n @Prop() hiddenInputContainer: string | HTMLElement;\n\n /** Translation strings. */\n @Prop() localization: StzhUploadLocalizedText;\n\n @Element() element: HTMLStzhUploadElement;\n\n @Watch(\"maxFiles\")\n maxFilesWatcher(newMaxFiles: number | null) {\n this.dropzone.options.maxFiles = newMaxFiles;\n }\n\n @Watch(\"maxFilesize\")\n maxFilesizeWatcher(newMaxFilesize: number) {\n this.dropzone.options.maxFilesize = newMaxFilesize;\n }\n\n @Watch(\"existingFiles\")\n existingFilesWatcher(newValue: StzhUploadFilesItem[] | string) {\n if (typeof newValue === \"string\") {\n this._existingFiles = JSON.parse(newValue);\n } else {\n this._existingFiles = newValue;\n }\n }\n\n @Watch(\"disabled\")\n disabledWatcher() {\n if (!this.dropzone) {\n return;\n }\n\n if (this.disabled) {\n this.dropzone.disable();\n } else {\n this.dropzone.enable();\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 /** File added */\n @Event() stzhFileAdded: EventEmitter<StzhUploadFileAddedEvent>;\n\n /** Files added (multiple) */\n @Event() stzhFilesAdded: EventEmitter<StzhUploadFilesAddedEvent>;\n\n /** File remove (before, cancelable) */\n @Event() stzhFileRemove: EventEmitter<StzhUploadFileRemoveEvent>;\n\n /** File removed */\n @Event() stzhFileRemoved: EventEmitter<StzhUploadFileRemovedEvent>;\n\n /** Before sending file (add additional data before request if necessary) */\n @Event() stzhSending: EventEmitter<StzhUploadSendingEvent>;\n\n /** Before sending multiple files (add additional data before request if necessary) */\n @Event() stzhSendingMultiple: EventEmitter<StzhUploadSendingMultipleEvent>;\n\n /** Files starting to get processed */\n @Event() stzhProcessing: EventEmitter<StzhUploadProcessingEvent>;\n\n /** Files starting to get processed (multiple) */\n @Event() stzhProcessingMultiple: EventEmitter<StzhUploadProcessingMultipleEvent>;\n\n /** Upload file progress during upload */\n @Event() stzhProgress: EventEmitter<StzhUploadProgressEvent>;\n\n /** Upload total file progress during upload */\n @Event() stzhProgressTotal: EventEmitter<StzhUploadProgressTotalEvent>;\n\n /** File error */\n @Event() stzhError: EventEmitter<StzhUploadErrorEvent>;\n\n /** Files error (multiple files) */\n @Event() stzhErrorMultiple: EventEmitter<StzhUploadErrorMultipleEvent>;\n\n /** File successfully uploaded */\n @Event() stzhSuccess: EventEmitter<StzhUploadSuccessEvent>;\n\n /** Files successfully uploaded (multiple files) */\n @Event() stzhSuccessMultiple: EventEmitter<StzhUploadSuccessMultipleEvent>;\n\n /** Canceled file upload */\n @Event() stzhCanceled: EventEmitter<StzhUploadCanceledEvent>;\n\n /** Canceled file upload (multiple files) */\n @Event() stzhCanceledMultiple: EventEmitter<StzhUploadCanceledMultipleEvent>;\n\n /** Completed upload (successfully or with error) */\n @Event() stzhComplete: EventEmitter<StzhUploadCompleteEvent>;\n\n /** Completed upload (successfully or with error, multiple files) */\n @Event() stzhCompleteMultiple: EventEmitter<StzhUploadCompleteMultipleEvent>;\n\n @Method()\n async processQueue() {\n return this.dropzone.processQueue();\n }\n\n @Method()\n async removeFile(file, force = false) {\n return this.dropzone.removeFile(file, force);\n }\n\n @Method()\n async removeAllFiles(onlyCancelCurrentlyUploadingFiles = false, force = false) {\n return this.dropzone.removeAllFiles(onlyCancelCurrentlyUploadingFiles, force);\n }\n\n private dropzone: any;\n private dropzoneElement: HTMLElement;\n private buttonElement: HTMLStzhButtonElement;\n private clickareaElement: HTMLElement;\n private previewsElement: HTMLElement;\n private errorsElement: HTMLElement;\n private hiddenInputContainerElement: HTMLElement;\n private uploadId: string;\n\n private filesize = function(size) {\n let selectedSize = 0;\n let selectedUnit = \"b\";\n\n if (size > 0) {\n let units = [\"tb\", \"gb\", \"mb\", \"kb\", \"b\"];\n\n for (let i = 0; i < units.length; i++) {\n let unit = units[i];\n let cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(selectedSize * 100) / 100; // Cutting of digits\n }\n\n return `<strong>${selectedSize}</strong> ${this.options.dictFileSizeUnits[selectedUnit]}`;\n }\n\n private filePreviewId = function(file): string {\n return `${this.uploadId}-${file._id}`\n }\n\n async componentWillLoad() {\n this.uploadId = `stzh-upload-${uploadCounter++}`;\n\n this.existingFilesWatcher(this.existingFiles);\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'upload');\n }\n }\n\n componentDidRender() {\n if (this.dropzone) {\n return;\n }\n\n const self = this;\n\n function enableDownload(file) {\n let fileHref = file.url || '';\n\n if (file.upload) {\n fileHref = URL.createObjectURL(file);\n }\n\n if (fileHref) {\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_LINK}]`)) {\n node.setAttribute(\"href\", fileHref);\n node.setAttribute(\"download\", file.name);\n\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${self.localization.downloadFile} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n }\n }\n\n this.dropzone = new window.Dropzone(this.dropzoneElement, {\n previewsContainer: this.previewsElement,\n url: this.url,\n method: this.method,\n withCredentials: this.withCredentials,\n clickable: [this.clickareaElement],\n acceptedFiles: this.acceptedFiles,\n accept: this.accept,\n maxFiles: this.maxFiles,\n maxFilesize: this.maxFilesize,\n filesizeBase: this.filesizeBase,\n parallelUploads: this.parallelUploads,\n uploadMultiple: this.uploadMultiple,\n autoProcessQueue: this.autoProcessQueue,\n headers: this.headers,\n defaultHeaders: this.defaultHeaders,\n chunking: this.chunking,\n chunkSize: this.chunkSize,\n chunksUploaded: this.chunksUploaded,\n forceChunking: this.forceChunking,\n parallelChunkUploads: this.parallelChunkUploads,\n retryChunks: this.retryChunks,\n retryChunksLimit: this.retryChunksLimit,\n createImageThumbnails: false,\n hiddenInputContainer: this.hiddenInputContainer ? this.hiddenInputContainer : this.hiddenInputContainerElement,\n dictFileSizeUnits: { tb: \"TiB\", gb: \"GiB\", mb: \"MiB\", kb: \"KiB\", b: \"b\" },\n dictRemoveFileConfirmation: null,\n dictMaxFilesExceeded: this.localization.maxFilesExceeded,\n dictRemoveFile: this.localization.removeFile,\n dictDeleteFile: this.localization.deleteFile,\n dictCancelUploadConfirmation: this.localization.cancelUploadConfirmation,\n dictUploadCanceled: this.localization.uploadCanceled,\n dictCancelUpload: this.localization.cancelUpload,\n dictResponseError: this.localization.responseError,\n dictInvalidFileType: this.localization.invalidFileType,\n dictFileTooBig: this.localization.fileTooBig,\n // Called when a file is added to the queue\n // Receives `file`\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L594\n addedfile(file) {\n file._id = previewCounter++;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer && !this.options.disablePreviews) {\n file.previewElement = window.Dropzone.createElement(\n this.options.previewTemplate.trim()\n );\n file.previewTemplate = file.previewElement; // Backwards compatibility\n this.previewsContainer.appendChild(file.previewElement);\n\n if (!file.size) {\n file.previewElement.classList.add(\"dz-empty\");\n }\n\n for (var node of file.previewElement.querySelectorAll(`[${ATTR_NAME}]`)) {\n node.textContent = file.name;\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_SIZE}]`)) {\n node.innerHTML = self.filesize.call(this, file.size);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_META_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-meta`);\n }\n\n for (node of file.previewElement.querySelectorAll(`[${ATTR_ERROR_MESSAGE_ID}]`)) {\n node.setAttribute(\"id\", `${self.filePreviewId(file)}-error-message`);\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = window.Dropzone.createElement(\n `<a class=\"dz-remove\" href=\"javascript:undefined;\" ${ATTR_REMOVE}>\n ${this.options.dictRemoveFile}\n </a>`\n );\n file.previewElement.appendChild(file._removeLink);\n }\n\n let removeFileEvent = (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === window.Dropzone.UPLOADING) {\n return window.Dropzone.confirm(\n this.options.dictCancelUploadConfirmation,\n () => this.removeFile(file)\n );\n } else {\n if (this.options.dictRemoveFileConfirmation) {\n return window.Dropzone.confirm(\n this.options.dictRemoveFileConfirmation,\n () => this.removeFile(file)\n );\n } else {\n return this.removeFile(file);\n }\n }\n };\n\n for (let removeLink of file.previewElement.querySelectorAll(\n `[${ATTR_REMOVE}]`\n )) {\n removeLink.addEventListener(\"click\", removeFileEvent);\n\n const isStzh = isStzhElement(removeLink);\n const fileId = self.filePreviewId(file);\n\n removeLink.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", `${this.options.dictRemoveFile}`);\n removeLink.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${this.options.dictRemoveFile} ${file.name}`);\n removeLink.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n if (!self.downloadDisabled && !self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n }\n },\n // When the upload is finished, either with success or an error.\n // Taken from https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L752\n complete(file) {\n for (let node of file.previewElement.querySelectorAll(`[${ATTR_REMOVE}]`)) {\n const hasErrorState = (file.status === \"error\");\n const removeOrDeleteLabel = hasErrorState ? this.options.dictRemoveFile : this.options.dictDeleteFile;\n const isStzh = isStzhElement(node);\n const fileId = self.filePreviewId(file);\n\n node.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", `${removeOrDeleteLabel} ${file.name}`);\n node.setAttribute(isStzh ? \"a11y-describedby\" : \"aria-describedby\", `${fileId}-error-message ${fileId}-meta`);\n }\n\n // move file uploads with errors to another element, so they are grouped together\n if (file.status === \"error\") {\n self.errorsElement.appendChild(file.previewElement);\n } else if (!self.downloadDisabled && self.downloadDisabledWhileProcessing) {\n enableDownload(file);\n }\n\n if (file._removeLink) {\n file._removeLink.innerHTML = this.options.dictRemoveFile;\n }\n\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n // Called whenever a file is removed.\n // Taken fom https://github.com/dropzone/dropzone/blob/v5.9.3/src/options.js#L649\n removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n\n // set focus to upload\n self.buttonElement.setFocus();\n\n return this._updateMaxFilesReachedClass();\n },\n error(file, message, xhr) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n\n if (typeof message !== \"string\" && message.error) {\n message = message.error;\n } else if (xhr) {\n if (xhr.status === 401 || xhr.status === 403) {\n message = self.localization.accessError;\n } else if (xhr.status === 413) {\n message = self.localization.fileTooBigServer;\n } else if (xhr.status === 415) {\n message = self.localization.invalidFileType;\n } else if (xhr.status >= 500) {\n message = self.localization.serverError;\n } else {\n const defaultError = self.localization.responseError\n .replace(\"{{statusCode}}\", xhr.status);\n\n message = defaultError;\n }\n }\n\n for (let node of file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")) {\n node.textContent = message;\n }\n }\n },\n previewTemplate: `\n <div class=\"stzh-upload__preview\">\n <div class=\"stzh-upload__image\">\n <img data-dz-thumbnail />\n </div>\n\n <div class=\"stzh-upload__details\">\n <div class=\"stzh-upload__info-wrapper\">\n <div class=\"stzh-upload__info-wrapper-processing\">\n <div class=\"stzh-upload__infos\">\n <div class=\"stzh-upload__subtitle\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__progress-text\">\n <span ${ATTR_PROGRESS_TEXT}></span>\n </div>\n </div>\n <div class=\"stzh-upload__meta\">\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__progress\">\n <span class=\"stzh-upload__progress-bar\" data-dz-uploadprogress></span>\n </div>\n </div>\n <div class=\"stzh-upload__info-wrapper-complete\">\n <div class=\"stzh-upload__title\">\n <a class=\"stzh-upload__link\" ${ATTR_NAME} ${ATTR_LINK}></a>\n </div>\n <div class=\"stzh-upload__meta\" ${ATTR_META_ID}>\n <span class=\"stzh-upload__extension\" ${ATTR_EXTENSION}></span>\n <span class=\"stzh-upload__size\" ${ATTR_SIZE}></span>\n </div>\n <div class=\"stzh-upload__error-message\" ${ATTR_ERROR_MESSAGE_ID}>\n <span data-dz-errormessage></span>\n </div>\n </div>\n </div>\n <div class=\"stzh-upload__actions\">\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only icon=\"download\" class=\"stzh-upload__download\" ${ATTR_LINK}></stzh-button>\n <stzh-button variant=\"tertiary\" size=\"tiny\" icon-only class=\"stzh-upload__delete\" ${ATTR_REMOVE}>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon\" name=\"delete\"></stzh-icon>\n <stzh-icon slot=\"icon\" class=\"stzh-upload__delete-icon-error\" name=\"close\"></stzh-icon>\n </stzh-button>\n </div>\n </div>\n </div>\n `\n });\n\n this.disabledWatcher();\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => this.stzhFileAdded.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"addedfiles\", (files: StzhUploadFile[]) => this.stzhFilesAdded.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"removefile\", (file: StzhUploadFile) => this.stzhFileRemove.emit({\n component: \"stzh-upload\", file\n }).defaultPrevented === false);\n\n this.dropzone.on(\"removedfile\", (file: StzhUploadFile, force: boolean) => this.stzhFileRemoved.emit({\n component: \"stzh-upload\", file, force\n }));\n\n this.dropzone.on(\"sending\", (file: StzhUploadFile, xhr: XMLHttpRequest, formData: FormData) => this.stzhSending.emit({\n component: \"stzh-upload\", file, xhr, formData\n }));\n\n this.dropzone.on(\"sendingmultiple\", (files: StzhUploadFile[], xhr: XMLHttpRequest, formData: FormData) => this.stzhSendingMultiple.emit({\n component: \"stzh-upload\", files, xhr, formData\n }));\n\n this.dropzone.on(\"processing\", (file: StzhUploadFile) => this.stzhProcessing.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"processingmultiple\", (files: StzhUploadFile[]) => this.stzhProcessingMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number, bytesSent: number) => this.stzhProgress.emit({\n component: \"stzh-upload\", file, progress, bytesSent\n }));\n\n this.dropzone.on(\"totaluploadprogress\", (totalUploadProgress: number, totalBytes: number, totalBytesSent: number) => this.stzhProgressTotal.emit({\n component: \"stzh-upload\", totalUploadProgress, totalBytes, totalBytesSent\n }));\n\n this.dropzone.on(\"error\", (file: StzhUploadFile, message: string, xhr: XMLHttpRequest) => this.stzhError.emit({\n component: \"stzh-upload\", file, message, xhr\n }));\n\n this.dropzone.on(\"errormultiple\", (files: StzhUploadFile[], message: string, xhr: XMLHttpRequest) => this.stzhErrorMultiple.emit({\n component: \"stzh-upload\", files, message, xhr\n }));\n\n this.dropzone.on(\"success\", (file: StzhUploadFile, responseText: string, event: ProgressEvent) => this.stzhSuccess.emit({\n component: \"stzh-upload\", file, responseText, event\n }));\n\n this.dropzone.on(\"successmultiple\", (files: StzhUploadFile[], responseText: string, event: ProgressEvent) => this.stzhSuccessMultiple.emit({\n component: \"stzh-upload\", files, responseText, event\n }));\n\n this.dropzone.on(\"canceled\", (file: StzhUploadFile) => this.stzhCanceled.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"canceledmultiple\", (files: StzhUploadFile[]) => this.stzhCanceledMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"complete\", (file: StzhUploadFile) => this.stzhComplete.emit({\n component: \"stzh-upload\", file\n }));\n\n this.dropzone.on(\"completemultiple\", (files: StzhUploadFile[]) => this.stzhCompleteMultiple.emit({\n component: \"stzh-upload\", files\n }));\n\n this.dropzone.on(\"addedfile\", (file: StzhUploadFile) => {\n file.previewElement.querySelectorAll(`[${ATTR_NAME}]`).forEach((name: HTMLElement) => {\n name.setAttribute(\"title\", file.name);\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_TYPE}]`).forEach((type: HTMLElement) => {\n type.innerText = file.type;\n });\n\n file.previewElement.querySelectorAll(`[${ATTR_EXTENSION}]`).forEach((extension: HTMLElement) => {\n extension.innerText = file.name.split(\".\").pop();\n })\n });\n\n this.dropzone.on(\"uploadprogress\", (file: StzhUploadFile, progress: number) => {\n file.previewElement.querySelectorAll(`[${ATTR_PROGRESS_TEXT}]`).forEach((progressText: HTMLElement) => {\n progressText.innerText = `${progress.toString()}%`;\n });\n });\n\n this._existingFiles.forEach((file) => {\n this.dropzone.displayExistingFile(file, null, null, null, null);\n });\n }\n\n disconnectedCallback() {\n if (this.dropzone) {\n this.dropzone.destroy();\n this.dropzone = null;\n }\n }\n\n render() {\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-upload\": true,\n \"stzh-upload--is-invalid\": this.invalid,\n \"stzh-upload--is-disabled\": this.disabled,\n \"stzh-upload--has-hidden-progress\": this.hideProgress,\n \"stzh-upload--has-hidden-progress-while-idle\": this.hideProgressWhileIdle,\n \"stzh-upload--has-error\": errorUsed,\n \"stzh-upload--has-instructions\": !!this.description || !!this.localization.description\n };\n\n return (\n <Host>\n <div\n class={classes}\n ref={(el) => (this.dropzoneElement = el as HTMLDivElement)}\n >\n <div ref={(el) => (this.hiddenInputContainerElement = el as HTMLElement)}></div>\n\n <div id={`${this.uploadId}-label`}>\n {this.label && <div class=\"stzh-upload__label\">{this.label}</div>}\n </div>\n\n <div\n class=\"stzh-upload__clickarea\"\n ref={(el) => (this.clickareaElement = el as HTMLDivElement)}\n >\n <div class=\"stzh-upload__instructions\" id={`${this.uploadId}-instruction`}>\n {this.description ? this.description : this.localization.description}\n </div>\n <stzh-button\n size=\"small\"\n class=\"stzh-upload__button\"\n ref={(el) => (this.buttonElement = el as HTMLStzhButtonElement)}\n a11yDescribedby={`${this.uploadId}-label ${this.uploadId}-instruction ${this.uploadId}-description`}\n disabled={this.disabled}\n a11yControls={`${this.uploadId}-previews`}\n >\n {this.button ? this.button : this.localization.button}\n </stzh-button>\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-upload\"\n id={`${this.uploadId}-description`}\n error={this._error}\n />\n\n <div id={`${this.uploadId}-previews`}>\n <div\n class=\"stzh-upload__errors\"\n ref={(el) => (this.errorsElement = el as HTMLElement)}\n ></div>\n\n <div\n class=\"stzh-upload__previews dropzone-previews\"\n ref={(el) => (this.previewsElement = el as HTMLElement)}\n ></div>\n </div>\n\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -9376,7 +9376,13 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
9376
9376
  };
9377
9377
 
9378
9378
  if (this.options.headers) {
9379
- Dropzone.extend(headers, this.options.headers);
9379
+ var optionHeaders = this.options.headers;
9380
+
9381
+ if (typeof this.options.headers === "function") {
9382
+ optionHeaders = this.options.headers(this);
9383
+ }
9384
+
9385
+ Dropzone.extend(headers, optionHeaders);
9380
9386
  }
9381
9387
 
9382
9388
  for (var headerName in headers) {
@@ -9376,7 +9376,13 @@ var Dropzone = /*#__PURE__*/function (_Emitter) {
9376
9376
  };
9377
9377
 
9378
9378
  if (this.options.headers) {
9379
- Dropzone.extend(headers, this.options.headers);
9379
+ var optionHeaders = this.options.headers;
9380
+
9381
+ if (typeof this.options.headers === "function") {
9382
+ optionHeaders = this.options.headers(this);
9383
+ }
9384
+
9385
+ Dropzone.extend(headers, optionHeaders);
9380
9386
  }
9381
9387
 
9382
9388
  for (var headerName in headers) {