@oiz/stzh-components 2.11.1 → 2.12.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 (381) hide show
  1. package/dist/cjs/{app-globals-7697372c.js → app-globals-749422d7.js} +8 -4
  2. package/dist/cjs/app-globals-749422d7.js.map +1 -0
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/stzh-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/stzh-accordion.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-appointments.cjs.entry.js +7 -3
  8. package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-components.cjs.js +2 -2
  10. package/dist/cjs/stzh-container.cjs.entry.js +1 -1
  11. package/dist/cjs/stzh-container.cjs.entry.js.map +1 -1
  12. package/dist/cjs/stzh-datalist_2.cjs.entry.js +1 -1
  13. package/dist/cjs/stzh-datalist_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/stzh-datepicker_3.cjs.entry.js +33 -14
  15. package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/stzh-gallery.cjs.entry.js +1 -1
  17. package/dist/cjs/stzh-gallery.cjs.entry.js.map +1 -1
  18. package/dist/cjs/stzh-progressbar-item.cjs.entry.js +2 -1
  19. package/dist/cjs/stzh-progressbar-item.cjs.entry.js.map +1 -1
  20. package/dist/cjs/stzh-progressbar.cjs.entry.js +14 -0
  21. package/dist/cjs/stzh-progressbar.cjs.entry.js.map +1 -1
  22. package/dist/cjs/stzh-sticky.cjs.entry.js +1 -1
  23. package/dist/cjs/stzh-sticky.cjs.entry.js.map +1 -1
  24. package/dist/cjs/stzh-toastbar.cjs.entry.js +8 -1
  25. package/dist/cjs/stzh-toastbar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +7 -3
  27. package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js.map +1 -1
  28. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +7 -3
  29. package/dist/cjs/stzh-vbz-ticker.cjs.entry.js.map +1 -1
  30. package/dist/collection/assets/i18n/de.json +12 -0
  31. package/dist/collection/assets/i18n/en.json +12 -0
  32. package/dist/collection/components/stzh-accordion/stzh-accordion.css +3 -2
  33. package/dist/collection/components/stzh-appointments/stzh-appointments.js +9 -3
  34. package/dist/collection/components/stzh-appointments/stzh-appointments.js.map +1 -1
  35. package/dist/collection/components/stzh-button/stzh-button.js +1 -1
  36. package/dist/collection/components/stzh-checkbox/stzh-checkbox.js +1 -1
  37. package/dist/collection/components/stzh-checkboxgroup/stzh-checkboxgroup.js +1 -1
  38. package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +1 -1
  39. package/dist/collection/components/stzh-container/stzh-container.css +8 -8
  40. package/dist/collection/components/stzh-datalist/stzh-datalist.css +1 -1
  41. package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +1 -1
  42. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js +62 -15
  43. package/dist/collection/components/stzh-datepicker/stzh-datepicker.js.map +1 -1
  44. package/dist/collection/components/stzh-gallery/stzh-gallery.css +0 -4
  45. package/dist/collection/components/stzh-input/stzh-input.js +1 -1
  46. package/dist/collection/components/stzh-link/stzh-link.js +1 -1
  47. package/dist/collection/components/stzh-progressbar/stzh-progressbar.js +35 -0
  48. package/dist/collection/components/stzh-progressbar/stzh-progressbar.js.map +1 -1
  49. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +3 -2
  50. package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js.map +1 -1
  51. package/dist/collection/components/stzh-radio/stzh-radio.js +1 -1
  52. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js +5 -3
  53. package/dist/collection/components/stzh-radiogroup/stzh-radiogroup.js.map +1 -1
  54. package/dist/collection/components/stzh-richtext/stzh-richtext.js +1 -1
  55. package/dist/collection/components/stzh-sticky/stzh-sticky.css +4 -4
  56. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +1 -1
  57. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js +8 -1
  58. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js.map +1 -1
  59. package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
  60. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js +9 -3
  61. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js.map +1 -1
  62. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +9 -3
  63. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  64. package/dist/collection/global/js/helpers/utils.js +6 -2
  65. package/dist/collection/index.js.map +1 -1
  66. package/dist/collection/utils/translation-utils.js.map +1 -1
  67. package/dist/components/index.js +7 -3
  68. package/dist/components/index.js.map +1 -1
  69. package/dist/components/index2.js.map +1 -1
  70. package/dist/components/stzh-accordion.js +1 -1
  71. package/dist/components/stzh-accordion.js.map +1 -1
  72. package/dist/components/stzh-appointments.js +8 -3
  73. package/dist/components/stzh-appointments.js.map +1 -1
  74. package/dist/components/stzh-container.js +1 -1
  75. package/dist/components/stzh-container.js.map +1 -1
  76. package/dist/components/stzh-datalist2.js +1 -1
  77. package/dist/components/stzh-datalist2.js.map +1 -1
  78. package/dist/components/stzh-datepicker2.js +38 -16
  79. package/dist/components/stzh-datepicker2.js.map +1 -1
  80. package/dist/components/stzh-gallery.js +1 -1
  81. package/dist/components/stzh-gallery.js.map +1 -1
  82. package/dist/components/stzh-progressbar-item2.js +2 -1
  83. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  84. package/dist/components/stzh-progressbar.js +16 -1
  85. package/dist/components/stzh-progressbar.js.map +1 -1
  86. package/dist/components/stzh-radiogroup2.js +1 -1
  87. package/dist/components/stzh-sticky.js +1 -1
  88. package/dist/components/stzh-sticky.js.map +1 -1
  89. package/dist/components/stzh-toastbar.js +8 -1
  90. package/dist/components/stzh-toastbar.js.map +1 -1
  91. package/dist/components/stzh-vbz-majorticker.js +8 -3
  92. package/dist/components/stzh-vbz-majorticker.js.map +1 -1
  93. package/dist/components/stzh-vbz-ticker.js +8 -3
  94. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  95. package/dist/esm/{app-globals-1a77c38b.js → app-globals-5f5be02f.js} +8 -4
  96. package/dist/esm/app-globals-5f5be02f.js.map +1 -0
  97. package/dist/esm/index.js.map +1 -1
  98. package/dist/esm/loader.js +2 -2
  99. package/dist/esm/stzh-accordion.entry.js +1 -1
  100. package/dist/esm/stzh-accordion.entry.js.map +1 -1
  101. package/dist/esm/stzh-appointments.entry.js +7 -3
  102. package/dist/esm/stzh-appointments.entry.js.map +1 -1
  103. package/dist/esm/stzh-components.js +2 -2
  104. package/dist/esm/stzh-container.entry.js +1 -1
  105. package/dist/esm/stzh-container.entry.js.map +1 -1
  106. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  107. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  108. package/dist/esm/stzh-datepicker_3.entry.js +34 -15
  109. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  110. package/dist/esm/stzh-gallery.entry.js +1 -1
  111. package/dist/esm/stzh-gallery.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-progressbar.entry.js +14 -0
  115. package/dist/esm/stzh-progressbar.entry.js.map +1 -1
  116. package/dist/esm/stzh-sticky.entry.js +1 -1
  117. package/dist/esm/stzh-sticky.entry.js.map +1 -1
  118. package/dist/esm/stzh-toastbar.entry.js +8 -1
  119. package/dist/esm/stzh-toastbar.entry.js.map +1 -1
  120. package/dist/esm/stzh-vbz-majorticker.entry.js +7 -3
  121. package/dist/esm/stzh-vbz-majorticker.entry.js.map +1 -1
  122. package/dist/esm/stzh-vbz-ticker.entry.js +7 -3
  123. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  124. package/dist/esm-es5/{app-globals-1a77c38b.js → app-globals-5f5be02f.js} +2 -2
  125. package/dist/esm-es5/app-globals-5f5be02f.js.map +1 -0
  126. package/dist/esm-es5/index.js.map +1 -1
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/loader.js.map +1 -1
  129. package/dist/esm-es5/stzh-accordion.entry.js +1 -1
  130. package/dist/esm-es5/stzh-accordion.entry.js.map +1 -1
  131. package/dist/esm-es5/stzh-appointments.entry.js +1 -1
  132. package/dist/esm-es5/stzh-appointments.entry.js.map +1 -1
  133. package/dist/esm-es5/stzh-components.js +1 -1
  134. package/dist/esm-es5/stzh-components.js.map +1 -1
  135. package/dist/esm-es5/stzh-container.entry.js +1 -1
  136. package/dist/esm-es5/stzh-container.entry.js.map +1 -1
  137. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  138. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  139. package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
  140. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  141. package/dist/esm-es5/stzh-gallery.entry.js +1 -1
  142. package/dist/esm-es5/stzh-gallery.entry.js.map +1 -1
  143. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  144. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  145. package/dist/esm-es5/stzh-progressbar.entry.js +1 -1
  146. package/dist/esm-es5/stzh-progressbar.entry.js.map +1 -1
  147. package/dist/esm-es5/stzh-sticky.entry.js +1 -1
  148. package/dist/esm-es5/stzh-sticky.entry.js.map +1 -1
  149. package/dist/esm-es5/stzh-toastbar.entry.js +1 -1
  150. package/dist/esm-es5/stzh-toastbar.entry.js.map +1 -1
  151. package/dist/esm-es5/stzh-vbz-majorticker.entry.js +1 -1
  152. package/dist/esm-es5/stzh-vbz-majorticker.entry.js.map +1 -1
  153. package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
  154. package/dist/esm-es5/stzh-vbz-ticker.entry.js.map +1 -1
  155. package/dist/stzh-components/assets/i18n/de.json +12 -0
  156. package/dist/stzh-components/assets/i18n/en.json +12 -0
  157. package/dist/stzh-components/index.esm.js.map +1 -1
  158. package/dist/stzh-components/p-0b1b2aa6.system.entry.js +2 -0
  159. package/dist/stzh-components/p-0b1b2aa6.system.entry.js.map +1 -0
  160. package/dist/stzh-components/{p-11784b90.entry.js → p-0ba7ce34.entry.js} +2 -2
  161. package/dist/stzh-components/p-0ba7ce34.entry.js.map +1 -0
  162. package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
  163. package/dist/stzh-components/p-222ba06a.entry.js +2 -0
  164. package/dist/stzh-components/p-222ba06a.entry.js.map +1 -0
  165. package/dist/stzh-components/{p-c658502d.system.entry.js → p-241997a2.system.entry.js} +2 -2
  166. package/dist/stzh-components/p-241997a2.system.entry.js.map +1 -0
  167. package/dist/stzh-components/p-2d88c544.system.entry.js +2 -0
  168. package/dist/stzh-components/p-2d88c544.system.entry.js.map +1 -0
  169. package/dist/stzh-components/p-361996d1.entry.js +2 -0
  170. package/dist/stzh-components/p-361996d1.entry.js.map +1 -0
  171. package/dist/stzh-components/{p-54dbcd0e.system.entry.js → p-383c2c21.system.entry.js} +2 -2
  172. package/dist/stzh-components/{p-54dbcd0e.system.entry.js.map → p-383c2c21.system.entry.js.map} +1 -1
  173. package/dist/stzh-components/{p-15980af0.entry.js → p-534dc28e.entry.js} +2 -2
  174. package/dist/stzh-components/{p-15980af0.entry.js.map → p-534dc28e.entry.js.map} +1 -1
  175. package/dist/stzh-components/{p-5fdf0a8e.entry.js → p-5486402c.entry.js} +2 -2
  176. package/dist/stzh-components/{p-5fdf0a8e.entry.js.map → p-5486402c.entry.js.map} +1 -1
  177. package/dist/stzh-components/p-55d76b46.system.entry.js +2 -0
  178. package/dist/stzh-components/p-55d76b46.system.entry.js.map +1 -0
  179. package/dist/stzh-components/{p-98b60fb7.js → p-5e014c0e.js} +2 -2
  180. package/dist/stzh-components/p-5e014c0e.js.map +1 -0
  181. package/dist/stzh-components/{p-e5c1f04c.system.entry.js → p-628b5b0d.system.entry.js} +2 -2
  182. package/dist/stzh-components/p-628b5b0d.system.entry.js.map +1 -0
  183. package/dist/stzh-components/p-66b0d1f3.entry.js +2 -0
  184. package/dist/stzh-components/p-66b0d1f3.entry.js.map +1 -0
  185. package/dist/stzh-components/{p-8b4cc10d.entry.js → p-761909d5.entry.js} +2 -2
  186. package/dist/stzh-components/p-761909d5.entry.js.map +1 -0
  187. package/dist/stzh-components/{p-50914ed3.system.entry.js → p-87a3758c.system.entry.js} +2 -2
  188. package/dist/stzh-components/p-87a3758c.system.entry.js.map +1 -0
  189. package/dist/stzh-components/p-a1e1261a.entry.js +2 -0
  190. package/dist/stzh-components/p-a1e1261a.entry.js.map +1 -0
  191. package/dist/stzh-components/p-aa9975e6.entry.js +2 -0
  192. package/dist/stzh-components/p-aa9975e6.entry.js.map +1 -0
  193. package/dist/stzh-components/{p-bb2fe16f.system.entry.js → p-b3d76f2a.system.entry.js} +2 -2
  194. package/dist/stzh-components/{p-bb2fe16f.system.entry.js.map → p-b3d76f2a.system.entry.js.map} +1 -1
  195. package/dist/stzh-components/p-bf7316ab.system.js +2 -0
  196. package/dist/stzh-components/{p-bde8bb45.system.js.map → p-bf7316ab.system.js.map} +1 -1
  197. package/dist/stzh-components/{p-aefc1441.entry.js → p-c57402af.entry.js} +2 -2
  198. package/dist/stzh-components/p-c57402af.entry.js.map +1 -0
  199. package/dist/stzh-components/{p-cbcb366a.system.entry.js → p-c60ccc16.system.entry.js} +2 -2
  200. package/dist/stzh-components/p-c60ccc16.system.entry.js.map +1 -0
  201. package/dist/stzh-components/{p-cc260e20.entry.js → p-d5ee8b1a.entry.js} +2 -2
  202. package/dist/stzh-components/{p-cc260e20.entry.js.map → p-d5ee8b1a.entry.js.map} +1 -1
  203. package/dist/stzh-components/{p-d9984b93.system.entry.js → p-dc30c467.system.entry.js} +2 -2
  204. package/dist/stzh-components/p-dc30c467.system.entry.js.map +1 -0
  205. package/dist/stzh-components/{p-9bfe7d0d.system.entry.js → p-e69312e4.system.entry.js} +2 -2
  206. package/dist/stzh-components/p-e69312e4.system.entry.js.map +1 -0
  207. package/dist/stzh-components/{p-84ae2651.system.js → p-ebb38041.system.js} +2 -2
  208. package/dist/stzh-components/p-ebb38041.system.js.map +1 -0
  209. package/dist/stzh-components/p-fa0e39e0.system.entry.js +2 -0
  210. package/dist/stzh-components/p-fa0e39e0.system.entry.js.map +1 -0
  211. package/dist/stzh-components/p-ffb4e717.entry.js +2 -0
  212. package/dist/stzh-components/p-ffb4e717.entry.js.map +1 -0
  213. package/dist/stzh-components/stzh-components.esm.js +1 -1
  214. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  215. package/dist/stzh-components/stzh-components.js +1 -1
  216. package/dist/types/components.d.ts +14 -2
  217. package/dist/types/utils/translation-utils.d.ts +2 -0
  218. package/dist/vscode-data.json +7523 -0
  219. package/package.json +1 -1
  220. package/dist/cjs/app-globals-7697372c.js.map +0 -1
  221. package/dist/esm/app-globals-1a77c38b.js.map +0 -1
  222. package/dist/esm-es5/app-globals-1a77c38b.js.map +0 -1
  223. package/dist/stzh-components/p-07819ba5.entry.js +0 -2
  224. package/dist/stzh-components/p-07819ba5.entry.js.map +0 -1
  225. package/dist/stzh-components/p-1095d872.system.entry.js +0 -2
  226. package/dist/stzh-components/p-1095d872.system.entry.js.map +0 -1
  227. package/dist/stzh-components/p-11784b90.entry.js.map +0 -1
  228. package/dist/stzh-components/p-446dcea5.entry.js +0 -2
  229. package/dist/stzh-components/p-446dcea5.entry.js.map +0 -1
  230. package/dist/stzh-components/p-50914ed3.system.entry.js.map +0 -1
  231. package/dist/stzh-components/p-7b0da017.entry.js +0 -2
  232. package/dist/stzh-components/p-7b0da017.entry.js.map +0 -1
  233. package/dist/stzh-components/p-7fdd98fe.entry.js +0 -2
  234. package/dist/stzh-components/p-7fdd98fe.entry.js.map +0 -1
  235. package/dist/stzh-components/p-84ae2651.system.js.map +0 -1
  236. package/dist/stzh-components/p-8b4cc10d.entry.js.map +0 -1
  237. package/dist/stzh-components/p-8f98fc45.system.entry.js +0 -2
  238. package/dist/stzh-components/p-8f98fc45.system.entry.js.map +0 -1
  239. package/dist/stzh-components/p-98b60fb7.js.map +0 -1
  240. package/dist/stzh-components/p-9bfe7d0d.system.entry.js.map +0 -1
  241. package/dist/stzh-components/p-aafc8687.entry.js +0 -2
  242. package/dist/stzh-components/p-aafc8687.entry.js.map +0 -1
  243. package/dist/stzh-components/p-aefc1441.entry.js.map +0 -1
  244. package/dist/stzh-components/p-afb2885a.entry.js +0 -2
  245. package/dist/stzh-components/p-afb2885a.entry.js.map +0 -1
  246. package/dist/stzh-components/p-bde8bb45.system.js +0 -2
  247. package/dist/stzh-components/p-c658502d.system.entry.js.map +0 -1
  248. package/dist/stzh-components/p-cbcb366a.system.entry.js.map +0 -1
  249. package/dist/stzh-components/p-d9984b93.system.entry.js.map +0 -1
  250. package/dist/stzh-components/p-e278cda2.system.entry.js +0 -2
  251. package/dist/stzh-components/p-e278cda2.system.entry.js.map +0 -1
  252. package/dist/stzh-components/p-e5c1f04c.system.entry.js.map +0 -1
  253. package/dist/stzh-components/p-ff356dc8.system.entry.js +0 -2
  254. package/dist/stzh-components/p-ff356dc8.system.entry.js.map +0 -1
  255. package/dist/types/components/stzh-accordion/stzh-accordion.d.ts +0 -15
  256. package/dist/types/components/stzh-accordion-item/stzh-accordion-item.d.ts +0 -73
  257. package/dist/types/components/stzh-actions/stzh-actions.d.ts +0 -16
  258. package/dist/types/components/stzh-actionset/stzh-actionset.d.ts +0 -45
  259. package/dist/types/components/stzh-amount/stzh-amount.d.ts +0 -73
  260. package/dist/types/components/stzh-appnav/stzh-appnav.d.ts +0 -23
  261. package/dist/types/components/stzh-appointments/stzh-appointments.d.ts +0 -73
  262. package/dist/types/components/stzh-audio/stzh-audio.d.ts +0 -58
  263. package/dist/types/components/stzh-button/stzh-button.d.ts +0 -105
  264. package/dist/types/components/stzh-buttongroup/stzh-buttongroup.d.ts +0 -7
  265. package/dist/types/components/stzh-calendar/stzh-calendar.d.ts +0 -88
  266. package/dist/types/components/stzh-card/stzh-card.d.ts +0 -127
  267. package/dist/types/components/stzh-card-list/stzh-card-list.d.ts +0 -31
  268. package/dist/types/components/stzh-carousel/stzh-carousel.d.ts +0 -175
  269. package/dist/types/components/stzh-chart/stzh-chart.d.ts +0 -15
  270. package/dist/types/components/stzh-checkbox/stzh-checkbox.d.ts +0 -57
  271. package/dist/types/components/stzh-checkboxgroup/stzh-checkboxgroup.d.ts +0 -64
  272. package/dist/types/components/stzh-chip/stzh-chip.d.ts +0 -74
  273. package/dist/types/components/stzh-chip-select/stzh-chip-select.d.ts +0 -46
  274. package/dist/types/components/stzh-clamp/stzh-clamp.d.ts +0 -49
  275. package/dist/types/components/stzh-contact/stzh-contact.d.ts +0 -54
  276. package/dist/types/components/stzh-datalist/stzh-datalist.d.ts +0 -51
  277. package/dist/types/components/stzh-datalist-item/stzh-datalist-item.d.ts +0 -62
  278. package/dist/types/components/stzh-datamessagelist/stzh-datamessagelist.d.ts +0 -6
  279. package/dist/types/components/stzh-datamessagelist-item/stzh-datamessagelist-item.d.ts +0 -57
  280. package/dist/types/components/stzh-datatable/stzh-datatable.d.ts +0 -103
  281. package/dist/types/components/stzh-datepicker/stzh-datepicker.d.ts +0 -91
  282. package/dist/types/components/stzh-details/stzh-details.d.ts +0 -35
  283. package/dist/types/components/stzh-dialog/stzh-dialog.d.ts +0 -64
  284. package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +0 -173
  285. package/dist/types/components/stzh-figure/stzh-figure.d.ts +0 -21
  286. package/dist/types/components/stzh-flyingfocus/stzh-flyingfocus.d.ts +0 -35
  287. package/dist/types/components/stzh-footer/stzh-footer.d.ts +0 -27
  288. package/dist/types/components/stzh-gallery/stzh-gallery.d.ts +0 -54
  289. package/dist/types/components/stzh-ghettobox/stzh-ghettobox.d.ts +0 -50
  290. package/dist/types/components/stzh-header/stzh-header.d.ts +0 -68
  291. package/dist/types/components/stzh-hr/stzh-hr.d.ts +0 -7
  292. package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +0 -60
  293. package/dist/types/components/stzh-imagecomparison/stzh-imagecomparison.d.ts +0 -29
  294. package/dist/types/components/stzh-input/stzh-input.d.ts +0 -104
  295. package/dist/types/components/stzh-invert/stzh-invert.d.ts +0 -7
  296. package/dist/types/components/stzh-langnav/stzh-langnav.d.ts +0 -19
  297. package/dist/types/components/stzh-link/stzh-link.d.ts +0 -88
  298. package/dist/types/components/stzh-list/stzh-list.d.ts +0 -9
  299. package/dist/types/components/stzh-list-item/stzh-list-item.d.ts +0 -7
  300. package/dist/types/components/stzh-loader/stzh-loader.d.ts +0 -13
  301. package/dist/types/components/stzh-loadingbar/stzh-loadingbar.d.ts +0 -12
  302. package/dist/types/components/stzh-logo/stzh-logo.d.ts +0 -9
  303. package/dist/types/components/stzh-menu-item/stzh-menu-item.d.ts +0 -50
  304. package/dist/types/components/stzh-message/stzh-message.d.ts +0 -37
  305. package/dist/types/components/stzh-metanav/stzh-metanav.d.ts +0 -11
  306. package/dist/types/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.d.ts +0 -33
  307. package/dist/types/components/stzh-monthyearpicker/stzh-monthyearpicker.d.ts +0 -98
  308. package/dist/types/components/stzh-olmap/stzh-olmap.d.ts +0 -124
  309. package/dist/types/components/stzh-overlay/stzh-overlay.d.ts +0 -34
  310. package/dist/types/components/stzh-page-skiplinks/stzh-page-skiplinks.d.ts +0 -11
  311. package/dist/types/components/stzh-pagebottom/stzh-pagebottom.d.ts +0 -29
  312. package/dist/types/components/stzh-pagetitle/stzh-pagetitle.d.ts +0 -15
  313. package/dist/types/components/stzh-pagetitle-hero/stzh-pagetitle-hero.d.ts +0 -25
  314. package/dist/types/components/stzh-pagination/stzh-pagination.d.ts +0 -52
  315. package/dist/types/components/stzh-panorama/stzh-panorama.d.ts +0 -74
  316. package/dist/types/components/stzh-popover/stzh-popover.d.ts +0 -73
  317. package/dist/types/components/stzh-print/stzh-print.d.ts +0 -12
  318. package/dist/types/components/stzh-progressbar/stzh-progressbar.d.ts +0 -49
  319. package/dist/types/components/stzh-progressbar-item/stzh-progressbar-item.d.ts +0 -34
  320. package/dist/types/components/stzh-radio/stzh-radio.d.ts +0 -57
  321. package/dist/types/components/stzh-radiogroup/stzh-radiogroup.d.ts +0 -66
  322. package/dist/types/components/stzh-ratio/stzh-ratio.d.ts +0 -22
  323. package/dist/types/components/stzh-readspeaker/stzh-readspeaker.d.ts +0 -18
  324. package/dist/types/components/stzh-richtext/stzh-richtext.d.ts +0 -22
  325. package/dist/types/components/stzh-saptcha/stzh-saptcha.d.ts +0 -28
  326. package/dist/types/components/stzh-scrollup/stzh-scrollup.d.ts +0 -12
  327. package/dist/types/components/stzh-share/stzh-share.d.ts +0 -21
  328. package/dist/types/components/stzh-show/stzh-show.d.ts +0 -22
  329. package/dist/types/components/stzh-sitemap/stzh-sitemap.d.ts +0 -14
  330. package/dist/types/components/stzh-skiplink/stzh-skiplink.d.ts +0 -38
  331. package/dist/types/components/stzh-sortable/stzh-sortable.d.ts +0 -59
  332. package/dist/types/components/stzh-status/stzh-status.d.ts +0 -14
  333. package/dist/types/components/stzh-sticky/stzh-sticky.d.ts +0 -58
  334. package/dist/types/components/stzh-table/stzh-table.d.ts +0 -43
  335. package/dist/types/components/stzh-textandimage/stzh-textandimage.d.ts +0 -14
  336. package/dist/types/components/stzh-timeline/stzh-timeline.d.ts +0 -23
  337. package/dist/types/components/stzh-timeline-item/stzh-timeline-item.d.ts +0 -78
  338. package/dist/types/components/stzh-timepicker/stzh-timepicker.d.ts +0 -62
  339. package/dist/types/components/stzh-toast/stzh-toast.d.ts +0 -39
  340. package/dist/types/components/stzh-toastbar/stzh-toastbar.d.ts +0 -41
  341. package/dist/types/components/stzh-toggle/stzh-toggle.d.ts +0 -59
  342. package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +0 -80
  343. package/dist/types/components/stzh-upload/stzh-upload.d.ts +0 -236
  344. package/dist/types/components/stzh-vbz-carousel/stzh-vbz-carousel.d.ts +0 -14
  345. package/dist/types/components/stzh-vbz-linechip/stzh-vbz-linechip.d.ts +0 -37
  346. package/dist/types/components/stzh-vbz-majorticker/stzh-vbz-majorticker.d.ts +0 -41
  347. package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.d.ts +0 -34
  348. package/dist/types/components/stzh-youtube/stzh-youtube.d.ts +0 -30
  349. package/dist/types/index.d.ts +0 -899
  350. package/dist/types/libraries/tom-select/types/constants.d.ts +0 -12
  351. package/dist/types/libraries/tom-select/types/contrib/highlight.d.ts +0 -13
  352. package/dist/types/libraries/tom-select/types/contrib/microevent.d.ts +0 -20
  353. package/dist/types/libraries/tom-select/types/contrib/microplugin.d.ts +0 -71
  354. package/dist/types/libraries/tom-select/types/defaults.d.ts +0 -51
  355. package/dist/types/libraries/tom-select/types/getSettings.d.ts +0 -3
  356. package/dist/types/libraries/tom-select/types/plugins/caret_position/plugin.d.ts +0 -16
  357. package/dist/types/libraries/tom-select/types/plugins/change_listener/plugin.d.ts +0 -16
  358. package/dist/types/libraries/tom-select/types/plugins/checkbox_options/plugin.d.ts +0 -16
  359. package/dist/types/libraries/tom-select/types/plugins/clear_button/plugin.d.ts +0 -17
  360. package/dist/types/libraries/tom-select/types/plugins/clear_button/types.d.ts +0 -5
  361. package/dist/types/libraries/tom-select/types/plugins/drag_drop/plugin.d.ts +0 -16
  362. package/dist/types/libraries/tom-select/types/plugins/dropdown_header/plugin.d.ts +0 -17
  363. package/dist/types/libraries/tom-select/types/plugins/dropdown_header/types.d.ts +0 -8
  364. package/dist/types/libraries/tom-select/types/plugins/dropdown_input/plugin.d.ts +0 -16
  365. package/dist/types/libraries/tom-select/types/plugins/input_autogrow/plugin.d.ts +0 -15
  366. package/dist/types/libraries/tom-select/types/plugins/no_active_items/plugin.d.ts +0 -15
  367. package/dist/types/libraries/tom-select/types/plugins/no_backspace_delete/plugin.d.ts +0 -15
  368. package/dist/types/libraries/tom-select/types/plugins/optgroup_columns/plugin.d.ts +0 -16
  369. package/dist/types/libraries/tom-select/types/plugins/remove_button/plugin.d.ts +0 -17
  370. package/dist/types/libraries/tom-select/types/plugins/remove_button/types.d.ts +0 -6
  371. package/dist/types/libraries/tom-select/types/plugins/restore_on_backspace/plugin.d.ts +0 -21
  372. package/dist/types/libraries/tom-select/types/plugins/virtual_scroll/plugin.d.ts +0 -16
  373. package/dist/types/libraries/tom-select/types/tom-select.complete.d.ts +0 -2
  374. package/dist/types/libraries/tom-select/types/tom-select.d.ts +0 -596
  375. package/dist/types/libraries/tom-select/types/tom-select.popular.d.ts +0 -2
  376. package/dist/types/libraries/tom-select/types/types/core.d.ts +0 -48
  377. package/dist/types/libraries/tom-select/types/types/index.d.ts +0 -2
  378. package/dist/types/libraries/tom-select/types/types/settings.d.ts +0 -78
  379. package/dist/types/libraries/tom-select/types/utils.d.ts +0 -76
  380. package/dist/types/libraries/tom-select/types/vanilla.d.ts +0 -76
  381. package/dist/types/types/svg.d.ts +0 -4
