@oiz/stzh-components 2.11.0 → 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 (252) hide show
  1. package/dist/cjs/{app-globals-909813e1.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 +1 -1
  53. package/dist/collection/components/stzh-richtext/stzh-richtext.js +1 -1
  54. package/dist/collection/components/stzh-sticky/stzh-sticky.css +4 -4
  55. package/dist/collection/components/stzh-timepicker/stzh-timepicker.js +1 -1
  56. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js +8 -1
  57. package/dist/collection/components/stzh-toastbar/stzh-toastbar.js.map +1 -1
  58. package/dist/collection/components/stzh-toggle/stzh-toggle.js +1 -1
  59. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js +9 -3
  60. package/dist/collection/components/stzh-vbz-majorticker/stzh-vbz-majorticker.js.map +1 -1
  61. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js +9 -3
  62. package/dist/collection/components/stzh-vbz-ticker/stzh-vbz-ticker.js.map +1 -1
  63. package/dist/collection/global/js/helpers/utils.js +6 -2
  64. package/dist/collection/index.js.map +1 -1
  65. package/dist/collection/utils/translation-utils.js.map +1 -1
  66. package/dist/components/index.js +7 -3
  67. package/dist/components/index.js.map +1 -1
  68. package/dist/components/index2.js.map +1 -1
  69. package/dist/components/stzh-accordion.js +1 -1
  70. package/dist/components/stzh-accordion.js.map +1 -1
  71. package/dist/components/stzh-appointments.js +8 -3
  72. package/dist/components/stzh-appointments.js.map +1 -1
  73. package/dist/components/stzh-container.js +1 -1
  74. package/dist/components/stzh-container.js.map +1 -1
  75. package/dist/components/stzh-datalist2.js +1 -1
  76. package/dist/components/stzh-datalist2.js.map +1 -1
  77. package/dist/components/stzh-datepicker2.js +38 -16
  78. package/dist/components/stzh-datepicker2.js.map +1 -1
  79. package/dist/components/stzh-gallery.js +1 -1
  80. package/dist/components/stzh-gallery.js.map +1 -1
  81. package/dist/components/stzh-progressbar-item2.js +2 -1
  82. package/dist/components/stzh-progressbar-item2.js.map +1 -1
  83. package/dist/components/stzh-progressbar.js +16 -1
  84. package/dist/components/stzh-progressbar.js.map +1 -1
  85. package/dist/components/stzh-sticky.js +1 -1
  86. package/dist/components/stzh-sticky.js.map +1 -1
  87. package/dist/components/stzh-toastbar.js +8 -1
  88. package/dist/components/stzh-toastbar.js.map +1 -1
  89. package/dist/components/stzh-vbz-majorticker.js +8 -3
  90. package/dist/components/stzh-vbz-majorticker.js.map +1 -1
  91. package/dist/components/stzh-vbz-ticker.js +8 -3
  92. package/dist/components/stzh-vbz-ticker.js.map +1 -1
  93. package/dist/esm/{app-globals-8bdc0f78.js → app-globals-5f5be02f.js} +8 -4
  94. package/dist/esm/app-globals-5f5be02f.js.map +1 -0
  95. package/dist/esm/index.js.map +1 -1
  96. package/dist/esm/loader.js +2 -2
  97. package/dist/esm/stzh-accordion.entry.js +1 -1
  98. package/dist/esm/stzh-accordion.entry.js.map +1 -1
  99. package/dist/esm/stzh-appointments.entry.js +7 -3
  100. package/dist/esm/stzh-appointments.entry.js.map +1 -1
  101. package/dist/esm/stzh-components.js +2 -2
  102. package/dist/esm/stzh-container.entry.js +1 -1
  103. package/dist/esm/stzh-container.entry.js.map +1 -1
  104. package/dist/esm/stzh-datalist_2.entry.js +1 -1
  105. package/dist/esm/stzh-datalist_2.entry.js.map +1 -1
  106. package/dist/esm/stzh-datepicker_3.entry.js +34 -15
  107. package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
  108. package/dist/esm/stzh-gallery.entry.js +1 -1
  109. package/dist/esm/stzh-gallery.entry.js.map +1 -1
  110. package/dist/esm/stzh-progressbar-item.entry.js +2 -1
  111. package/dist/esm/stzh-progressbar-item.entry.js.map +1 -1
  112. package/dist/esm/stzh-progressbar.entry.js +14 -0
  113. package/dist/esm/stzh-progressbar.entry.js.map +1 -1
  114. package/dist/esm/stzh-sticky.entry.js +1 -1
  115. package/dist/esm/stzh-sticky.entry.js.map +1 -1
  116. package/dist/esm/stzh-toastbar.entry.js +8 -1
  117. package/dist/esm/stzh-toastbar.entry.js.map +1 -1
  118. package/dist/esm/stzh-vbz-majorticker.entry.js +7 -3
  119. package/dist/esm/stzh-vbz-majorticker.entry.js.map +1 -1
  120. package/dist/esm/stzh-vbz-ticker.entry.js +7 -3
  121. package/dist/esm/stzh-vbz-ticker.entry.js.map +1 -1
  122. package/dist/esm-es5/{app-globals-8bdc0f78.js → app-globals-5f5be02f.js} +2 -2
  123. package/dist/esm-es5/app-globals-5f5be02f.js.map +1 -0
  124. package/dist/esm-es5/index.js.map +1 -1
  125. package/dist/esm-es5/loader.js +1 -1
  126. package/dist/esm-es5/loader.js.map +1 -1
  127. package/dist/esm-es5/stzh-accordion.entry.js +1 -1
  128. package/dist/esm-es5/stzh-accordion.entry.js.map +1 -1
  129. package/dist/esm-es5/stzh-appointments.entry.js +1 -1
  130. package/dist/esm-es5/stzh-appointments.entry.js.map +1 -1
  131. package/dist/esm-es5/stzh-components.js +1 -1
  132. package/dist/esm-es5/stzh-components.js.map +1 -1
  133. package/dist/esm-es5/stzh-container.entry.js +1 -1
  134. package/dist/esm-es5/stzh-container.entry.js.map +1 -1
  135. package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
  136. package/dist/esm-es5/stzh-datalist_2.entry.js.map +1 -1
  137. package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
  138. package/dist/esm-es5/stzh-datepicker_3.entry.js.map +1 -1
  139. package/dist/esm-es5/stzh-gallery.entry.js +1 -1
  140. package/dist/esm-es5/stzh-gallery.entry.js.map +1 -1
  141. package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
  142. package/dist/esm-es5/stzh-progressbar-item.entry.js.map +1 -1
  143. package/dist/esm-es5/stzh-progressbar.entry.js +1 -1
  144. package/dist/esm-es5/stzh-progressbar.entry.js.map +1 -1
  145. package/dist/esm-es5/stzh-sticky.entry.js +1 -1
  146. package/dist/esm-es5/stzh-sticky.entry.js.map +1 -1
  147. package/dist/esm-es5/stzh-toastbar.entry.js +1 -1
  148. package/dist/esm-es5/stzh-toastbar.entry.js.map +1 -1
  149. package/dist/esm-es5/stzh-vbz-majorticker.entry.js +1 -1
  150. package/dist/esm-es5/stzh-vbz-majorticker.entry.js.map +1 -1
  151. package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
  152. package/dist/esm-es5/stzh-vbz-ticker.entry.js.map +1 -1
  153. package/dist/stzh-components/assets/i18n/de.json +12 -0
  154. package/dist/stzh-components/assets/i18n/en.json +12 -0
  155. package/dist/stzh-components/index.esm.js.map +1 -1
  156. package/dist/stzh-components/p-0b1b2aa6.system.entry.js +2 -0
  157. package/dist/stzh-components/p-0b1b2aa6.system.entry.js.map +1 -0
  158. package/dist/stzh-components/{p-11784b90.entry.js → p-0ba7ce34.entry.js} +2 -2
  159. package/dist/stzh-components/p-0ba7ce34.entry.js.map +1 -0
  160. package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
  161. package/dist/stzh-components/p-222ba06a.entry.js +2 -0
  162. package/dist/stzh-components/p-222ba06a.entry.js.map +1 -0
  163. package/dist/stzh-components/{p-c658502d.system.entry.js → p-241997a2.system.entry.js} +2 -2
  164. package/dist/stzh-components/p-241997a2.system.entry.js.map +1 -0
  165. package/dist/stzh-components/p-2d88c544.system.entry.js +2 -0
  166. package/dist/stzh-components/p-2d88c544.system.entry.js.map +1 -0
  167. package/dist/stzh-components/p-361996d1.entry.js +2 -0
  168. package/dist/stzh-components/p-361996d1.entry.js.map +1 -0
  169. package/dist/stzh-components/{p-54dbcd0e.system.entry.js → p-383c2c21.system.entry.js} +2 -2
  170. package/dist/stzh-components/{p-54dbcd0e.system.entry.js.map → p-383c2c21.system.entry.js.map} +1 -1
  171. package/dist/stzh-components/{p-15980af0.entry.js → p-534dc28e.entry.js} +2 -2
  172. package/dist/stzh-components/{p-15980af0.entry.js.map → p-534dc28e.entry.js.map} +1 -1
  173. package/dist/stzh-components/{p-5fdf0a8e.entry.js → p-5486402c.entry.js} +2 -2
  174. package/dist/stzh-components/{p-5fdf0a8e.entry.js.map → p-5486402c.entry.js.map} +1 -1
  175. package/dist/stzh-components/p-55d76b46.system.entry.js +2 -0
  176. package/dist/stzh-components/p-55d76b46.system.entry.js.map +1 -0
  177. package/dist/stzh-components/{p-ca32a687.js → p-5e014c0e.js} +2 -2
  178. package/dist/stzh-components/p-5e014c0e.js.map +1 -0
  179. package/dist/stzh-components/{p-e5c1f04c.system.entry.js → p-628b5b0d.system.entry.js} +2 -2
  180. package/dist/stzh-components/p-628b5b0d.system.entry.js.map +1 -0
  181. package/dist/stzh-components/p-66b0d1f3.entry.js +2 -0
  182. package/dist/stzh-components/p-66b0d1f3.entry.js.map +1 -0
  183. package/dist/stzh-components/{p-8b4cc10d.entry.js → p-761909d5.entry.js} +2 -2
  184. package/dist/stzh-components/p-761909d5.entry.js.map +1 -0
  185. package/dist/stzh-components/{p-50914ed3.system.entry.js → p-87a3758c.system.entry.js} +2 -2
  186. package/dist/stzh-components/p-87a3758c.system.entry.js.map +1 -0
  187. package/dist/stzh-components/p-a1e1261a.entry.js +2 -0
  188. package/dist/stzh-components/p-a1e1261a.entry.js.map +1 -0
  189. package/dist/stzh-components/p-aa9975e6.entry.js +2 -0
  190. package/dist/stzh-components/p-aa9975e6.entry.js.map +1 -0
  191. package/dist/stzh-components/{p-bb2fe16f.system.entry.js → p-b3d76f2a.system.entry.js} +2 -2
  192. package/dist/stzh-components/{p-bb2fe16f.system.entry.js.map → p-b3d76f2a.system.entry.js.map} +1 -1
  193. package/dist/stzh-components/p-bf7316ab.system.js +2 -0
  194. package/dist/stzh-components/{p-428eacce.system.js.map → p-bf7316ab.system.js.map} +1 -1
  195. package/dist/stzh-components/{p-aefc1441.entry.js → p-c57402af.entry.js} +2 -2
  196. package/dist/stzh-components/p-c57402af.entry.js.map +1 -0
  197. package/dist/stzh-components/{p-cbcb366a.system.entry.js → p-c60ccc16.system.entry.js} +2 -2
  198. package/dist/stzh-components/p-c60ccc16.system.entry.js.map +1 -0
  199. package/dist/stzh-components/{p-cc260e20.entry.js → p-d5ee8b1a.entry.js} +2 -2
  200. package/dist/stzh-components/{p-cc260e20.entry.js.map → p-d5ee8b1a.entry.js.map} +1 -1
  201. package/dist/stzh-components/{p-d9984b93.system.entry.js → p-dc30c467.system.entry.js} +2 -2
  202. package/dist/stzh-components/p-dc30c467.system.entry.js.map +1 -0
  203. package/dist/stzh-components/{p-9bfe7d0d.system.entry.js → p-e69312e4.system.entry.js} +2 -2
  204. package/dist/stzh-components/p-e69312e4.system.entry.js.map +1 -0
  205. package/dist/stzh-components/{p-0c972915.system.js → p-ebb38041.system.js} +2 -2
  206. package/dist/stzh-components/p-ebb38041.system.js.map +1 -0
  207. package/dist/stzh-components/p-fa0e39e0.system.entry.js +2 -0
  208. package/dist/stzh-components/p-fa0e39e0.system.entry.js.map +1 -0
  209. package/dist/stzh-components/p-ffb4e717.entry.js +2 -0
  210. package/dist/stzh-components/p-ffb4e717.entry.js.map +1 -0
  211. package/dist/stzh-components/stzh-components.esm.js +1 -1
  212. package/dist/stzh-components/stzh-components.esm.js.map +1 -1
  213. package/dist/stzh-components/stzh-components.js +1 -1
  214. package/dist/types/components.d.ts +14 -2
  215. package/dist/types/utils/translation-utils.d.ts +2 -0
  216. package/dist/vscode-data.json +12 -0
  217. package/package.json +1 -1
  218. package/dist/cjs/app-globals-909813e1.js.map +0 -1
  219. package/dist/esm/app-globals-8bdc0f78.js.map +0 -1
  220. package/dist/esm-es5/app-globals-8bdc0f78.js.map +0 -1
  221. package/dist/stzh-components/p-07819ba5.entry.js +0 -2
  222. package/dist/stzh-components/p-07819ba5.entry.js.map +0 -1
  223. package/dist/stzh-components/p-0c972915.system.js.map +0 -1
  224. package/dist/stzh-components/p-1095d872.system.entry.js +0 -2
  225. package/dist/stzh-components/p-1095d872.system.entry.js.map +0 -1
  226. package/dist/stzh-components/p-11784b90.entry.js.map +0 -1
  227. package/dist/stzh-components/p-428eacce.system.js +0 -2
  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-8b4cc10d.entry.js.map +0 -1
  236. package/dist/stzh-components/p-8f98fc45.system.entry.js +0 -2
  237. package/dist/stzh-components/p-8f98fc45.system.entry.js.map +0 -1
  238. package/dist/stzh-components/p-9bfe7d0d.system.entry.js.map +0 -1
  239. package/dist/stzh-components/p-aafc8687.entry.js +0 -2
  240. package/dist/stzh-components/p-aafc8687.entry.js.map +0 -1
  241. package/dist/stzh-components/p-aefc1441.entry.js.map +0 -1
  242. package/dist/stzh-components/p-afb2885a.entry.js +0 -2
  243. package/dist/stzh-components/p-afb2885a.entry.js.map +0 -1
  244. package/dist/stzh-components/p-c658502d.system.entry.js.map +0 -1
  245. package/dist/stzh-components/p-ca32a687.js.map +0 -1
  246. package/dist/stzh-components/p-cbcb366a.system.entry.js.map +0 -1
  247. package/dist/stzh-components/p-d9984b93.system.entry.js.map +0 -1
  248. package/dist/stzh-components/p-e278cda2.system.entry.js +0 -2
  249. package/dist/stzh-components/p-e278cda2.system.entry.js.map +0 -1
  250. package/dist/stzh-components/p-e5c1f04c.system.entry.js.map +0 -1
  251. package/dist/stzh-components/p-ff356dc8.system.entry.js +0 -2
  252. package/dist/stzh-components/p-ff356dc8.system.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhToastbarCss","KEY_PREFIX_CLOSED","StzhToastbar","exports","this","_initialToasts","handleSlotchange","_this","toastsAppended","hideOverflowingItems","class_1","prototype","toast","label","_a","_b","type","link","document","createElement","hidden","role","initialOpenAnimation","slot","size","appendChild","element","initialToastsWatcher","newValue","JSON","parse","toastAppended","getAttribute","setAttribute","addEventListener","remove","timeoutStarted_1","Date","getTime","restTime_1","hideAfter","currentTimeout_1","window","setTimeout","hide","clearTimeout","timePassed","Array","from","children","forEach","childCount","length","splice","max","componentWillLoad","initialToasts","componentDidLoad","data","__awaiter","cookie","alreadyClosedBefore","Cookie","get","concat","HTMLElement","generatedLink","Object","assign","sent","set","expires","cookieExpires","render","classes","h","Host","class","onSlotchange"],"sources":["src/components/stzh-toastbar/stzh-toastbar.scss?tag=stzh-toastbar&encapsulation=shadow","src/components/stzh-toastbar/stzh-toastbar.tsx"],"sourcesContent":[":host {\n @include spaceCurve('bottom', 'regular');\n z-index: $zIndexOverlay;\n position: fixed;\n pointer-events: none;\n bottom: var(--stzh-header-sticky-appnav-height, 0);\n left: $containerMargin;\n right: $containerMargin;\n\n @include mq($from: small) {\n left: $containerMarginSmall;\n right: auto;\n max-width: 560px;\n max-width: min(560px, calc(100% - (#{$containerMarginSmall} * 2)));\n }\n\n @include mq($from: medium) {\n left: $containerMarginMedium;\n // max-width: calc(100% - (#{$containerMarginMedium} * 2));\n }\n\n @include mq($from: large) {\n left: $containerMarginLarge;\n // max-width: calc(100% - (#{$containerMarginLarge} * 2));\n }\n\n ::slotted(*:not([hidden]):not([slot])) {\n @include spaceCurve('margin-bottom', 'regular');\n }\n}\n\n.stzh-toastbar {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n\n @include mq($from: small) {\n align-items: flex-start;\n }\n}\n","import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Method,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n StzhToastbarInitialToast,\n StzhToastType,\n} from \"../../index\";\n\nimport Cookie from \"js-cookie\";\n\nconst KEY_PREFIX_CLOSED = \"stzh-components-toastbar-closed\";\n\n/**\n * @slot - Slot for stzh-toast elements\n */\n@Component({\n tag: \"stzh-toastbar\",\n styleUrl: \"stzh-toastbar.scss\",\n shadow: true\n})\nexport class StzhToastbar {\n /**\n * Time after toasts are hidden (in seconds).\n * Toasts with type `error` will stay, until the user closes them manually.\n */\n @Prop() hideAfter: number = 30;\n\n /**\n * Maximum of toasts allowed to be shown.\n * If more are created, oldest will be hidden, even if timeout not ended yet or toast type is `error`.\n */\n @Prop() max: number = 5;\n\n /**\n * Initial toasts.\n *\n * Array of objects that at least includes `label` and optionally `type`, `link` (object with `href` and `label`) `cookie` and `cookieExpires`:\n * `[{\"label\": \"Lorem ipsum\", \"link\": { \"label\": \"More info\", \"href\": \"https://example.com\" }, \"cookie\": \"cookie-banner\", \"cookieExpires\": 365 }]`\n *\n * If `cookie` exists in an object, it will check for that cookie name first (prefixed with `stzh-components-toastbar-closed-`) and only show if cookie doesn't exist.\n * `cookieExpires` sets the cookie lifetime (default 365 days, set 0 for session cookie).\n */\n @Prop() initialToasts: StzhToastbarInitialToast[] | string = [];\n private _initialToasts: StzhToastbarInitialToast[] = [];\n\n @Element() element: HTMLStzhToastbarElement;\n\n /** Create new toast. */\n @Method()\n async toast(\n label: string,\n { type, link }: { type?: StzhToastType, link?: HTMLStzhLinkElement } = { type: \"info\" }\n ): Promise<HTMLStzhToastElement> {\n const toast = document.createElement(\"stzh-toast\");\n toast.hidden = true;\n toast.label = label;\n toast.role = \"alert\";\n toast.type = type || \"info\";\n toast.initialOpenAnimation = true;\n\n if (link) {\n link.slot = \"link\";\n link.size = \"small\";\n toast.appendChild(link);\n }\n\n this.element.appendChild(toast);\n\n return toast;\n }\n\n @Watch(\"initialToasts\")\n initialToastsWatcher(newValue: any[] | string) {\n if (typeof newValue === \"string\") {\n this._initialToasts = JSON.parse(newValue);\n } else {\n this._initialToasts = newValue;\n }\n }\n\n private toastAppended(toast: HTMLStzhToastElement) {\n if (toast.getAttribute('data-stzh-toastbar-managed')) {\n return;\n }\n\n toast.setAttribute('data-stzh-toastbar-managed', '');\n\n toast.addEventListener(\"stzhClosed\", () => {\n toast.remove();\n });\n\n if (toast.type !== \"error\") {\n let timeoutStarted = new Date().getTime();\n let restTime = this.hideAfter * 1000;\n let currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n\n toast.addEventListener(\"pointerenter\", () => {\n if (currentTimeout) {\n window.clearTimeout(currentTimeout);\n const timePassed = new Date().getTime() - timeoutStarted;\n restTime = restTime - timePassed;\n }\n });\n\n toast.addEventListener(\"pointerleave\", () => {\n timeoutStarted = new Date().getTime();\n currentTimeout = window.setTimeout(() => {\n toast.hide();\n }, restTime);\n });\n }\n }\n\n private toastsAppended() {\n Array.from(this.element.children).forEach((toast: HTMLStzhToastElement) => {\n this.toastAppended(toast);\n });\n }\n\n private hideOverflowingItems() {\n const childCount = this.element.children.length;\n\n Array.from(this.element.children)\n .splice(0, childCount - this.max)\n .forEach((toast: HTMLStzhToastElement) => {\n toast.hide();\n });\n }\n\n private handleSlotchange = () => {\n this.toastsAppended();\n this.hideOverflowingItems();\n }\n\n componentWillLoad() {\n this.initialToastsWatcher(this.initialToasts);\n }\n\n componentDidLoad() {\n this._initialToasts.forEach(async (data) => {\n if (data.cookie) {\n const alreadyClosedBefore = Cookie.get(`${KEY_PREFIX_CLOSED}-${data.cookie}`);\n\n if (alreadyClosedBefore) {\n return;\n }\n }\n\n let link = data.link;\n\n if (!(link instanceof HTMLElement)) {\n const generatedLink = document.createElement(\"stzh-link\");\n generatedLink.slot = \"link\";\n generatedLink.size = \"small\";\n\n Object.assign(generatedLink, data.link);\n link = generatedLink;\n }\n\n const toast = await this.toast(data.label, {\n type: data.type,\n link: link as HTMLStzhLinkElement\n })\n\n if (data.cookie) {\n toast.addEventListener(\"stzhClosed\", () => {\n Cookie.set(`${KEY_PREFIX_CLOSED}-${data.cookie}`, '1', {\n expires: typeof data.cookieExpires !== \"undefined\" ? data.cookieExpires : 365\n });\n });\n }\n })\n }\n\n render() {\n const classes = {\n \"stzh-toastbar\": true,\n };\n\n return (\n <Host>\n <div class={classes}>\n <slot onSlotchange={this.handleSlotchange}></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"4rDAAA,IAAMA,EAAkB,+zDCiBxB,IAAMC,EAAoB,kC,IAUbC,EAAYC,EAAA,2B,mCAuBfC,KAAAC,eAA6C,GAwF7CD,KAAAE,iBAAmB,WACzBC,EAAKC,iBACLD,EAAKE,sB,iBA5GqB,G,SAMN,E,mBAWuC,E,CAOvDC,EAAAC,UAAAC,MAAN,SACEC,EACAC,G,IAAAC,EAAAD,SAAA,E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,qBAAA,WACN,IAAM0C,EAAa/C,KAAKsB,QAAQuB,SAASG,OAEzCL,MAAMC,KAAK5C,KAAKsB,QAAQuB,UACrBI,OAAO,EAAGF,EAAa/C,KAAKkD,KAC5BJ,SAAQ,SAACtC,GACRA,EAAMgC,M,KASZlC,EAAAC,UAAA4C,kBAAA,WACEnD,KAAKuB,qBAAqBvB,KAAKoD,c,EAGjC9C,EAAAC,UAAA8C,iBAAA,eAAAlD,EAAAH,KACEA,KAAKC,eAAe6C,SAAQ,SAAOQ,GAAI,OAAAC,UAAApD,OAAA,qB,wEACrC,GAAImD,EAAKE,OAAQ,CACTC,EAAsBC,EAAOC,IAAI,GAAAC,OAAG/D,EAAiB,KAAA+D,OAAIN,EAAKE,SAEpE,GAAIC,EAAqB,CACvB,S,EAIA5C,EAAOyC,EAAKzC,KAEhB,KAAMA,aAAgBgD,aAAc,CAC5BC,EAAgBhD,SAASC,cAAc,aAC7C+C,EAAc3C,KAAO,OACrB2C,EAAc1C,KAAO,QAErB2C,OAAOC,OAAOF,EAAeR,EAAKzC,MAClCA,EAAOiD,C,CAGK,SAAM9D,KAAKQ,MAAM8C,EAAK7C,MAAO,CACzCG,KAAM0C,EAAK1C,KACXC,KAAMA,K,OAFFL,EAAQE,EAAAuD,OAKd,GAAIX,EAAKE,OAAQ,CACfhD,EAAMsB,iBAAiB,cAAc,WACnC4B,EAAOQ,IAAI,GAAAN,OAAG/D,EAAiB,KAAA+D,OAAIN,EAAKE,QAAU,IAAK,CACrDW,eAAgBb,EAAKc,gBAAkB,YAAcd,EAAKc,cAAgB,K,yBAOpF9D,EAAAC,UAAA8D,OAAA,WACE,IAAMC,EAAU,CACd,gBAAiB,MAGnB,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOH,GACVC,EAAA,QAAMG,aAAc1E,KAAKE,oB,oQApKV,I"}
@@ -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","$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","replace","globalParser","input","regex","RegExp","match","groups","year","parseInt","Y","month","day","hours","G","H","minutes","globalAdapter","dateFormats","formattedDate","formattedDate2","range","dateRange","startsWith","timeRange","dates","split","getLocale","closestElement","closest","locale","lang","supportedLocales","defaultLocale","async","fetchTranslations","host","component","existingTranslations","JSON","sessionStorage","getItem","version","cacheTranslations","keys","$locale","$code","result","fetch","pathTranslations","ok","data","json","setItem","stringify","exception","error","appGlobalScript","assign","labels","pathMedia","utils","translationsLoading","then","catch","reason","globalScripts"],"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":"AAAA,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,EAAY,CAAE,CAAG,OAAO,SAAUO,EAAaC,EAAYC,GAAe,GAAID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,mBAAmB9P,OAAOmK,eAAegF,gBAAgBZ,IAAUS,KAAKe,UAAUH,IACzG,MAAO,IACFA,EAAKd,IAAc,GACtBtE,SAAUoF,EAAKpF,SACf8E,QAASM,EAAKL,MACdhF,SAAUqF,EAAKrF,SAEvB,CAEA,CAAI,MAAOyF,GACP3F,QAAQ4F,MAAM,yBAAyB1B,IAAUyB,EACrD,CACA,C,iICrQe,SAAAE,IACflQ,OAAAmK,eAAA7K,OAAA6Q,OAAA7Q,OAAA6Q,OAAA,CAAAzB,cAAA,KAAA0B,OAAA,QAAAC,UAAA,IAAAX,iBAAA,IAAAN,kBAAA,KAAApE,QAAA,GAAAZ,aAAA,MAAApK,OAAAmK,gBAAA,KAAAgF,UAAAV,iBAAA,YAAA6B,UACE,GAAItQ,OAAOmK,eAAeC,eAAA,MACxBpK,OAAOmK,eAAeoG,oBAAA3B,EAAAlM,SAAA2D,iBAAAmK,MAAApG,IACpBpK,OAAOmK,eAAAC,cAAA,IACNqG,OAAOC,IACRrG,QAAQ4F,MAAK,8BAAAS,EAAA,GAEnB,CACE9H,IACAQ,GACF,CCfY,MAACuH,EAAgBT,S"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["tc","translation","count","parts","split","part","trim","length","replace","toString","stzhAppointmentsCss","StzhAppointments","exports","this","showMoreLink","moreItemsLeft","showCalendar","showSort","showSortStart","showSortPlace","showAppointmentsTitle","allAppointsmentOnSameDay","sortOptions","isDateDisabled","date","dateHasAppointment","_this","_appointments","find","appointment","start","getFullYear","getMonth","getDate","onNextActiveDateClick","__awaiter","nextDate","currentDate","datepickerElement","getPopover","popover","_a","sent","hide","onMoreClick","showItems","stepItems","radio","inputElement","querySelector","setFocus","onDropdownChange","event","target","getValue","sortBy","onDatepickerChange","detail","component","valueAsDate","onRadioChange","value","stzhChange","emit","class_1","prototype","currentDateWatcher","newValue","_currentDate","dateByValue","earliestDate","setValueToFirstAppointmentOfCurrentDate","parseISODate","sortByWatcher","valueWatcher","updateDateByValue","appointmentsWatcher","JSON","parse","forEach","Date","end","sort","a","b","latestDate","firstDate_1","map","every","concat","getCurrentDateAppointments","indexOfLastCurrentDayDate","appointmentsCurrentDate","filter","index","dateIsInCurrentDay","appointments","disabled","componentWillLoad","localization","window","stzhComponents","utils","fetchTranslations","element","_b","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":"+qDAkEgBA,EAAGC,EAAqBC,GACtC,IAAKD,EAAa,CAChB,MAAO,E,CAGT,IAAME,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,IAAMC,EAAsB,k5H,ICiCfC,EAAgBC,EAAA,+B,0EAwHnBC,KAAAC,aAAwB,MACxBD,KAAAE,cAAwB,EACxBF,KAAAG,aAAwB,MACxBH,KAAAI,SAAoB,MACpBJ,KAAAK,cAAyB,MACzBL,KAAAM,cAAyB,MACzBN,KAAAO,sBAAiC,MACjCP,KAAAQ,yBAAoC,KACpCR,KAAAS,YAAc,GAwDdT,KAAAU,eAAiB,SAACC,GACxB,IAAMC,IAAgCC,EAAKC,cAAcC,MAAK,SAAAC,GAC5D,OAAOA,EAAYC,MAAMC,gBAAkBP,EAAKO,eAC3CF,EAAYC,MAAME,aAAeR,EAAKQ,YACtCH,EAAYC,MAAMG,YAAcT,E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","media","matches","_this","stepsUltra","currentSteps","stepsLarge","stepsMedium","stepsSmall","steps","element","style","setProperty","toString","class_1","prototype","dataWatcher","newValue","_data","JSON","parse","lastItemIndex","length","maxStepIndex","withinLastFewSteps","index","getItemAttributes","itemIndex","item","step","first","last","current","passed","dotted","hide","substract","componentWillLoad","data","localization","_a","window","stzhComponents","utils","fetchTranslations","_b","sent","connectedCallback","addMediaChangeListener","disconnectedCallback","removeMediaChangeListener","render","classes","concat","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":"sqDAAA,IAAMA,EAAqB,o8C,ICyBdC,EAAeC,EAAA,8B,mCAuGlBC,KAAAC,gBAAkB,WACxB,GAAIC,EAAM,SAASC,SAAWC,EAAKC,WAAY,CAC7CD,EAAKE,aAAeF,EAAKC,U,MACpB,GAAIH,EAAM,SAASC,SAAWC,EAAKG,WAAY,CACpDH,EAAKE,aAAeF,EAAKG,U,MACpB,GAAIL,E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,KAAKwB,Y,CAIvCK,EAAKO,KAAOR,EAAY,GAAKA,EAAYS,GACpCT,EAAY5B,KAAK0B,OAAS1B,KAAKM,aAAe,IAAMsB,EAAY5B,KAAKsB,a,EAI9E,OAAOO,C,EAmBHd,EAAAC,UAAAsB,kBAAN,W,kHACEtC,KAAKiB,YAAYjB,KAAKuC,M,KAEjBvC,KAAKwC,aAAN,YACFC,EAAAzC,KAAoB,SAAM0C,OAAOC,eAAeC,MAAMC,kBAAkB7C,KAAKW,QAAS,gB,OAAtF8B,EAAKD,aAAeM,EAAAC,O,mCAIxBhC,EAAAC,UAAAgC,kBAAA,WACEhD,KAAKC,kBACLgD,EAAuBjD,KAAKC,gB,EAG9Bc,EAAAC,UAAAkC,qBAAA,WACEC,EAA0BnD,KAAKC,gB,EAGjCc,EAAAC,UAAAoC,OAAA,W,MAAA,IAAAhD,EAAAJ,KACE,IAAMqD,GAAOZ,EAAA,CACX,mBAAoB,MACpBA,EAAC,2BAAAa,OAA2BtD,KAAK0B,UAAY1B,KAAK0B,M,GAGpD,OACE6B,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOJ,GACVE,EAAA,OACEE,MAAM,0BACNC,KAAK,OAAM,aACC1D,KAAKwC,aAAamB,OAE7B3D,KAAKmB,MAAMyC,KAAI,SAAC9B,EAAMJ,GACrB,OAAA6B,EAAA,wBAAAM,OAAAC,OAAA,GACM1D,EAAKuB,kBAAkBD,GAAM,CACjCqC,KAAMjC,EAAKiC,KACXC,SAAUlC,EAAKkC,SACfL,MAAO7B,EAAK6B,MACZF,MAAM,2BALR,M,kPAvJc,I"}
@@ -1,2 +0,0 @@
1
- System.register(["./p-290fcb28.system.js"],(function(t){"use strict";var i,n,e;return{setters:[function(t){i=t.r;n=t.h;e=t.a}],execute:function(){var r=".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}";var s=t("stzh_container",function(){function t(t){i(this,t);this.size="default";this.noMargin=false}t.prototype.render=function(){var t;var i=(t={"stzh-container":true,"stzh-container--has-no-margin":this.noMargin},t["stzh-container--size-".concat(this.size)]=!!this.size,t);return n(e,null,n("div",{class:i},n("slot",null)))};return t}());s.style=r}}}));
2
- //# sourceMappingURL=p-e278cda2.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhContainerCss","StzhContainer","exports","class_1","prototype","render","classes","_a","this","noMargin","concat","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":"kJAAA,IAAMA,EAAmB,+oH,ICeZC,EAAaC,EAAA,4B,kCAEU,U,cAGN,K,CAE5BC,EAAAC,UAAAC,OAAA,W,MACE,IAAMC,GAAOC,EAAA,CACX,iBAAkB,KAClB,gCAAiCC,KAAKC,UACtCF,EAAC,wBAAAG,OAAwBF,KAAKG,SAAWH,KAAKG,K,GAGhD,OACEC,EAACC,EAAI,KACHD,EAAA,OAAKE,MAAOR,GACVM,EAAA,c,WAjBgB,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhVbzTickerCss","StzhVbzTicker","exports","this","globalDisturbances","lines","counter","_c","concat","VBZ","DISTURBANCE_GLOBAL","DISTURBANCE_INFORMATION","DISTURBANCE_CONSTRUCTION","DISTURBANCE_NORMAL","DISTURBANCE_EVENT","DISTURBANCE_BUS","class_1","prototype","localizationWatcher","collator","Intl","Collator","localization","$locale","numeric","apiWatcher","newValue","apiUrl","api","replace","includes","Date","now","axios","get","data","sent","dataWatcher","_data","JSON","parse","_b","_a","Message","forEach","message","urls","channel","filter","name","CHANNEL_TICKER","url","map","reduce","a","b","infoUrl","find","indexOf","CHANNEL_INFO_URL_FILTER","baseType","BASE_TYPE_GLOBAL","_this","push","id","head","category","startDate","sDate","sTime","endDate","eDate","eTime","altStart","altEnd","affectedProduct","affectedLines_1","product","lineId","line","cls","disturbances","alert","Object","keys","key","sort","compare","componentWillLoad","window","stzhComponents","utils","fetchTranslations","element","_d","dateAdapter","createFormatParseAdapter","$formats","$globals","renderDisturbance","disturbance","h","class","formatSpan","size","href","moreInfo","target","icon","moreInfoLink","render","classes","Host","length","noDisturbances","furtherDisturbanceTitle","disturbanceTitle","constructionsTitle","Fragment","role","slot"],"sources":["src/components/stzh-vbz-ticker/stzh-vbz-ticker.scss?tag=stzh-vbz-ticker&encapsulation=scoped","src/components/stzh-vbz-ticker/stzh-vbz-ticker.tsx"],"sourcesContent":[":host {\n}\n\n.stzh-vbz-ticker {\n display: flex;\n flex-direction: column;\n position: relative;\n\n @include mq($from: medium) {\n flex-direction: row;\n align-items: flex-start;\n }\n\n &__icon {\n --size: #{iconSize('small')};\n margin-right: space('xsmall');\n }\n\n &__title {\n @include font('medium');\n @include fontCurve('p1');\n display: flex;\n flex-wrap: wrap;\n }\n\n &__title-parts {\n display: flex;\n flex-wrap: wrap;\n margin: calc(#{space('xxxsmall')} / -1) 0;\n }\n\n &__title-part {\n display: flex;\n align-items: center;\n white-space: nowrap;\n margin: space('xxxsmall') 0;\n\n &:not(:last-child) {\n margin-right: space('large');\n }\n\n &--no-disturbances {\n color: $colorTruegreen;\n }\n\n &--major-events {\n color: $colorCoral;\n }\n\n &--disturbances {\n color: $colorError;\n }\n }\n\n // &__description {\n // @include fontSize('micro');\n // @include spaceCurve('margin-top', 'tiny');\n // }\n\n &__link {\n margin-top: space('small');\n\n @include mq($from: medium) {\n position: absolute;\n top: 0;\n right: 0;\n margin-top: 0;\n }\n }\n\n &__chips {\n display: flex;\n flex-wrap: wrap;\n\n &:not(:empty) {\n margin: calc(#{space('xxsmall')} * -1);\n margin-top: calc(#{space('medium')} - #{space('xxsmall')});\n }\n }\n\n &__chip {\n margin: space('xxsmall');\n }\n\n &__tooltip {\n --width: 334px;\n }\n\n &__disturbance {\n display: flex;\n align-items: flex-start;\n\n &:not(:first-child) {\n margin-top: space('small');\n }\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type0 &__disturbance-icon,\n &__disturbance--type2 &__disturbance-title,\n &__disturbance--type2 &__disturbance-icon {\n color: $colorError;\n }\n\n &__disturbance-title {\n @include font('medium');\n display: flex;\n }\n\n &__disturbance--type0 &__disturbance-title,\n &__disturbance--type2 &__disturbance-title {\n @include font('heavy');\n }\n\n &__disturbance-icon {\n --size: #{iconSize('xsmall')};\n margin-top: space('xxxsmall');\n margin-right: space('xsmall');\n }\n\n &__disturbance-link {\n margin-top: space('xsmall');\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Watch,\n Element,\n Fragment\n} from \"@stencil/core\";\n\nimport axios from 'axios';\n\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\";\n\nimport {\n VBZ,\n VbzTickerInfoUrl,\n VbzTickerDisturbance,\n VbzTickerLine\n} from \"../../index\";\n\nimport { StzhVbzTickerLocalizedText } from \"./stzh-vbz-ticker.localization\";\n\n/**\n * @slot link - Optional link to traffic situation\n */\n@Component({\n tag: \"stzh-vbz-ticker\",\n styleUrl: \"stzh-vbz-ticker.scss\",\n scoped: true\n})\nexport class StzhVbzTicker {\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: StzhVbzTickerLocalizedText;\n\n @Element() element: HTMLStzhVbzTickerElement;\n\n private globalDisturbances: VbzTickerDisturbance[] = [];\n private lines: VbzTickerLine[] = [];\n private collator: Intl.Collator;\n\n private counter = {\n [`${VBZ.DISTURBANCE_GLOBAL}`]: 0,\n [`${VBZ.DISTURBANCE_INFORMATION}`]: 0,\n [`${VBZ.DISTURBANCE_CONSTRUCTION}`]: 0,\n [`${VBZ.DISTURBANCE_NORMAL}`]: 0,\n [`${VBZ.DISTURBANCE_EVENT}`]: 0,\n [`${VBZ.DISTURBANCE_BUS}`]: 0\n };\n\n @Watch(\"localization\")\n localizationWatcher() {\n this.collator = new Intl.Collator(this.localization.$locale, {\n numeric: true\n });\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 lines: { [key: string]: VbzTickerLine } = {};\n\n this._data?.Message?.forEach(message => {\n const urls: VbzTickerInfoUrl[] = message.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 if (message.baseType === VBZ.BASE_TYPE_GLOBAL) {\n this.counter[VBZ.DISTURBANCE_GLOBAL]++;\n\n this.globalDisturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n });\n } else {\n this.counter[message.category]++;\n }\n\n // don't add to lines if no line/product has been linked to\n // or if it is a information disturbance or global\n if (\n message.affectedProduct\n && message.category !== VBZ.DISTURBANCE_INFORMATION\n && message.baseType !== VBZ.BASE_TYPE_GLOBAL\n ) {\n const affectedLines = [];\n\n message.affectedProduct.forEach(product => {\n if (typeof lines[product.lineId] === \"undefined\") {\n lines[product.lineId] = {\n line: product.line,\n name: product.name,\n category: product.cls,\n disturbances: [],\n alert: false\n }\n }\n\n if (message.category === VBZ.DISTURBANCE_NORMAL) {\n lines[product.lineId].alert = true;\n }\n\n // only add disturbance message to line if it was not already added (avoiding same message twice)\n if (!affectedLines.includes(product.lineId)) {\n affectedLines.push(product.lineId);\n\n lines[product.lineId].disturbances.push({\n id: message.id,\n head: message.head,\n category: message.category,\n baseType: message.baseType,\n startDate: new Date(`${message.sDate}T${message.sTime}+02:00`),\n endDate: new Date(`${message.eDate}T${message.eTime}+02:00`),\n altStart: message.altStart,\n altEnd: message.altEnd,\n infoUrl: infoUrl\n })\n }\n })\n }\n });\n\n this.lines = Object.keys(lines)\n .map(key => lines[key]);\n\n // sort by line name\n this.lines.sort((a, b) => this.collator\n .compare(a.line, b.line));\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"vbz-ticker\");\n this.localizationWatcher();\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 renderDisturbance(disturbance: VbzTickerDisturbance) {\n return (\n <div class={{\n \"stzh-vbz-ticker__disturbance\": true,\n [`stzh-vbz-ticker__disturbance--type${disturbance.category}`]: !!disturbance.category\n }}>\n {disturbance.category === VBZ.DISTURBANCE_NORMAL\n || disturbance.baseType === VBZ.BASE_TYPE_GLOBAL\n ?\n <stzh-icon name=\"warning-big\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n :\n <stzh-icon name=\"construction\" class=\"stzh-vbz-ticker__disturbance-icon\"></stzh-icon>\n }\n\n <div class=\"stzh-vbz-ticker__disturbance-text\">\n <div class=\"stzh-vbz-ticker__disturbance-title\">\n {disturbance.head}\n </div>\n\n <div class=\"stzh-vbz-ticker__disturbance-date\">\n {this.dateAdapter.formatSpan(\n disturbance.altStart || disturbance.startDate,\n disturbance.altEnd || disturbance.endDate,\n \"date\"\n )}\n </div>\n\n {disturbance.infoUrl ?\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n href={disturbance.infoUrl.url}\n >\n {this.localization.moreInfo}\n </stzh-link>\n :\n <stzh-link\n class=\"stzh-vbz-ticker__disturbance-link\"\n size=\"small\"\n target=\"_blank\"\n icon=\"external-link\"\n href={this.moreInfoLink\n .replace(/\\{lang\\}/, this.localization.$locale)\n .replace(/\\{id\\}/, disturbance.id)}\n >\n {this.localization.moreInfo}\n </stzh-link>\n }\n </div>\n </div>\n );\n }\n\n render() {\n const classes = {\n \"stzh-vbz-ticker\": true\n };\n\n return (\n <Host>\n <div class={classes}>\n <div class=\"stzh-vbz-ticker__text\">\n <div class=\"stzh-vbz-ticker__title\">\n <div class=\"stzh-vbz-ticker__title-parts\">\n {this.lines.length === 0 && this.counter[VBZ.DISTURBANCE_GLOBAL] === 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--no-disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"checkmark-circle\"></stzh-icon>\n {this.localization.noDisturbances}\n </div>}\n\n {/* {this.counter[DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--major-events\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"important-warning\"></stzh-icon>\n {this.localization.majorEventTitle}\n </div>} */}\n\n {this.counter[VBZ.DISTURBANCE_NORMAL] > 0 &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--disturbances\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"warning\"></stzh-icon>\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 ?\n this.localization.furtherDisturbanceTitle : this.localization.disturbanceTitle}\n </div>}\n\n {(this.counter[VBZ.DISTURBANCE_CONSTRUCTION] > 0\n || this.counter[VBZ.DISTURBANCE_EVENT] > 0\n || this.counter[VBZ.DISTURBANCE_BUS] > 0) &&\n <div class=\"stzh-vbz-ticker__title-part stzh-vbz-ticker__title-part--others\">\n <stzh-icon class=\"stzh-vbz-ticker__icon\" name=\"construction\"></stzh-icon>\n {this.localization.constructionsTitle}\n </div>}\n </div>\n </div>\n\n {(this.lines.length > 0 || this.counter[VBZ.DISTURBANCE_GLOBAL] > 0) &&\n <Fragment>\n {/* <div class=\"stzh-vbz-ticker__description\">\n {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0\n ? this.localization.globalDisturbance\n : this.localization.affectedLines}\n </div> */}\n <div class=\"stzh-vbz-ticker__chips\" role=\"list\">\n {/* {this.counter[VBZ.DISTURBANCE_GLOBAL] > 0 &&\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip global></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {this.globalDisturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>} */}\n\n {this.lines.map((line) =>\n <div class=\"stzh-vbz-ticker__chip\" role=\"listitem\">\n <stzh-tooltip class=\"stzh-vbz-ticker__tooltip\">\n <stzh-vbz-linechip line={line.line} alert={line.alert}></stzh-vbz-linechip>\n <div class=\"stzh-vbz-ticker__tooltip-content\" slot=\"content\">\n {line.disturbances.map((disturbance) => this.renderDisturbance(disturbance))}\n </div>\n </stzh-tooltip>\n </div>\n )}\n </div>\n </Fragment>}\n </div>\n\n <div class=\"stzh-vbz-ticker__link\">\n <slot name=\"link\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"8sDAAA,IAAMA,EAAmB,s8J,IC+BZC,EAAaC,EAAA,6B,8BAuBhBC,KAAAC,mBAA6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,aAAWC,MAAM,wBAAwBrD,KAAK,iBAC7C9C,KAAKmB,aAAa+F,uBAKzBlH,KAAKE,MAAM4G,OAAS,GAAK9G,KAAKG,QAAQG,EAAIC,oBAAsB,IAChE2F,EAACiB,EAAQ,KAMPjB,EAAA,OAAKC,MAAM,yBAAyBiB,KAAK,QAWtCpH,KAAKE,MAAM+C,KAAI,SAAC2B,GACf,OAAAsB,EAAA,OAAKC,MAAM,wBAAwBiB,KAAK,YACtClB,EAAA,gBAAcC,MAAM,4BAClBD,EAAA,qBAAmBtB,KAAMA,EAAKA,KAAMG,MAAOH,EAAKG,QAChDmB,EAAA,OAAKC,MAAM,mCAAmCkB,KAAK,WAChDzC,EAAKE,aAAa7B,KAAI,SAACgD,GAAgB,OAAAtC,EAAKqC,kBAAkBC,EAAvB,MAJ9C,OAaVC,EAAA,OAAKC,MAAM,yBACTD,EAAA,QAAMpD,KAAK,W,0SArSG,I"}
@@ -1,2 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,i){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,s){function a(t){try{h(i.next(t))}catch(t){s(t)}}function n(t){try{h(i["throw"](t))}catch(t){s(t)}}function h(t){t.done?r(t.value):o(t.value).then(a,n)}h((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function n(t){return function(e){return h([t,e])}}function h(n){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,n[0]&&(r=0)),r)try{if(i=1,o&&(s=n[0]&2?o["return"]:n[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;if(o=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){r.label=n[1];break}if(n[0]===6&&r.label<s[1]){r.label=s[1];s=n;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(n);break}if(s[2])r.ops.pop();r.trys.pop();continue}n=e.call(t,r)}catch(t){n=[6,t];o=0}finally{i=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-290fcb28.system.js","./p-f6588a0f.system.js","./p-f9cb0fcd.system.js","./p-8550bdd3.system.js","./p-774595ba.system.js"],(function(t){"use strict";var e,r,i,o,s,a,n,h,d,c,l;return{setters:[function(t){e=t.r;r=t.c;i=t.h;o=t.F;s=t.a;a=t.g},function(t){n=t.a;h=t.p},function(t){d=t.h},function(t){c=t.S},function(t){l=t.c}],execute:function(){var u=".sc-stzh-datepicker-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-datepicker-h{display:none}.sc-stzh-datepicker-h *.sc-stzh-datepicker,.sc-stzh-datepicker-h *.sc-stzh-datepicker::before,.sc-stzh-datepicker-h *.sc-stzh-datepicker::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-datepicker-h .has-focus.sc-stzh-datepicker{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-datepicker-h .stzh-fylingfocus-focused.sc-stzh-datepicker{outline-style:none !important}.sc-stzh-datepicker-h .stzh-fylingfocus-focused.sc-stzh-datepicker::-moz-focus-inner{border:0 !important}.sc-stzh-datepicker-h{width:100%}.stzh-datepicker__popover.sc-stzh-datepicker{--padding:var(--stzh-space-medium);--width:auto}.stzh-datepicker__actions.sc-stzh-datepicker{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.stzh-datepicker__actions.sc-stzh-datepicker:not(:empty){margin-top:var(--stzh-space-xsmall)}";var p=t("stzh_datepicker",function(){function t(t){var i=this;e(this,t);this.stzhChange=r(this,"stzhChange",7);this.onRootFocus=function(){if(i.input){i.input.setFocus()}};this.onInputChanged=function(){var t=i.dateAdapter.parse(i.input.value,"dateInput");if(i.input.value===""||t){var e=n(t);if(i.value!==e){if(i.calendar){i.calendar.value=e}i.value=e}else{i.valueWatcher(e)}i.stzhChange.emit({component:"stzh-datepicker",value:i.value,valueAsDate:t})}};this.onCalendarChange=function(t){i.value=t.detail.value;i.stzhChange.emit({component:"stzh-datepicker",value:i.value,valueAsDate:t.detail.valueAsDate});if(i.input){i.input.value=t.detail.valueAsDate&&i.dateAdapter.format(t.detail.valueAsDate,"dateInput")}if(i.popover){i.popover.hide()}};this.calendarMin="";this.calendarMax="";this.calendarIsDateDisabled=function(){return false};this.name="";this.value="";this.label="";this.labelHidden=false;this.readonly=false;this.disabled=false;this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.invalid=false;this.required=false;this.showMarker=false;this.size="default";this.inline=false;this.dateAdapter=undefined;this.localization=undefined;this.buttonLabel=undefined}t.prototype.createDateFormatters=function(){if(this.localization){this.dateFormatLong=new Intl.DateTimeFormat(this.localization.$locale,{day:"numeric",month:"long",year:"numeric"})}};t.prototype.valueWatcher=function(t){var e=h(t);if(this.calendar){this.calendar.value=t}if(this.input){this.input.value=this.dateAdapter.format(e,"dateInput")}this.updateButtonAccessibleLabel()};t.prototype.setDate=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=n(t);return[2]}))}))};t.prototype.getPopover=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.popover]}))}))};t.prototype.updateButtonAccessibleLabel=function(){if(!this.localization){return}try{var t=h(this.value);this.buttonLabel="".concat(this.label,", ").concat(this.localization.buttonLabel,", ").concat(this.localization.selectedDateMessage," ").concat(this.dateFormatLong.format(t))}catch(t){this.buttonLabel="".concat(this.label,", ").concat(this.localization.buttonLabel)}};t.prototype.connectedCallback=function(){this.createDateFormatters()};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"datepicker")];case 1:t.localization=e.sent();e.label=2;case 2:if(!this.dateAdapter){this.dateAdapter=window.stzhComponents.utils.createFormatParseAdapter(this.localization.$formats,this.localization.$globals)}return[2]}}))}))};t.prototype.componentDidLoad=function(){this.valueWatcher(this.value)};t.prototype.render=function(){var t=this;var e={"stzh-datepicker":true,"stzh-datepicker--inline":this.inline};return i(s,{tabindex:this.disabled?null:"-1",onFocus:this.onRootFocus},i("div",{class:e},i("input",{type:"hidden",name:this.name,value:this.value}),this.inline&&i(o,null,i("stzh-calendar",{ref:function(e){return t.calendar=e},isDateDisabled:this.calendarIsDateDisabled,min:this.calendarMin,max:this.calendarMax,onStzhChange:this.onCalendarChange}),i("div",{class:"stzh-datepicker__actions"},i("slot",{name:"action"}))),!this.inline&&i("stzh-input",{label:this.label,labelHidden:this.labelHidden,ref:function(e){return t.input=e},noAutocomplete:true,onStzhChanged:this.onInputChanged,readonly:this.readonly,disabled:this.disabled,description:this.description,descriptionLong:this.descriptionLong,error:this.error,invalid:this.invalid,required:this.required,showMarker:this.showMarker,size:this.size},i("stzh-popover",{ref:function(e){return t.popover=e},class:"stzh-datepicker__popover",slot:"button-right",placement:"bottom-end",label:this.label},i("stzh-button",{variant:"input","icon-only":true,icon:"calendar",disabled:this.disabled,a11yLabel:this.buttonLabel}),i("div",{slot:"content"},i("stzh-calendar",{ref:function(e){return t.calendar=e},isDateDisabled:this.calendarIsDateDisabled,min:this.calendarMin,max:this.calendarMax,onStzhChange:this.onCalendarChange}),i("div",{class:"stzh-datepicker__actions"},i("slot",{name:"action"})))))))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{localization:["createDateFormatters"],value:["valueWatcher"]}},enumerable:false,configurable:true});return t}());p.style=u;var z='.sc-stzh-radio-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-radio-h{display:none}.sc-stzh-radio-h *.sc-stzh-radio,.sc-stzh-radio-h *.sc-stzh-radio::before,.sc-stzh-radio-h *.sc-stzh-radio::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-radio-h .has-focus.sc-stzh-radio{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-radio-h .stzh-fylingfocus-focused.sc-stzh-radio{outline-style:none !important}.sc-stzh-radio-h .stzh-fylingfocus-focused.sc-stzh-radio::-moz-focus-inner{border:0 !important}.sc-stzh-radio-h{display:inline-block}.sc-stzh-radio-h .sc-stzh-radio-s>stzh-text{--color:inherit}.stzh-radio__marker-symbol.sc-stzh-radio{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular)}.stzh-radio__marker-text.sc-stzh-radio{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-radio__description-wrapper.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-radio__error.sc-stzh-radio,.stzh-radio__description.sc-stzh-radio{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-radio__error.sc-stzh-radio{color:var(--stzh-color-error)}.stzh-radio__error-list.sc-stzh-radio{list-style:none;margin:0;padding:0}.stzh-radio__description.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-radio__description-long.sc-stzh-radio{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-radio__description-long-popover.sc-stzh-radio{--width:auto;--max-width:27.3125rem}.stzh-radio__description-long-popover[open].sc-stzh-radio:not([open=false]) .stzh-radio__description-long-button.sc-stzh-radio{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio__description-long-button.sc-stzh-radio{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-radio__description-long-button.sc-stzh-radio:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio.sc-stzh-radio stzh-icon.stzh-radio__description-long-icon.sc-stzh-radio{--size:var(--stzh-icon-size-xsmall)}.stzh-radio--has-error.sc-stzh-radio .stzh-radio__error.sc-stzh-radio,.stzh-radio--has-description.sc-stzh-radio .stzh-radio__description.sc-stzh-radio{margin-top:var(--stzh-space-xxsmall)}.stzh-radio__field-wrapper.sc-stzh-radio{font-size:var(--stzh-font-milli-font-size);line-height:var(--stzh-font-milli-text-line-height);letter-spacing:var(--stzh-font-curve---text-letter-spacing);position:relative;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.stzh-radio__input.sc-stzh-radio{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;z-index:-1;opacity:0;pointer-events:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--stzh-form-input-border-radius)}.stzh-radio__mark.sc-stzh-radio{border:0.0625rem solid var(--stzh-color-grey61);background-color:var(--stzh-color-white);width:1.5rem;height:1.5rem;-ms-flex-negative:0;flex-shrink:0;border-radius:50%;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-transition:border-color var(--stzh-base-transition-animation-speed);transition:border-color var(--stzh-base-transition-animation-speed)}.stzh-radio__mark.sc-stzh-radio::before{content:""}.stzh-radio__check.sc-stzh-radio{background-color:currentColor;color:var(--stzh-color-primary, var(--stzh-color-zueriblue));width:0.5rem;height:0.5rem;border-radius:50%;opacity:0}@media (forced-colors: active), (-ms-high-contrast: active){.stzh-radio__check.sc-stzh-radio{background-color:ButtonText}}.stzh-radio__label.sc-stzh-radio{display:inline-block;color:var(--stzh-base-color);-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);margin-left:var(--stzh-space-small);line-height:1.5rem}.stzh-radio__label.sc-stzh-radio:empty{display:none}.stzh-radio__marker-symbol.sc-stzh-radio{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height)}.stzh-radio.sc-stzh-radio:hover .stzh-radio__label.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__label.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:focus~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__label.sc-stzh-radio{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio.sc-stzh-radio:hover .stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:focus:hover~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:hover~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked:focus~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-primary-hover, var(--stzh-color-zueribluedark))}.stzh-radio__input.sc-stzh-radio:focus~.stzh-radio__mark.sc-stzh-radio,.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radio__input.sc-stzh-radio:checked~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{opacity:1}.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__label.sc-stzh-radio,.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-error)}.stzh-radio--is-invalid.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio{border-color:var(--stzh-color-error)}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__field-wrapper.sc-stzh-radio{cursor:not-allowed}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__label.sc-stzh-radio,.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio .stzh-radio__check.sc-stzh-radio{color:var(--stzh-color-grey61)}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__input.sc-stzh-radio~.stzh-radio__mark.sc-stzh-radio{border-color:transparent}.stzh-radio--is-disabled.sc-stzh-radio .stzh-radio__mark.sc-stzh-radio{background-color:var(--stzh-color-black8)}';var f=0;var g=t("stzh_radio",function(){function t(t){var i=this;e(this,t);this.stzhChange=r(this,"stzhChange",7);this.stzhFocus=r(this,"stzhFocus",7);this.stzhBlur=r(this,"stzhBlur",7);this.focusedByInput=false;this.onInput=function(t){i.checked=i.input.checked;i.stzhChange.emit({component:"stzh-radio",originalEvent:t,value:i.value,checked:i.checked})};this.onRootFocus=function(){if(!i.focusedByInput){i.setFocus()}i.focusedByInput=false};this.onFocus=function(t){i.focusedByInput=true;var e=new FocusEvent("focus",{view:window,bubbles:false,cancelable:false});i.element.dispatchEvent(e);i.stzhFocus.emit({component:"stzh-radio",originalEvent:t})};this.onBlur=function(t){var e=new FocusEvent("blur",{view:window,bubbles:false,cancelable:false});i.element.dispatchEvent(e);i.stzhBlur.emit({component:"stzh-radio",originalEvent:t})};this.localization=undefined;this.disabled=false;this.name="";this.value="";this.invalid=false;this.required=false;this.showMarker=false;this.checked=false;this.label="";this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.a11yDescribedby=""}t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.input.focus();return[2]}))}))};t.prototype.errorWatcher=function(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(e){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}this.invalid=this._error.length>0};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.inputId="stzh-radio-".concat(f++);this.errorWatcher(this.error);if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"radio")];case 1:t.localization=e.sent();e.label=2;case 2:return[2]}}))}))};t.prototype.render=function(){var t=this;var e=d(this.element,"description")||!!this.description;var r=d(this.element,"description-long")||!!this.descriptionLong;var o=d(this.element,"error")||!!this.error;var a={"stzh-radio":true,"stzh-radio--has-description":e,"stzh-radio--has-description-long":r,"stzh-radio--has-error":o,"stzh-radio--is-required":this.required,"stzh-radio--is-invalid":this.invalid,"stzh-radio--is-disabled":this.disabled};return i(s,{tabindex:this.disabled?null:"-1",onFocus:this.onRootFocus},i("div",{class:a},i("label",{class:"stzh-radio__field-wrapper"},i("input",{class:"stzh-radio__input",ref:function(e){return t.input=e},type:"radio",id:this.inputId,name:this.name,value:this.value,disabled:this.disabled,"aria-describedby":"".concat(this.inputId,"-description ").concat(this.a11yDescribedby),"aria-required":this.required?"true":"false","aria-invalid":this.invalid?"true":"false",checked:this.checked,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur}),i("div",{class:"stzh-radio__mark"},i("div",{class:"stzh-radio__check"})),i("div",{class:"stzh-radio__label"},this.label?this.label:i("slot",null),this.showMarker&&i("span",{class:"stzh-radio__marker"},i("span",{class:"stzh-radio__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),i("span",{class:"stzh-radio__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText)))),i(c,{classPrefix:"stzh-radio",id:"".concat(this.inputId,"-description"),error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongUsed:r,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel})))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{error:["errorWatcher"]}},enumerable:false,configurable:true});return t}());g.style=z;var b=".sc-stzh-radiogroup-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-radiogroup-h{display:none}.sc-stzh-radiogroup-h *.sc-stzh-radiogroup,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::before,.sc-stzh-radiogroup-h *.sc-stzh-radiogroup::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-radiogroup-h .has-focus.sc-stzh-radiogroup{outline:var(--stzh-flyingfocus-color) solid 0.125rem;outline-offset:0.3125rem}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup{outline-style:none !important}.sc-stzh-radiogroup-h .stzh-fylingfocus-focused.sc-stzh-radiogroup::-moz-focus-inner{border:0 !important}.sc-stzh-radiogroup-h[direction=vertical] .sc-stzh-radiogroup-s>stzh-radio:not(:last-child){margin-bottom:var(--stzh-space-medium)}.sc-stzh-radiogroup-h[direction=horizontal] .sc-stzh-radiogroup-s>stzh-radio:not(:last-child){margin-right:var(--stzh-space-large)}.stzh-radiogroup.sc-stzh-radiogroup{margin:0;padding:0;border:none}.stzh-radiogroup__marker-symbol.sc-stzh-radiogroup{font-family:var(--stzh-font-family-regular);font-weight:var(--stzh-font-weight-regular);font-style:var(--stzh-font-style-regular)}.stzh-radiogroup__marker-text.sc-stzh-radiogroup{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-radiogroup__description-wrapper.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup__description.sc-stzh-radiogroup{font-size:var(--stzh-font-micro-font-size);line-height:var(--stzh-font-micro-text-line-height);color:var(--stzh-base-color)}.stzh-radiogroup__error.sc-stzh-radiogroup{color:var(--stzh-color-error)}.stzh-radiogroup__error-list.sc-stzh-radiogroup{list-style:none;margin:0;padding:0}.stzh-radiogroup__description.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.stzh-radiogroup__description-long.sc-stzh-radiogroup{margin-left:var(--stzh-space-xxsmall);margin-top:0.1875rem}.stzh-radiogroup__description-long-popover.sc-stzh-radiogroup{--width:auto;--max-width:27.3125rem}.stzh-radiogroup__description-long-popover[open].sc-stzh-radiogroup:not([open=false]) .stzh-radiogroup__description-long-button.sc-stzh-radiogroup{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radiogroup__description-long-button.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;font-family:inherit;padding:0;border:none;background-color:transparent;border-radius:0.5rem;cursor:pointer;-webkit-transition:color var(--stzh-base-transition-animation-speed);transition:color var(--stzh-base-transition-animation-speed);color:var(--stzh-base-lead-color)}.stzh-radiogroup__description-long-button.sc-stzh-radiogroup:hover{color:var(--stzh-color-primary, var(--stzh-color-zueriblue))}.stzh-radiogroup.sc-stzh-radiogroup stzh-icon.stzh-radiogroup__description-long-icon.sc-stzh-radiogroup{--size:var(--stzh-icon-size-xsmall)}.stzh-radiogroup--has-error.sc-stzh-radiogroup .stzh-radiogroup__error.sc-stzh-radiogroup,.stzh-radiogroup--has-description.sc-stzh-radiogroup .stzh-radiogroup__description.sc-stzh-radiogroup{margin-top:var(--stzh-space-xxsmall)}.stzh-radiogroup__fields.sc-stzh-radiogroup{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:column;flex-direction:column}.stzh-radiogroup__legend.sc-stzh-radiogroup{font-family:var(--stzh-font-family-heavy);font-weight:var(--stzh-font-weight-heavy);font-style:var(--stzh-font-style-heavy);font-size:var(--stzh-font-nano-font-size);line-height:var(--stzh-font-nano-text-line-height);padding:0;margin-bottom:var(--stzh-space-xsmall)}.stzh-radiogroup--hide-legend.sc-stzh-radiogroup .stzh-radiogroup__legend.sc-stzh-radiogroup{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-radiogroup--direction-horizontal.sc-stzh-radiogroup .stzh-radiogroup__fields.sc-stzh-radiogroup{-ms-flex-direction:row;flex-direction:row}";var v="stzh-radio, stzh-button[type=radio], stzh-card";var m=0;var _=t("stzh_radiogroup",function(){function t(t){var r=this;e(this,t);this._preventUpdateProperties=[];this.init=function(){r.radios=Array.from(r.element.querySelectorAll(v));r.updateRadiosProperty("show-marker",false);r.updateRadiosProperty("a11y-describedby","".concat(r.radiogroupId,"-description"));r.watchValue(r.value);r.watchName(r.name);r.watchDisabled(r.disabled);r.watchInvalid(r.invalid);r.watchRequired(r.required)};this.localization=undefined;this.disabled=false;this.name=undefined;this.legend=undefined;this.hideLegend=false;this.invalid=false;this.required=false;this.showMarker=false;this.value="";this.direction="vertical";this.description=undefined;this.descriptionLong=undefined;this.error=undefined;this.checkedRadio=null;this.preventUpdateProperties=[]}t.prototype.watchName=function(t){this.updateRadiosProperty("name",t)};t.prototype.watchDisabled=function(t){this.updateRadiosProperty("disabled",t)};t.prototype.watchInvalid=function(t){this.updateRadiosProperty("invalid",t)};t.prototype.watchRequired=function(t){this.updateRadiosProperty("required",t)};t.prototype.watchValue=function(t){this.updateCheckedRadioByValue(t)};t.prototype.errorWatcher=function(t){if(typeof t==="string"){try{this._error=JSON.parse(t)}catch(e){if(t){this._error=[t]}else{this._error=[]}}}else if(t){this._error=t}else{this._error=[]}this.invalid=this._error.length>0};t.prototype.preventUpdatePropertiesWatcher=function(t){if(typeof t==="string"){this._preventUpdateProperties=JSON.parse(t)}else{this._preventUpdateProperties=t}};t.prototype.onChange=function(t){this.value=t.detail.value};t.prototype.updateRadiosProperty=function(t,e){var r=this;this.radios.forEach((function(i){if(t==="name"||r._preventUpdateProperties.indexOf(t)===-1){i[l(t)]=e}}))};t.prototype.updateCheckedRadioByValue=function(t){this.checkedRadio=this.radios.find((function(e){return e.value===t}));if(this.checkedRadio){this.checkedRadio.checked=true}this.uncheckRadios()};t.prototype.uncheckRadios=function(){var t=this;this.radios.forEach((function(e){if(!t.checkedRadio||e!==t.checkedRadio){e.checked=false}}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:this.radiogroupId="stzh-radiogroup-".concat(m++);this.errorWatcher(this.error);this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);if(!!this.localization)return[3,2];t=this;return[4,window.stzhComponents.utils.fetchTranslations(this.element,"radiogroup")];case 1:t.localization=e.sent();e.label=2;case 2:return[2]}}))}))};t.prototype.componentShouldUpdate=function(t,e,r){return r!=="checkedRadio"};t.prototype.componentDidRender=function(){this.init()};t.prototype.connectedCallback=function(){if(!this.value){this.radios=Array.from(this.element.querySelectorAll(v));var t=this.radios.find((function(t){return t.checked}));if(t){this.value=t.value}}this.observer=new MutationObserver(this.init);this.observer.observe(this.element,{childList:true,subtree:true})};t.prototype.disconnectedCallback=function(){if(this.observer){this.observer.disconnect()}};t.prototype.render=function(){var t;var e=d(this.element,"description")||!!this.description;var r=d(this.element,"description-long")||!!this.descriptionLong;var o=d(this.element,"error")||!!this.error;var s=(t={"stzh-radiogroup":true,"stzh-radiogroup--has-description":e,"stzh-radiogroup--has-description-long":r,"stzh-radiogroup--has-error":o,"stzh-radiogroup--is-required":this.required,"stzh-radiogroup--is-disabled":this.disabled,"stzh-radiogroup--is-invalid":this.invalid,"stzh-radiogroup--hide-legend":this.hideLegend},t["stzh-radiogroup--direction-".concat(this.direction)]=!!this.direction,t);return i("fieldset",{class:s},this.legend&&i("legend",{class:"stzh-radiogroup__legend"},this.legend,this.showMarker&&i("span",{class:"stzh-radiogroup__marker"},i("span",{class:"stzh-radiogroup__marker-symbol","aria-hidden":"true"},this.required?this.localization.$globals.requiredFieldMarker:this.localization.$globals.optionalFieldMarker),i("span",{class:"stzh-radiogroup__marker-text"},this.required?this.localization.$globals.requiredFieldText:this.localization.$globals.optionalFieldText))),i("div",{class:"stzh-radiogroup__fields"},i("slot",null)),i(c,{classPrefix:"stzh-radiogroup",id:"".concat(this.radiogroupId,"-description"),error:this._error,description:this.description,descriptionLong:this.descriptionLong,descriptionLongUsed:r,moreInfoButtonLabel:this.localization.$globals.moreInfoButtonLabel}))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{name:["watchName"],disabled:["watchDisabled"],invalid:["watchInvalid"],required:["watchRequired"],value:["watchValue"],error:["errorWatcher"],preventUpdateProperties:["preventUpdatePropertiesWatcher"]}},enumerable:false,configurable:true});return t}());_.style=b}}}));
2
- //# sourceMappingURL=p-ff356dc8.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["stzhDatepickerCss","StzhDatepicker","exports","this","onRootFocus","_this","input","setFocus","onInputChanged","parsedDate","dateAdapter","parse","value","isoDate","printISODate","calendar","valueWatcher","stzhChange","emit","component","valueAsDate","onCalendarChange","event","detail","format","popover","hide","class_1","prototype","createDateFormatters","localization","dateFormatLong","Intl","DateTimeFormat","$locale","day","month","year","newValue","date","parseISODate","updateButtonAccessibleLabel","setDate","getPopover","buttonLabel","concat","label","selectedDateMessage","err","connectedCallback","componentWillLoad","_a","window","stzhComponents","utils","fetchTranslations","element","_b","sent","createFormatParseAdapter","$formats","$globals","componentDidLoad","render","classes","inline","h","Host","tabindex","disabled","onFocus","class","type","name","Fragment","ref","el","isDateDisabled","calendarIsDateDisabled","min","calendarMin","max","calendarMax","onStzhChange","labelHidden","noAutocomplete","onStzhChanged","readonly","description","descriptionLong","error","invalid","required","showMarker","size","slot","placement","variant","icon","a11yLabel","stzhRadioCss","radioCounter","StzhRadio","focusedByInput","onInput","checked","originalEvent","focusEvent","FocusEvent","view","bubbles","cancelable","dispatchEvent","stzhFocus","onBlur","blurEvent","stzhBlur","class_2","focus","errorWatcher","_error","JSON","e","length","inputId","descriptionUsed","hasSlot","descriptionLongUsed","errorUsed","id","a11yDescribedby","requiredFieldMarker","optionalFieldMarker","requiredFieldText","optionalFieldText","StzhInputDescription","classPrefix","moreInfoButtonLabel","stzhRadiogroupCss","SELECTOR_RADIO","radiogroupCounter","StzhRadiogroup","_preventUpdateProperties","init","radios","Array","from","querySelectorAll","updateRadiosProperty","radiogroupId","watchValue","watchName","watchDisabled","watchInvalid","watchRequired","class_3","updateCheckedRadioByValue","preventUpdatePropertiesWatcher","onChange","prop","forEach","radio","indexOf","camelCase","checkedRadio","find","uncheckRadios","preventUpdateProperties","componentShouldUpdate","_newValue","_oldValue","componentDidRender","observer","MutationObserver","observe","childList","subtree","disconnectedCallback","disconnect","hideLegend","direction","legend"],"sources":["src/components/stzh-datepicker/stzh-datepicker.scss?tag=stzh-datepicker&encapsulation=scoped","src/components/stzh-datepicker/stzh-datepicker.tsx","src/components/stzh-radio/stzh-radio.scss?tag=stzh-radio&encapsulation=scoped","src/components/stzh-radio/stzh-radio.tsx","src/components/stzh-radiogroup/stzh-radiogroup.scss?tag=stzh-radiogroup&encapsulation=scoped","src/components/stzh-radiogroup/stzh-radiogroup.tsx"],"sourcesContent":[":host {\n width: 100%;\n}\n\n.stzh-datepicker {\n &__popover {\n --padding: #{space('medium')};\n --width: auto;\n }\n\n &__actions {\n display: flex;\n justify-content: flex-end;\n\n &:not(:empty) {\n margin-top: space('xsmall');\n }\n }\n}\n","import {\n Component,\n Prop,\n Host,\n Element,\n h,\n Event,\n EventEmitter,\n Method,\n Watch,\n Fragment,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhCalendarChangeEvent,\n StzhDatepickerChangeEvent\n} from \"../../index\";\n\nimport { StzhCalendarDateDisabledPredicate } from \"../../index\";\n\nimport { printISODate, parseISODate } from \"../../utils/date-utils\"\nimport { StzhLocaleAdapter } from \"../../utils/date-adapter\"\n\nimport { StzhDatepickerLocalizedText } from \"./stzh-datepicker.localization\";\n\n/**\n * @slot action - Slot for action below calendar (stzh-link element)\n */\n@Component({\n tag: \"stzh-datepicker\",\n styleUrl: \"stzh-datepicker.scss\",\n scoped: true\n})\nexport class StzhDatepicker {\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @Prop() calendarMin: string = \"\"\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @Prop() calendarMax: string = \"\"\n\n /**\n * Controls which days are disabled and therefore disallowed.\n * For example, this can be used to disallow selection of weekends.\n */\n @Prop() calendarIsDateDisabled: StzhCalendarDateDisabledPredicate = () => false\n\n /** Name of the hidden date picker input. */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Value of hidden date picker input (current selected date in ISO format). */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Label for input field and popover */\n @Prop() label: string = \"\";\n\n /** Whether label is visually hidden. */\n @Prop() labelHidden: boolean = false;\n\n /** Whether the element is readonly or not */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Size variant */\n @Prop({ reflect: true }) size: \"default\" | \"small\" = \"default\";\n\n /** Show calendar inline */\n @Prop() inline: boolean = false;\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: StzhDatepickerLocalizedText;\n\n @State() buttonLabel: string;\n\n @Watch(\"localization\")\n createDateFormatters() {\n if (this.localization) {\n this.dateFormatLong = new Intl.DateTimeFormat(this.localization.$locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n })\n }\n }\n\n /** Update calendar and input when value prop has changed */\n @Watch(\"value\")\n valueWatcher(newValue: string) {\n const date = parseISODate(newValue);\n\n if (this.calendar) {\n this.calendar.value = newValue;\n }\n\n if (this.input) {\n this.input.value = this.dateAdapter.format(date, \"dateInput\");\n }\n\n this.updateButtonAccessibleLabel();\n }\n\n /** Set value by a JS Date object */\n @Method()\n async setDate(date: Date) {\n this.value = printISODate(date);\n }\n\n /** Return internal popover element */\n @Method()\n async getPopover(): Promise<HTMLStzhPopoverElement> {\n return this.popover;\n }\n\n /** Datepicker change event */\n @Event() stzhChange: EventEmitter<StzhDatepickerChangeEvent>;\n\n @Element() element: HTMLStzhDatepickerElement;\n\n /**\n * To format dates exclusively for the benefit of screen readers.\n *\n * We prefer DateTimeFormat over date.toLocaleDateString, as the former has\n * better performance when formatting large number of dates. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance\n */\n private dateFormatLong: Intl.DateTimeFormat\n\n private input: HTMLStzhInputElement;\n private popover: HTMLStzhPopoverElement;\n private calendar: HTMLStzhCalendarElement;\n\n private onRootFocus = () => {\n if (this.input) {\n this.input.setFocus();\n }\n }\n\n private onInputChanged = () => {\n const parsedDate = this.dateAdapter.parse(this.input.value, \"dateInput\");\n\n if (this.input.value === \"\" || parsedDate) {\n const isoDate = printISODate(parsedDate);\n\n if (this.value !== isoDate) {\n if (this.calendar) {\n this.calendar.value = isoDate;\n }\n\n this.value = isoDate;\n } else {\n this.valueWatcher(isoDate);\n }\n\n this.stzhChange.emit({\n component: \"stzh-datepicker\",\n value: this.value,\n valueAsDate: parsedDate,\n })\n }\n }\n\n private onCalendarChange = (event: CustomEvent<StzhCalendarChangeEvent>) => {\n this.value = event.detail.value;\n this.stzhChange.emit({\n component: \"stzh-datepicker\",\n value: this.value,\n valueAsDate: event.detail.valueAsDate,\n });\n\n if (this.input) {\n this.input.value = event.detail.valueAsDate\n && this.dateAdapter.format(event.detail.valueAsDate, \"dateInput\");\n }\n\n if (this.popover) {\n this.popover.hide();\n }\n }\n\n private updateButtonAccessibleLabel() {\n if (!this.localization) {\n return;\n }\n\n try {\n const valueAsDate = parseISODate(this.value);\n this.buttonLabel = `${this.label}, ${this.localization.buttonLabel}, ${this.localization.selectedDateMessage} ${this.dateFormatLong.format(valueAsDate)}`;\n } catch (err) {\n this.buttonLabel = `${this.label}, ${this.localization.buttonLabel}`;\n }\n }\n\n connectedCallback() {\n this.createDateFormatters();\n }\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"datepicker\");\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 componentDidLoad() {\n this.valueWatcher(this.value);\n }\n\n render() {\n const classes = {\n \"stzh-datepicker\": true,\n \"stzh-datepicker--inline\": this.inline\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n />\n\n {this.inline &&\n <Fragment>\n <stzh-calendar\n ref={(el) => (this.calendar = el as HTMLStzhCalendarElement)}\n isDateDisabled={this.calendarIsDateDisabled}\n min={this.calendarMin}\n max={this.calendarMax}\n onStzhChange={this.onCalendarChange}\n ></stzh-calendar>\n <div class=\"stzh-datepicker__actions\">\n <slot name=\"action\"></slot>\n </div>\n </Fragment>\n }\n\n {!this.inline &&\n <stzh-input\n label={this.label}\n labelHidden={this.labelHidden}\n ref={(el) => (this.input = el as HTMLStzhInputElement)}\n noAutocomplete\n onStzhChanged={this.onInputChanged}\n readonly={this.readonly}\n disabled={this.disabled}\n description={this.description}\n descriptionLong={this.descriptionLong}\n error={this.error}\n invalid={this.invalid}\n required={this.required}\n showMarker={this.showMarker}\n size={this.size}\n >\n <stzh-popover\n ref={(el) => (this.popover = el as HTMLStzhPopoverElement)}\n class=\"stzh-datepicker__popover\"\n slot=\"button-right\"\n placement=\"bottom-end\"\n label={this.label}\n >\n <stzh-button\n variant=\"input\"\n icon-only\n icon=\"calendar\"\n disabled={this.disabled}\n a11yLabel={this.buttonLabel}\n >\n </stzh-button>\n <div slot=\"content\">\n <stzh-calendar\n ref={(el) => (this.calendar = el as HTMLStzhCalendarElement)}\n isDateDisabled={this.calendarIsDateDisabled}\n min={this.calendarMin}\n max={this.calendarMax}\n onStzhChange={this.onCalendarChange}\n >\n </stzh-calendar>\n <div class=\"stzh-datepicker__actions\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n </stzh-popover>\n </stzh-input>\n }\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n\n ::slotted(stzh-text) {\n --color: inherit;\n }\n}\n\n.stzh-radio {\n\t@include input-description;\n\n &__field-wrapper {\n @include fontSize('milli');\n position: relative;\n display: flex;\n user-select: none;\n cursor: pointer;\n }\n\n &__input {\n @include visuallyhiddenInput;\n border-radius: $formInputBorderRadius;\n }\n\n &__mark {\n @include radio__mark();\n }\n\n &__check {\n @include radio__check();\n }\n\n &__label {\n display: inline-block;\n color: $baseColor;\n transition: color $baseTransitionAnimationSpeed;\n margin-left: space('small');\n line-height: 24px;\n\n &:empty {\n display: none;\n }\n }\n\n &__marker-symbol {\n @include fontSize('micro');\n }\n\n /* Hover / Focus / Checked */\n\n &:hover &__label,\n &__input:checked:hover ~ &__label,\n &__input:checked:hover ~ &__mark &__check,\n &__input:checked:focus ~ &__mark &__check {\n color: $colorPrimaryHover;\n }\n\n &__input:checked ~ &__label {\n color: $colorPrimary;\n }\n\n &:hover &__mark,\n &__input:focus:hover ~ &__mark,\n &__input:checked:hover ~ &__mark,\n &__input:checked:focus ~ &__mark {\n border-color: $colorPrimaryHover;\n }\n\n &__input:focus ~ &__mark,\n &__input:checked ~ &__mark {\n border-color: $colorPrimary;\n }\n\n &__input:checked ~ &__mark &__check {\n opacity: 1;\n }\n\n /* Invalid */\n\n &--is-invalid &__input ~ &__label,\n &--is-invalid &__input ~ &__mark &__check {\n color: $colorError;\n }\n\n &--is-invalid &__input ~ &__mark {\n border-color: $colorError;\n }\n\n /* Disabled */\n\n\t&--is-disabled &__field-wrapper {\n cursor: not-allowed;\n }\n\n &--is-disabled &__input ~ &__label,\n &--is-disabled &__input ~ &__mark &__check {\n color: $formDisabledColor;\n }\n\n &--is-disabled &__input ~ &__mark {\n border-color: $formDisabledBorderColor;\n }\n\n &--is-disabled &__mark {\n background-color: $formDisabledBackgroundColor;\n }\n}\n","import {\n Host,\n Component,\n Prop,\n Event,\n Element,\n EventEmitter,\n Method,\n h,\n Watch\n} from \"@stencil/core\";\n\nimport {\n StzhRadioChangeEvent,\n StzhRadioFocusEvent,\n StzhRadioBlurEvent\n} from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nlet radioCounter = 0;\n\n/**\n * @slot - Slot for label content\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-radio\",\n styleUrl: \"stzh-radio.scss\",\n scoped: true\n})\nexport class StzhRadio {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** The value of the input element */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Checked status */\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Id for element which describes the radio button (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /** Focus input field */\n @Method()\n async setFocus() {\n this.input.focus();\n }\n\n /** Input change event */\n @Event() stzhChange: EventEmitter<StzhRadioChangeEvent>;\n\n /** Input focus event */\n @Event() stzhFocus: EventEmitter<StzhRadioFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhRadioBlurEvent>;\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n @Element() element: HTMLStzhRadioElement;\n\n private input: HTMLInputElement;\n private inputId: string;\n private focusedByInput: boolean = false;\n\n private onInput = (event: InputEvent) => {\n this.checked = this.input.checked;\n this.stzhChange.emit({\n component: \"stzh-radio\",\n originalEvent: event,\n value: this.value,\n checked: this.checked\n });\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.setFocus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent('focus', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-radio\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent('blur', {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-radio\",\n originalEvent: event\n });\n }\n\n async componentWillLoad() {\n this.inputId = `stzh-radio-${radioCounter++}`;\n this.errorWatcher(this.error);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'radio');\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-radio\": true,\n \"stzh-radio--has-description\": descriptionUsed,\n \"stzh-radio--has-description-long\": descriptionLongUsed,\n \"stzh-radio--has-error\": errorUsed,\n \"stzh-radio--is-required\": this.required,\n \"stzh-radio--is-invalid\": this.invalid,\n \"stzh-radio--is-disabled\": this.disabled\n };\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n <label class=\"stzh-radio__field-wrapper\">\n <input\n class=\"stzh-radio__input\"\n ref={(el) => (this.input = el as HTMLInputElement)}\n type=\"radio\"\n id={this.inputId}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-describedby={`${this.inputId}-description ${this.a11yDescribedby}`}\n aria-required={this.required ? \"true\" : \"false\"}\n aria-invalid={this.invalid ? \"true\" : \"false\"}\n checked={this.checked}\n onInput={this.onInput}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <div class=\"stzh-radio__mark\">\n <div class=\"stzh-radio__check\"></div>\n </div>\n <div class=\"stzh-radio__label\">\n {this.label ? this.label : <slot></slot>}\n {this.showMarker &&\n <span class=\"stzh-radio__marker\">\n <span class=\"stzh-radio__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-radio__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </div>\n </label>\n <StzhInputDescription\n classPrefix=\"stzh-radio\"\n id={`${this.inputId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n </div>\n </Host>\n );\n }\n}\n",":host([direction=\"vertical\"]) {\n ::slotted(stzh-radio:not(:last-child)) {\n margin-bottom: space('medium');\n }\n}\n\n:host([direction=\"horizontal\"]) {\n ::slotted(stzh-radio:not(:last-child)) {\n margin-right: space('large');\n }\n}\n\n.stzh-radiogroup {\n @include input-description;\n margin: 0;\n padding: 0;\n border: none;\n\n &__fields {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n }\n\n &__legend {\n @include font('heavy');\n @include fontSize('nano');\n padding: 0;\n margin-bottom: space('xsmall');\n }\n\n &--hide-legend &__legend {\n @include visuallyhidden;\n }\n\n &--direction-horizontal &__fields {\n flex-direction: row;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n Watch,\n h,\n Listen\n} from \"@stencil/core\";\n\nimport { StzhRadioChangeEvent } from \"../../index\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { camelCase } from \"../../utils/string-utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\nconst SELECTOR_RADIO = 'stzh-radio, stzh-button[type=radio], stzh-card';\n\nlet radiogroupCounter = 0;\n\n/**\n * @slot - Slot for `stzh-radio`, `stzh-button[type=\"radio\"]` or `stzh-card` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-radiogroup\",\n styleUrl: \"stzh-radiogroup.scss\",\n scoped: true\n})\nexport class StzhRadiogroup {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** Whether the element is disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** The name of the input radio elements, will define the radio group. If you have more than one radio group on a page, every group needs to have its own unique name */\n @Prop({ reflect: true }) name: string;\n\n /** The legend */\n @Prop() legend: string;\n\n /** Hide legend to show only for screenreaders */\n @Prop({ reflect: true }) hideLegend: boolean = false;\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Append text to label depending if field is optional/required. true -> show \"(optional)\", false -> show nothing */\n @Prop({ reflect: true }) showMarker: boolean = false;\n\n /** Select a radio by value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Direction */\n @Prop({ reflect: true }) direction: \"vertical\" | \"horizontal\" = \"vertical\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Current checked radio element (readonly) */\n @Prop() checkedRadio: HTMLStzhRadioElement | null = null;\n\n /** Prevent updating certain properties of radio elements (possible values inside array: disabled, invalid, required, hide-marker) */\n @Prop() preventUpdateProperties: string[] | string = [];\n private _preventUpdateProperties: string[] = [];\n\n /** Host element */\n @Element() element: HTMLElement;\n\n @Watch(\"name\")\n watchName(newValue: string) {\n this.updateRadiosProperty(\"name\", newValue);\n }\n\n @Watch(\"disabled\")\n watchDisabled(newValue: boolean) {\n this.updateRadiosProperty(\"disabled\", newValue);\n }\n\n @Watch(\"invalid\")\n watchInvalid(newValue: boolean) {\n this.updateRadiosProperty(\"invalid\", newValue);\n }\n\n @Watch(\"required\")\n watchRequired(newValue: boolean) {\n this.updateRadiosProperty(\"required\", newValue);\n }\n\n @Watch(\"value\")\n watchValue(newValue: string) {\n this.updateCheckedRadioByValue(newValue);\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n\n this.invalid = this._error.length > 0;\n }\n\n @Watch(\"preventUpdateProperties\")\n preventUpdatePropertiesWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n this._preventUpdateProperties = JSON.parse(newValue);\n } else {\n this._preventUpdateProperties = newValue;\n }\n }\n\n @Listen(\"stzhChange\")\n onChange(event: CustomEvent<StzhRadioChangeEvent>) {\n this.value = event.detail.value;\n }\n\n /** Radio elements */\n private radios: HTMLStzhRadioElement[];\n private radiogroupId: string;\n private observer: MutationObserver;\n\n private updateRadiosProperty(prop: string, value: any) {\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (prop === \"name\" || (this._preventUpdateProperties.indexOf(prop) === -1)) {\n radio[camelCase(prop)] = value;\n }\n });\n }\n\n private updateCheckedRadioByValue(value: string) {\n this.checkedRadio = this.radios.find(radio => radio.value === value);\n\n if (this.checkedRadio) {\n this.checkedRadio.checked = true;\n }\n\n this.uncheckRadios();\n }\n\n private uncheckRadios() {\n // make sure that no other radios are checked than the current one or no one\n this.radios.forEach((radio: HTMLStzhRadioElement) => {\n if (!this.checkedRadio || radio !== this.checkedRadio) {\n radio.checked = false;\n }\n });\n }\n\n private init = () => {\n // update radios\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n this.updateRadiosProperty(\"show-marker\", false);\n this.updateRadiosProperty(\"a11y-describedby\", `${this.radiogroupId}-description`);\n\n this.watchValue(this.value);\n this.watchName(this.name);\n this.watchDisabled(this.disabled);\n this.watchInvalid(this.invalid);\n this.watchRequired(this.required);\n }\n\n async componentWillLoad() {\n this.radiogroupId = `stzh-radiogroup-${radiogroupCounter++}`;\n this.errorWatcher(this.error);\n this.preventUpdatePropertiesWatcher(this.preventUpdateProperties);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, 'radiogroup');\n }\n }\n\n componentShouldUpdate(_newValue, _oldValue, prop: string) {\n return prop !== \"checkedRadio\";\n }\n\n componentDidRender() {\n this.init();\n }\n\n connectedCallback() {\n if (!this.value) {\n this.radios = Array.from(this.element.querySelectorAll(SELECTOR_RADIO));\n\n // try to find a checkbox that might has checked set to true\n const checkedRadio = this.radios.find(radio => radio.checked);\n\n if (checkedRadio) {\n this.value = checkedRadio.value;\n }\n }\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n }\n\n render() {\n const descriptionUsed = hasSlot(this.element, 'description') || !!this.description;\n const descriptionLongUsed = hasSlot(this.element, 'description-long') || !!this.descriptionLong;\n const errorUsed = hasSlot(this.element, 'error') || !!this.error;\n\n const classes = {\n \"stzh-radiogroup\": true,\n \"stzh-radiogroup--has-description\": descriptionUsed,\n \"stzh-radiogroup--has-description-long\": descriptionLongUsed,\n \"stzh-radiogroup--has-error\": errorUsed,\n \"stzh-radiogroup--is-required\": this.required,\n \"stzh-radiogroup--is-disabled\": this.disabled,\n \"stzh-radiogroup--is-invalid\": this.invalid,\n \"stzh-radiogroup--hide-legend\": this.hideLegend,\n [`stzh-radiogroup--direction-${this.direction}`]: !!this.direction\n };\n\n return (\n <fieldset class={classes}>\n {this.legend &&\n <legend class=\"stzh-radiogroup__legend\">\n {this.legend}\n {this.showMarker &&\n <span class=\"stzh-radiogroup__marker\">\n <span class=\"stzh-radiogroup__marker-symbol\" aria-hidden=\"true\">\n {this.required\n ? this.localization.$globals.requiredFieldMarker\n : this.localization.$globals.optionalFieldMarker\n }\n </span>\n <span class=\"stzh-radiogroup__marker-text\">\n {this.required\n ? this.localization.$globals.requiredFieldText\n : this.localization.$globals.optionalFieldText\n }\n </span>\n </span>\n }\n </legend>\n }\n <div class=\"stzh-radiogroup__fields\">\n <slot></slot>\n </div>\n <StzhInputDescription\n classPrefix=\"stzh-radiogroup\"\n id={`${this.radiogroupId}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButt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