@@ -1,2 +0,0 @@
1
- System.register(["./p-290fcb28.system.js","./p-f9cb0fcd.system.js","./p-774595ba.system.js"],(function(t){"use strict";var i,s,e,o,c,n,r;return{setters:[function(t){i=t.r;s=t.c;e=t.h;o=t.a;c=t.g},function(t){n=t.a;r=t.o},function(){}],execute:function(){var h='.sc-stzh-sticky-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-sticky-h{display:none}.sc-stzh-sticky-h *.sc-stzh-sticky,.sc-stzh-sticky-h *.sc-stzh-sticky::before,.sc-stzh-sticky-h *.sc-stzh-sticky::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-sticky-h .has-focus.sc-stzh-sticky{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-sticky-h .stzh-fylingfocus-focused.sc-stzh-sticky{outline-style:none !important}.sc-stzh-sticky-h .stzh-fylingfocus-focused.sc-stzh-sticky::-moz-focus-inner{border:0 !important}.sc-stzh-sticky-h{--padding:var(--stzh-space-large) 0;display:contents}@media print{.sc-stzh-sticky-h{display:none}}.stzh-sticky.sc-stzh-sticky{display:contents}.stzh-sticky__sticky.sc-stzh-sticky{position:-webkit-sticky;position:sticky;top:-0.0625rem;bottom:-0.0625rem;z-index:var(--stzh-z-index-sticky)}.stzh-sticky__content.sc-stzh-sticky{position:relative;padding:var(--padding)}.stzh-sticky__content.sc-stzh-sticky::before,.stzh-sticky__content.sc-stzh-sticky::after{content:"";pointer-events:none;display:block;position:absolute;left:0;width:100%;height:var(--stzh-space-xxlarge);opacity:0;-webkit-transition:opacity var(--stzh-base-transition-animation-speed);transition:opacity var(--stzh-base-transition-animation-speed)}.stzh-sticky__content.sc-stzh-sticky::before{background:-webkit-gradient(linear, left bottom, left top, from(#FFFFFF), to(rgba(255, 255, 255, 0)));background:linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);top:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}.stzh-sticky__content.sc-stzh-sticky::after{background:-webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0)), to(#FFFFFF));background:linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);bottom:0;-webkit-transform:translateY(100%);transform:translateY(100%)}.stzh-sticky__spacer.sc-stzh-sticky{display:none}.stzh-sticky--is-disabled-sticky-top.sc-stzh-sticky .stzh-sticky__sticky.sc-stzh-sticky{top:auto}.stzh-sticky--is-disabled-sticky-bottom.sc-stzh-sticky .stzh-sticky__sticky.sc-stzh-sticky{bottom:auto}.stzh-sticky--is-stuck.sc-stzh-sticky .stzh-sticky__content.sc-stzh-sticky{background-color:var(--stzh-color-white)}.stzh-sticky--is-stuck-bottom.sc-stzh-sticky .stzh-sticky__content.sc-stzh-sticky::before{opacity:1}.stzh-sticky--is-stuck-top.sc-stzh-sticky .stzh-sticky__content.sc-stzh-sticky::after{opacity:1}.stzh-sticky--is-breakout.sc-stzh-sticky .stzh-sticky__content.sc-stzh-sticky{position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;width:100vw;max-width:100vw}';var a=t("stzh_sticky",function(){function t(t){var e=this;i(this,t);this.stzhStuckTop=s(this,"stzhStuckTop",7);this.stzhStuckBottom=s(this,"stzhStuckBottom",7);this.fixedHeight=0;this.fixedWidth=0;this.fixedLimit=null;this.handleScroll=function(){if(e.debounceScroll){window.cancelAnimationFrame(e.debounceScroll)}e.debounceScroll=requestAnimationFrame(e.updateFixedByScroll)};this.handleResize=function(){if(e.debounceResize){window.cancelAnimationFrame(e.debounceResize)}e.debounceResize=requestAnimationFrame(e.updateFixedByResize)};this.updateFixedByScroll=function(){if(!n(e.stickyElement)){return}e.scrollX=window.scrollX;e.scrollY=window.scrollY;e.fixedLimit=e.getFixedLimit();if(e.isStuckTop||e.isStuckBottom){var t=r(e.spacerElement);e.fixedTop=t.top;e.fixedLeft=t.left}else{var t=r(e.stickyElement);e.fixedTop=t.top;e.fixedLeft=t.left}e.isStuckBottom=!e.disableStickyBottom&&e.scrollY+e.windowHeight<=e.fixedTop+e.fixedHeight;e.isStuckTop=!e.disableStickyTop&&e.scrollY>=e.fixedTop;e.hasReachedTopLimit=e.fixedLimit&&e.scrollY+e.windowHeight-e.fixedHeight<=e.fixedLimit.top;e.hasReachedBottomLimit=e.fixedLimit&&e.scrollY>=e.fixedLimit.bottom-e.fixedHeight;if(e.isStuckTop||e.isStuckBottom){e.setFixed()}else{e.setUnfixed()}};this.updateFixedByResize=function(){e.setUnfixed();e.stickyElement.style.position="static";e.isStuckTop=false;e.isStuckBottom=false;if(n(e.stickyElement)){e.windowHeight=window.innerHeight;e.fixedHeight=e.stickyElement.offsetHeight;e.fixedWidth=e.stickyElement.offsetWidth;e.spacerElement.style.height="".concat(e.fixedHeight,"px");e.updateFixedByScroll()}};this.observe=function(){e.updateStuck()};this.disableStickyTop=false;this.disableStickyBottom=false;this.breakout=false;this.position="sticky";this.isStuckTop=false;this.isStuckBottom=false;this.hasReachedTopLimit=false;this.hasReachedBottomLimit=false}t.prototype.disableStickyWatcher=function(){var t=this;requestAnimationFrame((function(){requestAnimationFrame((function(){if(t.position==="fixed"){t.updateFixedByResize()}else{t.updateStuck()}}))}))};t.prototype.isStuckTopWatcher=function(t){this.stzhStuckTop.emit({component:"stzh-sticky",sticky:t})};t.prototype.isStuckBottomWatcher=function(t){this.stzhStuckBottom.emit({component:"stzh-sticky",sticky:t})};t.prototype.positionWatcher=function(t){if(t==="fixed"){if(this.observer){this.observer.disconnect()}window.addEventListener("scroll",this.handleScroll,{passive:true});window.addEventListener("resize",this.handleResize);this.updateFixedByResize()}else{window.removeEventListener("scroll",this.handleScroll);window.removeEventListener("resize",this.handleResize);this.setUnfixed();this.observer=new IntersectionObserver(this.observe,{threshold:[1]});this.observer.observe(this.stickyElement);this.updateStuck()}};t.prototype.updateStuck=function(){var t=parseInt(getComputedStyle(this.stickyElement).top,10);var i=parseInt(getComputedStyle(this.stickyElement).bottom,10);var s=this.stickyElement.getBoundingClientRect();if(t){this.isStuckTop=s.top<0}else{this.isStuckTop=false}if(i){this.isStuckBottom=document.documentElement.clientHeight<s.bottom}else{this.isStuckBottom=false}};t.prototype.getFixedLimit=function(){var t=this.element.closest("[data-stzh-sticky-container]");if(!t){return null}var i=r(t);return{top:i.top,bottom:i.top+t.scrollHeight}};t.prototype.setUnfixed=function(){Object.assign(this.stickyElement.style,{position:null,top:null,bottom:null,left:null,width:null});Object.assign(this.spacerElement.style,{display:"none"})};t.prototype.setFixed=function(){var t=this.hasReachedTopLimit||this.hasReachedBottomLimit?"absolute":"fixed";Object.assign(this.stickyElement.style,{position:t,top:t==="absolute"?"".concat(this.isStuckTop?this.fixedLimit.bottom-this.fixedHeight:this.fixedLimit.top,"px"):this.isStuckTop?"0px":"auto",bottom:this.isStuckTop||t==="absolute"?"auto":"0px",left:"".concat(this.fixedLeft+(t==="fixed"?this.scrollX:0),"px"),width:"".concat(this.fixedWidth,"px")});Object.assign(this.spacerElement.style,{display:"block"})};t.prototype.componentDidLoad=function(){this.positionWatcher(this.position)};t.prototype.disconnectedCallback=function(){if(this.observer){this.observer.disconnect()}window.removeEventListener("scroll",this.handleScroll);window.removeEventListener("resize",this.handleResize)};t.prototype.render=function(){var t;var i=this;var s=this.isStuckTop||this.isStuckBottom;var c=(t={"stzh-sticky":true,"stzh-sticky--is-stuck":s,"stzh-sticky--is-stuck-top":this.isStuckTop,"stzh-sticky--is-stuck-bottom":this.isStuckBottom,"stzh-sticky--is-breakout":this.breakout,"stzh-sticky--is-disabled-sticky-top":this.disableStickyTop,"stzh-sticky--is-disabled-sticky-bottom":this.disableStickyBottom},t["stzh-sticky--position-".concat(this.position)]=!!this.position,t);return e(o,{"is-stuck":this.isStuckTop||this.isStuckBottom,"is-stuck-top":this.isStuckTop,"is-stuck-bottom":this.isStuckBottom},e("div",{class:c},e("div",{ref:function(t){return i.spacerElement=t},class:"stzh-sticky__spacer"}),e("div",{ref:function(t){return i.stickyElement=t},class:"stzh-sticky__sticky"},e("div",{class:"stzh-sticky__content"},e("slot",null)))))};Object.defineProperty(t.prototype,"element",{get:function(){return c(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{disableStickyTop:["disableStickyWatcher"],disableStickyBottom:["disableStickyWatcher"],isStuckTop:["isStuckTopWatcher"],isStuckBottom:["isStuckBottomWatcher"],position:["positionWatcher"]}},enumerable:false,configurable:true});return t}());a.style=h}}}));
2
- //# sourceMappingURL=p-1095d872.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhStickyCss","StzhSticky","exports","this","fixedHeight","fixedWidth","fixedLimit","handleScroll","_this","debounceScroll","window","cancelAnimationFrame","requestAnimationFrame","updateFixedByScroll","handleResize","debounceResize","updateFixedByResize","isVisible","stickyElement","scrollX","scrollY","getFixedLimit","isStuckTop","isStuckBottom","off","offset","spacerElement","fixedTop","top","fixedLeft","left","disableStickyBottom","windowHeight","disableStickyTop","hasReachedTopLimit","hasReachedBottomLimit","bottom","setFixed","setUnfixed","style","position","innerHeight","offsetHeight","offsetWidth","height","concat","observe","updateStuck","class_1","prototype","disableStickyWatcher","isStuckTopWatcher","newValue","stzhStuckTop","emit","component","sticky","isStuckBottomWatcher","stzhStuckBottom","positionWatcher","observer","disconnect","addEventListener","passive","removeEventListener","IntersectionObserver","threshold","topCss","parseInt","getComputedStyle","bottomCss","rect","getBoundingClientRect","document","documentElement","clientHeight","stickyContainer","element","closest","scrollHeight","Object","assign","width","display","componentDidLoad","disconnectedCallback","render","isStuck","classes","_a","breakout","h","Host","class","ref","el"],"sources":["src/components/stzh-sticky/stzh-sticky.scss?tag=stzh-sticky&encapsulation=scoped","src/components/stzh-sticky/stzh-sticky.tsx"],"sourcesContent":["/**\n * @prop --padding: Padding of sticky element\n */\n\n:host {\n --padding: #{space('large')} 0;\n\n display: contents;\n\n @media print {\n display: none;\n }\n}\n\n.stzh-sticky {\n display: contents;\n\n &__sticky {\n position: sticky;\n top: -1px;\n bottom: -1px;\n z-index: $zIndexSticky;\n }\n\n &__content {\n position: relative;\n padding: var(--padding);\n\n &::before,\n &::after {\n content: '';\n pointer-events: none;\n display: block;\n position: absolute;\n left: 0;\n width: 100%;\n height: space('xxlarge');\n opacity: 0;\n transition: opacity $baseTransitionAnimationSpeed;\n }\n\n &::before {\n background: linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);\n top: 0;\n transform: translateY(-100%);\n }\n\n &::after {\n background: linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);\n bottom: 0;\n transform: translateY(100%);\n }\n }\n\n &__spacer {\n display: none;\n }\n\n &--is-disabled-sticky-top &__sticky {\n top: auto;\n }\n\n &--is-disabled-sticky-bottom &__sticky {\n bottom: auto;\n }\n\n &--is-stuck &__content {\n background-color: $colorWhite;\n }\n\n &--is-stuck-bottom &__content {\n &::before {\n opacity: 1;\n }\n }\n\n &--is-stuck-top &__content {\n &::after {\n opacity: 1;\n }\n }\n\n /* Position sticky variant */\n\n &--is-breakout &__content {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: -50vw;\n margin-right: -50vw;\n width: 100vw;\n max-width: 100vw;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhStickyStuckTopEvent,\n StzhStickyStuckBottomEvent\n} from \"../../index\";\n\nimport { isVisible, offset } from \"../../utils/utils\";\n\n/**\n *\n */\n@Component({\n tag: \"stzh-sticky\",\n styleUrl: \"stzh-sticky.scss\",\n scoped: true\n})\nexport class StzhSticky {\n /** Whether to disable sticking to top */\n @Prop({ reflect: true }) disableStickyTop: boolean = false;\n\n /** Whether to disable sticking to bottom */\n @Prop({ reflect: true }) disableStickyBottom: boolean = false;\n\n /** Whether to breakout container */\n @Prop({ reflect: true }) breakout: boolean = false;\n\n /**\n * Position type used.\n *\n * - sticky: used only css position sticky\n * - fixed: uses position fixed with js for positioning (`data-stzh-sticky-container` can be used on a container element to limit sticky position)\n */\n @Prop({ reflect: true }) position: \"sticky\" | \"fixed\" = \"sticky\";\n\n @Watch(\"disableStickyTop\")\n @Watch(\"disableStickyBottom\")\n disableStickyWatcher() {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n if (this.position === \"fixed\") {\n this.updateFixedByResize();\n } else {\n this.updateStuck();\n }\n });\n });\n }\n\n @Element() element: HTMLStzhStickyElement;\n\n @State() isStuckTop: boolean = false;\n @State() isStuckBottom: boolean = false;\n\n @State() hasReachedTopLimit: boolean = false;\n @State() hasReachedBottomLimit: boolean = false;\n\n @Watch(\"isStuckTop\")\n isStuckTopWatcher(newValue: boolean) {\n this.stzhStuckTop.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"isStuckBottom\")\n isStuckBottomWatcher(newValue: boolean) {\n this.stzhStuckBottom.emit({\n component: \"stzh-sticky\",\n sticky: newValue\n });\n }\n\n @Watch(\"position\")\n positionWatcher(newValue: string) {\n if (newValue === \"fixed\") {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true });\n window.addEventListener(\"resize\", this.handleResize);\n\n this.updateFixedByResize();\n } else {\n window.removeEventListener(\"scroll\", this.handleScroll);\n window.removeEventListener(\"resize\", this.handleResize);\n this.setUnfixed();\n\n this.observer = new IntersectionObserver(this.observe, { threshold: [1] });\n this.observer.observe(this.stickyElement);\n\n this.updateStuck();\n }\n }\n\n /** Sticky stuck top event */\n @Event() stzhStuckTop: EventEmitter<StzhStickyStuckTopEvent>;\n\n /** Sticky stuck bottom event */\n @Event() stzhStuckBottom: EventEmitter<StzhStickyStuckBottomEvent>;\n\n private observer: IntersectionObserver;\n private debounceScroll: number;\n private debounceResize: number;\n private stickyElement: HTMLElement;\n private spacerElement: HTMLElement;\n\n private windowHeight: number;\n private scrollX: number;\n private scrollY: number;\n private fixedTop: number;\n private fixedLeft: number;\n private fixedHeight: number = 0;\n private fixedWidth: number = 0;\n private fixedLimit: { top: number, bottom: number } | null = null;\n\n private updateStuck() {\n const topCss = parseInt(getComputedStyle(this.stickyElement).top, 10);\n const bottomCss = parseInt(getComputedStyle(this.stickyElement).bottom, 10);\n const rect = this.stickyElement.getBoundingClientRect();\n\n if (topCss) {\n this.isStuckTop = rect.top < 0;\n } else {\n this.isStuckTop = false;\n }\n\n if (bottomCss) {\n this.isStuckBottom = document.documentElement.clientHeight < rect.bottom;\n } else {\n this.isStuckBottom = false;\n }\n }\n\n private getFixedLimit(): { top: number, bottom: number } | null {\n const stickyContainer = this.element.closest(\"[data-stzh-sticky-container]\");\n\n if (!stickyContainer) {\n return null;\n }\n\n const off = offset(stickyContainer);\n\n return {\n top: off.top,\n bottom: off.top + stickyContainer.scrollHeight,\n };\n }\n\n private setUnfixed() {\n Object.assign(this.stickyElement.style, {\n position: null,\n top: null,\n bottom: null,\n left: null,\n width: null,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"none\",\n });\n }\n\n private setFixed() {\n const position = (this.hasReachedTopLimit || this.hasReachedBottomLimit)\n ? \"absolute\"\n : \"fixed\";\n\n Object.assign(this.stickyElement.style, {\n position,\n top: position === \"absolute\"\n ? `${this.isStuckTop ? this.fixedLimit.bottom - this.fixedHeight : this.fixedLimit.top}px`\n : this.isStuckTop ? \"0px\" : \"auto\",\n bottom: this.isStuckTop || position === \"absolute\"\n ? \"auto\" : \"0px\",\n left: `${this.fixedLeft + (position === \"fixed\" ? this.scrollX : 0)}px`,\n width: `${this.fixedWidth}px`,\n });\n\n Object.assign(this.spacerElement.style, {\n display: \"block\",\n });\n }\n\n private handleScroll = () => {\n if (this.debounceScroll) {\n window.cancelAnimationFrame(this.debounceScroll);\n }\n\n this.debounceScroll = requestAnimationFrame(this.updateFixedByScroll);\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.updateFixedByResize);\n }\n\n private updateFixedByScroll = () => {\n if (!isVisible(this.stickyElement)) {\n return;\n }\n\n this.scrollX = window.scrollX;\n this.scrollY = window.scrollY;\n this.fixedLimit = this.getFixedLimit();\n\n if (this.isStuckTop || this.isStuckBottom) {\n const off = offset(this.spacerElement);\n\n this.fixedTop = off.top;\n this.fixedLeft = off.left;\n } else {\n const off = offset(this.stickyElement);\n\n this.fixedTop = off.top;\n this.fixedLeft = off.left;\n }\n\n // console.log(\n // this.scrollX,\n // this.scrollY,\n // this.windowHeight, \n // this.fixedTop,\n // this.fixedLeft,\n // this.fixedHeight,\n // this.fixedLimit,\n // );\n\n this.isStuckBottom = !this.disableStickyBottom\n && this.scrollY + this.windowHeight <= this.fixedTop + this.fixedHeight;\n this.isStuckTop = !this.disableStickyTop\n && this.scrollY >= this.fixedTop;\n\n this.hasReachedTopLimit = this.fixedLimit \n && this.scrollY + this.windowHeight - this.fixedHeight <= this.fixedLimit.top;\n this.hasReachedBottomLimit = this.fixedLimit \n && this.scrollY >= this.fixedLimit.bottom - this.fixedHeight;\n\n // console.log(\n // this.isStuckBottom,\n // this.isStuckTop,\n // this.hasReachedBottomLimit,\n // this.hasReachedTopLimit,\n // );\n\n if (this.isStuckTop || this.isStuckBottom) {\n this.setFixed();\n } else {\n this.setUnfixed();\n }\n }\n\n private updateFixedByResize = () => {\n // reset sticky so we can read current offsets\n this.setUnfixed();\n this.stickyElement.style.position = \"static\";\n this.isStuckTop = false;\n this.isStuckBottom = false;\n\n if (isVisible(this.stickyElement)) {\n this.windowHeight = window.innerHeight;\n this.fixedHeight = this.stickyElement.offsetHeight; \n this.fixedWidth = this.stickyElement.offsetWidth;\n this.spacerElement.style.height = `${this.fixedHeight}px`;\n\n this.updateFixedByScroll();\n }\n }\n\n private observe = () => {\n this.updateStuck();\n };\n\n componentDidLoad() {\n this.positionWatcher(this.position);\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n window.removeEventListener(\"scroll\", this.handleScroll);\n window.removeEventListener(\"resize\", this.handleResize);\n }\n\n render() {\n const isStuck = this.isStuckTop || this.isStuckBottom;\n\n const classes = {\n \"stzh-sticky\": true,\n \"stzh-sticky--is-stuck\": isStuck,\n \"stzh-sticky--is-stuck-top\": this.isStuckTop,\n \"stzh-sticky--is-stuck-bottom\": this.isStuckBottom,\n \"stzh-sticky--is-breakout\": this.breakout,\n \"stzh-sticky--is-disabled-sticky-top\": this.disableStickyTop,\n \"stzh-sticky--is-disabled-sticky-bottom\": this.disableStickyBottom,\n [`stzh-sticky--position-${this.position}`]: !!this.position,\n };\n\n return (\n <Host\n is-stuck={this.isStuckTop || this.isStuckBottom}\n is-stuck-top={this.isStuckTop}\n is-stuck-bottom={this.isStuckBottom}\n >\n <div class={classes}>\n <div\n ref={(el) => (this.spacerElement = el as HTMLDivElement)}\n class=\"stzh-sticky__spacer\"\n ></div>\n <div\n ref={(el) => (this.stickyElement = el as HTMLDivElement)}\n class=\"stzh-sticky__sticky\"\n >\n <div class=\"stzh-sticky__content\">\n <slot></slot>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"8PAAA,IAAMA,EAAgB,o4F,IC2BTC,EAAUC,EAAA,yB,+HAgGbC,KAAAC,YAAsB,EACtBD,KAAAE,WAAqB,EACrBF,KAAAG,WAAqD,KAsErDH,KAAAI,aAAe,WACrB,GAAIC,EAAKC,eAAgB,CACvBC,OAAOC,qBAAqBH,EAAKC,e,CAGnCD,EAAKC,eAAiBG,sBAAsBJ,EAAKK,oB,EAG3CV,KAAAW,aAAe,WACrB,GAAIN,EAAKO,eAAgB,CACvBL,OAAOC,qBAAqBH,EAAKO,e,CAGnCP,EAAKO,eAAiBH,sBAAsBJ,EAAKQ,oB,EAG3Cb,KAAAU,oBAAsB,WAC5B,IAAKI,EAAUT,EAAKU,eAAgB,CAClC,M,CAGFV,EAAKW,QAAUT,OAAOS,QACtBX,EAAKY,QAAUV,OAAOU,QACtBZ,EAAKF,WAAaE,EAAKa,gBAEvB,GAAIb,EAAKc,YAAcd,EAAKe,cAAe,CACzC,IAAMC,EAAMC,EAAOjB,EAAKkB,eAExBlB,EAAKmB,SAAWH,EAAII,IACpBpB,EAAKqB,UAAYL,EAAIM,I,KAChB,CACL,IAAMN,EAAMC,EAAOjB,EAAKU,eAExBV,EAAKmB,SAAWH,EAAII,IACpBpB,EAAKqB,UAAYL,EAAIM,I,CAavBtB,EAAKe,eAAiBf,EAAKuB,qBACtBvB,EAAKY,QAAUZ,EAAKwB,cAAgBxB,EAAKmB,SAAWnB,EAAKJ,YAC9DI,EAAKc,YAAcd,EAAK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ACEG,IAAK,SAACC,GAAE,OAAMvF,EAAKkB,cAAgBqE,CAA3B,EACRF,MAAM,wBAERF,EAAA,OACEG,IAAK,SAACC,GAAE,OAAMvF,EAAKU,cAAgB6E,CAA3B,EACRF,MAAM,uBAENF,EAAA,OAAKE,MAAM,wBACTF,EAAA,gB,yZA/SS,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhVbzMajortickerCss","StzhVbzMajorticker","this","disturbance","onGhettoboxOpen","ghettoboxShown","onGhettoboxClose","getGhettoboxShown","getDisturbance","apiWatcher","newValue","apiUrl","api","replace","localization","$locale","includes","Date","now","data","axios","get","dataWatcher","_data","JSON","parse","bigDisturbance","_b","_a","Message","find","message","category","VBZ","DISTURBANCE_INFORMATION","baseType","BASE_TYPE_GLOBAL","urls","channel","filter","name","CHANNEL_TICKER","url","map","reduce","a","b","concat","infoUrl","indexOf","CHANNEL_INFO_URL_FILTER","id","head","text","createParagraphsFromBrs","startDate","sDate","sTime","endDate","eDate","eTime","altStart","altEnd","stzhDisturbanceFetched","emit","component","componentWillLoad","window","stzhComponents","utils","fetchTranslations","element","dateAdapter","createFormatParseAdapter","$formats","$globals","render","classes","h","Host","hidden","class","onStzhOpen","onStzhClose","hideClose","closeTimeKey","ghettoboxCloseTimeKey","mainTitle","publishDate","innerHTML","slot","href","target","moreInfoLink","moreInfo"],"sources":["src/components/stzh-vbz-majorticker/stzh-vbz-majorticker.scss?tag=stzh-vbz-majorticker&encapsulation=scoped","src/components/stzh-vbz-majorticker/stzh-vbz-majorticker.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-vbz-majorticker {\n &__ghettobox {\n // --stzh-base-invert-color: #{$colorBlack};\n // --stzh-base-invert-color72: #{$colorBlack72};\n // --stzh-base-invert-color32: #{$colorBlack32};\n // --stzh-base-invert-color16: #{$colorBlack16};\n\n --stzh-base-invert-color-rgb: #{$colorBlackRgb};\n --color: #{$colorBlack};\n --background-color: #{$colorCoral};\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Element,\n Event,\n EventEmitter,\n Method\n} from \"@stencil/core\";\n\nimport axios from \"axios\";\n\nimport { createParagraphsFromBrs } from \"../../utils/string-utils\";\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport { StzhVbzMajortickerLocalizedText } from \"./stzh-vbz-majorticker.localization\";\n\nimport {\n VBZ,\n StzhVbzMajortickerDisturbanceFetchedEvent,\n StzhVbzMajortickerDisturbance,\n VbzTickerInfoUrl\n} from \"../../index\";\n\n/**\n */\n@Component({\n tag: \"stzh-vbz-majorticker\",\n styleUrl: \"stzh-vbz-majorticker.scss\",\n scoped: true\n})\nexport class StzhVbzMajorticker {\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string = \"https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}\";\n\n /** Data to pass in directly (alternative for API call) */\n @Prop() data: any = \"\";\n private _data: any;\n\n /** More info link (`{lang}` and `{id}` are replaced in the URL) */\n @Prop() moreInfoLink: string = \"https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n /** Translation strings. */\n @Prop() localization: StzhVbzMajortickerLocalizedText;\n\n /** Overwrite ghettobox close time cookie option if needed */\n @Prop() ghettoboxCloseTimeKey: string;\n\n /** Whether ghettobox is shown (if has not been closed before) */\n @State() ghettoboxShown: boolean = true;\n\n @Element() element: HTMLStzhVbzMajortickerElement;\n\n /** Event when major disturbance was fetched */\n @Event() stzhDisturbanceFetched: EventEmitter<StzhVbzMajortickerDisturbanceFetchedEvent>;\n\n /** Return whether ghettobox is shown (if has not been closed before) */\n @Method()\n async getGhettoboxShown() {\n return this.ghettoboxShown;\n }\n\n /** Return fetched disturbance */\n @Method()\n async getDisturbance() {\n return this.disturbance;\n }\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n if (!newValue) {\n return;\n }\n\n let apiUrl = this.api.replace(/\\{lang\\}/, this.localization.$locale)\n apiUrl = apiUrl + (apiUrl.includes(\"?\") ? \"&\" : \"?\") + Date.now();\n\n // load data from API\n const { data } = await axios.get(apiUrl);\n\n this.data = data;\n }\n\n @Watch(\"data\")\n async dataWatcher(newValue: any) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n const bigDisturbance = this._data?.Message\n ?.find(message => message.category === VBZ.DISTURBANCE_INFORMATION && message.baseType === VBZ.BASE_TYPE_GLOBAL);\n\n if (bigDisturbance) {\n const urls: VbzTickerInfoUrl[] = bigDisturbance.channel\n .filter(channel => channel.name === VBZ.CHANNEL_TICKER && channel.url)\n .map(channel => channel.url)\n .reduce((a, b) => a.concat(b), []);\n\n const infoUrl = urls\n .find(url => url.url.indexOf(VBZ.CHANNEL_INFO_URL_FILTER) !== -1);\n\n this.disturbance = {\n id: bigDisturbance.id,\n head: bigDisturbance.head,\n text: createParagraphsFromBrs(bigDisturbance.text),\n startDate: new Date(`${bigDisturbance.sDate}T${bigDisturbance.sTime}+02:00`),\n endDate: new Date(`${bigDisturbance.eDate}T${bigDisturbance.eTime}+02:00`),\n altStart: bigDisturbance.altStart,\n altEnd: bigDisturbance.altEnd,\n infoUrl: infoUrl\n };\n }\n\n this.stzhDisturbanceFetched.emit({\n component: \"stzh-vbz-majorticker\",\n disturbance: this.disturbance\n })\n }\n\n private disturbance: StzhVbzMajortickerDisturbance = null;\n\n private onGhettoboxOpen = () => {\n this.ghettoboxShown = true;\n }\n\n private onGhettoboxClose = () => {\n this.ghettoboxShown = false;\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"vbz-majorticker\");\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n\n if (this.data) {\n await this.dataWatcher(this.data);\n } else {\n await this.apiWatcher(this.api);\n }\n }\n\n render() {\n const classes = {\n \"stzh-vbz-majorticker\": true\n };\n\n return (\n <Host hidden={!this.disturbance || !this.ghettoboxShown}>\n <div class={classes}>\n {this.disturbance &&\n <stzh-ghettobox\n onStzhOpen={this.onGhettoboxOpen}\n onStzhClose={this.onGhettoboxClose}\n class=\"stzh-vbz-majorticker__ghettobox\"\n hideClose={true}\n closeTimeKey={this.ghettoboxCloseTimeKey}\n mainTitle={this.disturbance.head}\n publishDate={this.disturbance.startDate}\n >\n <stzh-richtext innerHTML={this.disturbance.text}></stzh-richtext>\n {this.disturbance.infoUrl ?\n <stzh-button\n slot=\"button\"\n href={this.disturbance.infoUrl.url}\n >\n {this.disturbance.infoUrl.name}\n </stzh-button>\n :\n <stzh-button\n slot=\"button\"\n target=\"_blank\"\n href={this.moreInfoLink\n .replace(/\\{lang\\}/, this.localization.$locale)\n .replace(/\\{id\\}/, this.disturbance.id)}\n >\n {this.localization.moreInfo}\n </stzh-button>\n }\n </stzh-ghettobox>\n }\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6KAAA,MAAMA,EAAwB,0rC,MCkCjBC,EAAkB,M,wFAiGrBC,KAAAC,YAA6C,KAE7CD,KAAAE,gBAAkB,KACxBF,KAAKG,eAAiB,IAAI,EAGpBH,KAAAI,iBAAmB,KACzBJ,KAAKG,eAAiB,KAAK,E,SAtGP,+I,UAGF,G,kBAIW,yD,gHAgBI,I,CASnC,uBAAME,GACJ,OAAOL,KAAKG,c,CAKd,oBAAMG,GACJ,OAAON,KAAKC,W,CAId,gBAAMM,CAAWC,GACf,IAAKA,EAAU,CACb,M,CAGF,IAAIC,EAAST,KAAKU,IAAIC,QAAQ,WAAYX,KAAKY,aAAaC,SAC5DJ,EAASA,GAAUA,EAAOK,SAAS,KAAO,IAAM,KAAO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Aa4D,SAClBxE,KAAKY,aAAa6D,S,CAItB,GAAIzE,KAAKiB,KAAM,OACPjB,KAAKoB,YAAYpB,KAAKiB,K,KACvB,OACCjB,KAAKO,WAAWP,KAAKU,I,EAI/B,MAAAgE,GACE,MAAMC,EAAU,CACd,uBAAwB,MAG1B,OACEC,EAACC,EAAI,CAACC,QAAS9E,KAAKC,cAAgBD,KAAKG,gBACvCyE,EAAA,OAAKG,MAAOJ,GACT3E,KAAKC,aACJ2E,EAAA,kBACEI,WAAYhF,KAAKE,gBACjB+E,YAAajF,KAAKI,iBAClB2E,MAAM,kCACNG,UAAW,KACXC,aAAcnF,KAAKoF,sBACnBC,UAAWrF,KAAKC,YAAYiD,KAC5BoC,YAAatF,KAAKC,YAAYoD,WAE9BuB,EAAA,iBAAeW,UAAWvF,KAAKC,YAAYkD,OAC1CnD,KAAKC,YAAY6C,QAChB8B,EAAA,eACEY,KAAK,SACLC,KAAMzF,KAAKC,YAAY6C,QAAQN,KAE9BxC,KAAKC,YAAY6C,QAAQR,MAG5BsC,EAAA,eACEY,KAAK,SACLE,OAAO,SACPD,KAAMzF,KAAK2F,aACRhF,QAAQ,WAAYX,KAAKY,aAAaC,SACtCF,QAAQ,SAAUX,KAAKC,YAAYgD,KAErCjD,KAAKY,aAAagF,Y"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as s,a as o,g as e}from"./p-c92165bd.js";const r=":host{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block;}:host[hidden]{display:none}:host *,:host *::before,:host *::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}:host .has-focus{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}:host .stzh-fylingfocus-focused{outline-style:none !important}:host .stzh-fylingfocus-focused::-moz-focus-inner{border:0 !important}:host ::slotted(stzh-accordion-item:not(:last-child)){margin-bottom:var(--stzh-space-small)}";const i=class{constructor(s){t(this,s);this.collapsible=true;this.multiselectable=true}openListener(t){const s=t.target;const o=s.closest("stzh-accordion");if(this.multiselectable||t.detail&&t.detail.component!=="stzh-accordion-item"||o!==this.element){return}const e=Array.from(o.querySelectorAll("stzh-accordion-item"));e.forEach((t=>{if(t!==s){t.hide()}}))}async setItemFocus(t,s){const o=t.closest("stzh-accordion");if(o!==this.element){return}const e=Array.from(o.querySelectorAll(":scope > stzh-accordion-item")).filter((t=>!t.disabled));const r=e.indexOf(t);if((s==="prev"||s==="next")&&r===null){s=s==="prev"?"last":"first"}if(s==="prev"&&r===0){s="last"}if(s==="next"&&r===e.length-1){s="first"}if(s==="prev"){e[r-1].setFocus()}else if(s==="next"){e[r+1].setFocus()}else if(s==="last"){e[e.length-1].setFocus()}else if(s==="first"){e[0].setFocus()}else{t.setFocus()}}render(){const t={"stzh-accordion":true};return s(o,null,s("div",{class:t},s("slot",null)))}get element(){return e(this)}};i.style=r;export{i as stzh_accordion};
2
- //# sourceMappingURL=p-446dcea5.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhAccordionCss","StzhAccordion","openListener","event","accordionItemOpened","target","accordionOpened","closest","this","multiselectable","detail","component","element","items","Array","from","querySelectorAll","forEach","item","hide","setItemFocus","accordionItem","action","accordion","filter","disabled","currentIndex","indexOf","length","setFocus","render","classes","h","Host","class"],"sources":["src/components/stzh-accordion/stzh-accordion.scss?tag=stzh-accordion&encapsulation=shadow","src/components/stzh-accordion/stzh-accordion.tsx"],"sourcesContent":[":host {\n ::slotted(stzh-accordion-item:not(:last-child)) {\n margin-bottom: space('small');\n }\n}\n\n.stzh-accordion {\n\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Listen,\n Method\n} from \"@stencil/core\";\n\nimport {\n StzhAccordionItemOpenEvent\n} from \"../../index\";\n\n/**\n * @slot - Slot for `stzh-accordion-item` elements\n */\n@Component({\n tag: \"stzh-accordion\",\n styleUrl: \"stzh-accordion.scss\",\n shadow: true\n})\nexport class StzhAccordion {\n /** Whether folds are collapsible */\n @Prop() collapsible: boolean = true;\n\n /** Whether multiple folds can be opened at once */\n @Prop() multiselectable: boolean = true;\n\n @Element() element: HTMLStzhAccordionElement;\n\n @Listen(\"stzhOpen\")\n openListener(event: CustomEvent<StzhAccordionItemOpenEvent>) {\n const accordionItemOpened = event.target as HTMLStzhAccordionItemElement;\n const accordionOpened = accordionItemOpened.closest(\"stzh-accordion\");\n\n if (\n this.multiselectable\n || (event.detail && event.detail.component !== \"stzh-accordion-item\")\n || accordionOpened !== this.element\n ) {\n return;\n }\n\n const items: HTMLStzhAccordionItemElement[] = Array.from(accordionOpened.querySelectorAll(\"stzh-accordion-item\"));\n items.forEach((item) => {\n if (item !== accordionItemOpened) {\n item.hide();\n }\n });\n }\n\n /** Set focus to accordion item */\n @Method()\n async setItemFocus(accordionItem: HTMLStzhAccordionItemElement, action: string) {\n const accordion = accordionItem.closest(\"stzh-accordion\");\n\n if (accordion !== this.element) {\n return;\n }\n\n const items = (Array.from(accordion.querySelectorAll(\":scope > stzh-accordion-item\")) as HTMLStzhAccordionItemElement[])\n .filter((item) => !item.disabled);\n\n const currentIndex = items.indexOf(accordionItem);\n\n if ((action === 'prev' || action === 'next') && currentIndex === null) {\n action = action === 'prev' ? 'last' : 'first'\n }\n\n if (action === 'prev' && currentIndex === 0) {\n action = 'last'\n }\n\n if (action === 'next' && currentIndex === items.length - 1) {\n action = 'first'\n }\n\n if (action === 'prev') {\n items[currentIndex - 1].setFocus();\n } else if (action === 'next') {\n items[currentIndex + 1].setFocus();\n } else if (action === 'last') {\n items[items.length - 1].setFocus();\n } else if (action === 'first') {\n items[0].setFocus();\n } else {\n accordionItem.setFocus();\n }\n }\n\n render() {\n const classes = {\n \"stzh-accordion\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n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":["stzhVbzMajortickerCss","StzhVbzMajorticker","exports","this","disturbance","onGhettoboxOpen","_this","ghettoboxShown","onGhettoboxClose","class_1","prototype","getGhettoboxShown","getDisturbance","apiWatcher","newValue","apiUrl","api","replace","localization","$locale","includes","Date","now","axios","get","data","_c","sent","dataWatcher","_data","JSON","parse","bigDisturbance","_b","_a","Message","find","message","category","VBZ","DISTURBANCE_INFORMATION","baseType","BASE_TYPE_GLOBAL","urls","channel","filter","name","CHANNEL_TICKER","url","map","reduce","a","b","concat","infoUrl","indexOf","CHANNEL_INFO_URL_FILTER","id","head","text","createParagraphsFromBrs","startDate","sDate","sTime","endDate","eDate","eTime","altStart","altEnd","stzhDisturbanceFetched","emit","component","componentWillLoad","window","stzhComponents","utils","fetchTranslations","element","_d","dateAdapter","createFormatParseAdapter","$formats","$globals","render","classes","h","Host","hidden","class","onStzhOpen","onStzhClose","hideClose","closeTimeKey","ghettoboxCloseTimeKey","mainTitle","publishDate","innerHTML","slot","href","target","moreInfoLink","moreInfo"],"sources":["src/components/stzh-vbz-majorticker/stzh-vbz-majorticker.scss?tag=stzh-vbz-majorticker&encapsulation=scoped","src/components/stzh-vbz-majorticker/stzh-vbz-majorticker.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-vbz-majorticker {\n &__ghettobox {\n // --stzh-base-invert-color: #{$colorBlack};\n // --stzh-base-invert-color72: #{$colorBlack72};\n // --stzh-base-invert-color32: #{$colorBlack32};\n // --stzh-base-invert-color16: #{$colorBlack16};\n\n --stzh-base-invert-color-rgb: #{$colorBlackRgb};\n --color: #{$colorBlack};\n --background-color: #{$colorCoral};\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Element,\n Event,\n EventEmitter,\n Method\n} from \"@stencil/core\";\n\nimport axios from \"axios\";\n\nimport { createParagraphsFromBrs } from \"../../utils/string-utils\";\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport { StzhVbzMajortickerLocalizedText } from \"./stzh-vbz-majorticker.localization\";\n\nimport {\n VBZ,\n StzhVbzMajortickerDisturbanceFetchedEvent,\n StzhVbzMajortickerDisturbance,\n VbzTickerInfoUrl\n} from \"../../index\";\n\n/**\n */\n@Component({\n tag: \"stzh-vbz-majorticker\",\n styleUrl: \"stzh-vbz-majorticker.scss\",\n scoped: true\n})\nexport class StzhVbzMajorticker {\n /** API URL (`{lang}` is replaced in the URL) */\n @Prop() api: string = \"https://fpbe.zvv.ch/restproxy/himsearch?format=json&accessId=unic&channels=ticker&additionalfields=tickers:VBZ&orderBy=LMOD_DESC&lang={lang}\";\n\n /** Data to pass in directly (alternative for API call) */\n @Prop() data: any = \"\";\n private _data: any;\n\n /** More info link (`{lang}` and `{id}` are replaced in the URL) */\n @Prop() moreInfoLink: string = \"https://zvv.ch/zvv/{lang}/fahrplan/vl.html?himIds={id}\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n /** Translation strings. */\n @Prop() localization: StzhVbzMajortickerLocalizedText;\n\n /** Overwrite ghettobox close time cookie option if needed */\n @Prop() ghettoboxCloseTimeKey: string;\n\n /** Whether ghettobox is shown (if has not been closed before) */\n @State() ghettoboxShown: boolean = true;\n\n @Element() element: HTMLStzhVbzMajortickerElement;\n\n /** Event when major disturbance was fetched */\n @Event() stzhDisturbanceFetched: EventEmitter<StzhVbzMajortickerDisturbanceFetchedEvent>;\n\n /** Return whether ghettobox is shown (if has not been closed before) */\n @Method()\n async getGhettoboxShown() {\n return this.ghettoboxShown;\n }\n\n /** Return fetched disturbance */\n @Method()\n async getDisturbance() {\n return this.disturbance;\n }\n\n @Watch(\"api\")\n async apiWatcher(newValue: string) {\n if (!newValue) {\n return;\n }\n\n let apiUrl = this.api.replace(/\\{lang\\}/, this.localization.$locale)\n apiUrl = apiUrl + (apiUrl.includes(\"?\") ? \"&\" : \"?\") + Date.now();\n\n // load data from API\n const { data } = await axios.get(apiUrl);\n\n this.data = data;\n }\n\n @Watch(\"data\")\n async dataWatcher(newValue: any) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n const bigDisturbance = this._data?.Message\n ?.find(message => message.category === VBZ.DISTURBANCE_INFORMATION && message.baseType === VBZ.BASE_TYPE_GLOBAL);\n\n if (bigDisturbance) {\n const urls: VbzTickerInfoUrl[] = bigDisturbance.channel\n .filter(channel => channel.name === VBZ.CHANNEL_TICKER && channel.url)\n .map(channel => channel.url)\n .reduce((a, b) => a.concat(b), []);\n\n const infoUrl = urls\n .find(url => url.url.indexOf(VBZ.CHANNEL_INFO_URL_FILTER) !== -1);\n\n this.disturbance = {\n id: bigDisturbance.id,\n head: bigDisturbance.head,\n text: createParagraphsFromBrs(bigDisturbance.text),\n startDate: new Date(`${bigDisturbance.sDate}T${bigDisturbance.sTime}+02:00`),\n endDate: new Date(`${bigDisturbance.eDate}T${bigDisturbance.eTime}+02:00`),\n altStart: bigDisturbance.altStart,\n altEnd: bigDisturbance.altEnd,\n infoUrl: infoUrl\n };\n }\n\n this.stzhDisturbanceFetched.emit({\n component: \"stzh-vbz-majorticker\",\n disturbance: this.disturbance\n })\n }\n\n private disturbance: StzhVbzMajortickerDisturbance = null;\n\n private onGhettoboxOpen = () => {\n this.ghettoboxShown = true;\n }\n\n private onGhettoboxClose = () => {\n this.ghettoboxShown = false;\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"vbz-majorticker\");\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n\n if (this.data) {\n await this.dataWatcher(this.data);\n } else {\n await this.apiWatcher(this.api);\n }\n }\n\n render() {\n const classes = {\n \"stzh-vbz-majorticker\": true\n };\n\n return (\n <Host hidden={!this.disturbance || !this.ghettoboxShown}>\n <div class={classes}>\n {this.disturbance &&\n <stzh-ghettobox\n onStzhOpen={this.onGhettoboxOpen}\n onStzhClose={this.onGhettoboxClose}\n class=\"stzh-vbz-majorticker__ghettobox\"\n hideClose={true}\n closeTimeKey={this.ghettoboxCloseTimeKey}\n mainTitle={this.disturbance.head}\n publishDate={this.disturbance.startDate}\n >\n <stzh-richtext innerHTML={this.disturbance.text}></stzh-richtext>\n {this.disturbance.infoUrl ?\n <stzh-button\n slot=\"button\"\n href={this.disturbance.infoUrl.url}\n >\n {this.disturbance.infoUrl.name}\n </stzh-button>\n :\n <stzh-button\n slot=\"button\"\n target=\"_blank\"\n href={this.moreInfoLink\n .replace(/\\{lang\\}/, this.localization.$locale)\n .replace(/\\{id\\}/, this.disturbance.id)}\n >\n {this.localization.moreInfo}\n </stzh-button>\n }\n </stzh-ghettobox>\n }\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"4vDAAA,IAAMA,EAAwB,0rC,ICkCjBC,EAAkBC,EAAA,kC,kGAiGrBC,KAAAC,YAA6C,KAE7CD,KAAAE,gBAAkB,WACxBC,EAAKC,eAAiB,I,EAGhBJ,KAAAK,iBAAmB,WACzBF,EAAKC,eAAiB,K,WAtGF,+I,UAGF,G,kBAIW,yD,gHAgBI,I,CAS7BE,EAAAC,UAAAC,kBAAN,W,qFACE,SAAOR,KAAKI,e,QAKRE,EAAAC,UAAAE,eAAN,W,qFACE,SAAOT,KAAKC,Y,QAIRK,EAAAC,UAAAG,WAAN,SAAiBC,G,oHACf,IAAKA,EAAU,CACb,S,CAGEC,EAASZ,KAAKa,IAAIC,QAAQ,WAAYd,KAAKe,aAAaC,SAC5DJ,EAASA,GAAUA,EAAOK,SAAS,KAAO,IAAM,KAAOC,KAAKC,MAG3C,SAAMC,EAAMC,IAAIT,I,OAAzBU,EAASC,EAAAC,OAAuBF,KAExCtB,KAAKsB,KAAOA,E,kBAIRhB,EAAAC,UAAAkB,YAAN,SAAkBd,G,mGAChB,UAAWA,IAA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B5E,KAAK4E,YAAcN,OAAOC,eAAeC,MAAMK,yBAC7C7E,KAAKe,aAAa+D,SAClB9E,KAAKe,aAAagE,S,KAIlB/E,KAAKsB,KAAL,YACF,SAAMtB,KAAKyB,YAAYzB,KAAKsB,O,OAA5BqD,EAAAnD,O,mBAEA,SAAMxB,KAAKU,WAAWV,KAAKa,M,OAA3B8D,EAAAnD,O,mCAIJlB,EAAAC,UAAAyE,OAAA,WACE,IAAMC,EAAU,CACd,uBAAwB,MAG1B,OACEC,EAACC,EAAI,CAACC,QAASpF,KAAKC,cAAgBD,KAAKI,gBACvC8E,EAAA,OAAKG,MAAOJ,GACTjF,KAAKC,aACJiF,EAAA,kBACEI,WAAYtF,KAAKE,gBACjBqF,YAAavF,KAAKK,iBAClBgF,MAAM,kCACNG,UAAW,KACXC,aAAczF,KAAK0F,sBACnBC,UAAW3F,KAAKC,YAAYsD,KAC5BqC,YAAa5F,KAAKC,YAAYyD,WAE9BwB,EAAA,iBAAeW,UAAW7F,KAAKC,YAAYuD,OAC1CxD,KAAKC,YAAYkD,QAChB+B,EAAA,eACEY,KAAK,SACLC,KAAM/F,KAAKC,YAAYkD,QAAQN,KAE9B7C,KAAKC,YAAYkD,QAAQR,MAG5BuC,EAAA,eACEY,KAAK,SACLE,OAAO,SACPD,KAAM/F,KAAKiG,aACRnF,QAAQ,WAAYd,KAAKe,aAAaC,SACtCF,QAAQ,SAAUd,KAAKC,YAAYqD,KAErCtD,KAAKe,aAAamF,Y,qQAhKN,I"}
@@ -1,2 +0,0 @@
1
- import{r as t,h as i,a as n}from"./p-c92165bd.js";const s=".sc-stzh-container-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-container-h{display:none}.sc-stzh-container-h *.sc-stzh-container,.sc-stzh-container-h *.sc-stzh-container::before,.sc-stzh-container-h *.sc-stzh-container::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-container-h .has-focus.sc-stzh-container{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container{outline-style:none !important}.sc-stzh-container-h .stzh-fylingfocus-focused.sc-stzh-container::-moz-focus-inner{border:0 !important}.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-1.25rem;margin-right:-1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2rem;margin-right:-2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-2.5rem;margin-right:-2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:-5.5rem;margin-right:-5.5rem}}@media screen and (min-width: 1440px){.sc-stzh-container-h .sc-stzh-container-s stzh-header{margin-left:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2);margin-right:calc((100vw - 78.75rem - var(--stzh-scrollbar-width, 0px)) / -2)}}.sc-stzh-container-h .sc-stzh-container-s stzh-container{position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;width:100vw;max-width:100vw}.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:1.25rem}@media screen and (min-width: 600px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2rem}}@media screen and (min-width: 1024px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:2.5rem}}@media screen and (min-width: 1260px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-space-xlarge)}}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-section[variant=highlight]{position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;width:100vw;max-width:100vw}}.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{--highlight-horizontal-padding:var(--stzh-section-highlight-horizontal-padding)}@media screen and (max-width: 1259px){.sc-stzh-container-h .sc-stzh-container-s stzh-row stzh-section[variant=highlight]{left:initial;right:initial;margin-left:initial;margin-right:initial;width:initial;max-width:initial}}.stzh-container.sc-stzh-container{margin-left:1.25rem;margin-right:1.25rem}@media screen and (min-width: 600px){.stzh-container.sc-stzh-container{margin-left:2rem;margin-right:2rem}}@media screen and (min-width: 1024px){.stzh-container.sc-stzh-container{margin-left:2.5rem;margin-right:2.5rem}}@media screen and (min-width: 1260px){.stzh-container.sc-stzh-container{margin-left:5.5rem;margin-right:5.5rem}}@media screen and (min-width: 1440px){.stzh-container.sc-stzh-container{margin-left:auto;margin-right:auto;width:78.75rem}}@media screen and (min-width: 1440px){.stzh-container--size-big.sc-stzh-container{width:90rem}}.stzh-container--has-no-margin.sc-stzh-container{margin-left:auto;margin-right:auto}";const r=class{constructor(i){t(this,i);this.size="default";this.noMargin=false}render(){const t={"stzh-container":true,"stzh-container--has-no-margin":this.noMargin,[`stzh-container--size-${this.size}`]:!!this.size};return i(n,null,i("div",{class:t},i("slot",null)))}};r.style=s;export{r as stzh_container};
2
- //# sourceMappingURL=p-7b0da017.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhContainerCss","StzhContainer","render","classes","this","noMargin","size","h","Host","class"],"sources":["src/components/stzh-container/stzh-container.scss?tag=stzh-container&encapsulation=scoped","src/components/stzh-container/stzh-container.tsx"],"sourcesContent":[":host {\n ::slotted(*) {\n stzh-header {\n margin-left: -$containerMargin;\n margin-right: -$containerMargin;\n\n @include mq($from: small) {\n margin-left: -$containerMarginSmall;\n margin-right: -$containerMarginSmall;\n }\n\n @include mq($from: medium) {\n margin-left: -$containerMarginMedium;\n margin-right: -$containerMarginMedium;\n }\n\n @include mq($from: large) {\n margin-left: -$containerMarginLarge;\n margin-right: -$containerMarginLarge;\n }\n\n @include mq($from: ultra) {\n margin-left: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n margin-right: calc((100vw - #{$containerMaxWidth} - var(--stzh-scrollbar-width, 0px)) / -2);\n }\n }\n\n stzh-container {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: -50vw;\n margin-right: -50vw;\n width: 100vw;\n max-width: 100vw;\n }\n\n stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$containerMargin};\n\n @include mq($from: small) {\n --highlight-horizontal-padding: #{$containerMarginSmall};\n }\n\n @include mq($from: medium) {\n --highlight-horizontal-padding: #{$containerMarginMedium};\n }\n\n @include mq($from: large) {\n --highlight-horizontal-padding: #{space('xlarge')};\n }\n\n @include mq($to: large) {\n position: relative;\n left: 50%;\n right: 50%;\n margin-left: -50vw;\n margin-right: -50vw;\n width: 100vw;\n max-width: 100vw;\n }\n }\n\n stzh-row stzh-section[variant=\"highlight\"] {\n --highlight-horizontal-padding: #{$sectionHighlightHorizontalPadding};\n\n @include mq($to: large) {\n left: initial;\n right: initial;\n margin-left: initial;\n margin-right: initial;\n width: initial;\n max-width: initial;\n }\n }\n }\n}\n\n.stzh-container {\n @include container;\n\n &--size-big {\n @include mq($from: ultra) {\n width: $containerBigMaxWidth;\n }\n }\n\n &--has-no-margin {\n margin-left: auto;\n margin-right: auto;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n} from \"@stencil/core\";\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-container\",\n styleUrl: \"stzh-container.scss\",\n scoped: true\n})\nexport class StzhContainer {\n /** Size variant */\n @Prop() size: \"default\" | \"big\" = \"default\";\n\n /** Whether to prevent side margins */\n @Prop() noMargin: boolean = false;\n\n render() {\n const classes = {\n \"stzh-container\": true,\n \"stzh-container--has-no-margin\": this.noMargin,\n [`stzh-container--size-${this.size}`]: !!this.size,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAmB,+oH,MCeZC,EAAa,M,mCAEU,U,cAGN,K,CAE5B,MAAAC,GACE,MAAMC,EAAU,CACd,iBAAkB,KAClB,gCAAiCC,KAAKC,SACtC,CAAC,wBAAwBD,KAAKE,UAAWF,KAAKE,MAGhD,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAON,GACVI,EAAA,c"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as s,h as i,a as e,g as n}from"./p-c92165bd.js";import{p as a,a as h}from"./p-23d404e1.js";function p(t,s){if(!t){return""}const i=t.split("|");let e=i[0].trim();if(i.length===3&&s===1){e=i[1].trim()}else if(i.length===3&&s>1){e=i[2].trim()}if(i.length===2&&s!==1){e=i[1].trim()}return e.replace(/\{n\}/gi,s.toString())}const o=".sc-stzh-appointments-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-appointments-h{display:none}.sc-stzh-appointments-h *.sc-stzh-appointments,.sc-stzh-appointments-h *.sc-stzh-appointments::before,.sc-stzh-appointments-h *.sc-stzh-appointments::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-appointments-h .has-focus.sc-stzh-appointments{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-appointments-h .stzh-fylingfocus-focused.sc-stzh-appointments{outline-style:none !important}.sc-stzh-appointments-h .stzh-fylingfocus-focused.sc-stzh-appointments::-moz-focus-inner{border:0 !important}.stzh-appointments__wrapper.sc-stzh-appointments{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width: 1024px){.stzh-appointments__wrapper.sc-stzh-appointments{-ms-flex-direction:row;flex-direction:row}}.stzh-appointments__calendar-wrapper.sc-stzh-appointments{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media screen and (min-width: 1024px){.stzh-appointments__calendar-wrapper.sc-stzh-appointments{margin-right:var(--stzh-space-large)}}.stzh-appointments__appointments-wrapper.sc-stzh-appointments{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.stzh-appointments__calendar-title-wrapper.sc-stzh-appointments,.stzh-appointments__appointments-title-wrapper.sc-stzh-appointments{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--stzh-space-xsmall)}@media screen and (min-width: 1024px){.stzh-appointments__calendar-title-wrapper.sc-stzh-appointments,.stzh-appointments__appointments-title-wrapper.sc-stzh-appointments{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:var(--stzh-space-medium);height:var(--stzh-space-xxlarge)}}.stzh-appointments__calendar-title.sc-stzh-appointments,.stzh-appointments__appointments-title.sc-stzh-appointments{display:-ms-flexbox;display:flex}.stzh-appointments__calendar-icon.sc-stzh-appointments,.stzh-appointments__appointments-icon.sc-stzh-appointments{margin-right:var(--stzh-space-xsmall);display:none}@media screen and (min-width: 1024px){.stzh-appointments__calendar-icon.sc-stzh-appointments,.stzh-appointments__appointments-icon.sc-stzh-appointments{display:-ms-inline-flexbox;display:inline-flex}}.stzh-appointments__calendar-content-medium.sc-stzh-appointments,.stzh-appointments__appointments-content.sc-stzh-appointments{background-color:var(--stzh-color-white);border:0.0625rem solid var(--stzh-color-grey13);border-radius:0.125rem}@media screen and (min-width: 1024px){.stzh-appointments__calendar-content.sc-stzh-appointments{display:none}}.stzh-appointments__calendar-content-medium.sc-stzh-appointments{display:none;padding:var(--stzh-space-medium)}@media screen and (min-width: 1024px){.stzh-appointments__calendar-content-medium.sc-stzh-appointments{display:block}}.stzh-appointments__appointments-content.sc-stzh-appointments{padding:var(--stzh-space-xlarge);-ms-flex-positive:1;flex-grow:1}.stzh-appointments__more-link.sc-stzh-appointments{margin-top:var(--stzh-space-medium)}.stzh-appointments--has-calendar.sc-stzh-appointments .stzh-appointments__appointments-wrapper.sc-stzh-appointments{margin-top:var(--stzh-space-large)}@media screen and (min-width: 1024px){.stzh-appointments--has-calendar.sc-stzh-appointments .stzh-appointments__appointments-wrapper.sc-stzh-appointments{margin-top:0}}";const r=class{constructor(i){t(this,i);this.stzhChange=s(this,"stzhChange",7);this.showMoreLink=false;this.moreItemsLeft=0;this.showCalendar=false;this.showSort=false;this.showSortStart=false;this.showSortPlace=false;this.showAppointmentsTitle=false;this.allAppointsmentOnSameDay=true;this.sortOptions=[];this.isDateDisabled=t=>{const s=!!this._appointments.find((s=>s.start.getFullYear()===t.getFullYear()&&s.start.getMonth()===t.getMonth()&&s.start.getDate()===t.getDate()));return!s};this.onNextActiveDateClick=async()=>{if(this.nextDate){this.currentDate=this.nextDate;const t=await this.datepickerElement.getPopover();if(t){t.hide()}}};this.onMoreClick=()=>{this.showItems=this.stepItems+this.showItems;const t=this.inputElement.querySelector("stzh-radio");t.setFocus()};this.onDropdownChange=async t=>{const s=t.target;const i=await s.getValue();if(i){this.sortBy=i}};this.onDatepickerChange=t=>{if(t.detail.component!=="stzh-datepicker"||!t.detail.valueAsDate){return}this.currentDate=t.detail.valueAsDate;this.showItems=this.stepItems};this.onRadioChange=t=>{this.value=t.detail.value;this.stzhChange.emit({component:"stzh-appointments",value:this.value})};this.localization=undefined;this.sortBy="start";this.appointments=[];this.currentDate=undefined;this.value="";this.name="appointment";this.showItems=5;this.stepItems=5;this.calendarTitle="";this.appointmentsTitle="";this.dateAdapter=undefined}currentDateWatcher(t){if(!t){this._currentDate=this.dateByValue||this.earliestDate;if(!this.dateByValue){this.setValueToFirstAppointmentOfCurrentDate()}}else if(typeof t==="string"){this._currentDate=a(t);this.setValueToFirstAppointmentOfCurrentDate()}else{this._currentDate=t;this.setValueToFirstAppointmentOfCurrentDate()}}sortByWatcher(){this.setValueToFirstAppointmentOfCurrentDate()}valueWatcher(){this.updateDateByValue();this.currentDateWatcher(this.currentDate)}appointmentsWatcher(t){if(typeof t==="string"){this._appointments=JSON.parse(t)}else{this._appointments=t}this._appointments.forEach((t=>{t.start=new Date(t.start);t.end=new Date(t.end)}));if(this._appointments.length>0){this._appointments.sort(((t,s)=>t["start"]>s["start"]?1:-1));this.earliestDate=this._appointments[0].start;this.latestDate=this._appointments[this._appointments.length-1].start;this.updateDateByValue()}if(this._appointments.length>1){const t=this._appointments[0].start;this.allAppointsmentOnSameDay=this._appointments.map((t=>t.start)).every((s=>`${s.getFullYear()}-${s.getMonth()}-${s.getDate()}`===`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`))}this.showCalendar=!this.allAppointsmentOnSameDay;this.showAppointmentsTitle=this._appointments.length>1;this.currentDateWatcher(this.currentDate)}updateDateByValue(){this.dateByValue=this.value&&this._appointments.find((t=>t.value===this.value)).start}getCurrentDateAppointments(){let t=0;const s=this._appointments.filter(((s,i)=>{const e=s.start.getFullYear()===this._currentDate.getFullYear()&&s.start.getMonth()===this._currentDate.getMonth()&&s.start.getDate()===this._currentDate.getDate();if(e){t=i}return e}));if(this._appointments[t+1]){this.nextDate=this._appointments[t+1].start}else{this.nextDate=null}s.sort(((t,s)=>t[this.sortBy]>s[this.sortBy]?1:-1));return s}setValueToFirstAppointmentOfCurrentDate(){const t=this.getCurrentDateAppointments().filter((t=>!t.disabled));if(t.length>0){this.value=t[0].value;this.stzhChange.emit({component:"stzh-appointments",value:this.value})}}async componentWillLoad(){this.appointmentsWatcher(this.appointments);if(!this.localization){this.localization=await window.stzhComponents.utils.fetchTranslations(this.element,"appointments")}if(!this.dateAdapter){this.dateAdapter=window.stzhComponents.utils.createFormatParseAdapter(this.localization.$formats,this.localization.$globals)}}componentWillRender(){const t=this.getCurrentDateAppointments();this.appointmentsShown=t.slice(0,this.showItems);this.showMoreLink=this.showItems<t.length;this.moreItemsLeft=t.length-this.showItems;this.showSortStart=t.map((t=>this.dateAdapter.format(t.start,"time"))).filter(((t,s,i)=>i.indexOf(t)==s)).length>1;this.showSortPlace=t.map((t=>t.place)).filter(((t,s,i)=>i.indexOf(t)==s)).length>1;this.sortOptions=[];if(this.showSortStart){this.sortOptions.push({text:this.localization.sortByTime,value:"start"})}if(this.showSortPlace){this.sortOptions.push({text:this.localization.sortByPlace,value:"place"})}this.showSort=this.appointmentsShown.length>1;this._sortBy=this.showSortStart&&!this.showSortPlace&&"start"||!this.showSortStart&&this.showSortPlace&&"place"||this.sortBy}componentDidRender(){if(this.datepickerElement){this.datepickerElement.setDate(this._currentDate)}if(this.datepickerElementMedium){this.datepickerElementMedium.setDate(this._currentDate)}}render(){const t={"stzh-appointments":true,"stzh-appointments--has-calendar":this.showCalendar,"stzh-appointments--has-appointments-title":this.showAppointmentsTitle,"stzh-appointments--has-sort":this.showSort};return i(e,null,i("div",{class:t},i("div",{class:"stzh-appointments__wrapper"},this.showCalendar&&i("div",{class:"stzh-appointments__calendar-wrapper"},i("div",{class:"stzh-appointments__calendar-title-wrapper"},i("div",{class:"stzh-appointments__calendar-title"},i("stzh-icon",{class:"stzh-appointments__calendar-icon",name:"calendar"}),i("stzh-text",{font:"heavy"},this.calendarTitle||this.localization.calendarTitle))),i("div",{class:"stzh-appointments__calendar-content"},i("stzh-datepicker",{ref:t=>this.datepickerElement=t,onStzhChange:this.onDatepickerChange,label:this.localization.datepickerLabel,calendarIsDateDisabled:this.isDateDisabled,calendarMin:h(this.earliestDate),calendarMax:h(this.latestDate)},i("stzh-link",{slot:"action",disabled:!this.nextDate,onClick:this.onNextActiveDateClick},i("stzh-text",{size:"milli"},this.localization.nextDayWithAppointments)))),i("div",{class:"stzh-appointments__calendar-content-medium"},i("stzh-datepicker",{ref:t=>this.datepickerElementMedium=t,onStzhChange:this.onDatepickerChange,inline:true,calendarIsDateDisabled:this.isDateDisabled,calendarMin:h(this.earliestDate),calendarMax:h(this.latestDate)},this.nextDate&&i("stzh-link",{slot:"action",onClick:this.onNextActiveDateClick},i("stzh-text",{size:"milli"},this.localization.nextDayWithAppointments))))),i("div",{class:"stzh-appointments__appointments-wrapper"},this.showAppointmentsTitle&&i("div",{class:"stzh-appointments__appointments-title-wrapper"},i("div",{class:"stzh-appointments__appointments-title"},i("stzh-icon",{class:"stzh-appointments__appointments-icon",name:"clock"}),i("stzh-text",{font:"heavy"},this.appointmentsTitle||this.localization.appointmentsTitle)),this.showSort&&i("div",{class:"stzh-appointments__sort"},i("stzh-dropdown",{inline:true,"no-search":true,class:"stzh-appointments__sort-dropdown",variant:"plain",size:"small",items:[this._sortBy],options:this.sortOptions,onStzhChange:this.onDropdownChange}))),i("div",{class:"stzh-appointments__appointments-content"},i("stzh-radiogroup",{ref:t=>this.inputElement=t,legend:this.localization.inputLegend,"hide-legend":true,name:this.name,value:this.value,preventUpdateProperties:["disabled"]},this.appointmentsShown.map((t=>i("stzh-radio",{onStzhChange:this.onRadioChange,value:t.value,disabled:typeof t.disabled!=="undefined"?t.disabled:false},i("stzh-text",{font:"heavy",size:"milli"},!this.showCalendar&&i("span",null,this.dateAdapter.format(t.start,"dateLong"),", "),this.dateAdapter.formatSpan(t.start,t.end,"time")),i("stzh-text",{size:"milli"},t.caption))))),this.showMoreLink&&i("stzh-link",{class:"stzh-appointments__more-link",onClick:this.onMoreClick},i("stzh-text",{size:"milli"},p(this.localization.moreTextItems,this.moreItemsLeft>this.stepItems?this.stepItems:this.moreItemsLeft))))))))}get element(){return n(this)}static get watchers(){return{currentDate:["currentDateWatcher"],sortBy:["sortByWatcher"],value:["valueWatcher"],appointments:["appointmentsWatcher"]}}};r.style=o;export{r as stzh_appointments};
2
- //# sourceMappingURL=p-7fdd98fe.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["tc","translation","count","parts","split","part","trim","length","replace","toString","stzhAppointmentsCss","StzhAppointments","this","showMoreLink","moreItemsLeft","showCalendar","showSort","showSortStart","showSortPlace","showAppointmentsTitle","allAppointsmentOnSameDay","sortOptions","isDateDisabled","date","dateHasAppointment","_appointments","find","appointment","start","getFullYear","getMonth","getDate","onNextActiveDateClick","async","nextDate","currentDate","popover","datepickerElement","getPopover","hide","onMoreClick","showItems","stepItems","radio","inputElement","querySelector","setFocus","onDropdownChange","event","target","sortBy","getValue","onDatepickerChange","detail","component","valueAsDate","onRadioChange","value","stzhChange","emit","currentDateWatcher","newValue","_currentDate","dateByValue","earliestDate","setValueToFirstAppointmentOfCurrentDate","parseISODate","sortByWatcher","valueWatcher","updateDateByValue","appointmentsWatcher","JSON","parse","forEach","Date","end","sort","a","b","latestDate","firstDate","map","every","getCurrentDateAppointments","indexOfLastCurrentDayDate","appointmentsCurrentDate","filter","index","dateIsInCurrentDay","appointments","disabled","componentWillLoad","localization","window","stzhComponents","utils","fetchTranslations","element","dateAdapter","createFormatParseAdapter","$formats","$globals","componentWillRender","appointmentsShown","slice","format","item","pos","self","indexOf","place","push","text","sortByTime","sortByPlace","_sortBy","componentDidRender","setDate","datepickerElementMedium","render","classes","h","Host","class","name","font","calendarTitle","ref","el","onStzhChange","label","datepickerLabel","calendarIsDateDisabled","calendarMin","printISODate","calendarMax","slot","onClick","size","nextDayWithAppointments","inline","appointmentsTitle","variant","items","options","legend","inputLegend","preventUpdateProperties","formatSpan","caption","moreTextItems"],"sources":["src/utils/translation-utils.ts","src/components/stzh-appointments/stzh-appointments.scss?tag=stzh-appointments&encapsulation=scoped","src/components/stzh-appointments/stzh-appointments.tsx"],"sourcesContent":["import {\n StzhDateFormat,\n StzhDateParse\n} from \"./date-adapter\";\n\nexport type StzhLocaleFormats = {\n datetime?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n datetimeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n date?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateLong?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n dateInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n time?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n timeInput?: {\n format: string | StzhDateFormat,\n parse: string | StzhDateParse\n },\n}\n\ntype MonthsNames = [string, string, string, string, string, string, string, string, string, string, string, string]\ntype DayNames = [string, string, string, string, string, string, string]\n\nexport type StzhLocaleGlobals = {\n dateRange: string,\n timeRange: string,\n externalLinkLabel: string\n downloadLinkLabel: string\n requiredFieldMarker: string\n requiredFieldText: string\n optionalFieldMarker: string\n optionalFieldText: string\n invalidFieldText: string\n clearButtonLabel: string\n moreInfoButtonLabel: string\n dayNames: DayNames\n monthNames: MonthsNames\n monthNamesShort: MonthsNames\n}\n\nexport type StzhLocaleComponent = {\n $locale: \"de\" | \"en\",\n $formats: StzhLocaleFormats,\n $globals: StzhLocaleGlobals\n}\n\nexport function tc(translation: string, count: number): string {\n if (!translation) {\n return \"\";\n }\n\n const parts = translation.split('|');\n let part = parts[0].trim();\n\n if (parts.length === 3 && count === 1) {\n part = parts[1].trim();\n } else if (parts.length === 3 && count > 1) {\n part = parts[2].trim();\n }\n\n if (parts.length === 2 && count !== 1) {\n part = parts[1].trim();\n }\n\n return part.replace(/\\{n\\}/ig, count.toString());\n}\n",".stzh-appointments {\n &__wrapper {\n display: flex;\n flex-direction: column;\n\n @include mq($from: medium) {\n flex-direction: row;\n }\n }\n\n &__calendar-wrapper {\n display: flex;\n flex-direction: column;\n\n @include mq($from: medium) {\n margin-right: space('large');\n }\n }\n\n &__appointments-wrapper {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n }\n\n &__calendar-title-wrapper,\n &__appointments-title-wrapper {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n margin-bottom: space('xsmall');\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n margin-bottom: space('medium');\n height: space('xxlarge');\n }\n }\n\n &__calendar-title,\n &__appointments-title {\n display: flex;\n }\n\n &__calendar-icon,\n &__appointments-icon {\n margin-right: space('xsmall');\n display: none;\n\n @include mq($from: medium) {\n display: inline-flex;\n }\n }\n\n &__calendar-content-medium,\n &__appointments-content {\n background-color: $colorWhite;\n border: 1px solid $colorGrey13;\n border-radius: 2px;\n }\n\n &__calendar-content {\n @include mq($from: medium) {\n display: none;\n }\n }\n\n &__calendar-content-medium {\n display: none;\n padding: space('medium');\n\n @include mq($from: medium) {\n display: block;\n }\n }\n\n &__appointments-content {\n padding: space('xlarge');\n flex-grow: 1;\n }\n\n &__more-link {\n margin-top: space('medium');\n }\n\n &--has-calendar &__appointments-wrapper {\n margin-top: space('large');\n\n @include mq($from: medium) {\n margin-top: 0;\n }\n }\n}\n","import {\n Component,\n Host,\n Element,\n Prop,\n h,\n Watch,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\nimport {\n StzhAppointmentsChangeEvent,\n StzhRadioChangeEvent,\n StzhDatepickerChangeEvent,\n StzhDropdownChangeEvent,\n} from \"../../index\";\n\nimport { tc } from \"../../utils/translation-utils\";\n\nimport { printISODate, parseISODate } from \"../../utils/date-utils\";\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport { StzhAppointmentsLocalizedText } from \"./stzh-appointments.localization\"\n\n/**\n * @slot - Slot for any content\n */\n@Component({\n tag: \"stzh-appointments\",\n styleUrl: \"stzh-appointments.scss\",\n scoped: true\n})\nexport class StzhAppointments {\n /** Translation strings */\n @Prop() localization: StzhAppointmentsLocalizedText;\n\n /** Sort by */\n @Prop({ mutable: true }) sortBy: \"start\" | \"place\" = \"start\";\n private _sortBy: \"start\" | \"place\";\n\n /** Initial selected values */\n @Prop() appointments: any[] | string = [];\n private _appointments: any[];\n private appointmentsShown: any[];\n\n /** Current selected date (if undefined, earliest appointment date in list is taken or current selected one by value) */\n @Prop({ mutable: true }) currentDate: Date | string;\n private _currentDate: Date;\n\n /* Selected appointment by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /* Name of radiogroup form element */\n @Prop({ reflect: true }) name: string = \"appointment\";\n\n /** Nr of items shown */\n @Prop({ mutable: true }) showItems: number = 5;\n\n /** Nr of items shown when more link is clicked */\n @Prop() stepItems: number = 5;\n\n /** Overwrite default calendar title */\n @Prop() calendarTitle = \"\";\n\n /** Overwrite default appointments title */\n @Prop() appointmentsTitle = \"\";\n\n /**\n * Date adapter, for custom parsing/formatting.\n * Must be object with a `parse` function which accepts a `string` and returns a `Date`,\n * and a `format` function which accepts a `Date` and returns a `string`.\n */\n @Prop() dateAdapter: StzhLocaleAdapter;\n\n @Element() element: HTMLStzhAppointmentsElement;\n\n /** Appointments change event */\n @Event() stzhChange: EventEmitter<StzhAppointmentsChangeEvent>;\n\n @Watch(\"currentDate\")\n currentDateWatcher(newValue: Date | string) {\n if (!newValue) {\n this._currentDate = this.dateByValue || this.earliestDate;\n\n if (!this.dateByValue) {\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n } else if (typeof newValue === \"string\") {\n this._currentDate = parseISODate(newValue);\n this.setValueToFirstAppointmentOfCurrentDate();\n } else {\n this._currentDate = newValue;\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n }\n\n @Watch(\"sortBy\")\n sortByWatcher() {\n this.setValueToFirstAppointmentOfCurrentDate();\n }\n\n @Watch(\"value\")\n valueWatcher() {\n this.updateDateByValue();\n // update current date if user has not choosen one\n this.currentDateWatcher(this.currentDate);\n }\n\n @Watch(\"appointments\")\n appointmentsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._appointments = JSON.parse(newValue);\n } else {\n this._appointments = newValue;\n }\n\n // convert start and end field to date\n this._appointments.forEach(appointment => {\n appointment.start = new Date(appointment.start);\n appointment.end = new Date(appointment.end);\n })\n\n if (this._appointments.length > 0) {\n // sort with start field and find earliest and latest date\n this._appointments.sort((a, b) => a['start'] > b['start'] ? 1 : -1);\n this.earliestDate = this._appointments[0].start;\n this.latestDate = this._appointments[this._appointments.length - 1].start;\n this.updateDateByValue();\n }\n\n // determine whether all appointments are from the same day\n if (this._appointments.length > 1) {\n const firstDate = this._appointments[0].start;\n this.allAppointsmentOnSameDay = this._appointments\n .map(appointment => appointment.start)\n .every(date => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`\n === `${firstDate.getFullYear()}-${firstDate.getMonth()}-${firstDate.getDate()}`);\n }\n\n // update flags\n this.showCalendar = !this.allAppointsmentOnSameDay;\n this.showAppointmentsTitle = this._appointments.length > 1;\n\n // update current date if user has not choosen one\n this.currentDateWatcher(this.currentDate);\n }\n\n private dateByValue: Date;\n private earliestDate: Date;\n private latestDate: Date;\n private nextDate: Date;\n\n private showMoreLink: boolean = false;\n private moreItemsLeft: number = 0;\n private showCalendar: boolean = false;\n private showSort: boolean = false;\n private showSortStart: boolean = false;\n private showSortPlace: boolean = false;\n private showAppointmentsTitle: boolean = false;\n private allAppointsmentOnSameDay: boolean = true;\n private sortOptions = [];\n\n private inputElement: HTMLStzhRadiogroupElement;\n private datepickerElement: HTMLStzhDatepickerElement;\n private datepickerElementMedium: HTMLStzhDatepickerElement;\n\n private updateDateByValue() {\n this.dateByValue = this.value\n && this._appointments\n .find(appointment => appointment.value === this.value)\n .start;\n }\n\n private getCurrentDateAppointments() {\n let indexOfLastCurrentDayDate = 0;\n\n // filter to current date appointments that can be shown\n const appointmentsCurrentDate = this._appointments\n .filter((appointment, index) => {\n const dateIsInCurrentDay = appointment.start.getFullYear() === this._currentDate.getFullYear()\n && appointment.start.getMonth() === this._currentDate.getMonth()\n && appointment.start.getDate() === this._currentDate.getDate();\n\n if (dateIsInCurrentDay) {\n indexOfLastCurrentDayDate = index;\n }\n\n return dateIsInCurrentDay;\n });\n\n // find next day with dates or set to null\n if (this._appointments[indexOfLastCurrentDayDate + 1]) {\n this.nextDate = this._appointments[indexOfLastCurrentDayDate + 1].start;\n } else {\n this.nextDate = null;\n }\n\n // sort\n appointmentsCurrentDate.sort((a, b) => a[this.sortBy] > b[this.sortBy] ? 1 : -1);\n return appointmentsCurrentDate;\n }\n\n private setValueToFirstAppointmentOfCurrentDate() {\n // choose the first available appointment from current date\n const appointments = this.getCurrentDateAppointments()\n .filter(appointment => !appointment.disabled)\n\n if (appointments.length > 0) {\n this.value = appointments[0].value;\n this.stzhChange.emit({\n component: \"stzh-appointments\",\n value: this.value\n });\n }\n }\n\n private isDateDisabled = (date: Date) => {\n const dateHasAppointment: boolean = !!this._appointments.find(appointment => {\n return appointment.start.getFullYear() === date.getFullYear()\n && appointment.start.getMonth() === date.getMonth()\n && appointment.start.getDate() === date.getDate();\n });\n\n return !dateHasAppointment;\n }\n\n private onNextActiveDateClick = async () => {\n if (this.nextDate) {\n this.currentDate = this.nextDate;\n\n const popover = await this.datepickerElement.getPopover();\n\n if (popover) {\n popover.hide();\n }\n }\n }\n\n private onMoreClick = () => {\n this.showItems = this.stepItems + this.showItems;\n\n // return focus to radiogroup\n const radio = this.inputElement.querySelector('stzh-radio');\n radio.setFocus();\n }\n\n private onDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n const target: HTMLStzhDropdownElement = event.target as HTMLStzhDropdownElement;\n\n const sortBy = await target.getValue() as \"start\" | \"place\" | \"\";\n\n if (sortBy) {\n this.sortBy = sortBy;\n }\n }\n\n private onDatepickerChange = (event: CustomEvent<StzhDatepickerChangeEvent>) => {\n if (event.detail.component !== 'stzh-datepicker' || !event.detail.valueAsDate) {\n return;\n }\n\n this.currentDate = event.detail.valueAsDate;\n // reset number of items that should be shown\n this.showItems = this.stepItems;\n }\n\n private onRadioChange = (event: CustomEvent<StzhRadioChangeEvent>) => {\n this.value = event.detail.value;\n this.stzhChange.emit({\n component: \"stzh-appointments\",\n value: this.value\n });\n }\n\n async componentWillLoad() {\n this.appointmentsWatcher(this.appointments);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"appointments\");\n }\n\n if (!this.dateAdapter) {\n this.dateAdapter = window.stzhComponents.utils.createFormatParseAdapter(\n this.localization.$formats,\n this.localization.$globals\n );\n }\n }\n\n componentWillRender() {\n const appointments = this.getCurrentDateAppointments();\n\n // slice to max that should be visible\n this.appointmentsShown = appointments.slice(0, this.showItems);\n\n // set flags\n this.showMoreLink = this.showItems < appointments.length;\n this.moreItemsLeft = appointments.length - this.showItems;\n\n // don't show time sort when only one time in the current day\n this.showSortStart = appointments\n .map(appointment => {\n return this.dateAdapter.format(appointment.start, \"time\");\n }).filter((item, pos, self) => {\n return self.indexOf(item) == pos;\n }).length > 1;\n\n // don't show place sort when only one place in the current day\n this.showSortPlace = appointments\n .map(appointment => {\n return appointment.place;\n }).filter((item, pos, self) => {\n return self.indexOf(item) == pos;\n }).length > 1;\n\n this.sortOptions = [];\n\n if (this.showSortStart) {\n this.sortOptions.push({\n text: this.localization.sortByTime,\n value: \"start\"\n });\n }\n\n if (this.showSortPlace) {\n this.sortOptions.push({\n text: this.localization.sortByPlace,\n value: \"place\"\n });\n }\n\n this.showSort = this.appointmentsShown.length > 1;\n\n // determine sort (force alternative sorting if it makes sense)\n this._sortBy =\n (this.showSortStart && !this.showSortPlace && \"start\")\n || (!this.showSortStart && this.showSortPlace && \"place\")\n || this.sortBy;\n }\n\n componentDidRender() {\n // set datepickers values to current date\n if (this.datepickerElement) {\n this.datepickerElement.setDate(this._currentDate);\n }\n\n if (this.datepickerElementMedium) {\n this.datepickerElementMedium.setDate(this._currentDate);\n }\n }\n\n render() {\n const classes = {\n \"stzh-appointments\": true,\n \"stzh-appointments--has-calendar\": this.showCalendar,\n \"stzh-appointments--has-appointments-title\": this.showAppointmentsTitle,\n \"stzh-appointments--has-sort\": this.showSort\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-appointments__wrapper\">\n {this.showCalendar &&\n <div class=\"stzh-appointments__calendar-wrapper\">\n <div class=\"stzh-appointments__calendar-title-wrapper\">\n <div class=\"stzh-appointments__calendar-title\">\n <stzh-icon class=\"stzh-appointments__calendar-icon\" name=\"calendar\"></stzh-icon>\n <stzh-text font=\"heavy\">{this.calendarTitle || this.localization.calendarTitle}</stzh-text>\n </div>\n </div>\n <div class=\"stzh-appointments__calendar-content\">\n <stzh-datepicker\n ref={(el) => (this.datepickerElement = el as HTMLStzhDatepickerElement)}\n onStzhChange={this.onDatepickerChange}\n label={this.localization.datepickerLabel}\n calendarIsDateDisabled={this.isDateDisabled}\n calendarMin={printISODate(this.earliestDate)}\n calendarMax={printISODate(this.latestDate)}\n >\n <stzh-link\n slot=\"action\"\n disabled={!this.nextDate}\n onClick={this.onNextActiveDateClick}\n >\n <stzh-text size=\"milli\">\n {this.localization.nextDayWithAppointments}\n </stzh-text>\n </stzh-link>\n </stzh-datepicker>\n </div>\n <div class=\"stzh-appointments__calendar-content-medium\">\n <stzh-datepicker\n ref={(el) => (this.datepickerElementMedium = el as HTMLStzhDatepickerElement)}\n onStzhChange={this.onDatepickerChange}\n inline\n calendarIsDateDisabled={this.isDateDisabled}\n calendarMin={printISODate(this.earliestDate)}\n calendarMax={printISODate(this.latestDate)}\n >\n {this.nextDate &&\n <stzh-link\n slot=\"action\"\n onClick={this.onNextActiveDateClick}\n >\n <stzh-text size=\"milli\">\n {this.localization.nextDayWithAppointments}\n </stzh-text>\n </stzh-link>\n }\n </stzh-datepicker>\n </div>\n </div>\n }\n <div class=\"stzh-appointments__appointments-wrapper\">\n {this.showAppointmentsTitle &&\n <div class=\"stzh-appointments__appointments-title-wrapper\">\n <div class=\"stzh-appointments__appointments-title\">\n <stzh-icon class=\"stzh-appointments__appointments-icon\" name=\"clock\"></stzh-icon>\n <stzh-text font=\"heavy\">{this.appointmentsTitle || this.localization.appointmentsTitle}</stzh-text>\n </div>\n {this.showSort &&\n <div class=\"stzh-appointments__sort\">\n <stzh-dropdown\n inline\n no-search\n class=\"stzh-appointments__sort-dropdown\"\n variant=\"plain\"\n size=\"small\"\n items={[this._sortBy]}\n options={this.sortOptions}\n onStzhChange={this.onDropdownChange}\n ></stzh-dropdown>\n </div>\n }\n </div>\n }\n\n <div class=\"stzh-appointments__appointments-content\">\n <stzh-radiogroup\n ref={(el) => this.inputElement = el as HTMLStzhRadiogroupElement}\n legend={this.localization.inputLegend}\n hide-legend\n name={this.name}\n value={this.value}\n preventUpdateProperties={[\"disabled\"]}\n >\n {this.appointmentsShown.map((appointment) =>\n <stzh-radio\n onStzhChange={this.onRadioChange}\n value={appointment.value}\n disabled={typeof appointment.disabled !== \"undefined\" ? appointment.disabled : false}\n >\n <stzh-text font=\"heavy\" size=\"milli\">\n {!this.showCalendar && <span>{this.dateAdapter.format(appointment.start, \"dateLong\")},&nbsp;</span>}\n {this.dateAdapter.formatSpan(appointment.start, appointment.end, \"time\")}\n </stzh-text>\n <stzh-text size=\"milli\">{appointment.caption}</stzh-text>\n </stzh-radio>\n )}\n </stzh-radiogroup>\n\n {this.showMoreLink &&\n <stzh-link\n class=\"stzh-appointments__more-link\"\n onClick={this.onMoreClick}\n >\n <stzh-text size=\"milli\">\n {tc(this.localization.moreTextItems,\n this.moreItemsLeft > this.stepItems\n ? this.stepItems\n : this.moreItemsLeft)}\n </stzh-text>\n </stzh-link>\n }\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"oHAkEgBA,EAAGC,EAAqBC,GACtC,IAAKD,EAAa,CAChB,MAAO,E,CAGT,MAAME,EAAQF,EAAYG,MAAM,KAChC,IAAIC,EAAOF,EAAM,GAAGG,OAEpB,GAAIH,EAAMI,SAAW,GAAKL,IAAU,EAAG,CACrCG,EAAOF,EAAM,GAAGG,M,MACX,GAAIH,EAAMI,SAAW,GAAKL,EAAQ,EAAG,CAC1CG,EAAOF,EAAM,GAAGG,M,CAGlB,GAAIH,EAAMI,SAAW,GAAKL,IAAU,EAAG,CACrCG,EAAOF,EAAM,GAAGG,M,CAGlB,OAAOD,EAAKG,QAAQ,UAAWN,EAAMO,WACvC,CCrFA,MAAMC,EAAsB,k5H,MCiCfC,EAAgB,M,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AA,iBACEmB,OAAM,sBAENjB,MAAM,mCACNmB,QAAQ,QACRJ,KAAK,QACLK,MAAO,CAACnI,KAAKuG,SACb6B,QAASpI,KAAKS,YACd4G,aAAcrH,KAAKmC,qBAO7B0E,EAAA,OAAKE,MAAM,2CACTF,EAAA,mBACEM,IAAMC,GAAOpH,KAAKgC,aAAeoF,EACjCiB,OAAQrI,KAAKgF,aAAasD,YAAW,mBAErCtB,KAAMhH,KAAKgH,KACXnE,MAAO7C,KAAK6C,MACZ0F,wBAAyB,CAAC,aAEzBvI,KAAK2F,kBAAkBtB,KAAKtD,GAC3B8F,EAAA,cACEQ,aAAcrH,KAAK4C,cACnBC,MAAO9B,EAAY8B,MACnBiC,gBAAiB/D,EAAY+D,WAAa,YAAc/D,EAAY+D,SAAW,OAE/E+B,EAAA,aAAWI,KAAK,QAAQa,KAAK,UACzB9H,KAAKG,cAAgB0G,EAAA,YAAO7G,KAAKsF,YAAYO,OAAO9E,EAAYC,MAAO,YAAW,MACnFhB,KAAKsF,YAAYkD,WAAWzH,EAAYC,MAAOD,EAAYgD,IAAK,SAEnE8C,EAAA,aAAWiB,KAAK,SAAS/G,EAAY0H,aAK1CzI,KAAKC,cACJ4G,EAAA,aACEE,MAAM,+BACNc,QAAS7H,KAAK4B,aAEdiF,EAAA,aAAWiB,KAAK,SACb1I,EAAGY,KAAKgF,aAAa0D,cACpB1I,KAAKE,cAAgBF,KAAK8B,UACtB9B,KAAK8B,UACL9B,KAAKE,qB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","window","slice","Array","matches","Element","msMatchesSelector","_focusableElementsString","join","InertRoot","rootElement","inertManager","this","_inertManager","_rootElement","_managedNodes","Set","hasAttribute","_savedAriaHidden","getAttribute","setAttribute","_makeSubtreeUnfocusable","_observer","MutationObserver","_onMutation","bind","observe","attributes","childList","subtree","value","destructor","disconnect","removeAttribute","forEach","inertNode","_unmanageNode","node","startNode","_this2","composedTreeWalk","_visitNode","activeElement","document","body","contains","root","undefined","nodeType","Node","DOCUMENT_FRAGMENT_NODE","parentNode","blur","focus","ELEMENT_NODE","element","_adoptInertRoot","call","_manageNode","register","add","deregister","_unmanageSubtree","_this3","inertSubroot","getInertRoot","setInert","managedNodes","savedInertNode","records","self","record","type","addedNodes","removedNodes","attributeName","managedNode","get","set","ariaHidden","InertNode","inertRoot","_node","_overrodeFocusMethod","_inertRoots","_savedTabIndex","_destroyed","ensureUntabbable","_throwIfDestroyed","destroyed","Error","tabIndex","hasSavedTabIndex","addInertRoot","removeInertRoot","size","InertManager","_document","Map","_watchForInert","addInertStyle","head","documentElement","readyState","addEventListener","_onDocumentLoaded","inert","has","parent","_inertRoot","inertElements","querySelectorAll","inertElement","_this","unshift","callback","shadowRootAncestor","shadowRoot","localName","content","distributedNodes","getDistributedNodes","slot","_distributedNodes","assignedNodes","flatten","_i","child","firstChild","nextSibling","querySelector","style","createElement","textContent","appendChild","HTMLElement","hasOwnProperty","packageName","packageNameScoped","substring","indexOf","applyAutofocus","event","autofocus","detail","namespace","tagName","toLowerCase","setFocus","observeScrollbarWidth","config","threshold","handleIntersect","entries","entry","scrollbarWidth","intersectionRatio","innerWidth","clientWidth","setProperty","bodyScrollObserver","IntersectionObserver","format","date","stzhComponents","translations","console","log","_a","$formats","$globals","adapter","createFormatParseAdapter","parse","string","formatSpan","date2","parseSpan","formats","globals","globalFormatter","Date","isNaN","getTime","j","getDate","toString","d","n","getMonth","m","yC","getFullYear","gC","getHours","hC","getMinutes","fC","monthNames","mC","monthNamesShort","l","dayNames","getDay","concat","replace","globalParser","input","regex","RegExp","match","groups","year","parseInt","Y","month","day","hours","G","H","minutes","globalAdapter","dateFormats","__assign","formattedDate","formattedDate2","range","dateRange","startsWith","timeRange","dates","split","getLocale","closestElement","closest","locale","lang","supportedLocales","defaultLocale","fetchTranslations","host","component","existingTranslations","JSON","sessionStorage","getItem","version","cacheTranslations","keys","$locale","$code","fetch","pathTranslations","result","sent","ok","json","data","setItem","stringify","error","exception_1","appGlobalScript","assign","labels","pathMedia","utils","translationsLoading","then","catch","reason","globalScripts","exports"],"sources":["node_modules/wicg-inert/dist/inert.esm.js","src/global/js/helpers/autofocus.js","src/global/js/helpers/scrollbar-width.js","src/global/js/helpers/utils.js","src/global/js/script.js","@stencil/core/internal/app-globals"],"sourcesContent":["var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n\n(function () {\n // Return early if we're not running inside of the browser.\n if (typeof window === 'undefined') {\n return;\n }\n\n // Convenience function for converting NodeLists.\n /** @type {typeof Array.prototype.slice} */\n var slice = Array.prototype.slice;\n\n /**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n\n /** @type {string} */\n var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', '[contenteditable]'].join(',');\n\n /**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n var InertRoot = function () {\n /**\n * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n _classCallCheck(this, InertRoot);\n\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n\n /** @type {!HTMLElement} */\n this._rootElement = rootElement;\n\n /**\n * @type {!Set<!InertNode>}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n this._managedNodes = new Set();\n\n // Make the subtree hidden from assistive technology\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n this._rootElement.setAttribute('aria-hidden', 'true');\n\n // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n this._makeSubtreeUnfocusable(this._rootElement);\n\n // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n this._observer = new MutationObserver(this._onMutation.bind(this));\n this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });\n }\n\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n _createClass(InertRoot, [{\n key: 'destructor',\n value: function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this);\n\n // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n this._observer = /** @type {?} */null;\n this._rootElement = /** @type {?} */null;\n this._managedNodes = /** @type {?} */null;\n this._inertManager = /** @type {?} */null;\n }\n\n /**\n * @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set.\n */\n\n }, {\n key: '_makeSubtreeUnfocusable',\n\n\n /**\n * @param {!Node} startNode\n */\n value: function _makeSubtreeUnfocusable(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._visitNode(node);\n });\n\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n var root = undefined;\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root = /** @type {!ShadowRoot} */node;\n break;\n }\n node = node.parentNode;\n }\n if (root) {\n activeElement = root.activeElement;\n }\n }\n if (startNode.contains(activeElement)) {\n activeElement.blur();\n // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n\n /**\n * @param {!Node} node\n */\n\n }, {\n key: '_visitNode',\n value: function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */node;\n\n // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_manageNode',\n value: function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n this._managedNodes.add(inertNode);\n }\n\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_unmanageNode',\n value: function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n if (inertNode) {\n this._managedNodes['delete'](inertNode);\n }\n }\n\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n\n }, {\n key: '_unmanageSubtree',\n value: function _unmanageSubtree(startNode) {\n var _this3 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this3._unmanageNode(node);\n });\n }\n\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!HTMLElement} node\n */\n\n }, {\n key: '_adoptInertRoot',\n value: function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node);\n\n // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_onMutation',\n value: function _onMutation(records, self) {\n records.forEach(function (record) {\n var target = /** @type {!HTMLElement} */record.target;\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this);\n\n // Un-manage removed nodes\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n var inertSubroot = this._inertManager.getInertRoot(target);\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n }\n }, {\n key: 'managedNodes',\n get: function get() {\n return new Set(this._managedNodes);\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'hasSavedAriaHidden',\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n\n /** @param {?string} ariaHidden */\n\n }, {\n key: 'savedAriaHidden',\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n }();\n\n /**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\n var InertNode = function () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n _classCallCheck(this, InertNode);\n\n /** @type {!Node} */\n this._node = node;\n\n /** @type {boolean} */\n this._overrodeFocusMethod = false;\n\n /**\n * @type {!Set<!InertRoot>} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n this._inertRoots = new Set([inertRoot]);\n\n /** @type {?number} */\n this._savedTabIndex = null;\n\n /** @type {boolean} */\n this._destroyed = false;\n\n // Save any prior tabindex info and make this node untabbable\n this.ensureUntabbable();\n }\n\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n _createClass(InertNode, [{\n key: 'destructor',\n value: function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */this._node;\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n }\n\n // Use `delete` to restore native focus method.\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n }\n\n // See note in InertRoot.destructor for why we cast these nulls to ANY.\n this._node = /** @type {?} */null;\n this._inertRoots = /** @type {?} */null;\n this._destroyed = true;\n }\n\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n\n }, {\n key: '_throwIfDestroyed',\n\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n value: function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'ensureUntabbable',\n\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n value: function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */this.node;\n if (matches.call(element, _focusableElementsString)) {\n if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n }\n element.setAttribute('tabindex', '-1');\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'addInertRoot',\n value: function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots.add(inertRoot);\n }\n\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'removeInertRoot',\n value: function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots['delete'](inertRoot);\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n }\n }, {\n key: 'destroyed',\n get: function get() {\n return (/** @type {!InertNode} */this._destroyed\n );\n }\n }, {\n key: 'hasSavedTabIndex',\n get: function get() {\n return this._savedTabIndex !== null;\n }\n\n /** @return {!Node} */\n\n }, {\n key: 'node',\n get: function get() {\n this._throwIfDestroyed();\n return this._node;\n }\n\n /** @param {?number} tabIndex */\n\n }, {\n key: 'savedTabIndex',\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n this._savedTabIndex = tabIndex;\n }\n\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n }();\n\n /**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\n var InertManager = function () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n _classCallCheck(this, InertManager);\n\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n\n /** @type {!Document} */\n this._document = document;\n\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertNode>}\n */\n this._managedNodes = new Map();\n\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map<!Node, !InertRoot>}\n */\n this._inertRoots = new Map();\n\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n this._observer = new MutationObserver(this._watchForInert.bind(this));\n\n // Add inert style.\n addInertStyle(document.head || document.body || document.documentElement);\n\n // Wait for document to be loaded.\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!HTMLElement} root\n * @param {boolean} inert\n */\n\n\n _createClass(InertManager, [{\n key: 'setInert',\n value: function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n this._inertRoots.set(root, inertRoot);\n // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n _inertRoot.destructor();\n this._inertRoots['delete'](root);\n root.removeAttribute('inert');\n }\n }\n\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n\n }, {\n key: 'getInertRoot',\n value: function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n\n }, {\n key: 'register',\n value: function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n\n }, {\n key: 'deregister',\n value: function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n if (inertNode.destroyed) {\n this._managedNodes['delete'](node);\n }\n\n return inertNode;\n }\n\n /**\n * Callback used when document has finished loading.\n */\n\n }, {\n key: '_onDocumentLoaded',\n value: function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this);\n\n // Comment this out to use programmatic API only.\n this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });\n }\n\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array<!MutationRecord>} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_watchForInert',\n value: function _watchForInert(records, self) {\n var _this = this;\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n var target = /** @type {!HTMLElement} */record.target;\n var inert = target.hasAttribute('inert');\n _this.setInert(target, inert);\n break;\n }\n }, this);\n }\n }]);\n\n return InertManager;\n }();\n\n /**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\n function composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */node;\n if (callback) {\n callback(element);\n }\n\n // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the <content> or <shadow> elements. Descend straight into the\n // ShadowRoot.\n var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n }\n\n // If it is a <content> element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'content') {\n var content = /** @type {!HTMLContentElement} */element;\n // Verifies if ShadowDom v0 is supported.\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n return;\n }\n\n // If it is a <slot> element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'slot') {\n var slot = /** @type {!HTMLSlotElement} */element;\n // Verify if ShadowDom v1 is supported.\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n return;\n }\n }\n\n // If it is neither the parent of a ShadowRoot, a <content> element, a <slot>\n // element, nor a <shadow> element recurse normally.\n var child = node.firstChild;\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n }\n\n /**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n function addInertStyle(node) {\n if (node.querySelector('style#inert-style, link#inert-style')) {\n return;\n }\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + ' user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n }\n\n if (!HTMLElement.prototype.hasOwnProperty('inert')) {\n /** @type {!InertManager} */\n var inertManager = new InertManager(document);\n\n Object.defineProperty(HTMLElement.prototype, 'inert', {\n enumerable: true,\n /** @this {!HTMLElement} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n /** @this {!HTMLElement} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n }\n})();\n","import { name as packageNameScoped } from '../../../../package.json';\n\nconst packageName = packageNameScoped.substring(packageNameScoped.indexOf('/')+1);\n\n/**\n * Execute setFocus method if it exists\n * on stzh-element with autofocus on pageload\n * when (child components are loaded)\n */\nexport function applyAutofocus() {\n window.addEventListener('appload', (event) => {\n const autofocus = document.querySelector('[autofocus]');\n\n if (autofocus\n && event.detail.namespace === packageName\n && autofocus.tagName.toLowerCase().indexOf('stzh-') === 0\n && 'setFocus' in autofocus\n ) {\n autofocus.setFocus();\n }\n });\n}\n","export function observeScrollbarWidth() {\n const config = {\n threshold: 1.0\n };\n\n const handleIntersect = (entries) => {\n entries.forEach(entry => {\n let scrollbarWidth = 0;\n\n if (entry.intersectionRatio < 1) {\n scrollbarWidth = window.innerWidth - document.body.clientWidth;\n }\n\n document.documentElement.style.setProperty('--stzh-scrollbar-width', scrollbarWidth + 'px');\n });\n };\n\n const bodyScrollObserver = new IntersectionObserver(handleIntersect, config);\n bodyScrollObserver.observe(document.body);\n}\n","\nexport function format(date, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.format(date, type);\n}\n\nexport function parse(string, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.parse(string, type);\n}\n\nexport function formatSpan(date, date2, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.formatSpan(date, date2, type);\n}\n\nexport function parseSpan(string, type = \"datetime\") {\n if (!window.stzhComponents.translations) {\n console.log(\"Translations not loaded yet, check for Promise `window.stzhComponents.translationsLoading`\");\n return;\n }\n\n const { $formats, $globals } = window.stzhComponents.translations;\n const adapter = createFormatParseAdapter($formats, $globals);\n return adapter.parseSpan(string, type);\n}\n\nexport function createFormatParseAdapter(formats, globals) {\n // format letters from https://www.php.net/manual/de/datetime.format.php\n const globalFormatter = function (format, date) {\n if (!date || !(date instanceof Date) || isNaN(date.getTime())) {\n return \"\";\n }\n\n let j = date.getDate().toString(10);\n let d = j;\n let n = (date.getMonth() + 1).toString(10);\n let m = n;\n let yC = date.getFullYear().toString(10);\n let gC = date.getHours().toString(10);\n let hC = gC;\n let i = date.getMinutes().toString(10);\n\n // full textual representation of a month\n let fC = globals.monthNames[date.getMonth()];\n // short textual representation of a month\n let mC = globals.monthNamesShort[date.getMonth()];\n // full textual representation of the day\n let l = globals.dayNames[date.getDay()];\n\n // months *are* zero-indexed, pad if less than 9!\n if (date.getMonth() < 9) {\n m = `0${m}`;\n }\n\n if (date.getDate() < 10) {\n d = `0${d}`;\n }\n\n if (date.getHours() < 10) {\n hC = `0${hC}`;\n }\n\n if (date.getMinutes() < 10) {\n i = `0${i}`;\n }\n\n return format\n .replace(/\\{j\\}/g, j)\n .replace(/\\{d\\}/g, d)\n .replace(/\\{l\\}/g, l)\n .replace(/\\{n\\}/g, n)\n .replace(/\\{m\\}/g, m)\n .replace(/\\{F\\}/g, fC)\n .replace(/\\{M\\}/g, mC)\n .replace(/\\{Y\\}/g, yC)\n .replace(/\\{H\\}/g, hC)\n .replace(/\\{G\\}/g, gC)\n .replace(/\\{i\\}/g, i);\n }\n\n const globalParser = function (parse, input) {\n if (!input) {\n return;\n }\n\n const regex = new RegExp(parse);\n const match = input.match(regex);\n\n if (match) {\n const { groups } = match;\n\n const year = parseInt(groups.Y || '', 10);\n const month = parseInt(groups.n || groups.m || '', 10);\n const day = parseInt(groups.j || groups.d || '', 10);\n const hours = parseInt(groups.G || groups.H || '', 10);\n const minutes = parseInt(groups.i || '', 10);\n\n if (!isNaN(year) && (year < 1000 || year > 9999)) {\n return;\n }\n\n if (!isNaN(month) && (month < 1 || month > 12)) {\n return;\n }\n\n // we check day later again (if month changed, it was out of range)\n if (!isNaN(day) && (day < 1 || day > 31)) {\n return;\n }\n\n if (!isNaN(hours) && (hours < 0 || hours > 23)) {\n return;\n }\n\n if (!isNaN(minutes) && (minutes < 0 || minutes > 59)) {\n return;\n }\n\n const date = new Date(\n !isNaN(year) ? year : null,\n !isNaN(month) ? month - 1 : null,\n !isNaN(day) ? day : null,\n !isNaN(hours) ? hours : null,\n !isNaN(minutes) ? minutes : null\n );\n\n // if day was out of possible range (1 - 28/29/30/31)\n // we find out by check if month has changed\n if (date.getMonth() + 1 !== month) {\n return;\n }\n\n return date;\n }\n }\n\n const globalAdapter = {\n format: function (date, type = \"datetime\") {\n const dateFormats = {\n ...formats[type],\n ...window.stzhComponents?.formats[type] || {}\n };\n\n if (typeof dateFormats.format === \"string\") {\n return globalFormatter(dateFormats.format, date);\n } else {\n return dateFormats.format(date);\n }\n },\n parse: function (input, type = \"datetime\") {\n const dateFormats = {\n ...formats[type],\n ...window.stzhComponents?.formats[type] || {}\n };\n\n if (typeof dateFormats.parse === \"string\") {\n return globalParser(dateFormats.parse, input);\n } else {\n return dateFormats.parse(input);\n }\n },\n formatSpan: function(date, date2, type = \"datetime\") {\n let formattedDate = date;\n let formattedDate2 = date2;\n\n if (date instanceof Date) {\n formattedDate = this.format(date, type);\n }\n\n if (date2 instanceof Date) {\n formattedDate2 = this.format(date2, type);\n }\n\n let range = globals.dateRange;\n\n if (type.startsWith('time')) {\n range = globals.timeRange;\n }\n\n return `${formattedDate}${range}${formattedDate2}`;\n },\n parseSpan: function(string, type) {\n let range = globals.dateRange;\n\n if (type.startsWith('time')) {\n range = globals.timeRange;\n }\n\n const dates = string.split(range);\n const date = this.parse(dates[0], type);\n const date2 = this.parse(dates[1], type);\n\n return [date, date2, range];\n }\n };\n\n return globalAdapter;\n}\n\nfunction getLocale(element) {\n const closestElement = element.closest(\"[lang]\");\n const locale = closestElement && closestElement.lang.split(\"-\")[0];\n\n if (window.stzhComponents.supportedLocales.indexOf(locale) === -1 || !locale) {\n return window.stzhComponents.defaultLocale;\n } else {\n return locale;\n }\n}\n\nexport async function fetchTranslations(host, component) {\n const locale = getLocale(host);\n const existingTranslations = JSON.parse(sessionStorage.getItem(`stzhComponents.v${window.stzhComponents.version}.i18n.${locale}`));\n\n if (\n window.stzhComponents.cacheTranslations\n && window.stzhComponents.version.match(/-dev-snapshot/i) === null\n && existingTranslations\n && Object.keys(existingTranslations).length > 0\n ) {\n return {\n ...existingTranslations[component] || {},\n $globals: existingTranslations.$globals,\n $locale: existingTranslations.$code,\n $formats: existingTranslations.$formats\n };\n }\n\n try {\n const result = await fetch(\n `${window.stzhComponents.pathTranslations}/${locale}.json`\n );\n\n if (result.ok) {\n const data = await result.json();\n sessionStorage.setItem(`stzhComponents.v${window.stzhComponents.version}.i18n.${locale}`, JSON.stringify(data));\n return {\n ...data[component] || {},\n $globals: data.$globals,\n $locale: data.$code,\n $formats: data.$formats\n };\n }\n\n } catch (exception) {\n console.error(`Error loading locale: ${locale}`, exception);\n }\n}\n","import \"wicg-inert\";\n\nimport { version } from '../../../package.json';\nimport { applyAutofocus } from './helpers/autofocus';\nimport { observeScrollbarWidth } from './helpers/scrollbar-width';\nimport * as utils from './helpers/utils';\n\nexport default function () {\n window.stzhComponents = {\n defaultLocale: 'de',\n labels: 'fixed',\n pathMedia: '/',\n pathTranslations: '/',\n cacheTranslations: true,\n formats: {},\n translations: null,\n ...window.stzhComponents || {},\n version,\n supportedLocales: ['de', 'en'],\n utils\n };\n\n if (window.stzhComponents.translations === null) {\n window.stzhComponents.translationsLoading = utils.fetchTranslations(document.documentElement).then((translations) => {\n window.stzhComponents.translations = translations;\n }).catch((reason) => {\n console.error(\"Translations couldn't load:\", reason)\n });\n }\n\n applyAutofocus();\n observeScrollbarWidth();\n}\n","import appGlobalScript from '/builds/OE-5041/desi/desi-code/stzh-components/src/global/js/script.js';\nexport const globalScripts = appGlobalScript;\n"],"mappings":"sxDAAA,IAAIA,EAAe,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,IAAIE,EAAaH,EAAMC,GAAIE,EAAWC,WAAaD,EAAWC,YAAc,MAAOD,EAAWE,aAAe,KAAM,GAAI,UAAWF,EAAYA,EAAWG,SAAW,KAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,E,CAAc,CAAG,OAAO,SAAUO,EAAaC,EAAYC,GAAe,GAAID,EAAYb,EAAiBY,EAAYG,UAAWF,GAAa,GAAIC,EAAad,EAAiBY,EAAaE,GAAc,OAAOF,CAAY,CAAG,CAA5hB,GAEnB,SAASI,EAAgBC,EAAUL,GAAe,KAAMK,aAAoBL,GAAc,CAAE,MAAM,IAAIM,UAAU,oC,CAAuC,EAOvJ,WAEE,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OAD/CkB,EAASrF,EAAAsF,O,IAIXD,EAAOE,GAAP,YACW,SAAMF,EAAOG,Q,OAApBC,EAAOzF,EAAAsF,OACbV,eAAec,QAAQ,mBAAAtD,OAAmB3M,OAAOmK,eAAekF,QAAO,UAAA1C,OAAS+B,GAAUQ,KAAKgB,UAAUF,IACzG,SAAAlC,kBAAA,GACKkC,EAAKhB,IAAc,IAAE,CACxBvE,SAAUuF,EAAKvF,SACf+E,QAASQ,EAAKP,MACdjF,SAAUwF,EAAKxF,Y,qCAKnBH,QAAQ8F,MAAM,yBAAAxD,OAAyB+B,GAAU0B,G,mKCnQtC,SAAAC,IACfrQ,OAAAmK,eAAA7K,OAAAgR,OAAAhR,OAAAgR,OAAA,CAAAzB,cAAA,KAAA0B,OAAA,QAAAC,UAAA,IAAAb,iBAAA,IAAAL,kBAAA,KAAArE,QAAA,GAAAb,aAAA,MAAApK,OAAAmK,gBAAA,KAAAkF,UAAAT,iBAAA,YAAA6B,UACE,GAAIzQ,OAAOmK,eAAeC,eAAA,MACxBpK,OAAOmK,eAAeuG,oBAAA5B,EAAApM,SAAA2D,iBAAAsK,MAAA,SAAAvG,GACpBpK,OAAOmK,eAAAC,cACb,IAAOwG,OAAM,SAACC,GACRxG,QAAQ8F,MAAK,8BAAAU,EACnB,G,CAEEjI,IACAQ,GACF,CCfY,IAAC0H,EAAaC,EAAA,IAAGV,E"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhProgressbarCss","StzhProgressbar","this","setCurrentSteps","media","matches","stepsUltra","currentSteps","stepsLarge","stepsMedium","stepsSmall","steps","element","style","setProperty","toString","dataWatcher","newValue","_data","JSON","parse","lastItemIndex","length","maxStepIndex","withinLastFewSteps","index","getItemAttributes","itemIndex","item","step","first","last","current","passed","dotted","hide","substract","componentWillLoad","data","localization","window","stzhComponents","utils","fetchTranslations","connectedCallback","addMediaChangeListener","disconnectedCallback","removeMediaChangeListener","render","classes","h","Host","class","role","label","map","Object","assign","icon","disabled"],"sources":["src/components/stzh-progressbar/stzh-progressbar.scss?tag=stzh-progressbar&encapsulation=scoped","src/components/stzh-progressbar/stzh-progressbar.tsx"],"sourcesContent":[":host {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSize} * 2);\n\n @include mq($from: small) {\n min-width: calc(var(--steps) * #{$progressbarItemDottedSizeSmallUp} * 2);\n }\n}\n\n.stzh-progressbar {\n position: relative;\n\toverflow: hidden;\n\n &__items {\n display: flex;\n flex-wrap: nowrap;\n }\n\n &__item {\n /* flex the bullets to always have the same size */\n\t\tflex-grow: 1;\n\t\tflex-shrink: 1;\n\t\tflex-basis: 0;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhProgressbarDataItem\n} from '../../index';\n\nimport { addMediaChangeListener, removeMediaChangeListener, media } from \"../../utils/media-utils\";\nimport { StzhProgressbarLocalizedText } from \"./stzh-progressbar.localization\"\n\n/**\n * @slot - Slot for any text content\n */\n@Component({\n tag: \"stzh-progressbar\",\n styleUrl: \"stzh-progressbar.scss\",\n scoped: true\n})\nexport class StzhProgressbar {\n /** Translation strings */\n @Prop() localization: StzhProgressbarLocalizedText;\n\n /**\n * Step data (JSON array with objects that have `label` attribute and optional:\n * - `disabled`, if step should be disabled\n * - `icon`, if icon instead of step number should be displayed):\n * - `analyticsId`, for Adobe Analytics, rendered as `s-object-id` (default is `label`)\n *\n * ```\n * {\n * \"label\": \"Step Label\"\n * \"icon\": \"clock\",\n * \"disabled\": true\n * }\n * ```\n */\n @Prop() data: StzhProgressbarDataItem[] | string = [];\n private _data: StzhProgressbarDataItem[];\n\n /** Index of the item that be active */\n @Prop() index: number = 0;\n\n /** Number of steps to show below small breakpoint */\n @Prop() steps: number = 5;\n\n /** Number of steps to show above small breakpoint */\n @Prop() stepsSmall: number = 6;\n\n /** Number of steps to show above medium breakpoint */\n @Prop() stepsMedium: number = 0;\n\n /** Number of steps to show above large breakpoint */\n @Prop() stepsLarge: number = 0;\n\n /** Number of steps to show above ultra breakpoint */\n @Prop() stepsUltra: number = 0;\n\n @State() currentSteps: number;\n\n @Element() element: HTMLStzhProgressbarElement;\n\n @Watch(\"data\")\n dataWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n }\n else {\n this._data = newValue;\n }\n\n this.lastItemIndex = this._data.length - 1;\n this.maxStepIndex = this.currentSteps - 1;\n this.withinLastFewSteps = this.index >= this._data.length - this.maxStepIndex;\n }\n\n private lastItemIndex: number;\n private maxStepIndex: number;\n private withinLastFewSteps: boolean;\n\n private getItemAttributes(itemIndex: number): any {\n const item = {} as HTMLStzhProgressbarItemElement;\n\n item.step = itemIndex + 1;\n item.first = itemIndex === 0;\n item.last = itemIndex === this.lastItemIndex;\n item.current = itemIndex === this.index;\n item.passed = itemIndex < this.index;\n\n // hide overflowings if more items than max steps in DOM\n if (this._data.length > this.currentSteps) {\n // add dots to last item if current index is below the last few items\n if (itemIndex === this.lastItemIndex && !this.withinLastFewSteps) {\n item.dotted = true;\n }\n\n if (this.index < 2) {\n // hide overflowing items on the right\n item.hide = itemIndex > this.maxStepIndex - 1 && itemIndex < this.lastItemIndex;\n } else {\n // add dots to first item if current item is third or above\n if (itemIndex === 0) {\n item.dotted = true;\n }\n\n let substract = this.index;\n\n // if is within the last elements, calculate how much previous\n // should be shown to stay on 5 visible elements\n if (this.withinLastFewSteps) {\n substract = this._data.length - this.maxStepIndex;\n }\n\n // hide overflowing items on left and right side\n item.hide = itemIndex > 0 && itemIndex < substract\n || itemIndex > this.index + (this.currentSteps - 3) && itemIndex < this.lastItemIndex;\n }\n }\n\n return item;\n }\n\n private setCurrentSteps = () => {\n if (media(\"ultra\").matches && this.stepsUltra) {\n this.currentSteps = this.stepsUltra;\n } else if (media(\"large\").matches && this.stepsLarge) {\n this.currentSteps = this.stepsLarge;\n } else if (media(\"medium\").matches && this.stepsMedium) {\n this.currentSteps = this.stepsMedium;\n } else if (media(\"small\").matches && this.stepsSmall) {\n this.currentSteps = this.stepsSmall;\n } else {\n this.currentSteps = this.steps;\n }\n\n this.element.style.setProperty(\"--steps\", this.currentSteps.toString());\n }\n\n async componentWillLoad() {\n this.dataWatcher(this.data);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"progressbar\");\n }\n }\n\n connectedCallback() {\n this.setCurrentSteps();\n addMediaChangeListener(this.setCurrentSteps);\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.setCurrentSteps);\n }\n\n render() {\n const classes = {\n \"stzh-progressbar\": true,\n [`stzh-progressbar--index-${this.index}`]: !!this.index\n };\n\n return (\n <Host>\n <div class={classes}>\n <div\n class=\"stzh-progressbar__items\"\n role=\"list\"\n aria-label={this.localization.label}\n >\n {this._data.map((step, index) =>\n <stzh-progressbar-item\n {...this.getItemAttributes(index)}\n icon={step.icon}\n disabled={step.disabled}\n label={step.label}\n class=\"stzh-progressbar__item\"\n ></stzh-progressbar-item>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAqB,o8C,MCyBdC,EAAe,M,yBAuGlBC,KAAAC,gBAAkB,KACxB,GAAIC,EAAM,SAASC,SAAWH,KAAKI,WAAY,CAC7CJ,KAAKK,aAAeL,KAAKI,U,MACpB,GAAIF,EAAM,SAASC,SAAWH,KAAKM,WAAY,CACpDN,KAAKK,aAAeL,KAAKM,U,MACpB,GAAIJ,EAAM,UAAUC,SAAWH,KAAKO,YAAa,CACtDP,KAAKK,aAAeL,KAAKO,W,MACpB,GAAIL,EAAM,SAASC,SAAWH,KAAKQ,WAAY,CACpDR,KAAKK,aAAeL,KAAKQ,U,KACpB,CACLR,KAAKK,aAAeL,KAAKS,K,CAG3BT,KAAKU,QAAQC,MAAMC,YAAY,UAAWZ,KAAKK,aAAaQ,WAAW,E,sCAlGtB,G,WAI3B,E,WAGA,E,gBAGK,E,iBAGC,E,gBAGD,E,gBAGA,E,4BAO7B,WAAAC,CAAYC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oBAAA2C,GACEC,EAA0B7C,KAAKC,gB,CAGjC,MAAA6C,GACE,MAAMC,EAAU,CACd,mBAAoB,KACpB,CAAC,2BAA2B/C,KAAKuB,WAAYvB,KAAKuB,OAGpD,OACEyB,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOH,GACVC,EAAA,OACEE,MAAM,0BACNC,KAAK,OAAM,aACCnD,KAAKqC,aAAae,OAE7BpD,KAAKgB,MAAMqC,KAAI,CAAC1B,EAAMJ,IACrByB,EAAA,wBAAAM,OAAAC,OAAA,GACMvD,KAAKwB,kBAAkBD,GAAM,CACjCiC,KAAM7B,EAAK6B,KACXC,SAAU9B,EAAK8B,SACfL,MAAOzB,EAAKyB,MACZF,MAAM,gC"}
@@ -1,2 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,i,e,s){function a(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function l(t){try{h(s.next(t))}catch(t){n(t)}}function r(t){try{h(s["throw"](t))}catch(t){n(t)}}function h(t){t.done?e(t.value):a(t.value).then(l,r)}h((s=s.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},s,a,n,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(t){return function(i){return h([t,i])}}function h(r){if(s)throw new TypeError("Generator is already executing.");while(l&&(l=0,r[0]&&(e=0)),e)try{if(s=1,a&&(n=r[0]&2?a["return"]:r[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,r[1])).done)return n;if(a=0,n)r=[r[0]&2,n.value];switch(r[0]){case 0:case 1:n=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!n||r[1]>n[0]&&r[1]<n[3])){e.label=r[1];break}if(r[0]===6&&e.label<n[1]){e.label=n[1];n=r;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(r);break}if(n[2])e.ops.pop();e.trys.pop();continue}r=i.call(t,e)}catch(t){r=[6,t];a=0}finally{s=n=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-290fcb28.system.js","./p-bd1030c9.system.js"],(function(t){"use strict";var i,e,s,a,n,l,r,h,o;return{setters:[function(t){i=t.r;e=t.c;s=t.h;a=t.a;n=t.g;l=t.F},function(t){r=t.m;h=t.a;o=t.r}],execute:function(){var d=".sc-stzh-datalist-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-datalist-h{display:none}.sc-stzh-datalist-h *.sc-stzh-datalist,.sc-stzh-datalist-h *.sc-stzh-datalist::before,.sc-stzh-datalist-h *.sc-stzh-datalist::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-datalist-h .has-focus.sc-stzh-datalist{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-datalist-h .stzh-fylingfocus-focused.sc-stzh-datalist{outline-style:none !important}.sc-stzh-datalist-h .stzh-fylingfocus-focused.sc-stzh-datalist::-moz-focus-inner{border:0 !important}.sc-stzh-datalist-h{--item-label-min-width:7.5rem}@media screen and (min-width: 800px){.sc-stzh-datalist-h{--item-label-min-width:9rem}}[disable-label-min-width].sc-stzh-datalist-h:not([disable-label-min-width=false]){--item-label-min-width:none}.sc-stzh-datalist-h .sc-stzh-datalist-s>stzh-details,.stzh-datalist.sc-stzh-datalist stzh-details.sc-stzh-datalist{--content-grid-column:1 / 6;--content-padding:var(--stzh-space-large) 0 var(--stzh-space-xlarge);--content-border-bottom:0.0625rem solid var(--stzh-base-border-color)}@media screen and (min-width: 1024px){.sc-stzh-datalist-h .sc-stzh-datalist-s>stzh-details,.stzh-datalist.sc-stzh-datalist stzh-details.sc-stzh-datalist{--content-padding:var(--stzh-space-large) 0 var(--stzh-space-xxlarge)}}@media screen and (min-width: 1260px){.sc-stzh-datalist-h .sc-stzh-datalist-s>stzh-details,.stzh-datalist.sc-stzh-datalist stzh-details.sc-stzh-datalist{--content-padding:var(--stzh-space-large) 0 var(--stzh-space-xxxlarge)}}.stzh-datalist__list.sc-stzh-datalist{width:100%}.stzh-datalist--has-hidden-border.sc-stzh-datalist .stzh-datalist__list.sc-stzh-datalist{margin-top:calc(var(--stzh-space-xsmall) / -2);margin-bottom:calc(var(--stzh-space-xsmall) / -2)}.stzh-datalist--direction-horizontal.sc-stzh-datalist .stzh-datalist__list.sc-stzh-datalist{width:100%;display:grid;border-collapse:collapse;grid-template-columns:auto auto minmax(auto, 1fr) auto auto;-ms-flex-align:stretch;align-items:stretch}";var c=t("stzh_datalist",function(){function t(t){var s=this;i(this,t);this.stzhDirectionChange=e(this,"stzhDirectionChange",7);this.stzhHideBorderChange=e(this,"stzhHideBorderChange",7);this._items=[];this.resizeHandler=function(){if(r("ultra").matches&&s.directionUltra!=="inherit"){s.currentDirection=s.directionUltra}else if(r("large").matches&&s.directionLarge!=="inherit"){s.currentDirection=s.directionLarge}else if(r("medium").matches&&s.directionMedium!=="inherit"){s.currentDirection=s.directionMedium}else if(r("small").matches&&s.directionSmall!=="inherit"){s.currentDirection=s.directionSmall}else{s.currentDirection=s.direction}};this.direction="vertical";this.directionSmall="horizontal";this.directionMedium="inherit";this.directionLarge="inherit";this.directionUltra="inherit";this.hideBorder=false;this.disableLabelMinWidth=false;this.currentDirection=undefined;this.items=[]}t.prototype.hideBorderWatcher=function(t){this.stzhHideBorderChange.emit({component:"stzh-datalist",value:t})};t.prototype.directionWatcher=function(){this.resizeHandler()};t.prototype.currentDirectionWatcher=function(t){this.stzhDirectionChange.emit({component:"stzh-datalist",value:t})};t.prototype.itemsWatcher=function(t){if(typeof t==="string"){this._items=JSON.parse(t)}else{this._items=t}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.itemsWatcher(this.items);this.hideBorderWatcher(this.hideBorder);this.resizeHandler();return[2]}))}))};t.prototype.connectedCallback=function(){h(this.resizeHandler)};t.prototype.disconnectedCallback=function(){o(this.resizeHandler)};t.prototype.render=function(){var t;var i=(t={"stzh-datalist":true,"stzh-datalist--has-hidden-border":this.hideBorder},t["stzh-datalist--direction-".concat(this.currentDirection)]=!!this.currentDirection,t);return s(a,null,s("div",{class:i},s("div",{class:"stzh-datalist__list",role:"list"},this._items.map((function(t){return s("stzh-datalist-item",Object.assign({},t),t.items&&t.items.length>0&&s("stzh-datalist",{items:t.items}))})),s("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{hideBorder:["hideBorderWatcher"],direction:["directionWatcher"],directionSmall:["directionWatcher"],directionMedium:["directionWatcher"],directionLarge:["directionWatcher"],directionUltra:["directionWatcher"],currentDirection:["currentDirectionWatcher"],items:["itemsWatcher"]}},enumerable:false,configurable:true});return t}());c.style=d;var m='.sc-stzh-datalist-item-h{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular);color:var(--stzh-base-color);-webkit-box-sizing:border-box;box-sizing:border-box;display:block}[hidden].sc-stzh-datalist-item-h{display:none}.sc-stzh-datalist-item-h *.sc-stzh-datalist-item,.sc-stzh-datalist-item-h *.sc-stzh-datalist-item::before,.sc-stzh-datalist-item-h *.sc-stzh-datalist-item::after{-webkit-box-sizing:border-box;box-sizing:border-box;text-underline-offset:var(--stzh-link-text-underline-offset);text-decoration-thickness:var(--stzh-link-text-decoration-thickness)}.sc-stzh-datalist-item-h .has-focus.sc-stzh-datalist-item{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-datalist-item-h .stzh-fylingfocus-focused.sc-stzh-datalist-item{outline-style:none !important}.sc-stzh-datalist-item-h .stzh-fylingfocus-focused.sc-stzh-datalist-item::-moz-focus-inner{border:0 !important}.sc-stzh-datalist-item-h{--font-family:var(--stzh-font-family-regular);--font-weight:var(--stzh-font-weight-regular);--color:inherit;--action-display:flex;--label-min-width:var(--item-label-min-width, none);--leading-icon-background-color:var(--stzh-color-grey5);--leading-icon-color:var(--stzh-color-grey70);--hover-leading-icon-background-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark));--hover-leading-icon-color:var(--stzh-color-white);--horizontal-min-height:3rem;display:contents}[href].sc-stzh-datalist-item-h:not([href=""]),[a11y-expanded].sc-stzh-datalist-item-h,[a11y-controls].sc-stzh-datalist-item-h{--color:var(--stzh-color-primary, var(--stzh-color-zueriblue));--hover-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.sc-stzh-datalist-item-h .sc-stzh-datalist-item-s>stzh-datalist{margin-left:var(--stzh-space-large)}.stzh-datalist-item.sc-stzh-datalist-item{position:relative;-webkit-text-decoration-line:none;text-decoration-line:none}.stzh-datalist-item__vhidden.sc-stzh-datalist-item{border:0;clip:rect(0 0 0 0);-webkit-clip-path:inset(100%);clip-path:inset(100%);width:0.0625rem;height:0.0625rem;overflow:hidden;padding:0;position:absolute}.stzh-datalist-item__wrapper.sc-stzh-datalist-item{-ms-flex-positive:1;flex-grow:1;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}.stzh-datalist-item__leading.sc-stzh-datalist-item,.stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item__meta.sc-stzh-datalist-item,.stzh-datalist-item__action-list.sc-stzh-datalist-item{color:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;background:transparent;border:none;padding:0;-webkit-text-decoration-line:none;text-decoration-line:none}.stzh-datalist-item__leading.is-button.sc-stzh-datalist-item,.stzh-datalist-item__leading.is-link.sc-stzh-datalist-item,.stzh-datalist-item__value.is-button.sc-stzh-datalist-item,.stzh-datalist-item__value.is-link.sc-stzh-datalist-item,.stzh-datalist-item__label.is-button.sc-stzh-datalist-item,.stzh-datalist-item__label.is-link.sc-stzh-datalist-item,.stzh-datalist-item__meta.is-button.sc-stzh-datalist-item,.stzh-datalist-item__meta.is-link.sc-stzh-datalist-item,.stzh-datalist-item__action-list.is-button.sc-stzh-datalist-item,.stzh-datalist-item__action-list.is-link.sc-stzh-datalist-item{cursor:pointer}.stzh-datalist-item__leading.sc-stzh-datalist-item{-ms-flex-negative:0;flex-shrink:0}.stzh-datalist-item__leading.sc-stzh-datalist-item:not(:empty){padding-right:var(--stzh-space-xsmall)}.stzh-datalist-item__leading-icon-container.sc-stzh-datalist-item{color:var(--leading-icon-color);background-color:var(--leading-icon-background-color);width:2.5rem;height:2.5rem;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:50%;-webkit-transition-property:color, background-color;transition-property:color, background-color;-webkit-transition-duration:var(--stzh-base-transition-animation-speed);transition-duration:var(--stzh-base-transition-animation-speed)}.stzh-datalist-item__value.sc-stzh-datalist-item{font-size:var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));line-height:var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));letter-spacing:var(--stzh-font-curve-p1-default-text-letter-spacing);font-family:var(--font-family);font-weight:var(--font-weight);-ms-flex-positive:1;flex-grow:1}@media screen and (min-width: 1024px){.stzh-datalist-item__value.sc-stzh-datalist-item{font-size:var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));line-height:var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));letter-spacing:var(--stzh-font-curve-p1-medium-text-letter-spacing)}}.stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item__icon.sc-stzh-datalist-item{color:var(--color)}.stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item__meta.sc-stzh-datalist-item{font-size:var(--stzh-font-curve-caption-default-font-size, var(--stzh-font-nano-font-size));line-height:var(--stzh-font-curve-caption-default-text-line-height, var(--stzh-font-nano-text-line-height))}@media screen and (min-width: 1024px){.stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item__meta.sc-stzh-datalist-item{font-size:var(--stzh-font-curve-caption-medium-font-size, var(--stzh-font-micro-font-size));line-height:var(--stzh-font-curve-caption-medium-text-line-height, var(--stzh-font-micro-text-line-height))}}.stzh-datalist-item__meta.sc-stzh-datalist-item{-ms-flex-pack:end;justify-content:flex-end}.stzh-datalist-item__label.sc-stzh-datalist-item{font-family:var(--stzh-font-family-medium);font-weight:var(--stzh-font-weight-medium);font-style:var(--stzh-font-style-medium);color:var(--stzh-base-lead-color)}.stzh-datalist-item__action-list.sc-stzh-datalist-item{display:var(--action-display);-ms-flex-pack:center;justify-content:center;text-align:center}.stzh-datalist-item__action-list.sc-stzh-datalist-item:not(:empty){padding-left:var(--stzh-space-xsmall)}.stzh-datalist-item__action.is-non-interactive.sc-stzh-datalist-item{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:var(--stzh-form-input-tiny-height);height:var(--stzh-form-input-tiny-height)}.stzh-datalist-item__action.is-button[variant=tertiary].sc-stzh-datalist-item{--color:inherit}.stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item__icon.sc-stzh-datalist-item{-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed)}.stzh-datalist-item__richtext.sc-stzh-datalist-item{color:inherit;font-family:inherit;font-weight:inherit}.stzh-datalist-item__interactive.sc-stzh-datalist-item{position:absolute;top:0;left:0}.stzh-datalist-item--is-button.sc-stzh-datalist-item .stzh-datalist-item__icon.is-open.sc-stzh-datalist-item{display:none}.stzh-datalist-item--is-button.stzh-datalist-item--is-expanded.sc-stzh-datalist-item .stzh-datalist-item__icon.is-closed.sc-stzh-datalist-item{display:none}.stzh-datalist-item--is-button.stzh-datalist-item--is-expanded.sc-stzh-datalist-item .stzh-datalist-item__icon.is-open.sc-stzh-datalist-item{display:-ms-inline-flexbox;display:inline-flex}.stzh-datalist-item--is-interactive.sc-stzh-datalist-item:hover .stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item--is-interactive.sc-stzh-datalist-item:hover .stzh-datalist-item__icon.sc-stzh-datalist-item{color:var(--hover-color)}.stzh-datalist-item--is-interactive.sc-stzh-datalist-item:hover .stzh-datalist-item__value.sc-stzh-datalist-item{-webkit-text-decoration-line:underline;text-decoration-line:underline}.stzh-datalist-item--is-interactive.sc-stzh-datalist-item:hover .stzh-datalist-item__leading-icon-container.sc-stzh-datalist-item,.stzh-datalist-item--is-interactive.sc-stzh-datalist-item:focus-within .stzh-datalist-item__leading-icon-container.sc-stzh-datalist-item{color:var(--hover-leading-icon-color);background-color:var(--hover-leading-icon-background-color)}.stzh-datalist-item--direction-vertical.sc-stzh-datalist-item{display:-ms-flexbox;display:flex;padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall)}.stzh-datalist-item--direction-vertical.stzh-datalist-item--has-hidden-border.sc-stzh-datalist-item{padding-top:calc(var(--stzh-space-xsmall) / 2);padding-bottom:calc(var(--stzh-space-xsmall) / 2)}.stzh-datalist-item--direction-vertical.sc-stzh-datalist-item:not(.stzh-datalist-item--has-hidden-border){border-bottom:0.0625rem solid var(--stzh-base-border-color)}.stzh-datalist-item--direction-vertical.sc-stzh-datalist-item .stzh-datalist-item__leading-icon-container.sc-stzh-datalist-item{width:2.5rem;height:2.5rem}.stzh-datalist-item--direction-vertical.sc-stzh-datalist-item .stzh-datalist-item__leading-icon.sc-stzh-datalist-item{--size:var(--stzh-icon-size-medium)}.stzh-datalist-item--direction-vertical.sc-stzh-datalist-item .stzh-datalist-item__meta.sc-stzh-datalist-item{-ms-flex-direction:column;flex-direction:column}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item+.stzh-datalist-item__nested.sc-stzh-datalist-item{display:contents}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item+.stzh-datalist-item__nested.sc-stzh-datalist-item .stzh-datalist-item__nested-inner.sc-stzh-datalist-item{grid-column:1/6}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__leading.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__meta.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__action-list.sc-stzh-datalist-item{min-height:var(--horizontal-min-height)}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__meta.sc-stzh-datalist-item{padding-top:var(--stzh-space-xsmall);padding-bottom:var(--stzh-space-xsmall)}.stzh-datalist-item--direction-horizontal.stzh-datalist-item--has-hidden-border.sc-stzh-datalist-item .stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.stzh-datalist-item--has-hidden-border.sc-stzh-datalist-item .stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.stzh-datalist-item--has-hidden-border.sc-stzh-datalist-item .stzh-datalist-item__meta.sc-stzh-datalist-item{padding-top:calc(var(--stzh-space-xsmall) / 2);padding-bottom:calc(var(--stzh-space-xsmall) / 2)}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item:not(.stzh-datalist-item--has-hidden-border) .stzh-datalist-item__label.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item:not(.stzh-datalist-item--has-hidden-border) .stzh-datalist-item__value.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item:not(.stzh-datalist-item--has-hidden-border) .stzh-datalist-item__meta.sc-stzh-datalist-item,.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item:not(.stzh-datalist-item--has-hidden-border) .stzh-datalist-item__action-list.sc-stzh-datalist-item{border-bottom:0.0625rem solid var(--stzh-base-border-color)}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__label.sc-stzh-datalist-item:not(:empty){min-width:var(--label-min-width);padding-right:var(--stzh-space-xsmall)}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__meta.sc-stzh-datalist-item:not(:empty){padding-left:var(--stzh-space-xsmall)}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__leading-icon-container.sc-stzh-datalist-item{width:2rem;height:2rem}.stzh-datalist-item--direction-horizontal.sc-stzh-datalist-item .stzh-datalist-item__meta-status.sc-stzh-datalist-item+.stzh-datalist-item__meta-text.sc-stzh-datalist-item{margin-left:var(--stzh-space-xsmall)}';var z=0;var u=t("stzh_datalist_item",function(){function t(t){var s=this;i(this,t);this.stzhItemActionClick=e(this,"stzhItemActionClick",7);this.actionClick=function(t){s.stzhItemActionClick.emit({component:"stzh-datalist-item",originalEvent:t})};this.handleDirectionChange=function(t){s.direction=t.detail.value};this.handleHideBorderChange=function(t){s.hideBorder=t.detail.value};this.localization=undefined;this.direction="vertical";this.href=undefined;this.rel=undefined;this.target=undefined;this.download=undefined;this.leadingIcon=undefined;this.icon=undefined;this.iconLabel=undefined;this.iconTooltip=undefined;this.label="";this.value="";this.meta="";this.statusLabel="";this.statusType="default";this.hideBorder=false;this.a11yExpanded=undefined;this.a11yControls=undefined;this.external=false}t.prototype.externalWatcher=function(){this.external=this.rel&&this.rel.includes("external")};t.prototype.renderInner=function(t){var i=t?"button":this.href?"a":"div";return s(l,null,s(i,{"aria-hidden":this.label?null:"true",tabindex:"-1",id:"".concat(this.datalistItemId,"-label"),class:{"stzh-datalist-item__label":true,"is-button":t,"is-link":!!this.href},href:this.href,rel:this.rel,target:this.target,download:this.download},this.label),s(i,{id:"".concat(this.datalistItemId,"-value"),class:{"stzh-datalist-item__value":true,"is-button":t,"is-link":!!this.href},href:this.href,rel:this.rel,target:this.target,download:this.download,"aria-labelledby":i!=="div"?"".concat(this.datalistItemId,"-label ").concat(this.datalistItemId,"-value ").concat(this.datalistItemId,"-meta"):null,"aria-controls":this.a11yControls||null,"aria-expanded":typeof this.a11yExpanded!=="undefined"?this.a11yExpanded?"true":"false":null},this.external&&s("div",{class:"stzh-datalist-item__vhidden"},this.localization.$globals.externalLinkLabel),this.download&&s("div",{class:"stzh-datalist-item__vhidden"},this.localization.$globals.downloadLinkLabel),s("stzh-richtext",{class:"stzh-datalist-item__richtext",innerHTML:this.value},s("slot",{name:"value"}))),s(i,{"aria-hidden":this.statusLabel||this.meta?null:"true",tabindex:"-1",id:"".concat(this.datalistItemId,"-meta"),class:{"stzh-datalist-item__meta":true,"is-button":t,"is-link":!!this.href},href:this.href,rel:this.rel,target:this.target,download:this.download},this.statusLabel&&s("stzh-status",{class:"stzh-datalist-item__meta-status",label:this.statusLabel,type:this.statusType}),this.meta&&s("span",{class:"stzh-datalist-item__meta-text"},this.meta)))};t.prototype.renderLeadingIcon=function(t){var i=t?"button":this.href?"a":"div";return s(i,{role:"presentation","aria-hidden":"true",tabindex:"-1",class:{"stzh-datalist-item__leading":true,"is-button":t,"is-link":!!this.href},href:this.href,rel:this.rel,target:this.target,download:this.download},this.leadingIcon&&s("div",{class:"stzh-datalist-item__leading-icon-container"},s("stzh-icon",{class:"stzh-datalist-item__leading-icon",name:this.leadingIcon})))};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.datalist=this.element.closest("stzh-datalist");if(this.datalist){this.direction=this.datalist.currentDirection;this.hideBorder=this.datalist.hideBorder;this.datalist.addEventListener("stzhDirectionChange",this.handleDirectionChange);this.datalist.addEventListener("stzhHideBorderChange",this.handleHideBorderChange)}return[2]}))}))};t.prototype.disconnectedCallback=function(){if(this.datalist){this.datalist.removeEventListener("stzhDirectionChange",this.handleDirectionChange);this.datalist.removeEventListener("stzhHideBorderChange",this.handleHideBorderChange);this.datalist=null}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.datalistItemId="stzh-datalist-item-".concat(z++);this.externalWatcher();if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"datalist-item")];case 1:t.localization=i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.render=function(){var t;var i=this;var e=typeof this.a11yExpanded!=="undefined"||typeof this.a11yControls!=="undefined";var n=!this.href&&this.icon;var r=(t={"stzh-datalist-item":true,"stzh-datalist-item--is-interactive":!!this.href||e,"stzh-datalist-item--is-link":!!this.href,"stzh-datalist-item--is-button":e,"stzh-datalist-item--is-expanded":this.a11yExpanded,"stzh-datalist-item--has-hidden-border":this.hideBorder},t["stzh-datalist-item--direction-".concat(this.direction)]=!!this.direction,t);var h=e?"button":this.href?"a":"div";var o=function(){return s("stzh-button",{class:{"stzh-datalist-item__action":true,"is-button":true},variant:"tertiary",size:"tiny","aria-label":i.iconLabel||"".concat(i.label," ").concat(i.value),iconOnly:true,icon:i.icon,onClick:i.actionClick})};return s(a,{role:"listitem"},s("div",{class:r},this.direction==="horizontal"?s(l,null,this.renderLeadingIcon(e),this.renderInner(e)):s(l,null,this.renderLeadingIcon(e),s("div",{class:"stzh-datalist-item__wrapper"},this.renderInner(e))),s(h,{role:n?null:"presentation","aria-hidden":n?null:"true",tabindex:"-1",class:{"stzh-datalist-item__action-list":true,"is-button":e,"is-link":!!this.href},href:this.href,rel:this.rel,target:this.target,download:this.download},this.href&&(this.download?s("div",{class:"stzh-datalist-item__action is-non-interactive"},s("stzh-icon",{class:"stzh-datalist-item__icon",name:this.icon?this.icon:"download"})):s("div",{class:"stzh-datalist-item__action is-non-interactive"},s("stzh-icon",{class:"stzh-datalist-item__icon",name:this.icon?this.icon:this.external?"external-link":"arrow-right"}))),e&&s("div",{class:"stzh-datalist-item__action is-non-interactive"},s("stzh-icon",{class:"stzh-datalist-item__icon is-closed",name:this.icon?this.icon:"plus"}),s("stzh-icon",{class:"stzh-datalist-item__icon is-open",name:this.icon?this.icon:"minus"})),n&&(this.iconTooltip?s("stzh-tooltip",{content:this.iconTooltip},o()):o()))),s("div",{class:"stzh-datalist-item__nested"},s("div",{class:"stzh-datalist-item__nested-inner"},s("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{rel:["externalWatcher"]}},enumerable:false,configurable:true});return t}());u.style=m}}}));
2
- //# sourceMappingURL=p-8f98fc45.system.entry.js.map