@watermarkinsights/ripple 3.25.0-2 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-9dce0ea3.js → chartFunctions-2f04ab6a.js} +591 -591
  3. package/dist/cjs/chartFunctions-2f04ab6a.js.map +1 -0
  4. package/dist/cjs/{functions-53aff314.js → functions-d2d99997.js} +478 -478
  5. package/dist/cjs/{functions-53aff314.js.map → functions-d2d99997.js.map} +1 -1
  6. package/dist/cjs/{global-c22b1249.js → global-d0584d18.js} +63 -63
  7. package/dist/cjs/global-d0584d18.js.map +1 -0
  8. package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +50 -50
  9. package/dist/cjs/http-service-9e8c4dd5.js.map +1 -0
  10. package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +30 -30
  11. package/dist/cjs/interfaces-30a74c1f.js.map +1 -0
  12. package/dist/cjs/intl-a1ccf587.js +140 -0
  13. package/dist/cjs/intl-a1ccf587.js.map +1 -0
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
  16. package/dist/cjs/priv-chart-popover.cjs.entry.js.map +1 -1
  17. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  18. package/dist/cjs/priv-datepicker.cjs.entry.js.map +1 -1
  19. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  20. package/dist/cjs/priv-navigator-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  22. package/dist/cjs/priv-navigator-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ripple.cjs.js +2 -2
  24. package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
  25. package/dist/cjs/wm-action-menu_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wm-button.cjs.entry.js +260 -260
  27. package/dist/cjs/wm-button.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
  29. package/dist/cjs/wm-chart-slice.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wm-chart.cjs.entry.js +179 -179
  31. package/dist/cjs/wm-chart.cjs.entry.js.map +1 -1
  32. package/dist/cjs/wm-datepicker.cjs.entry.js +264 -264
  33. package/dist/cjs/wm-datepicker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
  35. package/dist/cjs/wm-file-list.cjs.entry.js.map +1 -1
  36. package/dist/cjs/wm-file.cjs.entry.js +201 -201
  37. package/dist/cjs/wm-file.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wm-input.cjs.entry.js +124 -140
  39. package/dist/cjs/wm-input.cjs.entry.js.map +1 -1
  40. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  41. package/dist/cjs/wm-modal-footer.cjs.entry.js.map +1 -1
  42. package/dist/cjs/wm-modal-header.cjs.entry.js +32 -32
  43. package/dist/cjs/wm-modal-header.cjs.entry.js.map +1 -1
  44. package/dist/cjs/wm-modal.cjs.entry.js +152 -152
  45. package/dist/cjs/wm-modal.cjs.entry.js.map +1 -1
  46. package/dist/cjs/wm-navigation_3.cjs.entry.js +225 -230
  47. package/dist/cjs/wm-navigation_3.cjs.entry.js.map +1 -1
  48. package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
  49. package/dist/cjs/wm-navigator.cjs.entry.js.map +1 -1
  50. package/dist/cjs/wm-network-uploader.cjs.entry.js +465 -467
  51. package/dist/cjs/wm-network-uploader.cjs.entry.js.map +1 -1
  52. package/dist/cjs/wm-option_2.cjs.entry.js +769 -772
  53. package/dist/cjs/wm-option_2.cjs.entry.js.map +1 -1
  54. package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
  55. package/dist/cjs/wm-pagination.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
  57. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js.map +1 -1
  58. package/dist/cjs/wm-search.cjs.entry.js +185 -192
  59. package/dist/cjs/wm-search.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wm-snackbar.cjs.entry.js +155 -159
  61. package/dist/cjs/wm-snackbar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
  63. package/dist/cjs/wm-tab-item_3.cjs.entry.js.map +1 -1
  64. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  65. package/dist/cjs/wm-tag-input-row.cjs.entry.js.map +1 -1
  66. package/dist/cjs/wm-tag-input.cjs.entry.js +912 -924
  67. package/dist/cjs/wm-tag-input.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wm-timepicker.cjs.entry.js +386 -386
  69. package/dist/cjs/wm-timepicker.cjs.entry.js.map +1 -1
  70. package/dist/cjs/wm-toggletip.cjs.entry.js +130 -130
  71. package/dist/cjs/wm-toggletip.cjs.entry.js.map +1 -1
  72. package/dist/cjs/wm-uploader.cjs.entry.js +441 -510
  73. package/dist/cjs/wm-uploader.cjs.entry.js.map +1 -1
  74. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  75. package/dist/cjs/wm-wrapper.cjs.entry.js.map +1 -1
  76. package/dist/collection/components/charts/chartFunctions.js +557 -557
  77. package/dist/collection/components/charts/chartFunctions.js.map +1 -1
  78. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +268 -270
  79. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js.map +1 -1
  80. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +126 -126
  81. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js.map +1 -1
  82. package/dist/collection/components/charts/wm-chart/wm-chart.js +447 -447
  83. package/dist/collection/components/charts/wm-chart/wm-chart.js.map +1 -1
  84. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +208 -208
  85. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js.map +1 -1
  86. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +144 -144
  87. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js.map +1 -1
  88. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +122 -122
  89. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js.map +1 -1
  90. package/dist/collection/components/wm-action-menu/wm-action-menu.js +473 -473
  91. package/dist/collection/components/wm-action-menu/wm-action-menu.js.map +1 -1
  92. package/dist/collection/components/wm-button/wm-button.js +576 -576
  93. package/dist/collection/components/wm-button/wm-button.js.map +1 -1
  94. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +984 -984
  95. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js.map +1 -1
  96. package/dist/collection/components/wm-datepicker/wm-datepicker.css +4 -4
  97. package/dist/collection/components/wm-datepicker/wm-datepicker.js +492 -492
  98. package/dist/collection/components/wm-datepicker/wm-datepicker.js.map +1 -1
  99. package/dist/collection/components/wm-file/wm-file.js +334 -334
  100. package/dist/collection/components/wm-file/wm-file.js.map +1 -1
  101. package/dist/collection/components/wm-file-list/wm-file-list.js +153 -153
  102. package/dist/collection/components/wm-file-list/wm-file-list.js.map +1 -1
  103. package/dist/collection/components/wm-input/wm-input.css +4 -4
  104. package/dist/collection/components/wm-input/wm-input.js +428 -444
  105. package/dist/collection/components/wm-input/wm-input.js.map +1 -1
  106. package/dist/collection/components/wm-menuitem/wm-menuitem.js +455 -455
  107. package/dist/collection/components/wm-menuitem/wm-menuitem.js.map +1 -1
  108. package/dist/collection/components/wm-modal/wm-modal-footer.js +139 -139
  109. package/dist/collection/components/wm-modal/wm-modal-footer.js.map +1 -1
  110. package/dist/collection/components/wm-modal/wm-modal-header.js +83 -83
  111. package/dist/collection/components/wm-modal/wm-modal-header.js.map +1 -1
  112. package/dist/collection/components/wm-modal/wm-modal.js +463 -463
  113. package/dist/collection/components/wm-modal/wm-modal.js.map +1 -1
  114. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +177 -177
  115. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js.map +1 -1
  116. package/dist/collection/components/wm-navigation/wm-navigation-item.js +131 -131
  117. package/dist/collection/components/wm-navigation/wm-navigation-item.js.map +1 -1
  118. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -223
  119. package/dist/collection/components/wm-navigation/wm-navigation.js.map +1 -1
  120. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +107 -107
  121. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js.map +1 -1
  122. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -124
  123. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js.map +1 -1
  124. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  125. package/dist/collection/components/wm-navigator/wm-navigator.js.map +1 -1
  126. package/dist/collection/components/wm-option/wm-option.js +436 -436
  127. package/dist/collection/components/wm-option/wm-option.js.map +1 -1
  128. package/dist/collection/components/wm-pagination/wm-pagination.js +371 -371
  129. package/dist/collection/components/wm-pagination/wm-pagination.js.map +1 -1
  130. package/dist/collection/components/wm-search/wm-search.css +5 -3
  131. package/dist/collection/components/wm-search/wm-search.js +440 -447
  132. package/dist/collection/components/wm-search/wm-search.js.map +1 -1
  133. package/dist/collection/components/wm-select/wm-select.css +4 -4
  134. package/dist/collection/components/wm-select/wm-select.js +1055 -1058
  135. package/dist/collection/components/wm-select/wm-select.js.map +1 -1
  136. package/dist/collection/components/wm-snackbar/wm-snackbar.js +283 -287
  137. package/dist/collection/components/wm-snackbar/wm-snackbar.js.map +1 -1
  138. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +212 -212
  139. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js.map +1 -1
  140. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +328 -328
  141. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js.map +1 -1
  142. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +109 -109
  143. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js.map +1 -1
  144. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +123 -123
  145. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js.map +1 -1
  146. package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -4
  147. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1267 -1279
  148. package/dist/collection/components/wm-tag-input/wm-tag-input.js.map +1 -1
  149. package/dist/collection/components/wm-timepicker/wm-timepicker.css +4 -4
  150. package/dist/collection/components/wm-timepicker/wm-timepicker.js +606 -606
  151. package/dist/collection/components/wm-timepicker/wm-timepicker.js.map +1 -1
  152. package/dist/collection/components/wm-toggletip/wm-toggletip.js +254 -254
  153. package/dist/collection/components/wm-toggletip/wm-toggletip.js.map +1 -1
  154. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +773 -775
  155. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js.map +1 -1
  156. package/dist/collection/components/wm-uploader/wm-uploader.js +965 -1034
  157. package/dist/collection/components/wm-uploader/wm-uploader.js.map +1 -1
  158. package/dist/collection/components/wm-wrapper/wm-wrapper.js +29 -29
  159. package/dist/collection/components/wm-wrapper/wm-wrapper.js.map +1 -1
  160. package/dist/collection/dev/scripts.js +20 -20
  161. package/dist/collection/global/__mocks__/functions.js +7 -7
  162. package/dist/collection/global/__mocks__/functions.js.map +1 -1
  163. package/dist/collection/global/functions.js +521 -521
  164. package/dist/collection/global/functions.js.map +1 -1
  165. package/dist/collection/global/global.js +70 -70
  166. package/dist/collection/global/global.js.map +1 -1
  167. package/dist/collection/global/interfaces.js +50 -50
  168. package/dist/collection/global/interfaces.js.map +1 -1
  169. package/dist/collection/global/intl.js +133 -7
  170. package/dist/collection/global/intl.js.map +1 -1
  171. package/dist/collection/global/services/__mocks__/http-service.js +131 -131
  172. package/dist/collection/global/services/__mocks__/http-service.js.map +1 -1
  173. package/dist/collection/global/services/http-service.js +51 -51
  174. package/dist/collection/global/services/http-service.js.map +1 -1
  175. package/dist/collection/lang/lang.js +6 -6
  176. package/dist/collection/lang/lang.js.map +1 -1
  177. package/dist/collection/lang/missing.js +43 -43
  178. package/dist/collection/lang/piglatin.js +93 -93
  179. package/dist/esm/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +591 -591
  180. package/dist/esm/chartFunctions-a72f5835.js.map +1 -0
  181. package/dist/esm/{functions-bb1309d0.js → functions-dc9964aa.js} +478 -478
  182. package/dist/esm/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  183. package/dist/esm/{global-2c5c2727.js → global-3d0ef32b.js} +63 -63
  184. package/dist/esm/global-3d0ef32b.js.map +1 -0
  185. package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +50 -50
  186. package/dist/esm/http-service-5d037e16.js.map +1 -0
  187. package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +30 -30
  188. package/dist/esm/interfaces-61c6305b.js.map +1 -0
  189. package/dist/esm/intl-4d4826dd.js +137 -0
  190. package/dist/esm/intl-4d4826dd.js.map +1 -0
  191. package/dist/esm/loader.js +2 -2
  192. package/dist/esm/polyfills/core-js.js +0 -0
  193. package/dist/esm/polyfills/dom.js +0 -0
  194. package/dist/esm/polyfills/es5-html-element.js +0 -0
  195. package/dist/esm/polyfills/index.js +0 -0
  196. package/dist/esm/polyfills/system.js +0 -0
  197. package/dist/esm/priv-chart-popover.entry.js +91 -91
  198. package/dist/esm/priv-chart-popover.entry.js.map +1 -1
  199. package/dist/esm/priv-datepicker.entry.js +657 -657
  200. package/dist/esm/priv-datepicker.entry.js.map +1 -1
  201. package/dist/esm/priv-navigator-button.entry.js +19 -19
  202. package/dist/esm/priv-navigator-button.entry.js.map +1 -1
  203. package/dist/esm/priv-navigator-item.entry.js +23 -23
  204. package/dist/esm/priv-navigator-item.entry.js.map +1 -1
  205. package/dist/esm/ripple.js +2 -2
  206. package/dist/esm/wm-action-menu_2.entry.js +334 -334
  207. package/dist/esm/wm-action-menu_2.entry.js.map +1 -1
  208. package/dist/esm/wm-button.entry.js +260 -260
  209. package/dist/esm/wm-button.entry.js.map +1 -1
  210. package/dist/esm/wm-chart-slice.entry.js +18 -18
  211. package/dist/esm/wm-chart-slice.entry.js.map +1 -1
  212. package/dist/esm/wm-chart.entry.js +179 -179
  213. package/dist/esm/wm-chart.entry.js.map +1 -1
  214. package/dist/esm/wm-datepicker.entry.js +264 -264
  215. package/dist/esm/wm-datepicker.entry.js.map +1 -1
  216. package/dist/esm/wm-file-list.entry.js +35 -35
  217. package/dist/esm/wm-file-list.entry.js.map +1 -1
  218. package/dist/esm/wm-file.entry.js +201 -201
  219. package/dist/esm/wm-file.entry.js.map +1 -1
  220. package/dist/esm/wm-input.entry.js +124 -140
  221. package/dist/esm/wm-input.entry.js.map +1 -1
  222. package/dist/esm/wm-modal-footer.entry.js +33 -33
  223. package/dist/esm/wm-modal-footer.entry.js.map +1 -1
  224. package/dist/esm/wm-modal-header.entry.js +32 -32
  225. package/dist/esm/wm-modal-header.entry.js.map +1 -1
  226. package/dist/esm/wm-modal.entry.js +152 -152
  227. package/dist/esm/wm-modal.entry.js.map +1 -1
  228. package/dist/esm/wm-navigation_3.entry.js +225 -230
  229. package/dist/esm/wm-navigation_3.entry.js.map +1 -1
  230. package/dist/esm/wm-navigator.entry.js +264 -264
  231. package/dist/esm/wm-navigator.entry.js.map +1 -1
  232. package/dist/esm/wm-network-uploader.entry.js +465 -467
  233. package/dist/esm/wm-network-uploader.entry.js.map +1 -1
  234. package/dist/esm/wm-option_2.entry.js +769 -772
  235. package/dist/esm/wm-option_2.entry.js.map +1 -1
  236. package/dist/esm/wm-pagination.entry.js +179 -179
  237. package/dist/esm/wm-pagination.entry.js.map +1 -1
  238. package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
  239. package/dist/esm/wm-progress-indicator_3.entry.js.map +1 -1
  240. package/dist/esm/wm-search.entry.js +185 -192
  241. package/dist/esm/wm-search.entry.js.map +1 -1
  242. package/dist/esm/wm-snackbar.entry.js +155 -159
  243. package/dist/esm/wm-snackbar.entry.js.map +1 -1
  244. package/dist/esm/wm-tab-item_3.entry.js +264 -264
  245. package/dist/esm/wm-tab-item_3.entry.js.map +1 -1
  246. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  247. package/dist/esm/wm-tag-input-row.entry.js.map +1 -1
  248. package/dist/esm/wm-tag-input.entry.js +912 -924
  249. package/dist/esm/wm-tag-input.entry.js.map +1 -1
  250. package/dist/esm/wm-timepicker.entry.js +386 -386
  251. package/dist/esm/wm-timepicker.entry.js.map +1 -1
  252. package/dist/esm/wm-toggletip.entry.js +130 -130
  253. package/dist/esm/wm-toggletip.entry.js.map +1 -1
  254. package/dist/esm/wm-uploader.entry.js +441 -510
  255. package/dist/esm/wm-uploader.entry.js.map +1 -1
  256. package/dist/esm/wm-wrapper.entry.js +12 -12
  257. package/dist/esm/wm-wrapper.entry.js.map +1 -1
  258. package/dist/esm-es5/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +2 -2
  259. package/dist/esm-es5/chartFunctions-a72f5835.js.map +1 -0
  260. package/dist/esm-es5/{functions-bb1309d0.js → functions-dc9964aa.js} +1 -1
  261. package/dist/esm-es5/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  262. package/dist/esm-es5/global-3d0ef32b.js +2 -0
  263. package/dist/esm-es5/global-3d0ef32b.js.map +1 -0
  264. package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
  265. package/dist/esm-es5/http-service-5d037e16.js.map +1 -0
  266. package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +1 -1
  267. package/dist/esm-es5/interfaces-61c6305b.js.map +1 -0
  268. package/dist/esm-es5/intl-4d4826dd.js +2 -0
  269. package/dist/esm-es5/intl-4d4826dd.js.map +1 -0
  270. package/dist/esm-es5/loader.js +1 -1
  271. package/dist/esm-es5/loader.js.map +1 -1
  272. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  273. package/dist/esm-es5/priv-chart-popover.entry.js.map +1 -1
  274. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  275. package/dist/esm-es5/priv-datepicker.entry.js.map +1 -1
  276. package/dist/esm-es5/priv-navigator-button.entry.js.map +1 -1
  277. package/dist/esm-es5/priv-navigator-item.entry.js.map +1 -1
  278. package/dist/esm-es5/ripple.js +1 -1
  279. package/dist/esm-es5/ripple.js.map +1 -1
  280. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  281. package/dist/esm-es5/wm-action-menu_2.entry.js.map +1 -1
  282. package/dist/esm-es5/wm-button.entry.js +1 -1
  283. package/dist/esm-es5/wm-button.entry.js.map +1 -1
  284. package/dist/esm-es5/wm-chart-slice.entry.js.map +1 -1
  285. package/dist/esm-es5/wm-chart.entry.js +1 -1
  286. package/dist/esm-es5/wm-chart.entry.js.map +1 -1
  287. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  288. package/dist/esm-es5/wm-datepicker.entry.js.map +1 -1
  289. package/dist/esm-es5/wm-file-list.entry.js.map +1 -1
  290. package/dist/esm-es5/wm-file.entry.js +1 -1
  291. package/dist/esm-es5/wm-file.entry.js.map +1 -1
  292. package/dist/esm-es5/wm-input.entry.js +1 -1
  293. package/dist/esm-es5/wm-input.entry.js.map +1 -1
  294. package/dist/esm-es5/wm-modal-footer.entry.js.map +1 -1
  295. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  296. package/dist/esm-es5/wm-modal-header.entry.js.map +1 -1
  297. package/dist/esm-es5/wm-modal.entry.js +1 -1
  298. package/dist/esm-es5/wm-modal.entry.js.map +1 -1
  299. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  300. package/dist/esm-es5/wm-navigation_3.entry.js.map +1 -1
  301. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  302. package/dist/esm-es5/wm-navigator.entry.js.map +1 -1
  303. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  304. package/dist/esm-es5/wm-network-uploader.entry.js.map +1 -1
  305. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  306. package/dist/esm-es5/wm-option_2.entry.js.map +1 -1
  307. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  308. package/dist/esm-es5/wm-pagination.entry.js.map +1 -1
  309. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  310. package/dist/esm-es5/wm-progress-indicator_3.entry.js.map +1 -1
  311. package/dist/esm-es5/wm-search.entry.js +1 -1
  312. package/dist/esm-es5/wm-search.entry.js.map +1 -1
  313. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  314. package/dist/esm-es5/wm-snackbar.entry.js.map +1 -1
  315. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  316. package/dist/esm-es5/wm-tab-item_3.entry.js.map +1 -1
  317. package/dist/esm-es5/wm-tag-input-row.entry.js.map +1 -1
  318. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  319. package/dist/esm-es5/wm-tag-input.entry.js.map +1 -1
  320. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  321. package/dist/esm-es5/wm-timepicker.entry.js.map +1 -1
  322. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  323. package/dist/esm-es5/wm-toggletip.entry.js.map +1 -1
  324. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  325. package/dist/esm-es5/wm-uploader.entry.js.map +1 -1
  326. package/dist/esm-es5/wm-wrapper.entry.js.map +1 -1
  327. package/dist/ripple/{p-3f6c7e6c.entry.js → p-002d067e.entry.js} +2 -2
  328. package/dist/ripple/p-002d067e.entry.js.map +1 -0
  329. package/dist/ripple/p-02a1000a.entry.js +2 -0
  330. package/dist/ripple/p-02a1000a.entry.js.map +1 -0
  331. package/dist/ripple/{p-21bb563a.system.entry.js → p-04ae66fd.system.entry.js} +2 -2
  332. package/dist/ripple/p-04ae66fd.system.entry.js.map +1 -0
  333. package/dist/ripple/{p-c38f6103.system.js → p-0826dc64.system.js} +2 -2
  334. package/dist/ripple/{p-c38f6103.system.js.map → p-0826dc64.system.js.map} +1 -1
  335. package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +1 -1
  336. package/dist/ripple/p-08b7ec08.system.js.map +1 -0
  337. package/dist/ripple/{p-d5b0809e.entry.js → p-0ad3a708.entry.js} +2 -2
  338. package/dist/ripple/p-0ad3a708.entry.js.map +1 -0
  339. package/dist/ripple/p-0cd13c7d.system.entry.js +2 -0
  340. package/dist/ripple/p-0cd13c7d.system.entry.js.map +1 -0
  341. package/dist/ripple/p-0d7bccf7.entry.js.map +1 -1
  342. package/dist/ripple/p-0eb7b1b7.system.entry.js +2 -0
  343. package/dist/ripple/p-0eb7b1b7.system.entry.js.map +1 -0
  344. package/dist/ripple/{p-70768add.entry.js → p-11124a23.entry.js} +2 -2
  345. package/dist/ripple/p-11124a23.entry.js.map +1 -0
  346. package/dist/ripple/p-1808b90a.entry.js +2 -0
  347. package/dist/ripple/p-1808b90a.entry.js.map +1 -0
  348. package/dist/ripple/p-1fd20e05.system.entry.js +2 -0
  349. package/dist/ripple/p-1fd20e05.system.entry.js.map +1 -0
  350. package/dist/ripple/{p-f36b1c58.system.entry.js → p-23fa1ff6.system.entry.js} +2 -2
  351. package/dist/ripple/p-23fa1ff6.system.entry.js.map +1 -0
  352. package/dist/ripple/p-24a4cb11.system.entry.js.map +1 -1
  353. package/dist/ripple/p-2c2a7092.system.entry.js.map +1 -1
  354. package/dist/ripple/{p-9d02957d.system.js → p-313b6073.system.js} +1 -1
  355. package/dist/ripple/p-313b6073.system.js.map +1 -0
  356. package/dist/ripple/p-33558ec4.system.entry.js.map +1 -1
  357. package/dist/ripple/{p-28c12986.system.entry.js → p-33ec18d4.system.entry.js} +2 -2
  358. package/dist/ripple/p-33ec18d4.system.entry.js.map +1 -0
  359. package/dist/ripple/{p-7d0f3abe.entry.js → p-341aa131.entry.js} +2 -2
  360. package/dist/ripple/p-341aa131.entry.js.map +1 -0
  361. package/dist/ripple/p-3759b7af.system.entry.js.map +1 -1
  362. package/dist/ripple/p-38449dff.system.entry.js +2 -0
  363. package/dist/ripple/p-38449dff.system.entry.js.map +1 -0
  364. package/dist/ripple/{p-ee97c3f6.entry.js → p-384c4981.entry.js} +2 -2
  365. package/dist/ripple/p-384c4981.entry.js.map +1 -0
  366. package/dist/ripple/{p-b81ce905.system.entry.js → p-3869a69e.system.entry.js} +2 -2
  367. package/dist/ripple/p-3869a69e.system.entry.js.map +1 -0
  368. package/dist/ripple/p-4391166c.entry.js.map +1 -1
  369. package/dist/ripple/{p-e6e7cb2d.entry.js → p-43be123d.entry.js} +2 -2
  370. package/dist/ripple/p-43be123d.entry.js.map +1 -0
  371. package/dist/ripple/p-4a014591.entry.js.map +1 -1
  372. package/dist/ripple/p-4a06d0a9.system.entry.js +2 -0
  373. package/dist/ripple/p-4a06d0a9.system.entry.js.map +1 -0
  374. package/dist/ripple/p-4e02e2ae.entry.js +2 -0
  375. package/dist/ripple/p-4e02e2ae.entry.js.map +1 -0
  376. package/dist/ripple/p-56cd4d5e.entry.js +2 -0
  377. package/dist/ripple/p-56cd4d5e.entry.js.map +1 -0
  378. package/dist/ripple/p-59654f8e.entry.js.map +1 -1
  379. package/dist/ripple/p-5cc287d2.entry.js +2 -0
  380. package/dist/ripple/p-5cc287d2.entry.js.map +1 -0
  381. package/dist/ripple/{p-8eebf787.entry.js → p-7e0e6b00.entry.js} +2 -2
  382. package/dist/ripple/p-7e0e6b00.entry.js.map +1 -0
  383. package/dist/ripple/{p-0400599e.system.entry.js → p-833c622f.system.entry.js} +2 -2
  384. package/dist/ripple/p-833c622f.system.entry.js.map +1 -0
  385. package/dist/ripple/{p-b00991d9.system.entry.js → p-8613600d.system.entry.js} +2 -2
  386. package/dist/ripple/p-8613600d.system.entry.js.map +1 -0
  387. package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +1 -1
  388. package/dist/ripple/p-888bec42.js.map +1 -0
  389. package/dist/ripple/p-889579fc.entry.js +2 -0
  390. package/dist/ripple/p-889579fc.entry.js.map +1 -0
  391. package/dist/ripple/p-8c51e9f8.system.entry.js.map +1 -1
  392. package/dist/ripple/{p-42158d44.entry.js → p-8db604d2.entry.js} +2 -2
  393. package/dist/ripple/p-8db604d2.entry.js.map +1 -0
  394. package/dist/ripple/{p-24ef6556.system.entry.js → p-91deb45f.system.entry.js} +2 -2
  395. package/dist/ripple/p-91deb45f.system.entry.js.map +1 -0
  396. package/dist/ripple/p-9338011f.system.entry.js +2 -0
  397. package/dist/ripple/p-9338011f.system.entry.js.map +1 -0
  398. package/dist/ripple/p-976b2789.system.entry.js.map +1 -1
  399. package/dist/ripple/{p-1aa16d42.js → p-994303f2.js} +2 -2
  400. package/dist/ripple/p-994303f2.js.map +1 -0
  401. package/dist/ripple/p-9b2dfb54.js +2 -0
  402. package/dist/ripple/p-9b2dfb54.js.map +1 -0
  403. package/dist/ripple/p-9b9eb944.entry.js.map +1 -1
  404. package/dist/ripple/{p-980afed1.system.entry.js → p-a6d64d8a.system.entry.js} +2 -2
  405. package/dist/ripple/p-a6d64d8a.system.entry.js.map +1 -0
  406. package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +1 -1
  407. package/dist/ripple/p-a6d6eae7.js.map +1 -0
  408. package/dist/ripple/{p-219fbe2b.system.entry.js → p-a73cf968.system.entry.js} +2 -2
  409. package/dist/ripple/p-a73cf968.system.entry.js.map +1 -0
  410. package/dist/ripple/{p-76aafb99.system.entry.js → p-aed625c1.system.entry.js} +2 -2
  411. package/dist/ripple/p-aed625c1.system.entry.js.map +1 -0
  412. package/dist/ripple/{p-0d36ceba.system.entry.js → p-b5b521e4.system.entry.js} +2 -2
  413. package/dist/ripple/p-b5b521e4.system.entry.js.map +1 -0
  414. package/dist/ripple/{p-47d223f1.system.entry.js → p-b7451e73.system.entry.js} +2 -2
  415. package/dist/ripple/p-b7451e73.system.entry.js.map +1 -0
  416. package/dist/ripple/p-bafdcb4e.system.entry.js +2 -0
  417. package/dist/ripple/p-bafdcb4e.system.entry.js.map +1 -0
  418. package/dist/ripple/{p-262713b9.entry.js → p-bb45e122.entry.js} +2 -2
  419. package/dist/ripple/p-bb45e122.entry.js.map +1 -0
  420. package/dist/ripple/p-bd84628c.system.entry.js +2 -0
  421. package/dist/ripple/p-bd84628c.system.entry.js.map +1 -0
  422. package/dist/ripple/p-bf569af0.entry.js.map +1 -1
  423. package/dist/ripple/p-c094f6a8.entry.js +2 -0
  424. package/dist/ripple/p-c094f6a8.entry.js.map +1 -0
  425. package/dist/ripple/p-c36002b6.system.js +2 -0
  426. package/dist/ripple/p-c36002b6.system.js.map +1 -0
  427. package/dist/ripple/p-c5bf7db8.entry.js +2 -0
  428. package/dist/ripple/p-c5bf7db8.entry.js.map +1 -0
  429. package/dist/ripple/p-c68b3798.system.js +2 -0
  430. package/dist/ripple/p-c68b3798.system.js.map +1 -0
  431. package/dist/ripple/{p-05e0f901.js → p-c6a0f7e5.js} +1 -1
  432. package/dist/ripple/{p-05e0f901.js.map → p-c6a0f7e5.js.map} +1 -1
  433. package/dist/ripple/{p-bcba3ce8.entry.js → p-d46f5794.entry.js} +2 -2
  434. package/dist/ripple/p-d46f5794.entry.js.map +1 -0
  435. package/dist/ripple/{p-d7ffac2f.entry.js → p-d48313e0.entry.js} +2 -2
  436. package/dist/ripple/p-d48313e0.entry.js.map +1 -0
  437. package/dist/ripple/p-d939cb54.entry.js.map +1 -1
  438. package/dist/ripple/p-dbfd1640.system.entry.js.map +1 -1
  439. package/dist/ripple/{p-d7c55ce1.entry.js → p-e22854c1.entry.js} +2 -2
  440. package/dist/ripple/p-e22854c1.entry.js.map +1 -0
  441. package/dist/ripple/p-e70bb79f.js +2 -0
  442. package/dist/ripple/p-e70bb79f.js.map +1 -0
  443. package/dist/ripple/{p-e99a7f36.entry.js → p-ed82573a.entry.js} +2 -2
  444. package/dist/ripple/p-ed82573a.entry.js.map +1 -0
  445. package/dist/ripple/{p-bc28c815.system.js → p-f0fd8695.system.js} +1 -1
  446. package/dist/ripple/{p-bc28c815.system.js.map → p-f0fd8695.system.js.map} +1 -1
  447. package/dist/ripple/{p-e5f84104.system.entry.js → p-f312d59a.system.entry.js} +2 -2
  448. package/dist/ripple/p-f312d59a.system.entry.js.map +1 -0
  449. package/dist/ripple/{p-c19ddc00.system.entry.js → p-f59a495a.system.entry.js} +2 -2
  450. package/dist/ripple/p-f59a495a.system.entry.js.map +1 -0
  451. package/dist/ripple/{p-cc8ca6bd.system.js → p-f80eb8a5.system.js} +2 -2
  452. package/dist/ripple/p-f80eb8a5.system.js.map +1 -0
  453. package/dist/ripple/{p-1be55579.system.entry.js → p-fb67c39e.system.entry.js} +2 -2
  454. package/dist/ripple/p-fb67c39e.system.entry.js.map +1 -0
  455. package/dist/ripple/{p-20d0d019.entry.js → p-fc08d5e1.entry.js} +2 -2
  456. package/dist/ripple/p-fc08d5e1.entry.js.map +1 -0
  457. package/dist/ripple/{p-d7b946ed.entry.js → p-fe7da854.entry.js} +2 -2
  458. package/dist/ripple/p-fe7da854.entry.js.map +1 -0
  459. package/dist/ripple/ripple.esm.js +1 -1
  460. package/dist/ripple/ripple.esm.js.map +1 -1
  461. package/dist/ripple/ripple.js +1 -1
  462. package/dist/types/components/charts/chartFunctions.d.ts +37 -37
  463. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -0
  464. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  465. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -0
  466. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -0
  467. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -0
  468. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  469. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -0
  470. package/dist/types/components/wm-button/wm-button.d.ts +49 -0
  471. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -0
  472. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -0
  473. package/dist/types/components/wm-file/wm-file.d.ts +42 -0
  474. package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -0
  475. package/dist/types/components/wm-input/wm-input.d.ts +45 -0
  476. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -0
  477. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  478. package/dist/types/components/wm-modal/wm-modal-header.d.ts +10 -10
  479. package/dist/types/components/wm-modal/wm-modal.d.ts +40 -0
  480. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -0
  481. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -0
  482. package/dist/types/components/wm-navigation/wm-navigation.d.ts +26 -0
  483. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  484. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -0
  485. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -0
  486. package/dist/types/components/wm-option/wm-option.d.ts +34 -0
  487. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  488. package/dist/types/components/wm-search/wm-search.d.ts +77 -0
  489. package/dist/types/components/wm-select/wm-select.d.ts +101 -0
  490. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +31 -32
  491. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -0
  492. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -0
  493. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -0
  494. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -0
  495. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +135 -0
  496. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -0
  497. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +28 -0
  498. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -0
  499. package/dist/types/components/wm-uploader/wm-uploader.d.ts +99 -0
  500. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  501. package/dist/types/components.d.ts +27 -27
  502. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  503. package/dist/types/global/functions.d.ts +48 -48
  504. package/dist/types/global/global.d.ts +1 -1
  505. package/dist/types/global/interfaces.d.ts +74 -74
  506. package/dist/types/global/intl.d.ts +29 -1
  507. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  508. package/dist/types/global/services/http-service.d.ts +4 -4
  509. package/dist/types/lang/lang.d.ts +5 -5
  510. package/package.json +46 -46
  511. package/dist/cjs/chartFunctions-9dce0ea3.js.map +0 -1
  512. package/dist/cjs/global-c22b1249.js.map +0 -1
  513. package/dist/cjs/http-service-494d81de.js.map +0 -1
  514. package/dist/cjs/interfaces-a3338581.js.map +0 -1
  515. package/dist/cjs/intl-e14dc0a1.js +0 -13
  516. package/dist/cjs/intl-e14dc0a1.js.map +0 -1
  517. package/dist/esm/chartFunctions-1df8043a.js.map +0 -1
  518. package/dist/esm/global-2c5c2727.js.map +0 -1
  519. package/dist/esm/http-service-3dc3b3e7.js.map +0 -1
  520. package/dist/esm/interfaces-2b97fab2.js.map +0 -1
  521. package/dist/esm/intl-4153b9ef.js +0 -11
  522. package/dist/esm/intl-4153b9ef.js.map +0 -1
  523. package/dist/esm-es5/chartFunctions-1df8043a.js.map +0 -1
  524. package/dist/esm-es5/global-2c5c2727.js +0 -2
  525. package/dist/esm-es5/global-2c5c2727.js.map +0 -1
  526. package/dist/esm-es5/http-service-3dc3b3e7.js.map +0 -1
  527. package/dist/esm-es5/interfaces-2b97fab2.js.map +0 -1
  528. package/dist/esm-es5/intl-4153b9ef.js +0 -2
  529. package/dist/esm-es5/intl-4153b9ef.js.map +0 -1
  530. package/dist/ripple/p-0400599e.system.entry.js.map +0 -1
  531. package/dist/ripple/p-075607ac.entry.js +0 -2
  532. package/dist/ripple/p-075607ac.entry.js.map +0 -1
  533. package/dist/ripple/p-08d17d5a.entry.js +0 -2
  534. package/dist/ripple/p-08d17d5a.entry.js.map +0 -1
  535. package/dist/ripple/p-0d36ceba.system.entry.js.map +0 -1
  536. package/dist/ripple/p-124da634.entry.js +0 -2
  537. package/dist/ripple/p-124da634.entry.js.map +0 -1
  538. package/dist/ripple/p-1aa16d42.js.map +0 -1
  539. package/dist/ripple/p-1be55579.system.entry.js.map +0 -1
  540. package/dist/ripple/p-20d0d019.entry.js.map +0 -1
  541. package/dist/ripple/p-219fbe2b.system.entry.js.map +0 -1
  542. package/dist/ripple/p-21bb563a.system.entry.js.map +0 -1
  543. package/dist/ripple/p-241d4d41.system.entry.js +0 -2
  544. package/dist/ripple/p-241d4d41.system.entry.js.map +0 -1
  545. package/dist/ripple/p-24ef6556.system.entry.js.map +0 -1
  546. package/dist/ripple/p-262713b9.entry.js.map +0 -1
  547. package/dist/ripple/p-28c12986.system.entry.js.map +0 -1
  548. package/dist/ripple/p-3f6c7e6c.entry.js.map +0 -1
  549. package/dist/ripple/p-42158d44.entry.js.map +0 -1
  550. package/dist/ripple/p-43f1298b.js.map +0 -1
  551. package/dist/ripple/p-47d223f1.system.entry.js.map +0 -1
  552. package/dist/ripple/p-4d30004f.entry.js +0 -2
  553. package/dist/ripple/p-4d30004f.entry.js.map +0 -1
  554. package/dist/ripple/p-58b1415e.system.js +0 -2
  555. package/dist/ripple/p-58b1415e.system.js.map +0 -1
  556. package/dist/ripple/p-5cda4e9c.system.entry.js +0 -2
  557. package/dist/ripple/p-5cda4e9c.system.entry.js.map +0 -1
  558. package/dist/ripple/p-64f15a9e.system.entry.js +0 -2
  559. package/dist/ripple/p-64f15a9e.system.entry.js.map +0 -1
  560. package/dist/ripple/p-6e6b5b2c.system.entry.js +0 -2
  561. package/dist/ripple/p-6e6b5b2c.system.entry.js.map +0 -1
  562. package/dist/ripple/p-70768add.entry.js.map +0 -1
  563. package/dist/ripple/p-76aafb99.system.entry.js.map +0 -1
  564. package/dist/ripple/p-7d0f3abe.entry.js.map +0 -1
  565. package/dist/ripple/p-8aa85021.system.entry.js +0 -2
  566. package/dist/ripple/p-8aa85021.system.entry.js.map +0 -1
  567. package/dist/ripple/p-8eebf787.entry.js.map +0 -1
  568. package/dist/ripple/p-96b0ca93.system.js +0 -2
  569. package/dist/ripple/p-96b0ca93.system.js.map +0 -1
  570. package/dist/ripple/p-980afed1.system.entry.js.map +0 -1
  571. package/dist/ripple/p-9d02957d.system.js.map +0 -1
  572. package/dist/ripple/p-adbeb6a8.system.entry.js +0 -2
  573. package/dist/ripple/p-adbeb6a8.system.entry.js.map +0 -1
  574. package/dist/ripple/p-b00991d9.system.entry.js.map +0 -1
  575. package/dist/ripple/p-b81ce905.system.entry.js.map +0 -1
  576. package/dist/ripple/p-bcba3ce8.entry.js.map +0 -1
  577. package/dist/ripple/p-bf808ec4.entry.js +0 -2
  578. package/dist/ripple/p-bf808ec4.entry.js.map +0 -1
  579. package/dist/ripple/p-c19ddc00.system.entry.js.map +0 -1
  580. package/dist/ripple/p-cc8ca6bd.system.js.map +0 -1
  581. package/dist/ripple/p-ce52357e.js +0 -2
  582. package/dist/ripple/p-ce52357e.js.map +0 -1
  583. package/dist/ripple/p-d0f5773a.entry.js +0 -2
  584. package/dist/ripple/p-d0f5773a.entry.js.map +0 -1
  585. package/dist/ripple/p-d5b0809e.entry.js.map +0 -1
  586. package/dist/ripple/p-d7b946ed.entry.js.map +0 -1
  587. package/dist/ripple/p-d7c55ce1.entry.js.map +0 -1
  588. package/dist/ripple/p-d7ffac2f.entry.js.map +0 -1
  589. package/dist/ripple/p-dbf657c5.js +0 -2
  590. package/dist/ripple/p-dbf657c5.js.map +0 -1
  591. package/dist/ripple/p-e1b812ed.entry.js +0 -2
  592. package/dist/ripple/p-e1b812ed.entry.js.map +0 -1
  593. package/dist/ripple/p-e5f84104.system.entry.js.map +0 -1
  594. package/dist/ripple/p-e6e7cb2d.entry.js.map +0 -1
  595. package/dist/ripple/p-e99a7f36.entry.js.map +0 -1
  596. package/dist/ripple/p-ed14d37c.system.entry.js +0 -2
  597. package/dist/ripple/p-ed14d37c.system.entry.js.map +0 -1
  598. package/dist/ripple/p-ee97c3f6.entry.js.map +0 -1
  599. package/dist/ripple/p-f3130941.entry.js +0 -2
  600. package/dist/ripple/p-f3130941.entry.js.map +0 -1
  601. package/dist/ripple/p-f36b1c58.system.entry.js.map +0 -1
  602. package/dist/ripple/p-f4a622a9.system.entry.js +0 -2
  603. package/dist/ripple/p-f4a622a9.system.entry.js.map +0 -1
  604. package/dist/ripple/p-f5df5903.system.js.map +0 -1
  605. package/dist/ripple/p-fd8070fb.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["wmNetworkUploaderCss","NetworkUploader","exports","this","inputId","generateId","class_1","prototype","toggleTabbingOn","isTabbing","toggleTabbingOff","handleUploadProgress","ev","_this","inProgressList","map","i","name","detail","file_name","progress","forceUpdate","el","numFilesInProgress","srProgress","total_1","setInterval","aggregate","reduce","avg","item","liveRegion","innerHTML","intl","formatMessage","id","defaultMessage","percentage","Math","floor","handleFinishedSnack","snackbar","filter","n","setMaxSize","maxSize","uploadNotifications","newNum","oldNum","setTimeout","notif","message","clearInterval","num","emitFileListEvent","wmNetworkUploaderFilesChanged","emit","fileList","formatDate","isoDate","locale","timezone","timestamp","Date","parse","match","Intl","getCanonicalLocales","_a","date","year","getFullYear","month","getMonth","substr","day","getDate","time","toLocaleTimeString","timeZone","hour","minute","concat","isValidSize","size","isDuplicate","find","f","isEmpty","length","errorList","Object","defineProperty","isMax","maxFiles","errMessage","description","purgeProgressList","getExistingFiles","getRequest","getPath","then","reply","sortBy","sort","a","b","localeCompare","catch","errStatus","console","error","clearErrors","handleFiles","files","Array","from","target","validTypes","fileTypes","split","join","file","hasValidType","push","uploadFile","value","requestUploadPath","toString","__awaiter","assData","JSON","associatedData","fileInfo","assign","mime_type","type","file_path","path","document_uuid","guid","onProgress","lengthComputable","total","loaded","event","CustomEvent","dispatchEvent","putRequest","url","_b","sent","postRequest","uploadPath","err","downloadFile","uuid","payload","file_uuid","requestDownloadPath","window","location","deleteFile","fileName","link","deleteRequest","deletePath","componentWillLoad","Error","buttonText","emptyStateText","componentDidLoad","document","body","classList","contains","uploadButtonOnClick","isDisabled","preventDefault","errMsg_1","Promise","resolve","renderUploadSvg","h","class","width","height","viewBox","transform","fill","d","renderIcon","rotate","icon","String","fromCodePoint","parseInt","renderNotif","renderUploadButton","classes","multiple","onClick","onChange","e","htmlFor","renderWithItems","renderErrorList","renderInProgressList","renderFileList","renderEmptyState","srMessage","acc","style","background","renderFile","updated_at","DateTimeFormat","resolvedOptions","tooltip","render","Host","notifications","stringify","ref"],"sources":["src/components/wm-uploader/wm-network-uploader/wm-network-uploader.scss?tag=wm-network-uploader&encapsulation=shadow","src/components/wm-uploader/wm-network-uploader/wm-network-uploader.tsx"],"sourcesContent":[":host,\r\nwm-network-uploader {\r\n width: 100%;\r\n position: relative;\r\n\r\n &[dir=\"RTL\"] {\r\n .mdi {\r\n margin-left: rem-calc(5);\r\n margin-right: 0;\r\n }\r\n }\r\n @extend %wm-button;\r\n\r\n input:focus + .wm-button.user-is-tabbing {\r\n -webkit-box-shadow: 0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e !important;\r\n -moz-box-shadow: 0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e !important;\r\n box-shadow: 0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e !important;\r\n }\r\n}\r\n\r\n:host *,\r\nwm-network-uploader * {\r\n box-sizing: border-box;\r\n}\r\n\r\n.sr-only {\r\n @include srOnly;\r\n}\r\n\r\n.header {\r\n position: relative;\r\n display: flex;\r\n justify-content: space-between;\r\n flex-wrap: wrap;\r\n\r\n .notif-wrapper {\r\n align-items: flex-end;\r\n }\r\n}\r\n\r\n.notif-wrapper {\r\n display: flex;\r\n align-items: flex-start; // for .notif\r\n height: -moz-fit-content;\r\n height: fit-content;\r\n flex-direction: column; // for.notif\r\n align-items: center; // for.notif\r\n .notif {\r\n font-size: 0.875rem;\r\n font-style: italic;\r\n margin-top: rem-calc(4);\r\n }\r\n}\r\n\r\n@media (max-width: rem-calc(975)) {\r\n .descr {\r\n margin-bottom: rem-calc(8);\r\n }\r\n .notif-wrapper {\r\n margin-bottom: rem-calc(16);\r\n }\r\n .header {\r\n .notif-wrapper {\r\n align-items: flex-start;\r\n }\r\n }\r\n}\r\n\r\n.file-info {\r\n white-space: nowrap;\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n\r\n + .file-controls {\r\n flex: none;\r\n margin-left: rem-calc(16);\r\n }\r\n}\r\n\r\n.empty-block {\r\n margin: 5rem auto;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n\r\n .upload-file {\r\n margin-bottom: rem-calc(30);\r\n }\r\n\r\n .empty-message {\r\n font-size: 1.5rem;\r\n margin-bottom: rem-calc(7);\r\n }\r\n\r\n .notif-wrapper {\r\n justify-content: center;\r\n\r\n .wm-button {\r\n // Removing the width inherit here to prevent a 100% width\r\n // from the notif-wrapper. Future proofing a day when\r\n // we might want a long notif to wrap.\r\n width: auto;\r\n }\r\n }\r\n}\r\n\r\nul {\r\n list-style: none;\r\n padding: 0;\r\n width: 100%;\r\n li {\r\n font-size: rem-calc(14);\r\n .file {\r\n @include border-radius(3px);\r\n position: relative; // for progress bar\r\n height: rem-calc(60);\r\n padding: rem-calc(8 20);\r\n background: $background;\r\n border: 1px solid rgb(107, 107, 107);\r\n\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n\r\n + .file {\r\n margin-top: rem-calc(20);\r\n }\r\n\r\n .filename {\r\n font-weight: 500;\r\n }\r\n\r\n .filedate {\r\n margin-left: rem-calc(60);\r\n font-weight: normal;\r\n font-style: italic;\r\n }\r\n\r\n wm-button + wm-button {\r\n margin-left: rem-calc(16);\r\n }\r\n }\r\n }\r\n\r\n &.file-list .file.--saved,\r\n &.inprogress-list .file {\r\n // margin-bottom also on the last element, otherwise tooltip on dl and delete btns triggers a scrollbar\r\n margin-bottom: rem-calc(26);\r\n }\r\n\r\n .progress {\r\n position: absolute;\r\n left: 0;\r\n top: 0;\r\n right: 0;\r\n height: 8px;\r\n }\r\n\r\n &.error-list li {\r\n margin-bottom: rem-calc(20);\r\n color: $error-color;\r\n .file {\r\n border: 1px solid $error-color;\r\n background-color: #f5ebea;\r\n height: rem-calc(60);\r\n }\r\n }\r\n .error-message {\r\n padding-top: rem-calc(4);\r\n font-style: italic;\r\n }\r\n}\r\n","import { Component, Element, h, Host, Prop, State, Listen, Watch, Event, EventEmitter } from \"@stencil/core\";\r\nimport { forceUpdate } from \"@stencil/core\";\r\nimport { getRequest, postRequest, putRequest, deleteRequest } from \"../../../global/services/http-service\";\r\nimport { intl, generateId, hasValidType } from \"../../../global/functions\";\r\n//\r\n// Web API File interface => for FileList on input element, sending to AWS\r\n// Custom FileInfo interface (below) => for our server\r\nexport interface FileInfo {\r\n file_name: string;\r\n file_path?: string;\r\n mime_type: string;\r\n updated_at?: string;\r\n\r\n uuid?: string; // AWS guid\r\n document_uuid?: string; // aka file uuid. how is that different from the uuid above?\r\n // organization_uuid: string; // aka node uuid\r\n}\r\n\r\ninterface FileInProgress extends File {\r\n progress?: number;\r\n}\r\n\r\ninterface ErrorInfo {\r\n file_name: string;\r\n message: string;\r\n}\r\n\r\ninterface AWSData {\r\n url: string;\r\n updated_at: string;\r\n path: string;\r\n guid: string;\r\n}\r\n\r\ninterface Notification {\r\n message: string;\r\n id: string;\r\n link: string;\r\n}\r\n\r\n@Component({\r\n tag: \"wm-network-uploader\",\r\n styleUrl: \"wm-network-uploader.scss\",\r\n shadow: true,\r\n})\r\nexport class NetworkUploader {\r\n @Element() el!: HTMLWmNetworkUploaderElement;\r\n private liveRegion?: HTMLDivElement;\r\n\r\n @State() isTabbing: boolean = false;\r\n\r\n @State() fileList: FileInfo[] = [];\r\n @State() inProgressList: FileInProgress[] = [];\r\n @State() errorList: ErrorInfo[] = []; // for errors on a particular file\r\n @State() notif?: { id: number; message: string } | null; // for global errors, e.g. user tries uploading too many files, and upload notifications\r\n @State() snackbar: Notification[] = [];\r\n @State() numFilesInProgress?: number | null; // null when not uploading != 0 (when all files are done uploading) != undefined (original state)\r\n private srProgress?: any; // setInterval for SR to announce the aggregate progress percentage when things take a long time. stored here so it can be stopped when upload is finished.\r\n\r\n @Prop() getPath!: string;\r\n @Prop() requestUploadPath!: string;\r\n @Prop() uploadPath!: string; // used for POST request (create db entry)\r\n @Prop() requestDownloadPath!: string;\r\n @Prop() deletePath!: string;\r\n\r\n @Prop() associatedData?: string;\r\n @Prop() buttonText!: string;\r\n @Prop() emptyStateText!: string;\r\n @Prop() icon!: string;\r\n @Prop() fileTypes: string = \"pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv\";\r\n @Prop({ mutable: true }) maxSize: number = 100; // in Mb\r\n @Prop() maxFiles?: number;\r\n @Prop() sortBy: \"name\" | \"date\" = \"date\"; // name is descending (a -> z), date is ascending (earlier -> later)\r\n\r\n @Event() wmNetworkUploaderFilesChanged!: EventEmitter<Object[]>;\r\n\r\n private inputId = generateId();\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n @Listen(\"wmUploadProgress\")\r\n handleUploadProgress(ev: CustomEvent) {\r\n this.inProgressList.map((i) => {\r\n if (i.name === ev.detail.file_name) {\r\n i.progress = ev.detail.progress;\r\n forceUpdate(this.el);\r\n }\r\n });\r\n\r\n if (ev.detail.progress === 100) {\r\n // inProgressList is not a perfect reflection of how many files are uploading\r\n // because even after progress reached 100% the item should remain in the array\r\n // (should only be removed once it appears in fileList)\r\n this.numFilesInProgress! -= 1;\r\n }\r\n\r\n // aggregate the percentages for SR to announce progress\r\n if (!this.srProgress && this.numFilesInProgress) {\r\n const total = this.numFilesInProgress; // if we don't reassign this number changes when a file is done and the percentage becomes wrong\r\n this.srProgress = setInterval(() => {\r\n const aggregate = this.inProgressList.reduce((avg, item) => (item.progress ? avg + item.progress : avg), 0);\r\n if (this.liveRegion) {\r\n this.liveRegion.innerHTML = intl.formatMessage(\r\n {\r\n id: \"uploader.uploadProgress\",\r\n defaultMessage: \"Upload progress: {percentage}%\",\r\n },\r\n { percentage: Math.floor(aggregate / total) }\r\n );\r\n }\r\n }, 5000);\r\n }\r\n }\r\n\r\n @Listen(\"userFinishedSnack\")\r\n handleFinishedSnack(ev: CustomEvent) {\r\n this.snackbar = this.snackbar.filter((n) => n.id !== ev.detail.id);\r\n }\r\n\r\n @Watch(\"maxSize\")\r\n setMaxSize() {\r\n // Max size can't be set above 100Mb\r\n this.maxSize = this.maxSize > 100 ? 100 : this.maxSize;\r\n }\r\n\r\n @Watch(\"numFilesInProgress\")\r\n uploadNotifications(newNum: number, oldNum: number) {\r\n if (oldNum > 0 && newNum === 0) {\r\n setTimeout(() => {\r\n this.notif = null;\r\n }, 20 * 1000);\r\n const message = intl.formatMessage({\r\n id: \"uploader.finishedUploading\",\r\n defaultMessage: \"Finished uploading\",\r\n });\r\n this.notif = { id: 5, message };\r\n if (this.liveRegion) {\r\n this.liveRegion.innerHTML = message;\r\n }\r\n this.numFilesInProgress = null;\r\n clearInterval(this.srProgress);\r\n forceUpdate(this.el);\r\n } else if (newNum > 0 && newNum != oldNum) {\r\n const message = intl.formatMessage(\r\n {\r\n id: \"uploader.filesUploading\",\r\n defaultMessage: \"{num, plural, one {1 file uploading} other {# files uploading}}\",\r\n },\r\n { num: newNum }\r\n );\r\n this.notif = { id: 6, message };\r\n if (this.liveRegion) {\r\n this.liveRegion.innerHTML = message;\r\n }\r\n forceUpdate(this.el);\r\n }\r\n }\r\n\r\n @Watch(\"fileList\")\r\n emitFileListEvent() {\r\n this.wmNetworkUploaderFilesChanged.emit(this.fileList);\r\n }\r\n\r\n formatDate(isoDate: string, locale: string, timezone: string) {\r\n const timestamp = Date.parse(isoDate);\r\n if (locale.match(/^[a-zA-Z]*(-[a-zA-Z0-9]*)*$/g)) {\r\n // make sure locale is valid, otherwise set default locale\r\n try {\r\n //@ts-ignore\r\n Intl.getCanonicalLocales(locale);\r\n } catch {\r\n locale = \"en-us\";\r\n }\r\n } else {\r\n return isoDate;\r\n }\r\n\r\n if (!!timestamp) {\r\n const date = new Date(timestamp);\r\n const year = date.getFullYear();\r\n const month = (\"0\" + (date.getMonth() + 1)).substr(-2);\r\n const day = (\"0\" + date.getDate()).substr(-2);\r\n const time = date.toLocaleTimeString([locale, \"en-us\"], {\r\n timeZone: timezone,\r\n hour: \"numeric\",\r\n minute: \"numeric\",\r\n });\r\n return `${year}/${month}/${day} ${time}`;\r\n } else {\r\n return isoDate;\r\n }\r\n }\r\n\r\n isValidSize(size: number) {\r\n // https://stackoverflow.com/questions/2365100/converting-bytes-to-megabytes\r\n return size / 1024 / 1024 <= this.maxSize;\r\n }\r\n\r\n isDuplicate(name: string) {\r\n return this.fileList.find((f) => f.file_name === name);\r\n }\r\n\r\n isEmpty() {\r\n return !this.fileList.length && !this.inProgressList.length && !this.errorList.length;\r\n }\r\n\r\n get isDisabled() {\r\n const isMax = !!this.maxFiles && this.fileList.length >= this.maxFiles;\r\n\r\n if (!this.notif) {\r\n if (isMax) {\r\n const errMessage = intl.formatMessage({\r\n id: \"uploader.fileUploadLimitExceeded\",\r\n defaultMessage: \"Upload unsuccessful because file selection would exceed the maximum number of files\",\r\n description: \"Message displayed when trying to upload too many files\",\r\n });\r\n this.notif = { id: 1, message: errMessage };\r\n if (this.liveRegion) {\r\n this.liveRegion.innerHTML = errMessage;\r\n }\r\n } else {\r\n this.notif = null;\r\n }\r\n } else if (this.notif.id === 1) {\r\n // to make sure SR don't repeat the error, don't reset it if it already is showing\r\n // just dismiss it if isMax is not true anymore\r\n if (!isMax) {\r\n this.notif = null;\r\n }\r\n // finally do nothing if error 2 is showing (special case when user selects too many files)\r\n }\r\n // disable if is the uploader is maxed out or if something is uploading\r\n return isMax || this.numFilesInProgress! > 0;\r\n }\r\n\r\n purgeProgressList(item: FileInfo) {\r\n // If a file is retrieved from the server because it was just uploaded\r\n // it should be removed from inProgressList\r\n this.inProgressList = this.inProgressList.filter((i) => i.progress !== 100 && i.name !== item.file_name);\r\n }\r\n\r\n getExistingFiles() {\r\n getRequest(this.getPath)\r\n .then((reply: FileInfo[]) => {\r\n reply.map((item) => this.purgeProgressList(item));\r\n if (this.sortBy === \"name\") {\r\n reply.sort((a, b) => a.file_name.localeCompare(b.file_name));\r\n }\r\n this.fileList = reply;\r\n })\r\n .catch((errStatus) => {\r\n console.error(errStatus);\r\n });\r\n }\r\n\r\n clearErrors() {\r\n this.errorList = [];\r\n this.notif = null;\r\n }\r\n\r\n handleFiles(ev: Event) {\r\n const files = Array.from((ev.target! as HTMLInputElement).files!);\r\n const validTypes = this.fileTypes.split(\" \").join(\", \");\r\n\r\n if (!!this.maxFiles && this.fileList.length + files.length > this.maxFiles) {\r\n const errMessage = intl.formatMessage({\r\n id: \"uploader.fileUploadLimitExceeded\",\r\n defaultMessage: \"Upload unsuccessful because file selection would exceed the maximum number of files\",\r\n description: \"Message displayed when trying to upload too many files\",\r\n });\r\n this.notif = { id: 2, message: errMessage };\r\n if (this.liveRegion) {\r\n this.liveRegion.innerHTML = errMessage;\r\n }\r\n } else {\r\n // map to create inProgress items so they can be displayed immediately\r\n files &&\r\n files.map((file) => {\r\n if (!hasValidType(file, this.fileTypes)) {\r\n const error = {\r\n file_name: file.name,\r\n message: intl.formatMessage(\r\n {\r\n id: \"uploader.invalidFileType\",\r\n defaultMessage: \"The file type is invalid. Accepted types: {validTypes}\",\r\n },\r\n { validTypes }\r\n ),\r\n };\r\n this.errorList.push(error);\r\n } else if (!this.isValidSize(file.size)) {\r\n const error = {\r\n file_name: file.name,\r\n message: intl.formatMessage(\r\n {\r\n id: \"uploader.fileTooLarge\",\r\n defaultMessage: \"The selected file is too large. Maximum file size is {size}Mb\",\r\n },\r\n { size: this.maxSize }\r\n ),\r\n };\r\n this.errorList.push(error);\r\n } else if (this.isDuplicate(file.name)) {\r\n const error = {\r\n file_name: file.name,\r\n message: intl.formatMessage({\r\n id: \"uploader.duplicateName\",\r\n defaultMessage: \"A file with this name already exists.\",\r\n }),\r\n };\r\n this.errorList.push(error);\r\n } else {\r\n this.inProgressList.push(file);\r\n }\r\n forceUpdate(this.el);\r\n });\r\n\r\n if (this.inProgressList.length > 0) {\r\n this.numFilesInProgress = this.inProgressList.length;\r\n\r\n // map over \"uploadable\" files for actual upload\r\n // this happens separately otherwise at each pass we'd have to wait for the requests to complete before displaying things\r\n this.inProgressList.map((file, i) => {\r\n this.uploadFile(file, i); // = input.files file\r\n });\r\n }\r\n }\r\n (ev.target! as HTMLInputElement).value = \"\"; // reset to ensure that onChange is triggered when the same file is selected a second time\r\n }\r\n\r\n uploadFile(file: File, i: number) {\r\n // get upload link\r\n getRequest(this.requestUploadPath + i.toString())\r\n .then(async (reply: AWSData) => {\r\n const assData = JSON.parse(this.associatedData!);\r\n const fileInfo: FileInfo = {\r\n ...assData,\r\n file_name: file.name,\r\n mime_type: file.type,\r\n file_path: reply.path,\r\n document_uuid: reply.guid,\r\n };\r\n\r\n // onProgress is passed as a callback to the ev listener inside putRequest (http service),\r\n // so we can't change component things directly => custom event to pass data to uploader component.\r\n const onProgress = (ev: ProgressEvent) => {\r\n const progress = ev.lengthComputable && ev.total !== 0 ? (ev.loaded / ev.total) * 100 : 0;\r\n const event = new CustomEvent(\"wmUploadProgress\", {\r\n detail: { file_name: file.name, progress },\r\n });\r\n\r\n this.el.dispatchEvent(event);\r\n };\r\n\r\n // upload to AWS s3 to url we just fetched\r\n await putRequest(reply.url, file, onProgress);\r\n\r\n // create the db entry\r\n await postRequest(this.uploadPath, fileInfo);\r\n\r\n // get files from server again\r\n this.getExistingFiles();\r\n })\r\n .catch((err) => {\r\n // do not show toast on error\r\n this.numFilesInProgress = null;\r\n // do not show in progress item on error\r\n this.inProgressList = [];\r\n this.notif = {\r\n id: 3,\r\n message: intl.formatMessage({\r\n id: \"global.genericError\",\r\n defaultMessage: \"An error occurred. Please try again.\",\r\n }),\r\n };\r\n console.error(err);\r\n });\r\n }\r\n\r\n downloadFile(uuid: string, path: string) {\r\n this.clearErrors();\r\n\r\n // POST request to get temporary download link\r\n const payload = {\r\n file_path: path,\r\n file_uuid: uuid,\r\n };\r\n postRequest(this.requestDownloadPath, payload)\r\n .then((reply: { url: string }) => {\r\n // we got the download link, now download the file\r\n window.location.assign(reply.url);\r\n })\r\n .catch((err) => {\r\n console.error(err);\r\n });\r\n }\r\n\r\n deleteFile(file: FileInfo) {\r\n this.clearErrors();\r\n\r\n this.snackbar.push({\r\n message: intl.formatMessage(\r\n {\r\n id: \"uploader.fileDeleted\",\r\n defaultMessage: \"{fileName} was deleted.\",\r\n },\r\n { fileName: file.file_name }\r\n ),\r\n id: file.uuid!,\r\n link: \"\",\r\n });\r\n\r\n // rm file from list immediately.\r\n this.fileList = this.fileList.filter((i) => i.uuid !== file.uuid);\r\n\r\n deleteRequest(`${this.deletePath}/${file.uuid}`).catch((err) => {\r\n this.notif = {\r\n id: 4,\r\n message: intl.formatMessage(\r\n {\r\n id: \"uploader.fileNotDeleted\",\r\n defaultMessage: \"{fileName} could not be deleted.\",\r\n },\r\n { fileName: file.file_name }\r\n ),\r\n };\r\n this.getExistingFiles();\r\n console.error(err);\r\n });\r\n }\r\n\r\n componentWillLoad() {\r\n if (!this.getPath) {\r\n throw new Error(\"wm-network-uploader: get-path is a required prop\");\r\n }\r\n if (!this.requestUploadPath) {\r\n throw new Error(\"wm-network-uploader: request-upload-path is a required prop\");\r\n }\r\n if (!this.uploadPath) {\r\n throw new Error(\"wm-network-uploader: upload-path is a required prop\");\r\n }\r\n if (!this.requestDownloadPath) {\r\n throw new Error(\"wm-network-uploader: request-download-path is a required prop\");\r\n }\r\n if (!this.deletePath) {\r\n throw new Error(\"wm-network-uploader: delete-path is a required prop\");\r\n }\r\n if (!this.buttonText) {\r\n throw new Error(\"wm-network-uploader: button-text is a required prop\");\r\n }\r\n if (!this.emptyStateText) {\r\n throw new Error(\"wm-network-uploader: empty-state-text is a required prop\");\r\n }\r\n if (!this.associatedData) {\r\n throw new Error(\"wm-network-uploader: associated-data is a required prop\");\r\n }\r\n\r\n this.setMaxSize();\r\n this.clearErrors();\r\n }\r\n\r\n componentDidLoad() {\r\n this.getExistingFiles();\r\n\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n }\r\n\r\n uploadButtonOnClick(ev: Event) {\r\n if (this.isDisabled) {\r\n // this is a temporary fix.\r\n // we need the disabled button to be programmatically focusable\r\n // to allow return focus after closing the browser file panel\r\n // since it's focusable the button should respond when activated\r\n // it looks disabled, and announces the reason why the action cannot\r\n // be taken when activated.\r\n // this is not pretty duplicating a intl message + the logic of isDisabled,\r\n // but not worth a bigger refactor since this is only until we get the UX for disabled elements and refactor all interactive els.\r\n ev.preventDefault();\r\n if (this.liveRegion) {\r\n const isMax = !!this.maxFiles && this.fileList.length >= this.maxFiles;\r\n let errMsg: string = \"\";\r\n if (this.numFilesInProgress! > 0) {\r\n errMsg = intl.formatMessage({\r\n id: \"uploader.waitToUpload\",\r\n defaultMessage: \"Please wait for current upload to complete before uploading new files.\",\r\n description: \"Message for screen reader users\",\r\n });\r\n } else if (isMax) {\r\n errMsg = intl.formatMessage({\r\n id: \"uploader.fileUploadLimitExceeded\",\r\n defaultMessage: \"Upload unsuccessful because file selection would exceed the maximum number of files\",\r\n description: \"Message displayed when trying to upload too many files\",\r\n });\r\n }\r\n\r\n if (errMsg) {\r\n // clear and set again to re-announce if button is clicked several times\r\n // (can't be done inside setTimeout because of scope, hence the promise)\r\n this.liveRegion.innerHTML = \"\";\r\n new Promise((resolve) => {\r\n setTimeout(() => {\r\n resolve(\"\");\r\n }, 500);\r\n }).then(() => (this.liveRegion!.innerHTML = errMsg));\r\n }\r\n }\r\n } else {\r\n this.clearErrors();\r\n }\r\n }\r\n\r\n renderUploadSvg() {\r\n return (\r\n <svg class=\"upload-file\" width=\"91\" height=\"84\" viewBox=\"0 0 91 84\">\r\n <path\r\n transform=\"rotate(-180.000000) translate(-452, -255.5)\"\r\n fill=\"#eae8ec\"\r\n d=\"M361,249.681818 L361,197.318182 C361,194.118182 365.555061,191.5 371.122358,191.5 L391.316463,191.5 L391.286495,200.562515 L369.871211,200.600292 L369.885404,200.622146 L369.886423,246.655947 L443.657038,246.840767 L443.657038,200.622146 L421.683537,200.622146 L421.683537,191.5 L441.978865,191.5 C447.546162,191.5 452,194.118182 452,197.318182 L452,249.681818 C452,252.881818 447.546162,255.5 441.978865,255.5 L371.122358,255.5 C365.504449,255.5 361,252.881818 361,249.681818 Z M391.5,207 L406,221 L420.5,207 L409.625,207 L409.625,172 L402.375,172 L402.375,207 L391.5,207 Z\"\r\n ></path>\r\n </svg>\r\n );\r\n }\r\n\r\n renderIcon() {\r\n // mdi attachment icon (paper clip) is horizontal but we want it vertical\r\n const rotate = this.icon && this.icon === \"f066\";\r\n return (\r\n this.icon && (\r\n <span class={`mdi ${rotate ? \"rotate\" : \"\"}`}>{String.fromCodePoint(parseInt(`0x${this.icon}`))}</span>\r\n )\r\n );\r\n }\r\n\r\n renderNotif() {\r\n return this.notif ? <span class=\"notif\">{this.notif.message}</span> : \"\";\r\n }\r\n\r\n renderUploadButton(classes: string) {\r\n return (\r\n <div class=\"notif-wrapper\">\r\n <input\r\n name={this.inputId}\r\n id={this.inputId}\r\n class=\"sr-only\"\r\n type=\"file\"\r\n multiple\r\n onClick={(ev) => this.uploadButtonOnClick(ev)}\r\n onChange={(e) => this.handleFiles(e)}\r\n />\r\n <label htmlFor={this.inputId} class={`wm-button ${classes}${this.isTabbing ? \" user-is-tabbing\" : \"\"}`}>\r\n {this.renderIcon()}\r\n {this.buttonText}\r\n </label>\r\n {this.renderNotif()}\r\n </div>\r\n );\r\n }\r\n\r\n renderWithItems() {\r\n return (\r\n <div>\r\n <div class=\"header\">\r\n <div class=\"descr\">\r\n <slot />\r\n </div>\r\n {this.renderUploadButton(this.isDisabled ? \"disabled\" : \"\")}\r\n </div>\r\n {this.renderErrorList()}\r\n {this.renderInProgressList()}\r\n {this.renderFileList()}\r\n </div>\r\n );\r\n }\r\n\r\n renderEmptyState() {\r\n return (\r\n <div>\r\n <div class=\"header\">\r\n <div class=\"descr\">\r\n <slot />\r\n </div>\r\n </div>\r\n <div class=\"empty-block\">\r\n {this.renderUploadSvg()}\r\n <div class=\"empty-message\">{this.emptyStateText}</div>\r\n {this.renderUploadButton(\"-primary empty-button\")}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n renderErrorList() {\r\n if (!!this.errorList.length) {\r\n if (this.liveRegion) {\r\n let srMessage = this.errorList.reduce(function (acc, err) {\r\n return acc + `${err.file_name}: ${err.message} `;\r\n }, \"\");\r\n this.liveRegion.innerHTML = srMessage;\r\n }\r\n\r\n return (\r\n <ul class=\"error-list\">\r\n {this.errorList.map((err) => (\r\n <li>\r\n <div class=\"file --error\">\r\n <div class=\"file-info\">\r\n <span class=\"filename\">{err.file_name}</span>\r\n </div>\r\n </div>\r\n <div class=\"error-message\">{err.message}</div>\r\n </li>\r\n ))}\r\n </ul>\r\n );\r\n }\r\n }\r\n\r\n renderInProgressList() {\r\n return (\r\n <ul class=\"inprogress-list\">\r\n {this.inProgressList.map((item) => {\r\n return (\r\n <li>\r\n <div class=\"file --progress\">\r\n <div\r\n class=\"progress\"\r\n style={{\r\n background: `linear-gradient(to right, rgba(67, 126, 142, 1) ${item.progress}%, transparent ${item.progress}%)`,\r\n }}\r\n ></div>\r\n <div class=\"file-info\">\r\n <span class=\"filename\">\r\n {item.name} <span class=\"sr-only\">uploading</span>\r\n </span>\r\n </div>\r\n </div>\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n );\r\n }\r\n\r\n renderFile(item: FileInfo) {\r\n return (\r\n <li>\r\n <div class=\"file --saved\">\r\n <div class=\"file-info\">\r\n <span class=\"filename\">{item.file_name}</span>\r\n <span class=\"filedate\">\r\n {this.formatDate(item.updated_at!, intl.locale, Intl.DateTimeFormat().resolvedOptions().timeZone)}\r\n </span>\r\n </div>\r\n <div class=\"file-controls\">\r\n <wm-button\r\n class=\"download-button\"\r\n button-type=\"icononly\"\r\n tooltip=\"download\"\r\n label-for-identical-buttons={`download ${item.file_name}`}\r\n icon=\"f1da\"\r\n onClick={() => this.downloadFile(item.uuid!, item.file_path!)}\r\n ></wm-button>\r\n <wm-button\r\n class=\"delete-button\"\r\n button-type=\"icononly\"\r\n tooltip=\"remove\"\r\n label-for-identical-buttons={`remove ${item.file_name}`}\r\n icon=\"f1c0\"\r\n onClick={() => this.deleteFile(item)}\r\n ></wm-button>\r\n </div>\r\n </div>\r\n </li>\r\n );\r\n }\r\n\r\n renderFileList() {\r\n return <ul class=\"file-list\">{this.fileList.map((item) => this.renderFile(item))}</ul>;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host>\r\n {this.isEmpty() ? this.renderEmptyState() : this.renderWithItems()}\r\n <wm-snackbar notifications={JSON.stringify(this.snackbar)}></wm-snackbar>\r\n <div\r\n ref={(el) => (this.liveRegion = el as HTMLDivElement)}\r\n class=\"live-region sr-only\"\r\n aria-live=\"assertive\" // since it's directly linked to the action the user took, it should be read in priority. With polite, some messages get dismissed in favor of the page title\r\n aria-atomic=\"true\"\r\n ></div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"4vDAAA,IAAMA,EAAuB,m9sB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,8BACW,YAAAxI,OAAYpD,EAAKX,WAC9C8K,KAAK,OACLQ,QAAS,WAAM,OAAA5L,EAAK8I,aAAa7H,EAAK8H,KAAO9H,EAAK2G,UAAnC,IAEjB8C,EAAA,aACEC,MAAM,gBAAe,cACT,WACZkC,QAAQ,SAAQ,8BACa,UAAAxI,OAAUpD,EAAKX,WAC5C8K,KAAK,OACLQ,QAAS,WAAM,OAAA5L,EAAKqJ,WAAWpI,EAAhB,M,EAQ3BxB,EAAAC,UAAAyM,eAAA,eAAAnM,EAAAV,KACE,OAAOoL,EAAA,MAAIC,MAAM,aAAarL,KAAKsD,SAAS1C,KAAI,SAACe,GAAS,OAAAjB,EAAKyM,WAAWxL,EAAhB,I,EAG5DxB,EAAAC,UAAAoN,OAAA,eAAA9M,EAAAV,KACE,OACEoL,EAACqC,EAAI,KACFzN,KAAKqF,UAAYrF,KAAK8M,mBAAqB9M,KAAK0M,kBACjDtB,EAAA,eAAasC,cAAe1F,KAAK2F,UAAU3N,KAAKsC,YAChD8I,EAAA,OACEwC,IAAK,SAACzM,GAAE,OAAMT,EAAKkB,WAAaT,CAAxB,EACRkK,MAAM,sBAAqB,YACjB,Y,cACE,S,yTA9oBM,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["wmChartCss","Chart","this","uid","generateId","slicesDetails","handleStackedBarResize","debounce","async","hasHiddenBarValue","valueEls","el","shadowRoot","querySelectorAll","length","lastVisibleRightEdge","getBoundingClientRect","right","margin","forEach","valueEl","idx","bounds","left","classList","add","remove","debouncedUpdate","forceUpdate","debouncedSliceUpdate","getDetails","call","currentChartType","tempValueFormat","valueFormat","showValues","hybridType","window","innerWidth","popoverEl","querySelector","sliceEls","Array","from","current","chartType","children","chartDetails","allChartsDetails","ariaLabelText","text","label","subinfo","isDoughnut","category","isStackedBar","isSimpleBar","isBar","chartRoleDescription","intl","formatMessage","id","defaultMessage","description","toggleTabbingOn","isTabbing","toggleTabbingOff","handleKeydown","ev","handleChartKeydown","Error","console","warn","resizeObserver","ResizeObserver","observe","handleSliceUpdate","renderBarText","s","val","perc","amount","h","class","style","width","amountToPercent","total","drawAxis","x1","x2","y1","y2","x","y","renderChart","renderStackedBar","renderSimpleBar","renderDoughnut","render","Host","onBlur","exitChart","ref","componentWrapperEl","userIsNavigating","labelPosition","role","tabindex","htmlFor","renderLegend","renderCompletionMessage","renderHiddenValuesMessage","renderInstructionsText"],"sources":["./src/components/charts/wm-chart/wm-chart.scss?tag=wm-chart&encapsulation=shadow","./src/components/charts/wm-chart/wm-chart.tsx"],"sourcesContent":[":host,\r\nwm-chart {\r\n @extend %chart-styles;\r\n}\r\n\r\n:host(:focus) {\r\n @extend %chart-focus-styles;\r\n}\r\n","import { Component, Element, h, Host, Prop, State, Listen } from \"@stencil/core\";\r\nimport { forceUpdate } from \"@stencil/core\";\r\nimport { debounce, generateId, intl } from \"../../../global/functions\";\r\nimport {\r\n amountToPercent,\r\n exitChart,\r\n getDetails,\r\n handleChartKeydown,\r\n renderStackedBar,\r\n renderSimpleBar,\r\n renderCompletionMessage,\r\n renderDoughnut,\r\n renderHiddenValuesMessage,\r\n renderInstructionsText,\r\n renderLegend,\r\n allChartsDetails,\r\n} from \"../chartFunctions\";\r\nimport { ChartType, SliceDetails, SliceElement } from \"../../../global/interfaces\";\r\n\r\n@Component({\r\n tag: \"wm-chart\",\r\n shadow: { delegatesFocus: true },\r\n styleUrl: \"wm-chart.scss\",\r\n})\r\nexport class Chart {\r\n @Element() el!: HTMLWmChartElement;\r\n // @ts-ignore-- TS warns this is unused, but its needed in chartFunctions\r\n private componentWrapperEl!: HTMLDivElement;\r\n\r\n @Prop() chartType: ChartType | \"hybrid\" = \"doughnut1\"; // hybrid is not a real ChartType, it gets converted to something else.\r\n @Prop() label?: string;\r\n @Prop() labelWidth: string = \"150px\";\r\n @Prop() subinfo?: string;\r\n @Prop() completionMessage?: string;\r\n @Prop() valueFormat?: \"percentage\" | \"amount\";\r\n @Prop() showValues?: \"percentage\" | \"amount\"; // DEPRECATED in favor of value-format\r\n @Prop() showGrid?: boolean = true; \r\n get tempValueFormat() {\r\n // use of this getter should be replaced with dateFormat when showValues is fully phased out\r\n return this.valueFormat || this.showValues || \"none\";\r\n }\r\n @Prop() showLegend: boolean = true;\r\n @Prop() showBarLegend: boolean = false;\r\n @Prop() notStartedColor: boolean = false;\r\n // left labels are a temporary solution for the lack of a stacked bar chart and is undocumented\r\n // it only works with bar4 and should be used without a legend\r\n @Prop() labelPosition: \"left\" | \"top\" = \"top\";\r\n @State() isTabbing: boolean = false;\r\n @State() userIsNavigating: boolean = false;\r\n @State() hasHiddenBarValue: boolean = false;\r\n\r\n get hybridType(): \"doughnut0\" | \"bar1\" {\r\n return window.innerWidth > 1340 ? \"doughnut0\" : \"bar1\";\r\n }\r\n private uid: string = generateId();\r\n private total!: number;\r\n private slicesDetails: SliceDetails[] = [];\r\n\r\n get popoverEl() {\r\n return this.el.shadowRoot!.querySelector(\"priv-chart-popover\");\r\n }\r\n\r\n get sliceEls(): SliceElement[] {\r\n return Array.from(this.el.shadowRoot!.querySelectorAll(\".segment\"));\r\n }\r\n\r\n get currentChartType(): ChartType {\r\n let current = this.chartType as ChartType;\r\n\r\n if (this.chartType === \"hybrid\") {\r\n current = this.hybridType;\r\n } else if (this.chartType === \"doughnut2\" && this.el.children.length > 3) {\r\n // render an internal type (that includes an additional color) if doughnut2 has more than 3 slices\r\n current = \"doughnut2plus\";\r\n }\r\n return current; \r\n }\r\n\r\n get chartDetails() {\r\n return allChartsDetails[this.currentChartType];\r\n }\r\n\r\n get ariaLabelText() {\r\n let text = `${this.label}`;\r\n if (this.subinfo) {\r\n text += ` ${this.subinfo}`;\r\n }\r\n return text;\r\n }\r\n\r\n get isDoughnut() {\r\n return this.chartDetails.category === \"doughnut\";\r\n }\r\n\r\n get isStackedBar() {\r\n return this.chartDetails.category === \"stackedBar\";\r\n }\r\n\r\n get isSimpleBar() {\r\n return this.chartDetails.category === \"simpleBar\";\r\n }\r\n\r\n get isBar() {\r\n return this.isStackedBar || this.isSimpleBar;\r\n }\r\n\r\n get chartRoleDescription(): string {\r\n return intl.formatMessage({\r\n id: \"chart.roleDescription\",\r\n defaultMessage: \"Interactive chart\",\r\n description: \"For screen readers only, a description clarifying the role of the chart widget\",\r\n });\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKeydown(ev: KeyboardEvent) {\r\n handleChartKeydown.call(this, ev);\r\n }\r\n\r\n /* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */\r\n\r\n async componentWillLoad() {\r\n if (!this.label) {\r\n throw new Error(\r\n \"For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.\"\r\n );\r\n }\r\n if (this.showValues) {\r\n console.warn(\"wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.\");\r\n }\r\n await getDetails.call(this, this.currentChartType);\r\n\r\n // rerender on resize\r\n // unnecessary for doughnuts (except hybrid) as layout doesn't change\r\n if (this.chartType === \"hybrid\" || !this.isDoughnut) {\r\n const resizeObserver = new ResizeObserver(() => {\r\n this.isStackedBar ? this.handleStackedBarResize() : this.debouncedUpdate();\r\n });\r\n resizeObserver.observe(this.el);\r\n }\r\n }\r\n\r\n handleStackedBarResize = debounce(async () => {\r\n let hasHiddenBarValue = false;\r\n\r\n // if any value text overlaps with another, hide it and display warning\r\n const valueEls = this.el.shadowRoot!.querySelectorAll(\".value\");\r\n\r\n if (valueEls.length) {\r\n let lastVisibleRightEdge = valueEls.length ? valueEls[0].getBoundingClientRect().right : 0;\r\n let margin = 4;\r\n\r\n valueEls.forEach((valueEl, idx) => {\r\n // checks are to the left of each valueEl, so skip the first one\r\n if (idx > 0) {\r\n const bounds = valueEl.getBoundingClientRect();\r\n\r\n if (bounds.left - margin < lastVisibleRightEdge) {\r\n // left edge of current value is overlapping right edge of last visible value\r\n valueEl.classList.add(\"hidden\");\r\n hasHiddenBarValue = true;\r\n } else {\r\n valueEl.classList.remove(\"hidden\");\r\n lastVisibleRightEdge = bounds.right;\r\n }\r\n }\r\n });\r\n }\r\n\r\n this.hasHiddenBarValue = hasHiddenBarValue;\r\n }, 100);\r\n\r\n debouncedUpdate = debounce(async () => {\r\n forceUpdate(this.el);\r\n }, 10);\r\n\r\n debouncedSliceUpdate = debounce(async () => {\r\n await getDetails.call(this, this.currentChartType);\r\n forceUpdate(this.el);\r\n }, 100);\r\n\r\n @Listen(\"wmChartSliceUpdated\")\r\n handleSliceUpdate() {\r\n this.debouncedSliceUpdate();\r\n }\r\n\r\n /* RENDERING */\r\n renderBarText(s: SliceDetails, idx: number) {\r\n let val;\r\n if (this.tempValueFormat === \"percentage\") {\r\n // if segment has an amount, but \"0\" percentage (it's below 0.5% and rounded down), still display it as <1%\r\n val = s.perc === 0 && s.amount > 0 ? \"<1%\" : `${s.perc}%`;\r\n } else if (this.tempValueFormat === \"amount\") {\r\n val = s.amount;\r\n }\r\n\r\n // even though we do not display the value text if it has an amount of 0, we still want to render the value-wrapper\r\n // in order to not disturb the positioning of the other value texts in the entire row\r\n return (\r\n <div\r\n class=\"value-wrapper\"\r\n style={{\r\n width: `calc(${amountToPercent(s.amount, this.total, false)}%\r\n ${idx !== this.slicesDetails.length - 1 ? \" - 2px\" : \"\"}`,\r\n }}\r\n >\r\n <span class=\"value\">{s.amount > 0 && val}</span>\r\n </div>\r\n );\r\n }\r\n\r\n drawAxis() {\r\n if (this.currentChartType === \"bar3\") {\r\n return (\r\n <svg class=\"axis\">\r\n <line x1=\"0\" x2=\"100%\" y1=\"0\" y2=\"0\" />\r\n <line x1=\"0\" x2=\"0\" y1=\"0\" y2=\"-85px\" />\r\n <line class=\"tick\" x1=\"0.5\" x2=\"0.5\" y1=\"0\" y2=\"6\" />\r\n <text x=\"0.5\" y=\"-6\">\r\n 0%\r\n </text>\r\n <line class=\"tick\" x1=\"100%\" x2=\"100%\" y1=\"0\" y2=\"6\" />\r\n <text x=\"100%\" y=\"-6\">\r\n 100%\r\n </text>\r\n </svg>\r\n );\r\n }\r\n }\r\n\r\n renderChart() {\r\n if (this.total > 0) {\r\n if (this.isStackedBar) {\r\n return renderStackedBar.call(this, this.currentChartType);\r\n } else if (this.isSimpleBar) {\r\n return renderSimpleBar.call(this, this.currentChartType);\r\n } else if (this.isDoughnut) {\r\n return renderDoughnut.call(this, this.currentChartType);\r\n }\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host onBlur={() => exitChart.call(this)}>\r\n <div\r\n ref={(el) => (this.componentWrapperEl = el as HTMLDivElement)}\r\n class={`component-wrapper ${this.currentChartType} ${\r\n this.isTabbing && !this.userIsNavigating ? \"user-is-tabbing\" : \"\"\r\n } ${this.labelPosition === \"left\" && this.currentChartType === \"bar4\" ? \"left-label\" : \"\"}`}\r\n role=\"application\"\r\n aria-label={this.ariaLabelText}\r\n tabindex={0}\r\n aria-roledescription={this.chartRoleDescription}\r\n aria-describedby=\"chart-instructions\"\r\n >\r\n <label class=\"label\" id={`label-${this.uid}`} htmlFor={`graphic-${this.uid}`}>\r\n <span class=\"label-text\">{this.label}</span>\r\n {this.subinfo ? <span class=\"subinfo\">{this.subinfo}</span> : \"\"}\r\n </label>\r\n {this.isBar && renderLegend.call(this, this.currentChartType)}\r\n {this.renderChart()}\r\n {this.isDoughnut && renderLegend.call(this, this.currentChartType)}\r\n <priv-chart-popover class={this.isTabbing ? \"user-is-tabbing\" : \"\"}></priv-chart-popover>\r\n {this.currentChartType === \"doughnut0\" ? renderCompletionMessage.call(this) : \"\"}\r\n {this.hasHiddenBarValue && renderHiddenValuesMessage()}\r\n </div>\r\n {renderInstructionsText()}\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"mOAAA,MAAMA,EAAa,8kpB,MCwBNC,EAAK,M,yBA8BRC,KAAAC,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D,qBAAoB,mBAC9B,sBAEjBwB,EAAA,SAAOC,MAAM,QAAQtB,GAAI,SAAS3D,KAAKC,MAAO0G,QAAS,WAAW3G,KAAKC,OACrE+E,EAAA,QAAMC,MAAM,cAAcjF,KAAKiD,OAC9BjD,KAAKkD,QAAU8B,EAAA,QAAMC,MAAM,WAAWjF,KAAKkD,SAAkB,IAE/DlD,KAAKuD,OAASqD,EAAa/E,KAAK7B,KAAMA,KAAK8B,kBAC3C9B,KAAK6F,cACL7F,KAAKmD,YAAcyD,EAAa/E,KAAK7B,KAAMA,KAAK8B,kBACjDkD,EAAA,sBAAoBC,MAAOjF,KAAK+D,UAAY,kBAAoB,KAC/D/D,KAAK8B,mBAAqB,YAAc+E,EAAwBhF,KAAK7B,MAAQ,GAC7EA,KAAKO,mBAAqBuG,KAE5BC,I"}
@@ -1,2 +0,0 @@
1
- System.register([],(function(){"use strict";return{execute:function(){var e="3.25.0-2";if(window.navigator.plugins.length>0){console.log("Ripple component library",e)}function t(e){if(e.key=="Tab"){var t=new Event("wmUserIsTabbing");window.dispatchEvent(t);document.querySelector("body").classList.add("wmcl-user-is-tabbing")}if(e.key=="ArrowLeft"||e.key=="ArrowUp"||e.key=="ArrowRight"||e.key=="ArrowDown"){var t=new Event("wmUserIsKeying");window.dispatchEvent(t);document.querySelector("body").classList.add("wmcl-user-is-keying")}}function n(){var e=new Event("wmUserIsNotTabbing");window.dispatchEvent(e);document.querySelector("body").classList.remove("wmcl-user-is-tabbing");document.querySelector("body").classList.remove("wmcl-user-is-keying")}window.addEventListener("keydown",t);window.addEventListener("mousedown",n);var o=document.createElement("div");o.id="wm-tooltip-container";var i=document.createElement("div");i.id="wm-tooltip";i.setAttribute("aria-hidden","true");i.style.position="fixed";i.style.overflow="hidden";i.style.pointerEvents="none";i.style.lineHeight="normal";i.style.fontFamily="inherit";i.style.fontSize="0.875rem";i.style.textTransform="none";i.style.fontWeight="normal";i.style.background="black";i.style.color="#fff";i.style.zIndex="999999";i.style.maxWidth="var(--wmTooltipMaxWidth, 13.75rem)";i.style.marginRight="1.5rem";i.style.padding="0.375rem";i.style.transitionProperty="opacity";i.style.transitionDelay="opacity";i.style.opacity="0";i.style.top="0";i.style.left="0";i.style.transform="translateZ(0)";i.style.willChange="transform";i.style.transform="translate(var(--wmTooltipLeft), var(--wmTooltipTop))";o.appendChild(i);var r=document.querySelector("body");r.appendChild(o)}}}));
2
- //# sourceMappingURL=p-96b0ca93.system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["window","navigator","plugins","length","console","log","version","wmComponentKeys","ev","key","event","Event","dispatchEvent","document","querySelector","classList","add","wmComponentMouseDownOnce","remove","addEventListener","tooltipContainer","createElement","id","tooltipEl","setAttribute","style","position","overflow","pointerEvents","lineHeight","fontFamily","fontSize","textTransform","fontWeight","background","color","zIndex","maxWidth","marginRight","padding","transitionProperty","transitionDelay","opacity","top","left","transform","willChange","appendChild","body"],"sources":["src/global/global.ts"],"sourcesContent":["import { setMode } from \"@stencil/core\";\r\nimport { version } from \"../../package.json\";\r\n\r\n// PRINT RIPPLE VERSION IN CONSOLE\r\n// test envs return 0 for plugin.length\r\n// do not print version number there as it causes issues\r\nif (window.navigator.plugins.length > 0) {\r\n console.log(\"Ripple component library\", version);\r\n}\r\n\r\n// USER-IS-TABBING CLASSES (FOR FOCUS INDICATORS)\r\n// Dispatching events to track whether user is navigating with keyboard or mouse\r\nfunction wmComponentKeys(ev: KeyboardEvent) {\r\n if (ev.key == \"Tab\") {\r\n var event: Event = new Event(\"wmUserIsTabbing\");\r\n window.dispatchEvent(event);\r\n document.querySelector(\"body\")!.classList.add(\"wmcl-user-is-tabbing\");\r\n }\r\n if (ev.key == \"ArrowLeft\" || ev.key == \"ArrowUp\" || ev.key == \"ArrowRight\" || ev.key == \"ArrowDown\") {\r\n var event: Event = new Event(\"wmUserIsKeying\");\r\n window.dispatchEvent(event);\r\n document.querySelector(\"body\")!.classList.add(\"wmcl-user-is-keying\");\r\n }\r\n}\r\n\r\nfunction wmComponentMouseDownOnce() {\r\n var event = new Event(\"wmUserIsNotTabbing\");\r\n window.dispatchEvent(event);\r\n document.querySelector(\"body\")!.classList.remove(\"wmcl-user-is-tabbing\");\r\n document.querySelector(\"body\")!.classList.remove(\"wmcl-user-is-keying\");\r\n}\r\n\r\nwindow.addEventListener(\"keydown\", wmComponentKeys);\r\nwindow.addEventListener(\"mousedown\", wmComponentMouseDownOnce);\r\n\r\n// MODES (FOR PRODUCT-SPECIFIC STYLING)\r\n//Checks for mode attribute explicitly set on the document. If \"mode\" is set on component, it will override the global mode. Falls back to default (Planning styles)\r\nsetMode((elm) => {\r\n return elm.getAttribute(\"mode\") || document.documentElement.getAttribute(\"mode\") || \"planning\";\r\n});\r\n\r\n// TOOLTIP\r\n// Add a tooltip element\r\n// This allows tooltips to be always at the highest stacking context (always on top)\r\n// Element is added withing a container to avoid performance impact\r\nconst tooltipContainer = document.createElement(\"div\");\r\ntooltipContainer.id = \"wm-tooltip-container\";\r\nconst tooltipEl = document.createElement(\"div\");\r\ntooltipEl.id = \"wm-tooltip\";\r\ntooltipEl.setAttribute(\"aria-hidden\", \"true\");\r\ntooltipEl.style.position = \"fixed\";\r\ntooltipEl.style.overflow = \"hidden\";\r\ntooltipEl.style.pointerEvents = \"none\";\r\ntooltipEl.style.lineHeight = \"normal\";\r\ntooltipEl.style.fontFamily = \"inherit\";\r\ntooltipEl.style.fontSize = \"0.875rem\";\r\ntooltipEl.style.textTransform = \"none\";\r\ntooltipEl.style.fontWeight = \"normal\";\r\ntooltipEl.style.background = \"black\";\r\ntooltipEl.style.color = \"#fff\";\r\ntooltipEl.style.zIndex = \"999999\";\r\ntooltipEl.style.maxWidth = \"var(--wmTooltipMaxWidth, 13.75rem)\";\r\ntooltipEl.style.marginRight = \"1.5rem\";\r\ntooltipEl.style.padding = \"0.375rem\";\r\ntooltipEl.style.transitionProperty = \"opacity\";\r\ntooltipEl.style.transitionDelay = \"opacity\";\r\ntooltipEl.style.opacity = \"0\";\r\ntooltipEl.style.top = \"0\";\r\ntooltipEl.style.left = \"0\";\r\ntooltipEl.style.transform = \"translateZ(0)\";\r\ntooltipEl.style.willChange = \"transform\";\r\ntooltipEl.style.transform = \"translate(var(--wmTooltipLeft), var(--wmTooltipTop))\";\r\n\r\ntooltipContainer.appendChild(tooltipEl);\r\nconst body = document.querySelector(\"body\");\r\nbody!.appendChild(tooltipContainer);\r\n"],"mappings":"uFAMA,GAAIA,OAAOC,UAAUC,QAAQC,OAAS,EAAG,CACvCC,QAAQC,IAAI,2BAA4BC,E,CAK1C,SAASC,EAAgBC,GACvB,GAAIA,EAAGC,KAAO,MAAO,CACnB,IAAIC,EAAe,IAAIC,MAAK,mBAC5BX,OAAOY,cAAcF,GACrBG,SAASC,cAAc,QAAMC,UAAAC,IAAA,uB,CAE/B,GAAAR,EAAAC,KAAA,aAAAD,EAAAC,KAAA,WAAAD,EAAAC,KAAA,cAAAD,EAAAC,KAAA,aACE,IAAIC,EAAe,IAAIC,MAAM,kBAC7BX,OAAOY,cAAcF,GACrBG,SAASC,cAAc,QAAMC,UAAAC,IAAA,sB,CAEjC,CAEA,SAAAC,IACE,IAAIP,EAAQ,IAAIC,MAAM,sBACtBX,OAAOY,cAAcF,GACrBG,SAASC,cAAc,QAAMC,UAAAG,OAAA,wBAC7BL,SAASC,cAAc,QAASC,UAAUG,OAAO,sBACnD,CAEAlB,OAAAmB,iBAAA,UAAAZ,GACAP,OAAOmB,iBAAiB,YAAaF,GAYrC,IAAMG,EAAmBP,SAASQ,cAAc,OAChDD,EAAiBE,GAAK,uBACtB,IAAMC,EAAYV,SAASQ,cAAc,OACzCE,EAAUD,GAAK,aACfC,EAAUC,aAAa,sBACvBD,EAAUE,MAAMC,SAAW,QAC3BH,EAAUE,MAAME,SAAW,SAC3BJ,EAAUE,MAAMG,cAAgB,OAChCL,EAAUE,MAAMI,WAAa,SAC7BN,EAAUE,MAAMK,WAAa,UAC7BP,EAAUE,MAAMM,SAAW,WAC3BR,EAAUE,MAAMO,cAAgB,OAChCT,EAAUE,MAAMQ,WAAa,SAC7BV,EAAUE,MAAMS,WAAa,QAC7BX,EAAUE,MAAMU,MAAQ,OACxBZ,EAAUE,MAAMW,OAAS,SACzBb,EAAUE,MAAMY,SAAW,qCAC3Bd,EAAUE,MAAMa,YAAc,SAC9Bf,EAAUE,MAAMc,QAAU,WAC1BhB,EAAUE,MAAMe,mBAAqB,UACrCjB,EAAUE,MAAMgB,gBAAkB,UAClClB,EAAUE,MAAMiB,QAAU,IAC1BnB,EAAUE,MAAMkB,IAAM,IACtBpB,EAAUE,MAAMmB,KAAO,IACvBrB,EAAUE,MAAMoB,UAAY,gBAC5BtB,EAAUE,MAAMqB,WAAa,YAC7BvB,EAAUE,MAAMoB,UAAY,uDAE5BzB,EAAiB2B,YAAYxB,GAC7B,IAAMyB,EAAOnC,SAASC,cAAc,QACpCkC,EAAMD,YAAY3B,E"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["privDatepickerCss","PrivDatepicker","exports","this","popupClicked","buttonClicked","prevClicked","nextClicked","openUp","calendar_months","intl","formatMessage","id","defaultMessage","description","weekdays","renderCalendarDate","date","index","monthOfDate","_this","removeZeroes","String","dayOfDate","isThisMonth","monthInFocus","dateId","isToday","isDateToday","h","role","concat","parentId","class","onClick","ev","handleTriggeredDate","target","onKeyDown","trapFocusEnd","onBlur","stopPropagation","Date","getUTCFullYear","getUTCMonth","getUTCDate","selectedMonth","selectedYear","selectedDay","class_1","prototype","handleKey","key","preventDefault","includes","click","isExpanded","closePopup","backOneMonth","forwardOneMonth","unfocusCell","dayInFocus","forceUpdate","el","getMonthDays","yearInFocus","view","newMonth","getPreviousMonth","month","year","unfocusMonth","monthNumInFocus","getNextMonth","numDaysToSubtract","openPopup","document","activeElement","shadowRoot","classList","contains","focusCell","changeoverDate","activeEl","tagName","focusMonth","toggleTabbingOn","validKeys","isTabbing","toggleTabbingOff","blurHandler","popupBlurred","emit","relatedTarget","handleBlurOnWindow","componentDidUpdate","handleSelectedDate","prevButton","focus","nextButton","componentDidLoad","setDateValuesForView","zeroPad","value","length","padStart","targetLength","padString","repeat","slice","toString","today","todayDateArray","getFullYear","getMonth","getDate","reduce","result","val","togglePopup","returnFocus","popupEl","remove","window","setTimeout","style","visibility","changeView","buttonEl","panelPosition","requestAnimationFrame","add","months30","leapYear","getMonthFirstDay","getDay","prevMonth","prevMonthYear","nextMonth","nextMonthYear","getCalendarDates","monthDays","monthFirstDay","daysFromPrevMonth","daysFromNextMonth","_a","_b","prevMonthDays","prevMonthDates","__spreadArray","Array","fill","map","_","day","thisMonthDates","nextMonthDates","totalDays","updateLiveRegion","cellTriggered","selectedDate","removeAttribute","getCellById","setAttribute","querySelector","cellToUnfocus","tabIndex","maxDays","cellToFocus","monthToUnfocus","monthToFocus","trapFocusLeft","shiftKey","focusCellInView","trapFocusRight","toggleBusyAttribute","state","text","liveRegion","innerHTML","host","getElementById","labelHeight","clientHeight","shouldOpenUp","hasRoomRight","left","right","newView","renderMonths","tabindex","render","dates","disabled","bind","ref","title","i"],"sources":["src/components/wm-datepicker/priv-datepicker/priv-datepicker.scss?tag=priv-datepicker","src/components/wm-datepicker/priv-datepicker/priv-datepicker.tsx"],"sourcesContent":[".toggle {\r\n all: unset;\r\n cursor: pointer;\r\n padding: rem-calc(0px 6px);\r\n height: rem-calc(38);\r\n border: none;\r\n -moz-border-top-right-radius: 3px;\r\n -webkit-border-top-right-radius: 3px;\r\n border-top-right-radius: 3px;\r\n -moz-border-bottom-right-radius: 3px;\r\n -webkit-border-bottom-right-radius: 3px;\r\n border-bottom-right-radius: 3px;\r\n\r\n // reset styles inherited from Planning in browsers without shadow DOM\r\n -moz-border-top-left-radius: 0;\r\n -webkit-border-top-left-radius: 0;\r\n border-top-left-radius: 0;\r\n -moz-border-bottom-left-radius: 0;\r\n -webkit-border-bottom-left-radius: 0;\r\n border-bottom-left-radius: 0;\r\n @include box-shadow(none);\r\n background-color: $button-default-background;\r\n\r\n &:disabled {\r\n pointer-events: none;\r\n @include box-shadow(none);\r\n background-color: rgba(74, 74, 74, 0.05);\r\n .calendar::after {\r\n color: #7b7b7b;\r\n }\r\n }\r\n\r\n &:hover {\r\n @include box-shadow(none);\r\n background: mix(black, $button-default-background, 10%);\r\n\r\n .calendar::after {\r\n color: $button-default-text;\r\n }\r\n }\r\n\r\n [dir=\"RTL\"] & {\r\n right: auto;\r\n left: 0;\r\n }\r\n\r\n span::after {\r\n @include mdi-icon;\r\n content: \"\\f0ed\";\r\n font-size: rem-calc(24);\r\n color: $button-default-text;\r\n padding: 0;\r\n line-height: rem-calc(40);\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &::-moz-focus-inner {\r\n border: 0;\r\n }\r\n}\r\n\r\n.user-is-tabbing {\r\n .toggle:focus {\r\n @include focus-style;\r\n }\r\n}\r\n\r\n.popup {\r\n visibility: hidden;\r\n font-family: inherit;\r\n @include border-radius(3px);\r\n @include box-shadow(0px 4px 15px 0px rgba(0, 0, 0, 0.2));\r\n width: rem-calc(336);\r\n z-index: 10;\r\n //relative to inner wrapper in wm-datepicker, which contains the input and priv-datepicker\r\n position: absolute;\r\n left: 0;\r\n top: 40px;\r\n min-height: rem-calc(337);\r\n transition: transform 0.25s ease;\r\n transform-origin: center top;\r\n transform: scale(1, 0);\r\n background-color: $light-background;\r\n\r\n &.open {\r\n // display: block;\r\n transform: scale(1, 1);\r\n }\r\n\r\n &.expand-upwards {\r\n top: auto;\r\n bottom: rem-calc(38);\r\n transform-origin: center bottom;\r\n }\r\n\r\n .calendar-header {\r\n @include displayFlex();\r\n @include justifyContent(space-between);\r\n position: relative;\r\n padding: rem-calc(15 4);\r\n\r\n .title-box {\r\n height: rem-calc(42);\r\n @include border-radius(3px);\r\n border: 1px solid;\r\n font-weight: 500;\r\n font-size: rem-calc(14);\r\n background: transparent;\r\n cursor: pointer;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: rem-calc(0 6 0 12);\r\n border-color: $button-default-text;\r\n color: $button-default-text;\r\n\r\n &:after {\r\n @include mdi-icon;\r\n content: \"\\f140\";\r\n padding-left: rem-calc(12);\r\n }\r\n\r\n &.year:after {\r\n content: \"\\f143\";\r\n }\r\n\r\n &::-moz-focus-inner {\r\n border: 0;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n }\r\n\r\n .arw-btn {\r\n cursor: pointer;\r\n @include border-radius(50%);\r\n width: rem-calc(44);\r\n height: rem-calc(44);\r\n border: none;\r\n color: $button-default-text;\r\n background: transparent;\r\n padding: 0;\r\n @include box-shadow(none);\r\n line-height: rem-calc(44);\r\n\r\n .mdi {\r\n @include mdi-icon;\r\n font-size: rem-calc(24);\r\n font-weight: normal;\r\n line-height: rem-calc(44);\r\n\r\n &:hover {\r\n background-color: #efeef1;\r\n }\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:active {\r\n @include scale($xVal: 0.9, $yVal: 0.9);\r\n background-color: #d7d6d9;\r\n }\r\n }\r\n }\r\n\r\n .day-view {\r\n min-width: 100%;\r\n\r\n .date-grid {\r\n width: 100%;\r\n text-align: center;\r\n border-collapse: collapse;\r\n margin-bottom: rem-calc(7);\r\n color: #757575;\r\n\r\n .date-row:first-child {\r\n .date-cell {\r\n margin-top: rem-calc(2);\r\n }\r\n }\r\n\r\n .date-header {\r\n background-color: rgb(238, 237, 244);\r\n }\r\n\r\n .header-cell {\r\n height: rem-calc(33);\r\n line-height: rem-calc(33);\r\n width: rem-calc(44);\r\n margin: 0 calc((14.28% - 44px) / 2);\r\n padding: 0;\r\n display: inline-block;\r\n font-size: rem-calc(13);\r\n font-weight: bold;\r\n color: #4a4a4a;\r\n border: none;\r\n }\r\n\r\n .date-cell {\r\n cursor: pointer;\r\n display: inline-block;\r\n padding: 0;\r\n @include border-radius(50%);\r\n height: rem-calc(44);\r\n width: rem-calc(44);\r\n margin: 0 calc((14.28% - 44px) / 2);\r\n font-size: rem-calc(14);\r\n font-weight: 500;\r\n line-height: rem-calc(44);\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:hover {\r\n background-color: #efeef1;\r\n }\r\n\r\n &:active {\r\n background-color: $button-primary-background;\r\n color: #ffffff;\r\n }\r\n\r\n &.current-month {\r\n color: #4a4a4a;\r\n\r\n &[aria-selected=\"true\"] {\r\n background-color: $button-primary-background;\r\n color: #ffffff;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n .month-view {\r\n .months {\r\n border-top: 2px solid;\r\n border-top-color: #eeedf4;\r\n @include displayFlex();\r\n flex-wrap: wrap;\r\n }\r\n\r\n .month-row {\r\n @include displayFlex();\r\n @include justifyContent(space-between);\r\n width: 100%;\r\n border-bottom: 2px solid;\r\n border-bottom-color: #eeedf4;\r\n }\r\n\r\n .month {\r\n cursor: pointer;\r\n text-align: center;\r\n width: 100%;\r\n height: rem-calc(64);\r\n line-height: rem-calc(64);\r\n font-weight: 500;\r\n color: $button-default-text;\r\n\r\n &:not(:last-child) {\r\n border-right: 2px solid;\r\n border-right-color: #eeedf4;\r\n }\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n &:hover {\r\n background-color: #efeef1;\r\n }\r\n\r\n &:active,\r\n &.selected {\r\n background-color: #575195;\r\n color: #ffffff;\r\n }\r\n }\r\n }\r\n\r\n &.user-is-tabbing {\r\n button:focus,\r\n .title-box:focus,\r\n .date-cell:focus,\r\n .month:focus {\r\n @include focus-style;\r\n border: none;\r\n z-index: 11;\r\n }\r\n }\r\n}\r\n\r\n.sr-only {\r\n @include srOnly;\r\n}\r\n","import { h, Component, Prop, Element, Event, EventEmitter, Listen, State } from \"@stencil/core\";\r\nimport { forceUpdate } from \"@stencil/core\";\r\nimport { intl, hasRoomRight, shouldOpenUp } from \"../../../global/functions\";\r\n\r\n@Component({\r\n tag: \"priv-datepicker\",\r\n styleUrl: \"priv-datepicker.scss\",\r\n})\r\nexport class PrivDatepicker {\r\n @Element() el!: HTMLPrivDatepickerElement;\r\n\r\n @Prop() disabled: boolean = false;\r\n @Prop({ mutable: true, reflect: true }) isExpanded: boolean = false;\r\n @Prop({ mutable: true, reflect: true }) view: string = \"day\";\r\n @Prop({ mutable: true, reflect: true }) date: Date = new Date();\r\n @Prop({ mutable: true }) selectedYear: number = this.date.getUTCFullYear();\r\n @Prop({ mutable: true }) selectedMonth: number = this.date.getUTCMonth() + 1;\r\n @Prop({ mutable: true }) selectedDay: number = this.date.getUTCDate();\r\n @Prop({ mutable: true }) monthInFocus: number = this.selectedMonth;\r\n @Prop({ mutable: true }) yearInFocus: number = this.selectedYear;\r\n @Prop({ mutable: true }) dayInFocus: number = this.selectedDay;\r\n @State() monthNumInFocus: number = this.selectedMonth;\r\n @Prop({ mutable: true, reflect: true }) parentId: string = \"\";\r\n\r\n @State() isTabbing: boolean = false;\r\n\r\n selectedDate!: HTMLTableCellElement;\r\n\r\n @Event() cellTriggered!: EventEmitter<HTMLElement>;\r\n @Event() toggleButtonClicked!: EventEmitter<HTMLButtonElement>;\r\n @Event() popupClosed!: EventEmitter;\r\n @Event() popupBlurred!: EventEmitter<{ relatedTarget: EventTarget | null }>;\r\n\r\n private popupEl?: HTMLElement;\r\n private buttonEl!: HTMLButtonElement;\r\n private popupClicked: boolean = true;\r\n private buttonClicked: boolean = true;\r\n private prevButton!: HTMLButtonElement;\r\n private nextButton!: HTMLButtonElement;\r\n private prevClicked: boolean = true;\r\n private nextClicked: boolean = true;\r\n private openUp: boolean = false;\r\n\r\n private calendar_months: Array<string> = [\r\n intl.formatMessage({\r\n id: \"date.january\",\r\n defaultMessage: \"January\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.february\",\r\n defaultMessage: \"February\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.march\",\r\n defaultMessage: \"March\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.april\",\r\n defaultMessage: \"April\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.may\",\r\n defaultMessage: \"May\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.june\",\r\n defaultMessage: \"June\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.july\",\r\n defaultMessage: \"July\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.august\",\r\n defaultMessage: \"August\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.september\",\r\n defaultMessage: \"September\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.october\",\r\n defaultMessage: \"October\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.november\",\r\n defaultMessage: \"November\",\r\n description: \"Month of the year\",\r\n }),\r\n intl.formatMessage({\r\n id: \"date.december\",\r\n defaultMessage: \"December\",\r\n description: \"Month of the year\",\r\n }),\r\n ];\r\n\r\n private weekdays: Array<string> = [\r\n intl.formatMessage({ id: \"date.sunday\", defaultMessage: \"Sunday\" }),\r\n intl.formatMessage({ id: \"date.monday\", defaultMessage: \"Monday\" }),\r\n intl.formatMessage({ id: \"date.tuesday\", defaultMessage: \"Tuesday\" }),\r\n intl.formatMessage({ id: \"date.wednesday\", defaultMessage: \"Wednesday\" }),\r\n intl.formatMessage({ id: \"date.thursday\", defaultMessage: \"Thursday\" }),\r\n intl.formatMessage({ id: \"date.friday\", defaultMessage: \"Friday\" }),\r\n intl.formatMessage({ id: \"date.saturday\", defaultMessage: \"Saturday\" }),\r\n ];\r\n\r\n @Listen(\"keydown\")\r\n handleKey(ev: KeyboardEvent): void {\r\n this.prevClicked = false;\r\n this.nextClicked = false;\r\n\r\n switch (ev.key) {\r\n case \"Enter\":\r\n ev.preventDefault();\r\n //Clunky exception for blur validation. Remove when blur reworked.\r\n !(ev.target as HTMLElement).id.includes(\"popup-title\") && (ev.target as HTMLElement)!.click();\r\n break;\r\n\r\n case \"Escape\":\r\n ev.preventDefault();\r\n if (this.isExpanded) {\r\n ev.stopPropagation(); // prevents closing of parent modal\r\n this.closePopup(true);\r\n }\r\n break;\r\n\r\n case \"PageUp\":\r\n ev.preventDefault();\r\n this.backOneMonth();\r\n break;\r\n\r\n case \"PageDown\":\r\n ev.preventDefault();\r\n this.forwardOneMonth();\r\n break;\r\n\r\n case \"Home\":\r\n ev.preventDefault();\r\n this.unfocusCell();\r\n this.dayInFocus = 1;\r\n forceUpdate(this.el);\r\n break;\r\n\r\n case \"End\":\r\n ev.preventDefault();\r\n this.unfocusCell();\r\n this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);\r\n forceUpdate(this.el);\r\n break;\r\n\r\n case \"ArrowLeft\":\r\n ev.preventDefault();\r\n if (this.view === \"day\") {\r\n this.unfocusCell();\r\n if (this.dayInFocus === 1) {\r\n const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);\r\n } else {\r\n this.dayInFocus -= 1;\r\n }\r\n } else {\r\n this.unfocusMonth();\r\n if (this.monthNumInFocus === 0) {\r\n this.monthNumInFocus = 11;\r\n } else {\r\n this.monthNumInFocus -= 1;\r\n }\r\n }\r\n break;\r\n\r\n case \"ArrowRight\":\r\n ev.preventDefault();\r\n if (this.view === \"day\") {\r\n this.unfocusCell();\r\n if (this.dayInFocus === this.getMonthDays(this.monthInFocus, this.yearInFocus)) {\r\n const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n this.dayInFocus = 1;\r\n } else {\r\n this.dayInFocus += 1;\r\n }\r\n } else {\r\n this.unfocusMonth();\r\n if (this.monthNumInFocus === 11) {\r\n this.monthNumInFocus = 0;\r\n } else {\r\n this.monthNumInFocus += 1;\r\n }\r\n }\r\n break;\r\n\r\n case \"ArrowUp\":\r\n ev.preventDefault();\r\n if (this.view === \"day\") {\r\n this.unfocusCell();\r\n if (this.dayInFocus < 8) {\r\n const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n const numDaysToSubtract = 7 - this.dayInFocus;\r\n this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus) - numDaysToSubtract;\r\n } else {\r\n this.dayInFocus -= 7;\r\n }\r\n } else {\r\n this.unfocusMonth();\r\n if (this.monthNumInFocus < 3) {\r\n this.monthNumInFocus += 9;\r\n } else {\r\n this.monthNumInFocus -= 3;\r\n }\r\n }\r\n break;\r\n\r\n case \"ArrowDown\":\r\n ev.preventDefault();\r\n if (!this.isExpanded) {\r\n this.openPopup();\r\n } else {\r\n if (this.view === \"day\") {\r\n //If the down arrow is pressed from the month button or the arrow buttons, focus should shift to the current cell in focus\r\n if (!(document.activeElement!.shadowRoot! || document).activeElement!.classList.contains(\"date-cell\")) {\r\n this.focusCell();\r\n break;\r\n }\r\n\r\n this.unfocusCell();\r\n const changeoverDate = this.getMonthDays(this.monthInFocus, this.yearInFocus) - 7;\r\n if (this.dayInFocus > changeoverDate) {\r\n const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n this.dayInFocus = this.dayInFocus - changeoverDate;\r\n } else {\r\n this.dayInFocus += 7;\r\n }\r\n } else {\r\n //If the down arrow is pressed from the arrow buttons or the title box, focus should shift to the current month in focus\r\n const activeEl = (document.activeElement!.shadowRoot! || document).activeElement!;\r\n if (activeEl.tagName === \"BUTTON\" || activeEl.id.includes(\"popup-title-year\")) {\r\n this.focusMonth();\r\n break;\r\n }\r\n\r\n this.unfocusMonth();\r\n if (this.monthNumInFocus > 8) {\r\n this.monthNumInFocus -= 9;\r\n } else {\r\n this.monthNumInFocus += 3;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n\r\n @Listen(\"keydown\")\r\n toggleTabbingOn(ev: KeyboardEvent) {\r\n const validKeys = [\"Tab\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"Enter\"];\r\n if (validKeys.includes(ev.key)) {\r\n this.isTabbing = true;\r\n }\r\n }\r\n\r\n //Using mousedown prevents this from running when the keydown listener emits \".click()\" for when enter is pressed.\r\n @Listen(\"mousedown\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n @Listen(\"click\", { target: \"document\" })\r\n blurHandler(ev: PointerEvent): void {\r\n if (!this.popupClicked && !this.buttonClicked && this.isExpanded) {\r\n this.closePopup();\r\n // in this case, the PointerEvent target is identical to the blur events relatedTarget, and is passed on as such\r\n this.popupBlurred.emit({ relatedTarget: ev.target });\r\n }\r\n this.popupClicked = false;\r\n this.buttonClicked = false;\r\n }\r\n\r\n @Listen(\"blur\", { target: \"window\" })\r\n handleBlurOnWindow(ev: FocusEvent) {\r\n // for cases where the user clicks or uses a shortcut to leave the document\r\n if (this.isExpanded) {\r\n this.closePopup();\r\n this.popupBlurred.emit({ relatedTarget: ev.target });\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n this.handleSelectedDate();\r\n if (this.isExpanded) {\r\n this.prevClicked\r\n ? this.prevButton.focus()\r\n : this.nextClicked\r\n ? this.nextButton.focus()\r\n : this.view === \"day\"\r\n ? this.focusCell()\r\n : this.focusMonth();\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n this.handleSelectedDate();\r\n this.setDateValuesForView();\r\n }\r\n\r\n zeroPad(value: number | string, length: number) {\r\n if (!String.prototype.padStart) {\r\n String.prototype.padStart = function padStart(targetLength, padString) {\r\n targetLength = targetLength - this.length;\r\n if (targetLength > padString!.length) {\r\n padString += padString!.repeat(targetLength / padString!.length);\r\n }\r\n return padString!.slice(0, targetLength) + String(this);\r\n };\r\n }\r\n return `${value.toString()}`.padStart(length, \"0\");\r\n }\r\n\r\n removeZeroes(date: string): number {\r\n return +date < 10 ? +date.slice(1) : +date;\r\n }\r\n\r\n isDateToday(date: Array<string>): boolean {\r\n const today = new Date();\r\n const todayDateArray = [\r\n today.getFullYear().toString(),\r\n (today.getMonth() + 1).toString(),\r\n today.getDate().toString(),\r\n ];\r\n //Compare today's date to date and return true if they match\r\n return todayDateArray.reduce(\r\n (result: boolean, val: string, index: number) => result && this.removeZeroes(date[index]).toString() === val,\r\n true\r\n );\r\n }\r\n\r\n togglePopup() {\r\n this.isExpanded ? this.closePopup() : this.openPopup();\r\n this.buttonClicked = true;\r\n }\r\n\r\n closePopup(returnFocus: boolean = false) {\r\n this.isExpanded = false;\r\n this.popupEl!.classList.remove(\"open\");\r\n window.setTimeout(() => {\r\n //not using display none in order to get measurements of the popup while hidden\r\n this.popupEl!.style.visibility = \"hidden\";\r\n }, 250);\r\n //Reset values so that menu reopens to day view with selected date in focus\r\n if (this.view === \"day\") {\r\n this.unfocusCell();\r\n }\r\n this.monthInFocus = this.selectedMonth;\r\n this.yearInFocus = this.selectedYear;\r\n this.dayInFocus = this.selectedDay;\r\n this.changeView(\"day\");\r\n if (returnFocus) {\r\n this.buttonEl.focus();\r\n }\r\n }\r\n\r\n openPopup() {\r\n this.panelPosition();\r\n this.setDateValuesForView();\r\n this.prevClicked = false;\r\n this.nextClicked = false;\r\n this.popupEl!.style.visibility = \"visible\";\r\n window.requestAnimationFrame(() => {\r\n this.popupEl!.classList.add(\"open\");\r\n });\r\n this.isExpanded = true;\r\n this.focusCell();\r\n }\r\n\r\n getMonthDays(month: number, year: number) {\r\n const months30 = [4, 6, 9, 11];\r\n const leapYear = year % 4 === 0;\r\n\r\n return month === 2 ? (leapYear ? 29 : 28) : months30.includes(month) ? 30 : 31;\r\n }\r\n\r\n // 1 => Sunday, 7 => Saturday\r\n getMonthFirstDay(month: number, year: number) {\r\n return +new Date(year, month - 1, 1, 12, 0, 0).getDay() + 1;\r\n }\r\n\r\n getPreviousMonth(month: number, year: number) {\r\n const prevMonth = month > 1 ? month - 1 : 12;\r\n const prevMonthYear = month > 1 ? year : year - 1;\r\n\r\n return { month: prevMonth, year: prevMonthYear };\r\n }\r\n\r\n getNextMonth(month: number, year: number) {\r\n const nextMonth = month < 12 ? month + 1 : 1;\r\n const nextMonthYear = month < 12 ? year : year + 1;\r\n\r\n return { month: nextMonth, year: nextMonthYear };\r\n }\r\n\r\n getCalendarDates(month: number, year: number) {\r\n // Get number of days in the month and the month's first day\r\n const monthDays = this.getMonthDays(month, year);\r\n const monthFirstDay = this.getMonthFirstDay(month, year);\r\n\r\n // Get number of days to be displayed from previous and next months\r\n // These ensure a total of 42 days (6 weeks) displayed on the calendar\r\n const daysFromPrevMonth = monthFirstDay - 1;\r\n let daysFromNextMonth = 42 - (daysFromPrevMonth + monthDays);\r\n daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;\r\n\r\n // Get the previous and next months and years\r\n const { month: prevMonth, year: prevMonthYear } = this.getPreviousMonth(month, year);\r\n const { month: nextMonth, year: nextMonthYear } = this.getNextMonth(month, year);\r\n\r\n // Get number of days in previous month\r\n const prevMonthDays = this.getMonthDays(prevMonth, prevMonthYear);\r\n\r\n // Builds dates to be displayed from previous month. The initialized array is \"filled\" with an arbitrary number because IE and Edge won't map over an array with empty values.\r\n const prevMonthDates = [...new Array(daysFromPrevMonth).fill(\"1\")].map((_, index) => {\r\n const day = index + 1 + (prevMonthDays - daysFromPrevMonth);\r\n return [prevMonthYear.toString(), this.zeroPad(prevMonth, 2), this.zeroPad(day, 2)];\r\n });\r\n\r\n // Builds dates to be displayed from current month. The initialized array is \"filled\" with an arbitrary number because IE and Edge won't map over an array with empty values.\r\n const thisMonthDates = [...new Array(monthDays).fill(\"1\")].map((_, index) => {\r\n const day = index + 1;\r\n return [year.toString(), this.zeroPad(month, 2), this.zeroPad(day, 2)];\r\n });\r\n\r\n // Builds dates to be displayed from next month. The initialized array is \"filled\" with an arbitrary number because IE and Edge won't map over an array with empty values.\r\n const nextMonthDates = [...new Array(daysFromNextMonth).fill(\"1\")].map((_, index) => {\r\n const day = index + 1;\r\n return [nextMonthYear.toString(), this.zeroPad(nextMonth, 2), this.zeroPad(day, 2)];\r\n });\r\n\r\n // Combines all dates from previous, current and next months\r\n return [...prevMonthDates, ...thisMonthDates, ...nextMonthDates];\r\n }\r\n\r\n forwardOneMonth() {\r\n this.unfocusCell();\r\n const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);\r\n if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {\r\n this.dayInFocus = totalDays;\r\n }\r\n this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);\r\n }\r\n\r\n backOneMonth() {\r\n this.unfocusCell();\r\n const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);\r\n this.monthInFocus = newMonth.month;\r\n this.yearInFocus = newMonth.year;\r\n const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);\r\n if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {\r\n this.dayInFocus = totalDays;\r\n }\r\n this.updateLiveRegion(`Viewing ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);\r\n }\r\n\r\n handleTriggeredDate(el: HTMLTableDataCellElement) {\r\n this.cellTriggered.emit(el as HTMLTableDataCellElement);\r\n // change of input value will trigger the function updating selectedDate\r\n this.closePopup(true);\r\n }\r\n\r\n handleSelectedDate() {\r\n //Remove old selection status\r\n if (this.selectedDate) {\r\n this.selectedDate.removeAttribute(\"aria-selected\");\r\n }\r\n //Update selected date to new date inputted/selected\r\n this.selectedDate = this.getCellById(this.selectedYear, this.selectedMonth, this.selectedDay);\r\n\r\n if (this.selectedDate) {\r\n this.selectedDate.setAttribute(\"aria-selected\", \"true\");\r\n }\r\n }\r\n\r\n getCellById(year: number, month: number, day: number) {\r\n const id = year + this.zeroPad(month, 2) + this.zeroPad(day, 2);\r\n return this.el.querySelector(`#cell-${id}-${this.parentId}`) as HTMLTableCellElement;\r\n }\r\n\r\n unfocusCell() {\r\n const cellToUnfocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);\r\n cellToUnfocus.tabIndex = -1;\r\n }\r\n\r\n focusCell() {\r\n //These two lines of code prevent an error from happening when the day in focus does not exist in a new month selected, e.g., May 31 is in focus, then the user selects \"November\". It will return focus in the date view to the last day of the month so that focus doesn't fly out of the popup.\r\n const maxDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);\r\n this.dayInFocus = this.dayInFocus > maxDays ? maxDays : this.dayInFocus;\r\n\r\n const cellToFocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);\r\n if (cellToFocus) {\r\n cellToFocus.tabIndex = 0;\r\n cellToFocus.focus();\r\n }\r\n }\r\n\r\n unfocusMonth() {\r\n const monthToUnfocus = this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`) as HTMLDivElement;\r\n monthToUnfocus.tabIndex = -1;\r\n }\r\n\r\n focusMonth() {\r\n const monthToFocus = this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`) as HTMLDivElement;\r\n monthToFocus.tabIndex = 0;\r\n monthToFocus.focus();\r\n }\r\n\r\n trapFocusLeft(ev: KeyboardEvent) {\r\n if (ev.shiftKey && ev.key === \"Tab\") {\r\n ev.preventDefault();\r\n this.focusCellInView();\r\n }\r\n }\r\n\r\n trapFocusEnd(ev: KeyboardEvent) {\r\n if (!ev.shiftKey && ev.key === \"Tab\") {\r\n ev.preventDefault();\r\n this.prevButton.focus();\r\n }\r\n }\r\n\r\n trapFocusRight(ev: KeyboardEvent) {\r\n if (!ev.shiftKey && ev.key === \"Tab\") {\r\n ev.preventDefault();\r\n this.focusCellInView();\r\n }\r\n }\r\n\r\n focusCellInView() {\r\n if (this.view === \"day\") {\r\n this.focusCell();\r\n } else {\r\n this.focusMonth();\r\n }\r\n }\r\n\r\n toggleBusyAttribute(state: string) {\r\n (this.el.querySelector(\"#wm-container\") as HTMLElement).setAttribute(\"aria-busy\", state);\r\n }\r\n\r\n setDateValuesForView() {\r\n this.selectedYear = this.date.getUTCFullYear();\r\n this.selectedMonth = this.date.getUTCMonth() + 1;\r\n this.selectedDay = this.date.getUTCDate();\r\n this.monthInFocus = this.selectedMonth;\r\n this.yearInFocus = this.selectedYear;\r\n this.dayInFocus = this.selectedDay;\r\n this.monthNumInFocus = this.selectedMonth - 1;\r\n }\r\n\r\n updateLiveRegion(text: string) {\r\n let liveRegion = this.el.querySelector(\"#live-region\") as HTMLElement;\r\n liveRegion.innerHTML = text;\r\n }\r\n\r\n panelPosition() {\r\n // getting a ref to the input el (in datepicker.tsx)\r\n let host = document.getElementById(this.parentId) as HTMLWmDatepickerElement;\r\n\r\n const labelHeight = host.shadowRoot!.querySelector(\".label-wrapper\")!.clientHeight;\r\n\r\n this.openUp = shouldOpenUp(host, this.popupEl!, labelHeight);\r\n\r\n if (hasRoomRight(host, 336)) {\r\n this.popupEl!.style.left = \"0\";\r\n this.popupEl!.style.right = \"auto\";\r\n } else {\r\n this.popupEl!.style.right = \"0\";\r\n this.popupEl!.style.left = \"auto\";\r\n }\r\n }\r\n\r\n changeView(newView: string) {\r\n this.view = newView;\r\n //Ensure month view always opens to the month last visited in date view\r\n this.monthNumInFocus = this.monthInFocus - 1;\r\n }\r\n\r\n renderCalendarDate = (date: Array<string>, index: number) => {\r\n let monthOfDate = this.removeZeroes(String(date[1]));\r\n let dayOfDate = this.removeZeroes(String(date[2]));\r\n let isThisMonth = monthOfDate === this.monthInFocus ? \"current-month\" : \"\";\r\n const dateId = date[0] + date[1] + date[2];\r\n const isToday = this.isDateToday(date);\r\n\r\n return (\r\n <div\r\n role=\"gridcell\"\r\n id={`cell-${dateId}-${this.parentId}`}\r\n class={`date-cell ${isThisMonth}`}\r\n aria-selected={false}\r\n aria-label={`${\r\n isToday\r\n ? `${intl.formatMessage({\r\n id: \"date.today\",\r\n defaultMessage: \"today\",\r\n description: \"calendar button\",\r\n })}, `\r\n : \"\"\r\n }${this.weekdays[index]}, ${this.calendar_months[monthOfDate - 1]} ${dayOfDate}, ${date[0]}`}\r\n onClick={(ev) => {\r\n this.handleTriggeredDate(ev.target as HTMLTableDataCellElement);\r\n }}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusEnd(ev)}\r\n data-month={date[1]}\r\n data-year={date[0]}\r\n onBlur={(ev: FocusEvent) => ev.stopPropagation()}\r\n >\r\n {dayOfDate}\r\n </div>\r\n );\r\n };\r\n\r\n renderMonths(month: string, index: number) {\r\n return (\r\n <div\r\n id={`month-${index}-${this.parentId}`}\r\n class={`month ${this.selectedMonth - 1 === index ? \"selected\" : \"\"}`}\r\n role=\"gridcell\"\r\n tabindex={index + 1 === this.monthInFocus ? 0 : -1}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusEnd(ev)}\r\n onBlur={(ev: FocusEvent) => ev.stopPropagation()}\r\n onClick={() => {\r\n this.monthInFocus = index + 1;\r\n this.changeView(\"day\");\r\n }}\r\n >\r\n {month}\r\n </div>\r\n );\r\n }\r\n\r\n render() {\r\n const dates = this.getCalendarDates(this.monthInFocus, this.yearInFocus);\r\n\r\n return (\r\n <div class=\"container\" id=\"wm-container\">\r\n <button\r\n disabled={this.disabled}\r\n onClick={this.togglePopup.bind(this)}\r\n aria-describedby={`date-input-${this.parentId}`}\r\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\r\n aria-expanded={`${this.isExpanded}`}\r\n class=\"toggle\"\r\n id={`toggle-${this.parentId}`}\r\n >\r\n <span\r\n class=\"calendar\"\r\n title={intl.formatMessage({\r\n id: \"date.calendarView\",\r\n defaultMessage: \"Calendar View\",\r\n description: \"Calendar button\",\r\n })}\r\n />\r\n </button>\r\n <div\r\n class={`popup ${this.view}-view ${this.openUp ? \"expand-upwards\" : \"\"} ${\r\n this.isTabbing ? \"user-is-tabbing\" : \"\"\r\n }`}\r\n id={`popup-${this.parentId}`}\r\n ref={(el) => (this.popupEl = el as HTMLElement)}\r\n onClick={() => (this.popupClicked = true)}\r\n role=\"application\"\r\n aria-describedby=\"application\"\r\n >\r\n {this.view === \"day\" ? (\r\n <div class=\"day-view\">\r\n <div class=\"calendar-header\">\r\n <button\r\n onClick={() => {\r\n this.prevClicked = true;\r\n this.popupClicked = true;\r\n this.backOneMonth();\r\n }}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusLeft(ev)}\r\n ref={(el) => (this.prevButton = el as HTMLButtonElement)}\r\n class=\"arw-btn\"\r\n aria-label={intl.formatMessage({\r\n id: \"date.selectPreviousMonth\",\r\n defaultMessage: \"Select previous month\",\r\n description: \"Calendar button\",\r\n })}\r\n >\r\n <span class=\"mdi\">&#xf141;</span>\r\n </button>\r\n <div\r\n id={`popup-title-month-${this.parentId}`}\r\n class=\"title-box\"\r\n tabindex={0}\r\n role=\"button\"\r\n onKeyDown={(ev: KeyboardEvent) => {\r\n if (ev.key === \"Enter\" || ev.key === \" \") {\r\n ev.preventDefault();\r\n this.changeView(\"month\");\r\n }\r\n }}\r\n onClick={this.changeView.bind(this, \"month\")}\r\n aria-label={`${intl.formatMessage({\r\n id: \"date.currentMonth\",\r\n defaultMessage: \"current month\",\r\n description: \"Calendar button\",\r\n })}: ${this.calendar_months[this.monthInFocus - 1]}\r\n ${this.yearInFocus}.`}\r\n aria-describedby=\"month-title\"\r\n >\r\n <span class=\"title\" aria-hidden=\"true\">\r\n {this.calendar_months[this.monthInFocus - 1]} {this.yearInFocus}\r\n </span>\r\n </div>\r\n <button\r\n onClick={() => {\r\n this.nextClicked = true;\r\n this.popupClicked = true;\r\n this.forwardOneMonth();\r\n }}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusRight(ev)}\r\n aria-label={intl.formatMessage({\r\n id: \"date.selectNextMonth\",\r\n defaultMessage: \"Select next month\",\r\n description: \"Calendar button\",\r\n })}\r\n ref={(el) => (this.nextButton = el as HTMLButtonElement)}\r\n class=\"arw-btn\"\r\n >\r\n <span class=\"mdi\">&#xf142;</span>\r\n </button>\r\n </div>\r\n <div aria-labelledby={`popup-title-month-${this.parentId}`} role=\"grid\" class=\"date-grid\">\r\n <div role=\"rowgroup\" class=\"date-header\">\r\n <div role=\"row\" class=\"header-row\">\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.su\",\r\n defaultMessage: \"Su\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.mo\",\r\n defaultMessage: \"Mo\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.tu\",\r\n defaultMessage: \"Tu\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.we\",\r\n defaultMessage: \"We\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.th\",\r\n defaultMessage: \"Th\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.fr\",\r\n defaultMessage: \"Fr\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n <div role=\"columnheader\" class=\"header-cell\">\r\n <span>\r\n {intl.formatMessage({\r\n id: \"date.sa\",\r\n defaultMessage: \"Sa\",\r\n description: \"Abbreviated day of the week\",\r\n })}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div role=\"rowgroup\">\r\n <div role=\"row\" class=\"date-row\">\r\n {dates.slice(0, 7).map((date, i) => this.renderCalendarDate(date, i))}\r\n </div>\r\n <div role=\"row\">{dates.slice(7, 14).map((date, i) => this.renderCalendarDate(date, i))}</div>\r\n <div role=\"row\">{dates.slice(14, 21).map((date, i) => this.renderCalendarDate(date, i))}</div>\r\n <div role=\"row\">{dates.slice(21, 28).map((date, i) => this.renderCalendarDate(date, i))}</div>\r\n <div role=\"row\">{dates.slice(28, 35).map((date, i) => this.renderCalendarDate(date, i))}</div>\r\n {dates.length > 35 ? (\r\n <div role=\"row\">{dates.slice(35).map((date, i) => this.renderCalendarDate(date, i))}</div>\r\n ) : (\r\n \"\"\r\n )}\r\n </div>\r\n </div>\r\n </div>\r\n ) : (\r\n <div class=\"month-view\">\r\n <div class=\"calendar-header\">\r\n <button\r\n onClick={() => {\r\n this.prevClicked = true;\r\n this.popupClicked = true;\r\n this.yearInFocus -= 1;\r\n this.updateLiveRegion(`${this.yearInFocus} selected.`);\r\n }}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusLeft(ev)}\r\n aria-label={intl.formatMessage({\r\n id: \"date.selectPreviousYear\",\r\n defaultMessage: \"Select previous year\",\r\n description: \"Calendar button\",\r\n })}\r\n ref={(el) => (this.prevButton = el as HTMLButtonElement)}\r\n class=\"arw-btn\"\r\n >\r\n <span class=\"mdi\">&#xf141;</span>\r\n </button>\r\n <div\r\n id={`popup-title-year-${this.parentId}`}\r\n tabindex={0}\r\n class=\"title-box year\"\r\n role=\"button\"\r\n onClick={this.changeView.bind(this, \"day\")}\r\n onKeyDown={(ev: KeyboardEvent) => {\r\n if (ev.key === \"Enter\" || ev.key === \" \") {\r\n ev.preventDefault();\r\n this.changeView(\"day\");\r\n }\r\n }}\r\n aria-labelledby=\"year-title\"\r\n >\r\n <span class=\"title\">{this.yearInFocus}</span>\r\n </div>\r\n <button\r\n onClick={() => {\r\n this.nextClicked = true;\r\n this.popupClicked = true;\r\n this.yearInFocus += 1;\r\n this.updateLiveRegion(`${this.yearInFocus} selected.`);\r\n }}\r\n aria-label={intl.formatMessage({\r\n id: \"date.selectNextYear\",\r\n defaultMessage: \"Select next year\",\r\n description: \"Calendar button\",\r\n })}\r\n onKeyDown={(ev: KeyboardEvent) => this.trapFocusRight(ev)}\r\n ref={(el) => (this.nextButton = el as HTMLButtonElement)}\r\n class=\"arw-btn\"\r\n >\r\n <span class=\"mdi\">&#xf142;</span>\r\n </button>\r\n </div>\r\n <div aria-labelledby={`popup-title-year-${this.parentId}`} role=\"grid\" class=\"months\">\r\n <div role=\"row\" class=\"month-row\">\r\n {this.calendar_months\r\n .slice(0, 3)\r\n .map((month: string, index: number) => this.renderMonths(month, index))}\r\n </div>\r\n <div role=\"row\" class=\"month-row\">\r\n {this.calendar_months\r\n .slice(3, 6)\r\n .map((month: string, index: number) => this.renderMonths(month, index + 3))}\r\n </div>\r\n <div role=\"row\" class=\"month-row\">\r\n {this.calendar_months\r\n .slice(6, 9)\r\n .map((month: string, index: number) => this.renderMonths(month, index + 6))}\r\n </div>\r\n <div role=\"row\" class=\"month-row\">\r\n {this.calendar_months\r\n .slice(9)\r\n .map((month: string, index: number) => this.renderMonths(month, index + 9))}\r\n </div>\r\n </div>\r\n </div>\r\n )}\r\n </div>\r\n {this.isExpanded && <div id=\"live-region\" aria-live=\"polite\" aria-relevant=\"text\" class=\"sr-only\" />}\r\n <div id=\"month-title\" class=\"sr-only\">\r\n {intl.formatMessage({\r\n id: \"date.selectMonth\",\r\n defaultMessage: \"Activate to select a month.\",\r\n description: \"Calendar button\",\r\n })}\r\n </div>\r\n <div id=\"year-title\" class=\"sr-only\">\r\n {intl.formatMessage({\r\n id: \"date.selectYear\",\r\n defaultMessage: \"Activate to select a year.\",\r\n description: \"Calendar button\",\r\n })}\r\n </div>\r\n <div id=\"application\" class=\"sr-only\">\r\n {intl.formatMessage({\r\n id: \"date.instructions\",\r\n defaultMessage:\r\n \"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table.\",\r\n })}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n"],"mappings":"kdAAA,IAAMA,EAAoB,wjP,ICQbC,EAAcC,EAAA,6B,6NA2BjBC,KAAAC,aAAwB,KACxBD,KAAAE,cAAyB,KAGzBF,KAAAG,YAAuB,KACvBH,KAAAI,YAAuB,KACvBJ,KAAAK,OAAkB,MAElBL,KAAAM,gBAAiC,CACvCC,EAAKC,cAAc,CACjBC,GAAI,eACJC,eAAgB,UAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,gBACJC,eAAgB,WAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,aACJC,eAAgB,QAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,aACJC,eAAgB,QAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,WACJC,eAAgB,MAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,YACJC,eAAgB,OAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,YACJC,eAAgB,OAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,cACJC,eAAgB,SAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,iBACJC,eAAgB,YAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,eACJC,eAAgB,UAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,gBACJC,eAAgB,WAChBC,YAAa,sBAEfJ,EAAKC,cAAc,CACjBC,GAAI,gBACJC,eAAgB,WAChBC,YAAa,uBAITX,KAAAY,SAA0B,CAChCL,EAAKC,cAAc,CAAEC,GAAI,cAAeC,eAAgB,WACxDH,EAAKC,cAAc,CAAEC,GAAI,cAAeC,eAAgB,WACxDH,EAAKC,cAAc,CAAEC,GAAI,eA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AE,EAAKyK,aAAaxH,EAAOnD,EAAQ,EAAjC,KAE3CW,EAAA,OAAKC,KAAK,MAAMG,MAAM,aACnB9B,KAAKM,gBACHoG,MAAM,GACN2C,KAAI,SAACnF,EAAenD,GAAkB,OAAAE,EAAKyK,aAAaxH,EAAOnD,EAAQ,EAAjC,QAMlDf,KAAKqD,YAAc3B,EAAA,OAAKjB,GAAG,cAAa,YAAW,SAAQ,gBAAe,OAAOqB,MAAM,YACxFJ,EAAA,OAAKjB,GAAG,cAAcqB,MAAM,WACzBvB,EAAKC,cAAc,CAClBC,GAAI,mBACJC,eAAgB,8BAChBC,YAAa,qBAGjBe,EAAA,OAAKjB,GAAG,aAAaqB,MAAM,WACxBvB,EAAKC,cAAc,CAClBC,GAAI,kBACJC,eAAgB,6BAChBC,YAAa,qBAGjBe,EAAA,OAAKjB,GAAG,cAAcqB,MAAM,WACzBvB,EAAKC,cAAc,CAClBC,GAAI,oBACJC,eACE,oJ,uHAh6Ba,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["getRequest","exports","url","__awaiter","_this","fetch","response","_a","sent","ok","json","Error","statusText","postRequest","payload","method","headers","body","JSON","stringify","deleteRequest","putRequest","file","onProgress","Promise","resolve","reject","req","XMLHttpRequest","upload","addEventListener","ev","this","readyState","status","onerror","open","setRequestHeader","concat","name","send"],"sources":["src/global/services/http-service.tsx"],"sourcesContent":["export const getRequest = async (url: string) => {\r\n const response = await fetch(url);\r\n if (!!response && !!response.ok) {\r\n return await response.json();\r\n } else {\r\n throw new Error(response.statusText);\r\n }\r\n};\r\n\r\nexport const postRequest = async (url: string, payload: Object) => {\r\n const response = await fetch(url, {\r\n method: \"POST\",\r\n headers: { \"Content-Type\": \"application/json; charset=utf-8\" },\r\n body: JSON.stringify(payload),\r\n });\r\n if (!!response && !!response.ok) {\r\n return await response.json();\r\n } else {\r\n throw new Error(response.statusText);\r\n }\r\n};\r\n\r\nexport const deleteRequest = async (url: string) => {\r\n const response = await fetch(url, { method: \"DELETE\" });\r\n if (!!response && !!response.ok) {\r\n return await response.json();\r\n } else {\r\n throw new Error(response.statusText);\r\n }\r\n};\r\n\r\nexport const putRequest = (url: string, file: File, onProgress: Function) => {\r\n return new Promise((resolve, reject) => {\r\n // there's no way to track progress with the fetch API, so using XHR\r\n const req = new XMLHttpRequest();\r\n\r\n req.upload.addEventListener(\"progress\", (ev) => onProgress(ev));\r\n\r\n req.addEventListener(\"readystatechange\", function () {\r\n if (this.readyState === 4 && this.status === 200) {\r\n resolve(this);\r\n } else if (this.readyState === 4 && this.status !== 200) {\r\n reject();\r\n }\r\n });\r\n\r\n req.onerror = () => reject();\r\n req.open(\"PUT\", url, true);\r\n req.setRequestHeader(\"Content-Disposition\", `attachment;filename=\"${file.name}\"`);\r\n req.send(file);\r\n });\r\n};\r\n"],"mappings":"oiDAAaA,EAAUC,EAAA,KAAG,SAAOC,GAAW,OAAAC,UAAAC,OAAA,qB,kEACzB,SAAMC,MAAMH,I,OAAvBI,EAAWC,EAAAC,O,OACXF,KAAcA,EAASG,IAAzB,YACK,SAAMH,EAASI,Q,OAAtB,SAAOH,EAAAC,Q,OAEP,MAAM,IAAIG,MAAML,EAASM,Y,cAIhBC,EAAWZ,EAAA,KAAG,SAAOC,EAAaY,GAAe,OAAAX,UAAAC,OAAA,qB,kEAC3C,SAAMC,MAAMH,EAAK,CAChCa,OAAQ,OACRC,QAAS,CAAE,eAAgB,mCAC3BC,KAAMC,KAAKC,UAAUL,M,OAHjBR,EAAWC,EAAAC,O,OAKXF,KAAcA,EAASG,IAAzB,YACK,SAAMH,EAASI,Q,OAAtB,SAAOH,EAAAC,Q,OAEP,MAAM,IAAIG,MAAML,EAASM,Y,cAIhBQ,EAAanB,EAAA,KAAG,SAAOC,GAAW,OAAAC,UAAAC,OAAA,qB,kEAC5B,SAAMC,MAAMH,EAAK,CAAEa,OAAQ,Y,OAAtCT,EAAWC,EAAAC,O,OACXF,KAAcA,EAASG,IAAzB,YACK,SAAMH,EAASI,Q,OAAtB,SAAOH,EAAAC,Q,OAEP,MAAM,IAAIG,MAAML,EAASM,Y,cAIhBS,EAAUpB,EAAA,KAAG,SAACC,EAAaoB,EAAYC,GAClD,OAAO,IAAIC,SAAQ,SAACC,EAASC,GAE3B,IAAMC,EAAM,IAAIC,eAEhBD,EAAIE,OAAOC,iBAAiB,YAAY,SAACC,GAAO,OAAAR,EAAWQ,EAAX,IAEhDJ,EAAIG,iBAAiB,oBAAoB,WACvC,GAAIE,KAAKC,aAAe,GAAKD,KAAKE,SAAW,IAAK,CAChDT,EAAQO,K,MACH,GAAIA,KAAKC,aAAe,GAAKD,KAAKE,SAAW,IAAK,CACvDR,G,KAIJC,EAAIQ,QAAU,WAAM,OAAAT,GAAA,EACpBC,EAAIS,KAAK,MAAOlC,EAAK,MACrByB,EAAIU,iBAAiB,sBAAuB,wBAAAC,OAAwBhB,EAAKiB,KAAI,MAC7EZ,EAAIa,KAAKlB,E,GAEb,G"}
@@ -1,2 +0,0 @@
1
- System.register(["./p-7b2fc615.system.js","./p-bc28c815.system.js","./p-58b1415e.system.js"],(function(t){"use strict";var e,i,o,n,a,s,r,l,c;return{setters:[function(t){e=t.r;i=t.c;o=t.h;n=t.H;a=t.g;s=t.f},function(t){r=t.i;l=t.x},function(t){c=t.c}],execute:function(){var u=":host{z-index:10}:host([aria-expanded=true]){z-index:5000}.tray{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:#fff;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.tray{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.tray ul{visibility:hidden}.tray .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([aria-expanded=true]) .tray{-webkit-transform:translateX(0);transform:translateX(0)}:host([aria-expanded=true]) .tray ul{visibility:visible}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";var p=t("wm_navigation",function(){function t(t){var o=this;e(this,t);this.wmNavigationStateChanged=i(this,"wmNavigationStateChanged",7);this.mainNavigationMessage=r.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"});this.openTooltipMessage=r.formatMessage({id:"global.openVerb",defaultMessage:"Open",description:"For a button, to open a user interface element"});this.throttledRerender=l((function(){return s(o.el)}),50);this.open=false;this.isTabbing=false}Object.defineProperty(t.prototype,"isCollapsible",{get:function(){return window.innerWidth<1024},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.isCollapsible?this.open.toString():undefined},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.closeOnEscape=function(t){if(t.key==="Escape"){this.open=false}};t.prototype.handleWindowResize=function(){this.throttledRerender()};t.prototype.handleHamburgerClicked=function(){this.open=!this.open};t.prototype.handleClickOnItem=function(){this.open=false};t.prototype.handleStateChange=function(){if(this.isCollapsible){this.wmNavigationStateChanged.emit();this.open?this.expand():this.collapse()}};t.prototype.componentWillLoad=function(){var t=this;if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.el.focus=function(){var e=t.open?t.el.shadowRoot.querySelector(".toggle"):document.querySelector("wm-navigation-hamburger");var i=t.el.querySelector("wm-navigation-item");t.isCollapsible?e.focus():i.focus()};if(this.isCollapsible&&this.open){this.wmNavigationStateChanged.emit();this.expand()}};t.prototype.redirectFocusFromBody=function(t){if(document.activeElement.tagName==="BODY"&&!t.relatedTarget){this.el.focus()}};t.prototype.expand=function(){var t=this;document.body.tabIndex=0;document.body.addEventListener("focus",this.redirectFocusFromBody.bind(this),true);setTimeout((function(){return t.toggleEl.focus()}),250)};t.prototype.collapse=function(){document.body.tabIndex=-1;document.body.removeEventListener("focus",this.redirectFocusFromBody.bind(this));var t=document.querySelector("wm-navigation-hamburger");if(t)t.focus()};t.prototype.focusLastItem=function(){var t=this.el.querySelectorAll("wm-navigation-item");var e=Array.from(t).pop();e.focus()};t.prototype.renderOverlay=function(){var t=this;return o("div",{class:"overlay",onClick:function(){t.open=false}})};t.prototype.render=function(){var t=this;return o(n,{role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&o("div",{class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return t.focusLastItem()}}),o("div",{class:"tray"},o("div",{class:"toggle-wrapper"},o("wm-button",{ref:function(e){return t.toggleEl=e},class:"toggle ".concat(this.isTabbing?"user-is-tabbing":""),"button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?c:this.openTooltipMessage,"tooltip-position":"left",tabIndex:this.open?undefined:-1,onClick:function(){t.open=!t.open}})),o("ul",{class:"navlist"},o("slot",null))),this.isCollapsible&&o("div",{class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return t.toggleEl.focus()}}))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{open:["handleStateChange"]}},enumerable:false,configurable:true});return t}());p.style=u;var d='button{display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}button.user-is-tabbing:focus::-moz-focus-inner{border:0}button:hover{background-color:#d7d6d9}.icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f35c";font-size:1.5rem;color:#575195}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';var f=t("wm_navigation_hamburger",function(){function t(t){e(this,t);this.wmNavigationHamburgerClicked=i(this,"wmNavigationHamburgerClicked",7);this.showNavMessage=r.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"});this.navId=undefined;this.tooltipVisible=false;this.isTabbing=false;this.open=false}Object.defineProperty(t.prototype,"tooltipEl",{get:function(){return document.getElementById("wm-tooltip")},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleNavigationStateChanged=function(t){this.open=t.target.open};t.prototype.componentWillLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}if(!this.navId){console.error("wm-navigation-hamburger: nav-id is a required prop")}};t.prototype.showTooltip=function(){var t=this;var e=this.showNavMessage;this.tooltipEl.textContent=e;this.tooltipEl.style.setProperty("--wmTooltipTop","1.125rem");this.tooltipEl.style.setProperty("--wmTooltipLeft","2.75rem");this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1";var i=e.match(/^[^\s]+$/);if(i){this.tooltipEl.classList.add("single-word");this.tooltipEl.style.setProperty("--wmTooltipMaxWidth","none")}else{this.tooltipEl.classList.remove("single-word");this.tooltipEl.style.removeProperty("--wmTooltipMaxWidth")}setTimeout((function(){t.tooltipVisible=true}),500)};t.prototype.hideTooltip=function(){this.tooltipEl.style.transitionDelay="0s";this.tooltipEl.style.opacity="0";this.tooltipVisible=false};t.prototype.showTooltipForKeyboardUsers=function(){if(this.isTabbing){this.showTooltip()}};t.prototype.handleClick=function(){this.hideTooltip();this.wmNavigationHamburgerClicked.emit()};t.prototype.render=function(){var t=this;return o(n,{class:"hamburger ".concat(this.open?"nav-open":"nav-closed")},o("button",{class:this.isTabbing?"user-is-tabbing":undefined,"aria-expanded":this.open,"aria-controls":this.navId,"aria-label":this.showNavMessage,onMouseEnter:function(){return t.showTooltip()},onMouseLeave:function(){return t.hideTooltip()},onFocus:function(){return t.showTooltipForKeyboardUsers()},onBlur:function(){return t.hideTooltip()},onClick:function(){return t.handleClick()}},o("span",{class:"icon"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=d;var b='.link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative}.link:hover{background-color:#f2f2f2}.link .icon{font-size:1.375rem;color:#6b6b6b}.link .text{font-size:0.875rem}.link.user-is-tabbing:focus{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}.link.active{background-color:#e9e7ec}.link.active:before{content:"";background-color:#575195;position:absolute;height:100%;width:5px;left:0}.link.active .text{color:#575195}.link.active .icon{color:#575195}';var h=t("wm_navigation_item",function(){function t(t){e(this,t);this.wmNavigationItemClicked=i(this,"wmNavigationItemClicked",7);this.href=undefined;this.text=undefined;this.active=undefined;this.isTabbing=false}t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.componentWillLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};t.prototype.render=function(){var t=this;return o(n,{role:"listitem"},o("a",{class:"link ".concat(this.active?"active":""," ").concat(this.isTabbing?"user-is-tabbing":""),href:this.href,onClick:function(){return t.wmNavigationItemClicked.emit()}},o("div",{class:"icon","aria-hidden":"true"},o("slot",null)),o("div",{class:"text"},this.text)))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());h.style=b}}}));
2
- //# sourceMappingURL=p-adbeb6a8.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["wmNavigationCss","Navigation","exports","this","mainNavigationMessage","intl","formatMessage","id","defaultMessage","description","openTooltipMessage","throttledRerender","throttle","forceUpdate","_this","el","Object","defineProperty","class_1","prototype","window","innerWidth","isCollapsible","open","toString","undefined","toggleTabbingOn","isTabbing","toggleTabbingOff","closeOnEscape","ev","key","handleWindowResize","handleHamburgerClicked","handleClickOnItem","handleStateChange","wmNavigationStateChanged","emit","expand","collapse","componentWillLoad","document","body","classList","contains","focus","btn","shadowRoot","querySelector","firstItem","redirectFocusFromBody","activeElement","tagName","relatedTarget","tabIndex","addEventListener","bind","setTimeout","toggleEl","removeEventListener","hamburgerBtn","focusLastItem","items","querySelectorAll","lastItem","Array","from","pop","renderOverlay","h","class","onClick","render","Host","role","ariaExpanded","tabindex","onFocus","ref","concat","icon","tooltip","closeVerb","wmNavigationHamburgerCss","NavigationHamburger","showNavMessage","class_2","getElementById","handleNavigationStateChanged","target","navId","console","error","showTooltip","tooltipText","tooltipEl","textContent","style","setProperty","transitionDelay","opacity","hasNoWhitespace","match","add","remove","removeProperty","tooltipVisible","hideTooltip","showTooltipForKeyboardUsers","handleClick","wmNavigationHamburgerClicked","onMouseEnter","onMouseLeave","onBlur","wmNavigationItemCss","NavigationItem","class_3","active","href","wmNavigationItemClicked","text"],"sources":["src/components/wm-navigation/wm-navigation.scss?tag=wm-navigation&encapsulation=shadow","src/components/wm-navigation/wm-navigation.tsx","src/components/wm-navigation/wm-navigation-hamburger.scss?tag=wm-navigation-hamburger&encapsulation=shadow","src/components/wm-navigation/wm-navigation-hamburger.tsx","src/components/wm-navigation/wm-navigation-item.scss?tag=wm-navigation-item&encapsulation=shadow","src/components/wm-navigation/wm-navigation-item.tsx"],"sourcesContent":[":host {\r\n z-index: 10;\r\n}\r\n\r\n:host([aria-expanded=\"true\"]) {\r\n z-index: 5000;\r\n}\r\n\r\n.tray {\r\n @include box-shadow(0 0 14px 0 rgba(0, 0, 0, 0.14));\r\n display: flex;\r\n flex-direction: column;\r\n width: rem-calc(121);\r\n background-color: $light-background;\r\n overflow-x: hidden;\r\n overflow-y: auto;\r\n -webkit-overflow-scrolling: touch;\r\n font-size: rem-calc(14);\r\n height: 100%;\r\n}\r\n\r\n.navlist {\r\n margin: 0;\r\n padding: 0;\r\n}\r\n\r\n.toggle-wrapper {\r\n display: none;\r\n}\r\n\r\n/* COLLAPSIBLE STYLES */\r\n@media screen and (max-width: 1023px) {\r\n .tray {\r\n @include transition(transform 0.33s ease);\r\n position: fixed;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n transform: translateX(-100%);\r\n\r\n ul {\r\n visibility: hidden;\r\n }\r\n\r\n .toggle-wrapper {\r\n display: inline-block;\r\n min-height: 5rem;\r\n width: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n }\r\n\r\n :host([aria-expanded=\"true\"]) {\r\n .tray {\r\n transform: translateX(0);\r\n\r\n ul {\r\n visibility: visible;\r\n }\r\n }\r\n }\r\n\r\n .overlay {\r\n width: 100vw;\r\n height: 100vh;\r\n max-width: none;\r\n max-height: none;\r\n position: fixed !important;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n transform: translate(0%, 0%);\r\n background-color: rgba(25, 25, 25, 0.4);\r\n @include transition(opacity 0.5s ease-out);\r\n }\r\n}\r\n","import {\r\n h,\r\n Component,\r\n Element,\r\n Prop,\r\n State,\r\n Listen,\r\n Host,\r\n Watch,\r\n Event,\r\n EventEmitter,\r\n forceUpdate,\r\n} from \"@stencil/core\";\r\nimport { intl, throttle } from \"../../global/functions\";\r\nimport { closeVerb } from \"../../global/intl\";\r\n\r\n@Component({\r\n tag: \"wm-navigation\",\r\n styleUrl: \"wm-navigation.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class Navigation {\r\n @Element() el!: HTMLWmNavigationElement;\r\n toggleEl!: HTMLWmButtonElement;\r\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\r\n\r\n @State() isTabbing: boolean = false;\r\n @Event() wmNavigationStateChanged!: EventEmitter;\r\n\r\n private mainNavigationMessage: string = intl.formatMessage({\r\n id: \"navigation.mainNavigation\",\r\n defaultMessage: \"Main\",\r\n description: \"Label describing the site navigation, for screen reader users\",\r\n });\r\n\r\n private openTooltipMessage: string = intl.formatMessage({\r\n id: \"global.openVerb\",\r\n defaultMessage: \"Open\",\r\n description: \"For a button, to open a user interface element\",\r\n });\r\n\r\n get isCollapsible() {\r\n return window.innerWidth < 1024;\r\n }\r\n\r\n get ariaExpanded() {\r\n return this.isCollapsible\r\n ? // if component is in collapsible mode, set aria-expanded according to expanded state\r\n this.open.toString()\r\n : // otherwise, do not render attr at all\r\n undefined;\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n @Listen(\"keydown\")\r\n closeOnEscape(ev: KeyboardEvent) {\r\n if (ev.key === \"Escape\") {\r\n this.open = false;\r\n }\r\n }\r\n\r\n throttledRerender = throttle(() => forceUpdate(this.el), 50);\r\n\r\n @Listen(\"resize\", { target: \"window\" })\r\n handleWindowResize() {\r\n // for component to react when breakpoint is crossed\r\n // (doesn't rerender on window resize)\r\n this.throttledRerender();\r\n }\r\n\r\n @Listen(\"wmNavigationHamburgerClicked\", { target: \"window\" })\r\n handleHamburgerClicked() {\r\n this.open = !this.open;\r\n }\r\n\r\n @Listen(\"wmNavigationItemClicked\")\r\n handleClickOnItem() {\r\n this.open = false;\r\n }\r\n\r\n @Watch(\"open\")\r\n handleStateChange() {\r\n if (this.isCollapsible) {\r\n this.wmNavigationStateChanged.emit();\r\n this.open ? this.expand() : this.collapse();\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n\r\n this.el.focus = () => {\r\n // in addition to delegatesFocus, we need to highjack the focus method to send focus to the appropriate element based on the navigation's state\r\n const btn = this.open\r\n ? (this.el.shadowRoot!.querySelector(\".toggle\")! as HTMLWmButtonElement)\r\n : (document.querySelector(\"wm-navigation-hamburger\") as HTMLWmNavigationHamburgerElement);\r\n const firstItem = this.el.querySelector(\"wm-navigation-item\")! as HTMLWmNavigationItemElement;\r\n this.isCollapsible ? btn.focus() : firstItem.focus();\r\n };\r\n\r\n if (this.isCollapsible && this.open) {\r\n // hamburger needs to know if open was initially set to true\r\n this.wmNavigationStateChanged.emit();\r\n this.expand();\r\n }\r\n }\r\n\r\n redirectFocusFromBody(ev: FocusEvent) {\r\n // the 2nd check excludes the case when user clicks on the page when the nav is open,\r\n // which should not redirect focus\r\n if ((document.activeElement as HTMLElement).tagName === \"BODY\" && !ev.relatedTarget) {\r\n this.el.focus();\r\n }\r\n }\r\n\r\n expand() {\r\n // listen to focus on body and redirect to the component\r\n // this is to handle trap focus when user has left the page (e.g. went to the address bar)\r\n // and is tabbing back in\r\n document.body.tabIndex = 0;\r\n document.body.addEventListener(\"focus\", this.redirectFocusFromBody.bind(this), true);\r\n\r\n // wait for nav to be expanded otherwise tooltip will be misplaced.\r\n setTimeout(() => this.toggleEl.focus(), 250);\r\n //document.querySelector(\"wm-navigation\")!.shadowRoot!.querySelector(\".toggle\")!.focus()\r\n }\r\n\r\n collapse() {\r\n // rm event listener on body\r\n document.body.tabIndex = -1;\r\n document.body.removeEventListener(\"focus\", this.redirectFocusFromBody.bind(this));\r\n\r\n const hamburgerBtn = document.querySelector(\"wm-navigation-hamburger\");\r\n // should fail silently if el doesn't exist\r\n // (dev may have chosen not to use the hamburger component)\r\n if (hamburgerBtn) hamburgerBtn.focus();\r\n }\r\n\r\n focusLastItem() {\r\n const items = this.el.querySelectorAll(\"wm-navigation-item\");\r\n const lastItem = Array.from(items).pop() as HTMLWmNavigationItemElement;\r\n lastItem.focus();\r\n }\r\n\r\n renderOverlay() {\r\n return (\r\n <div\r\n class=\"overlay\"\r\n onClick={() => {\r\n this.open = false;\r\n }}\r\n ></div>\r\n );\r\n }\r\n\r\n render() {\r\n return (\r\n <Host role=\"navigation\" aria-expanded={this.ariaExpanded} aria-label={this.mainNavigationMessage}>\r\n {this.open ? this.renderOverlay() : \"\"}\r\n {this.isCollapsible && (\r\n <div class=\"trapfocus\" tabindex={this.open ? 0 : undefined} onFocus={() => this.focusLastItem()}></div>\r\n )}\r\n <div class=\"tray\">\r\n <div class=\"toggle-wrapper\">\r\n <wm-button\r\n ref={(el) => (this.toggleEl = el as HTMLWmButtonElement)}\r\n class={`toggle ${this.isTabbing ? \"user-is-tabbing\" : \"\"}`}\r\n button-type=\"navigational\"\r\n icon={this.open ? \"f156\" : \"f35c\"}\r\n icon-size=\"2rem\"\r\n tooltip={this.open ? closeVerb : this.openTooltipMessage}\r\n tooltip-position=\"left\"\r\n tabIndex={this.open ? undefined : -1}\r\n onClick={() => {\r\n this.open = !this.open;\r\n }}\r\n />\r\n </div>\r\n <ul class=\"navlist\">\r\n <slot />\r\n </ul>\r\n </div>\r\n {this.isCollapsible && (\r\n <div class=\"trapfocus\" tabindex={this.open ? 0 : undefined} onFocus={() => this.toggleEl.focus()}></div>\r\n )}\r\n </Host>\r\n );\r\n }\r\n}\r\n","button {\r\n display: none;\r\n width: 100%;\r\n height: 100%;\r\n border: none;\r\n box-shadow: none;\r\n transition: background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);\r\n background-color: transparent;\r\n outline: none;\r\n padding: 0;\r\n\r\n &.user-is-tabbing:focus {\r\n @include focus-style;\r\n }\r\n\r\n &:hover {\r\n background-color: $button-default-hover;\r\n }\r\n}\r\n\r\n.icon {\r\n &:before {\r\n @include mdi-icon;\r\n content: \"\\f35c\";\r\n font-size: rem-calc(24);\r\n color: $button-default-text;\r\n }\r\n}\r\n\r\n@media screen and (max-width: 1023px) {\r\n :host {\r\n width: rem-calc(60);\r\n height: rem-calc(60);\r\n }\r\n\r\n button {\r\n display: initial;\r\n }\r\n}\r\n","import { h, Component, Element, Host, Prop, Listen, Event, EventEmitter, State } from \"@stencil/core\";\r\nimport { intl } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-navigation-hamburger\",\r\n styleUrl: \"wm-navigation-hamburger.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class NavigationHamburger {\r\n @Element() el!: HTMLWmNavigationHamburgerElement;\r\n nav!: HTMLWmNavigationElement;\r\n\r\n @Prop() navId?: string;\r\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\r\n\r\n @State() isTabbing?: boolean = false;\r\n @State() open: boolean = false;\r\n\r\n @Event() wmNavigationHamburgerClicked!: EventEmitter;\r\n\r\n showNavMessage = intl.formatMessage({\r\n id: \"navigation.showNavigation\",\r\n defaultMessage: \"Show navigation\",\r\n description: \"For user interface element opening a navigation menu\",\r\n });\r\n\r\n get tooltipEl(): HTMLElement {\r\n return document.getElementById(\"wm-tooltip\")!;\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n // this also works on initial load because event is fired then\r\n @Listen(\"wmNavigationStateChanged\", { target: \"document\" })\r\n handleNavigationStateChanged(ev: CustomEvent) {\r\n this.open = (ev.target! as HTMLWmNavigationElement).open;\r\n }\r\n\r\n componentWillLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n if (!this.navId) {\r\n console.error(\"wm-navigation-hamburger: nav-id is a required prop\");\r\n }\r\n }\r\n\r\n showTooltip() {\r\n const tooltipText = this.showNavMessage;\r\n this.tooltipEl.textContent = tooltipText;\r\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", \"1.125rem\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", \"2.75rem\");\r\n this.tooltipEl.style.transitionDelay = \"500ms\";\r\n this.tooltipEl.style.opacity = \"1\";\r\n\r\n // tooltip only has a maxWidth if it contains whitespace and can break\r\n const hasNoWhitespace = tooltipText!.match(/^[^\\s]+$/);\r\n if (hasNoWhitespace) {\r\n this.tooltipEl.classList.add(\"single-word\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\r\n } else {\r\n this.tooltipEl.classList.remove(\"single-word\");\r\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\r\n }\r\n\r\n // tooltip is only visible after the transition delay.\r\n // This also fixes an issue for keyboard users:\r\n // if they tab to a button out of screen bounds, the page scrolls\r\n // and hideTooltip() would be triggered before the tooltip would show\r\n setTimeout(() => {\r\n this.tooltipVisible = true;\r\n }, 500);\r\n }\r\n\r\n hideTooltip() {\r\n this.tooltipEl.style.transitionDelay = \"0s\";\r\n this.tooltipEl.style.opacity = \"0\";\r\n this.tooltipVisible = false;\r\n }\r\n\r\n showTooltipForKeyboardUsers() {\r\n if (this.isTabbing) {\r\n this.showTooltip();\r\n }\r\n }\r\n\r\n handleClick() {\r\n this.hideTooltip();\r\n this.wmNavigationHamburgerClicked.emit();\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class={`hamburger ${this.open ? \"nav-open\" : \"nav-closed\"}`}>\r\n <button\r\n class={this.isTabbing ? \"user-is-tabbing\" : undefined}\r\n aria-expanded={this.open}\r\n aria-controls={this.navId}\r\n aria-label={this.showNavMessage}\r\n onMouseEnter={() => this.showTooltip()}\r\n onMouseLeave={() => this.hideTooltip()}\r\n onFocus={() => this.showTooltipForKeyboardUsers()}\r\n onBlur={() => this.hideTooltip()}\r\n onClick={() => this.handleClick()}\r\n >\r\n <span class=\"icon\"></span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n",".link {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n color: inherit;\r\n text-decoration: none;\r\n min-height: rem-calc(72);\r\n text-align: center;\r\n padding: 1.25rem 0.5rem;\r\n font-weight: 500;\r\n outline: none;\r\n position: relative;\r\n\r\n &:hover {\r\n background-color: $light-background-hover;\r\n }\r\n\r\n .icon {\r\n font-size: rem-calc(22);\r\n color: $sidenav-icon;\r\n }\r\n\r\n .text {\r\n font-size: rem-calc(14);\r\n }\r\n\r\n &.user-is-tabbing:focus {\r\n // from P&SS\r\n box-shadow: inset 0 2px 2px 0 rgb(244 243 246 / 20%), inset 0 2px 2px 0 rgb(0 0 0 / 10%), inset 0 0 4px 3px #61279e;\r\n }\r\n}\r\n\r\n.link.active {\r\n background-color: $pale-lilac-gray;\r\n &:before {\r\n content: \"\";\r\n // link to or create semantic name\r\n background-color: $periwinkle;\r\n position: absolute;\r\n height: 100%;\r\n width: 5px;\r\n left: 0;\r\n }\r\n\r\n .text {\r\n // link to or create semantic name\r\n color: $periwinkle;\r\n }\r\n\r\n .icon {\r\n // link to or create semantic name\r\n color: $periwinkle;\r\n }\r\n}\r\n","import { h, Component, Prop, Element, Host, State, Listen, Event, EventEmitter } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"wm-navigation-item\",\r\n styleUrl: \"wm-navigation-item.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class NavigationItem {\r\n @Element() el!: HTMLWmNavigationItemElement;\r\n @Prop() href?: string;\r\n @Prop() text?: string;\r\n @Prop() active?: boolean;\r\n\r\n @State() isTabbing?: boolean = false;\r\n @Event() wmNavigationItemClicked!: EventEmitter;\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n componentWillLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host role=\"listitem\">\r\n <a\r\n class={`link ${this.active ? \"active\" : \"\"} ${this.isTabbing ? \"user-is-tabbing\" : \"\"}`}\r\n href={this.href}\r\n onClick={() => this.wmNavigationItemClicked.emit()}\r\n >\r\n <div class=\"icon\" aria-hidden=\"true\">\r\n <slot />\r\n </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S,WAAM,OAAA/D,EAAK8F,6BAAL,EACfK,OAAQ,WAAM,OAAAnG,EAAK6F,aAAL,EACdpC,QAAS,WAAM,OAAAzD,EAAK+F,aAAL,GAEfxC,EAAA,QAAMC,MAAM,U,kOAzGU,I,UCRhC,IAAM4C,EAAsB,q2B,ICOfC,EAAcjH,EAAA,gC,sKAMM,K,CAI/BkH,EAAAjG,UAAAO,gBAAA,WACEvB,KAAKwB,UAAY,I,EAInByF,EAAAjG,UAAAS,iBAAA,WACEzB,KAAKwB,UAAY,K,EAGnByF,EAAAjG,UAAAqB,kBAAA,WACE,GAAIC,SAASC,KAAKC,UAAUC,SAAS,wBAAyB,CAC5DzC,KAAKuB,iB,GAIT0F,EAAAjG,UAAAqD,OAAA,eAAA1D,EAAAX,KACE,OACEkE,EAACI,EAAI,CAACC,KAAK,YACTL,EAAA,KACEC,MAAO,QAAAS,OAAQ5E,KAAKkH,OAAS,SAAW,GAAE,KAAAtC,OAAI5E,KAAKwB,UAAY,kBAAoB,IACnF2F,KAAMnH,KAAKmH,KACX/C,QAAS,WAAM,OAAAzD,EAAKyG,wBAAwBlF,MAA7B,GAEfgC,EAAA,OAAKC,MAAM,OAAM,cAAa,QAC5BD,EAAA,cAEFA,EAAA,OAAKC,MAAM,QAAQnE,KAAKqH,O,kOApCP,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["wmButtonCss","Button","exports","this","btnPos","old","new","id","generateId","ariaPopup","Object","defineProperty","class_1","prototype","toBool","disabled","buttonType","buttonStyle","buttonEl","tempButtonType","offsetWidth","scrollWidth","isTruncated","document","getElementById","classes","permanentlyDelete","textWrap","isTabbing","customBackground","transformStyle","iconRotate","concat","iconFlip","assign","iconSize","fontSize","transform","toggleTabbingOn","toggleTabbingOff","handleScroll","tooltipVisible","hideTooltip","validateType","newValue","valid","includes","validateIcon","validateDeprecatedType","updateIcon","icon","getIconCodeFromName","console","error","tooltip","handleKeydown","ev","key","preventDefault","isDisabled","el","click","componentWillLoad","warn","componentDidLoad","body","classList","contains","getAttribute","getBoundingClientRect","showTooltip","_this","hasTooltip","tooltipText","textContent","tooltipEl","hasNoWhitespace","match","add","style","setProperty","remove","removeProperty","adjustedTooltipPlacement_1","adjustTooltipPlacement","tooltipPosition","tooltipRect_1","transitionDelay","opacity","setTimeout","positionTooltip","tPos","tooltipRect","window","requestAnimationFrame","top","left","vDiff","height","hDiff","width","vPos","hPos","bottom","right","Math","max","showTooltipForKeyboardUsers","getAriaLabel","labelForIdenticalButtons","render","h","Host","class","buttonClasses","ref","onMouseEnter","onMouseLeave","onFocus","onBlur","onClick","iconStyles","String","fromCodePoint","parseInt"],"sources":["src/components/wm-button/wm-button.scss?tag=wm-button&encapsulation=shadow","src/components/wm-button/wm-button.tsx"],"sourcesContent":[":host([disabled]),\r\n:host(.button-disabled) {\r\n pointer-events: none;\r\n}\r\n\r\n:host([disabled=\"false\"]) {\r\n // override disabled behavior from occuring when the string is \"false\", which would evaluate as truthy\r\n pointer-events: initial;\r\n}\r\n\r\n:host,\r\nwm-button {\r\n display: inline-block;\r\n width: fit-content;\r\n position: relative; // for tooltip\r\n @include box-shadow(none);\r\n\r\n .sr-only {\r\n @include srOnly;\r\n }\r\n\r\n @extend %wm-button;\r\n}\r\n","import { h, Component, Prop, Element, Listen, Watch, Host, State } from \"@stencil/core\";\r\nimport { getIconCodeFromName, TooltipPlacement, validButtonTypes } from \"../../global/interfaces\";\r\nimport { generateId, adjustTooltipPlacement, toBool } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-button\",\r\n styleUrl: \"wm-button.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class Button {\r\n @Element() el!: HTMLWmButtonElement;\r\n private buttonEl!: HTMLButtonElement;\r\n\r\n // icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute\r\n // and the component throws errors when they are required (when buttonType is icononly or navigational)\r\n @Prop({ reflect: true }) disabled: boolean = false;\r\n get isDisabled(): boolean {\r\n // string \"false\" needs to be treated as bool False because react wrappers convert bool to string.\r\n return toBool(this.disabled);\r\n }\r\n @Prop({ mutable: true }) buttonType: validButtonTypes | null = null;\r\n @Prop({ mutable: true }) buttonStyle: validButtonTypes | null = null; // DEPRECATED in favor of button-type\r\n get tempButtonType(): validButtonTypes {\r\n // uses of this getter should be replaced with this.buttonType when buttonStyle is fully phased out\r\n // don't forget to reset this.buttonType's default value to secondary\r\n return this.buttonType || this.buttonStyle || \"secondary\";\r\n }\r\n @Prop({ reflect: true, mutable: true }) icon?: string;\r\n @Prop() iconSize?: string;\r\n @Prop() iconRotate?: number;\r\n @Prop() iconFlip?: \"horizontal\" | \"vertical\";\r\n @Prop({ reflect: true, mutable: true }) tooltip?: string;\r\n @Prop() labelForIdenticalButtons?: string;\r\n @Prop() tooltipPosition: TooltipPlacement = \"bottom-right\";\r\n @Prop() permanentlyDelete?: boolean = false;\r\n @Prop() textWrap: boolean = true;\r\n @Prop() customBackground?: string;\r\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\r\n\r\n @State() isTabbing: boolean = false;\r\n\r\n private btnPos: any = { old: {}, new: {} }; // for tooltip position. old and new are DOMRect\r\n private id = generateId();\r\n private ariaPopup: boolean = false;\r\n\r\n get isTruncated(): boolean {\r\n return (\r\n !!this.buttonEl && this.tempButtonType === \"textonly\" && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth\r\n );\r\n }\r\n\r\n get hasTooltip(): boolean {\r\n // tooltip is only rendered for icononly and navigational types, or if the button text is truncated\r\n return this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\" || this.isTruncated;\r\n }\r\n\r\n get tooltipEl(): HTMLElement {\r\n return document.getElementById(\"wm-tooltip\")!;\r\n }\r\n\r\n get buttonClasses() {\r\n let classes = \"wm-button\";\r\n classes += this.permanentlyDelete ? \" -permanentlydelete\" : \"\";\r\n classes += this.tempButtonType ? \" -\" + this.tempButtonType : \" -secondary\";\r\n classes += this.textWrap ? \"\" : \" nowrap\";\r\n classes += this.isTabbing ? \" user-is-tabbing\" : \"\";\r\n classes += this.isTruncated ? \" -truncated\" : \"\";\r\n classes += this.customBackground === \"dark\" ? \" dark\" : \"\";\r\n return classes;\r\n }\r\n\r\n get iconStyles() {\r\n let transformStyle = \"\";\r\n transformStyle += this.iconRotate ? `rotate(${this.iconRotate}deg)` : \"\";\r\n transformStyle += this.iconFlip === \"horizontal\" ? `scaleX(-1)` : \"\";\r\n transformStyle += this.iconFlip === \"vertical\" ? `scaleY(-1)` : \"\";\r\n\r\n return {\r\n ...(this.iconSize && { fontSize: this.iconSize }),\r\n ...((this.iconRotate || this.iconFlip) && { transform: transformStyle }),\r\n };\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n // we need to listen for scroll events during the capture phase because they do not bubble up\r\n // there can be layouts where the main content has 100vh and overflows\r\n // in these cases window will register no scroll events unless we catch on they way down\r\n @Listen(\"scroll\", { target: \"window\", capture: true })\r\n handleScroll() {\r\n if (this.tooltipVisible) {\r\n this.hideTooltip();\r\n }\r\n }\r\n\r\n @Watch(\"buttonType\")\r\n validateType(newValue: string) {\r\n const valid = [\r\n \"primary\",\r\n \"secondary\",\r\n \"textonly\",\r\n \"icononly\",\r\n \"navigational\",\r\n \"selector\",\r\n \"selector-primary\",\r\n \"pairpositive\",\r\n \"pairnegative\",\r\n ].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonType = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n // remove entire watcher after buttonStyle has been fully removed\r\n @Watch(\"buttonStyle\")\r\n validateDeprecatedType(newValue: string) {\r\n const valid = [\"primary\", \"secondary\", \"textonly\", \"icononly\", \"navigational\", \"selector\"].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonStyle = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n @Watch(\"icon\")\r\n updateIcon() {\r\n this.icon = getIconCodeFromName(this.icon!);\r\n }\r\n\r\n validateIcon() {\r\n switch (this.tempButtonType) {\r\n case \"icononly\":\r\n case \"navigational\":\r\n // if the style is icononly or navigational...\r\n // - an icon must be provided\r\n if (!this.icon) {\r\n console.error(\r\n \"wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n // - if no tooltip text was passed and we couldn't generate one, throw an error\r\n if (!this.tooltip) {\r\n console.error(\r\n \"wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n break;\r\n case \"pairpositive\":\r\n this.icon = \"f12c\";\r\n break;\r\n case \"pairnegative\":\r\n this.icon = \"f739\";\r\n break;\r\n }\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKeydown(ev: KeyboardEvent) {\r\n switch (ev.key) {\r\n case \"Enter\":\r\n ev.preventDefault();\r\n if (!this.isDisabled) {\r\n this.el.click();\r\n }\r\n break;\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.buttonStyle) {\r\n console.warn(\"wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.\");\r\n }\r\n\r\n this.validateType(this.tempButtonType);\r\n\r\n if (this.icon) {\r\n this.icon = this.icon = getIconCodeFromName(this.icon);\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n\r\n this.ariaPopup = !!this.el.getAttribute(\"aria-haspopup\");\r\n\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n }\r\n\r\n showTooltip() {\r\n if (this.hasTooltip) {\r\n // set tooltip text\r\n let tooltipText = \"\";\r\n if (this.isTruncated && this.el.textContent) {\r\n // when truncated, tooltip text is the button's content\r\n tooltipText = this.el.textContent;\r\n } else if (this.tooltip) {\r\n // otherwise it is the tooltip property if present\r\n tooltipText = this.tooltip;\r\n }\r\n this.tooltipEl.textContent = tooltipText;\r\n\r\n // tooltip only has a maxWidth if it contains whitespace and can break\r\n const hasNoWhitespace = tooltipText.match(/^[^\\s]+$/);\r\n if (hasNoWhitespace) {\r\n this.tooltipEl.classList.add(\"single-word\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\r\n } else {\r\n this.tooltipEl.classList.remove(\"single-word\");\r\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\r\n }\r\n\r\n // adjust placement in case there is no space to place the tooltip where specified via prop\r\n // calculation outside of the function to keep it pure\r\n const adjustedTooltipPlacement = adjustTooltipPlacement(this.tooltipPosition, this.buttonEl, this.tooltipEl);\r\n\r\n this.btnPos.old = {};\r\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\r\n this.tooltipEl.style.transitionDelay = \"500ms\";\r\n this.tooltipEl.style.opacity = \"1\";\r\n // This slight delay fixes an issue for keyboard users:\r\n // if they tab to a button out of screen bounds, the page scrolls\r\n // and hideTooltip() would be triggered before the tooltip would show\r\n setTimeout(() => {\r\n this.tooltipVisible = true;\r\n this.positionTooltip(adjustedTooltipPlacement, tooltipRect);\r\n }, 50);\r\n }\r\n }\r\n\r\n positionTooltip(tPos: string, tooltipRect: DOMRect) {\r\n if (this.tooltipVisible) {\r\n window.requestAnimationFrame(() => this.positionTooltip(tPos, tooltipRect));\r\n }\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n if (this.btnPos.new.top != this.btnPos.old.top || this.btnPos.new.left != this.btnPos.old.left) {\r\n // this is to figure out how to offset, given the size of the button and of the tooltip\r\n // to get the center positions, calculate the difference between the button width and the tooltip width\r\n const vDiff = (this.btnPos.new.height - tooltipRect.height) / 2;\r\n const hDiff = (this.btnPos.new.width - tooltipRect.width) / 2;\r\n // the naming convention defaults to center in the absence of a value\r\n // Values \"top\" and \"bottom\" imply horizontal centering; Values \"right\" and \"left\" imply vertical centering\r\n // therefore we first set to center first, then adjust accordingly\r\n let vPos = this.btnPos.new.top + vDiff;\r\n let hPos = this.btnPos.new.left + hDiff;\r\n\r\n if (tPos.includes(\"top\")) {\r\n vPos = this.btnPos.new.top - tooltipRect.height - 8;\r\n }\r\n if (tPos.includes(\"bottom\")) {\r\n vPos = this.btnPos.new.bottom + 8;\r\n }\r\n if (tPos.includes(\"left\")) {\r\n hPos = this.btnPos.new.left - tooltipRect.width - 8;\r\n }\r\n if (tPos.includes(\"right\")) {\r\n hPos = this.btnPos.new.right + 8;\r\n }\r\n\r\n // after all positioning has been calculated, if tooltip is off-screen or closer than 24px it is readjusted\r\n // this only occurs when the tooltip is overflowing to the left and is positioned top or bottom\r\n // (button placed too far left, or screen size under 268px)\r\n hPos = Math.max(hPos, 24);\r\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", vPos + \"px\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", hPos + \"px\");\r\n // this.tooltipEl.style.top = vPos + \"px\";\r\n // this.tooltipEl.style.left = hPos + \"px\";\r\n // this.tooltipEl.style.top = (vPos / 16).toString() + \"rem\";\r\n // this.tooltipEl.style.left = (hPos / 16).toString() + \"rem\";\r\n\r\n this.btnPos.old = this.btnPos.new;\r\n }\r\n }\r\n\r\n hideTooltip() {\r\n if (this.hasTooltip) {\r\n this.tooltipEl.style.transitionDelay = \"0s\";\r\n this.tooltipEl.style.opacity = \"0\";\r\n this.tooltipVisible = false;\r\n }\r\n }\r\n\r\n showTooltipForKeyboardUsers() {\r\n if (this.isTabbing) {\r\n this.showTooltip();\r\n }\r\n }\r\n\r\n getAriaLabel() {\r\n if (this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\") {\r\n return this.labelForIdenticalButtons || this.tooltip;\r\n }\r\n\r\n if (this.labelForIdenticalButtons) {\r\n return this.labelForIdenticalButtons;\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class={this.isDisabled ? \"button-disabled\" : \"\"}>\r\n <button\r\n id={this.id}\r\n class={`${this.buttonClasses}`}\r\n disabled={this.isDisabled}\r\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\r\n aria-label={this.getAriaLabel()}\r\n aria-hasPopup={this.ariaPopup ? \"menu\" : null}\r\n onMouseEnter={() => this.showTooltip()}\r\n onMouseLeave={() => this.hideTooltip()}\r\n onFocus={() => this.showTooltipForKeyboardUsers()}\r\n onBlur={() => this.hideTooltip()}\r\n onClick={() => this.hideTooltip()}\r\n >\r\n {this.icon && (\r\n <span class=\"mdi\" style={this.iconStyles}>\r\n {String.fromCodePoint(parseInt(`0x${this.icon}`))}\r\n </span>\r\n )}\r\n <span class=\"button-text\">\r\n <slot />\r\n </span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"sQAAA,IAAMA,EAAc,q6lB,ICSPC,EAAMC,EAAA,uB,wBAgCTC,KAAAC,OAAc,CAAEC,IAAK,GAAIC,IAAK,IAC9BH,KAAAI,GAAKC,IACLL,KAAAM,UAAqB,M,cA5BgB,M,gBAKkB,K,iBACC,K,kLAYpB,e,uBACN,M,cACV,K,oDAEc,M,eAEZ,K,CAvB9BC,OAAAC,eAAIC,EAAAC,UAAA,aAAU,C,IAAd,WAEE,OAAOC,EAAOX,KAAKY,S,uCAIrBL,OAAAC,eAAIC,EAAAC,UAAA,iBAAc,C,IAAlB,WAGE,OAAOV,KAAKa,YAAcb,KAAKc,aAAe,W,uCAoBhDP,OAAAC,eAAIC,EAAAC,UAAA,cAAW,C,IAAf,WACE,QACIV,KAAKe,UAAYf,KAAKgB,iBAAmB,YAAchB,KAAKe,SAASE,YAAcjB,KAAKe,SAASG,W,uCAIvGX,OAAAC,eAAIC,EAAAC,UAAA,aAAU,C,IAAd,WAEE,OAAOV,KAAKgB,iBAAmB,YAAchB,KAAKgB,iBAAmB,gBAAkBhB,KAAKmB,W,uCAG9FZ,OAAAC,eAAIC,EAAAC,UAAA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,EAAKD,aAAL,EACpB+C,aAAc,WAAM,OAAA9C,EAAK7B,aAAL,EACpB4E,QAAS,WAAM,OAAA/C,EAAKoC,6BAAL,EACfY,OAAQ,WAAM,OAAAhD,EAAK7B,aAAL,EACd8E,QAAS,WAAM,OAAAjD,EAAK7B,aAAL,GAEdvC,KAAK+C,MACJ6D,EAAA,QAAME,MAAM,MAAMlC,MAAO5E,KAAKsH,YAC3BC,OAAOC,cAAcC,SAAS,KAAA5F,OAAK7B,KAAK+C,SAG7C6D,EAAA,QAAME,MAAM,eACVF,EAAA,e,0ZApUO,I"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["wmModalCss","Modal","exports","this","bodyFocusListener","_this","redirectFocusFromBody","Object","defineProperty","class_1","prototype","open","isOpen","modalType","isTypeDialog","customElementToFocus","elementToFocus","el","querySelector","concat","uid","console","warn","closeButtonEl","toggleModal","tempOpen","showModal","hideModal","handleClick","ev","target","overlayEl","focusOnOpenEl","focus","closeModalOnEscape","key","stopPropagation","wmModalCloseTriggered","emit","wmCloseTriggered","setAriaDescribedbyOnModal","setElToFocusOnClose","document","body","style","overflow","tabIndex","removeEventListener","addEventListener","window","requestAnimationFrame","focusOnCloseEl","componentWillLoad","id","error","generateId","componentDidLoad","emitCloseEvent","emitPrimaryEvent","wmModalPrimaryTriggered","wmPrimaryTriggered","emitSecondaryEvent","wmModalSecondaryTriggered","wmSecondaryTriggered","modalBody","getElementById","setAttribute","elToFocus","activeElement","tagName","parentElement","checkForActiveElInShadow","render","h","Host","class","tempModalType","role","tabindex","onFocus","focusLastElement","ref","focusFirstElement"],"sources":["src/components/wm-modal/wm-modal.scss?tag=wm-modal","src/components/wm-modal/wm-modal.tsx"],"sourcesContent":["wm-modal {\r\n * {\r\n box-sizing: border-box;\r\n }\r\n @include displayFlex();\r\n @include justifyContent(center);\r\n @include alignItems(center);\r\n\r\n flex-direction: column;\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n z-index: 2001;\r\n width: 80vw;\r\n max-width: 750px;\r\n max-height: 80vh;\r\n @include box-shadow(\r\n 0px 11px 15px 0px rgba(0, 0, 0, 0.2),\r\n 0px 9px 46px 8px rgba(0, 0, 0, 0.12),\r\n 0px 24px 38px 3px rgba(0, 0, 0, 0.14)\r\n );\r\n\r\n > * {\r\n width: 80vw;\r\n max-width: 750px;\r\n background: $light-background;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n }\r\n\r\n wm-modal-header,\r\n wm-modal-footer {\r\n padding: rem-calc(20 30);\r\n }\r\n\r\n wm-modal-header {\r\n z-index: 2003;\r\n }\r\n\r\n wm-modal-footer {\r\n z-index: 2003;\r\n }\r\n\r\n > :not(wm-modal-header):not(wm-modal-footer) {\r\n max-height: calc(80vh - 166px);\r\n z-index: 2002;\r\n }\r\n\r\n &.wm-modal {\r\n wm-modal-header {\r\n border-bottom: 1px solid rgb(244, 243, 246);\r\n }\r\n\r\n wm-modal-footer {\r\n border-top: 1px solid rgb(244, 243, 246);\r\n }\r\n\r\n @media only screen and (max-width: 768px) {\r\n height: 100%;\r\n max-height: none;\r\n max-width: none;\r\n width: 100vw;\r\n\r\n > * {\r\n max-width: none;\r\n width: 100vw;\r\n }\r\n\r\n > *:not(wm-modal-header):not(wm-modal-footer) {\r\n max-height: none;\r\n height: calc(100vh - 166px);\r\n }\r\n }\r\n }\r\n\r\n &.wm-dialog {\r\n > :not(wm-modal-header):not(wm-modal-footer) {\r\n padding: rem-calc(0 30 20 30);\r\n font-size: rem-calc(14px);\r\n border: none;\r\n }\r\n }\r\n\r\n .overlay {\r\n width: 100vw;\r\n height: 100vh;\r\n max-width: none;\r\n max-height: none;\r\n position: fixed !important;\r\n top: -1;\r\n bottom: 1;\r\n left: -1;\r\n right: 1;\r\n transform: translate(0%, 0%);\r\n background-color: rgba(25, 25, 25, 0.4);\r\n @include transition(opacity 0.5s ease-out);\r\n z-index: 2000;\r\n }\r\n\r\n &.hide {\r\n visibility: hidden;\r\n }\r\n\r\n .sr-only {\r\n @include srOnly;\r\n top: 0;\r\n left: 0;\r\n }\r\n}\r\n","import { h, Component, Element, Listen, Host, Prop, Watch, Event, EventEmitter, Method } from \"@stencil/core\";\r\nimport { checkForActiveElInShadow } from \"../../global/functions\";\r\nimport { generateId } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-modal\",\r\n styleUrl: \"wm-modal.scss\",\r\n})\r\nexport class Modal {\r\n @Element() el!: HTMLWmModalElement;\r\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\r\n @Prop({ reflect: true, mutable: true }) isOpen: boolean = false; // DEPRECATED in favor of open\r\n get tempOpen() {\r\n // instances of this.tempOpen should be replaced with this.open once isOpen is fully phased out\r\n return this.open || this.isOpen;\r\n }\r\n @Prop({ mutable: true }) elementToFocus: \"primary\" | \"secondary\" | string = \"\"; // primary and secondary point to the corresponding buttons, otherwise focus based on element id\r\n @Prop({ reflect: true }) modalType: \"modal\" | \"dialog\" | null = null;\r\n @Prop({ reflect: true }) isTypeDialog: boolean | null = null;\r\n get tempModalType() {\r\n return this.modalType ? this.modalType : this.isTypeDialog ? \"dialog\" : \"modal\";\r\n }\r\n @Prop({ mutable: true, reflect: true }) uid!: string;\r\n private focusOnCloseEl!: HTMLElement;\r\n private overlayEl!: HTMLDivElement;\r\n private bodyFocusListener: () => void = () => this.redirectFocusFromBody();\r\n\r\n @Event({ bubbles: false }) focusLastElement!: EventEmitter;\r\n @Event({ bubbles: false }) focusFirstElement!: EventEmitter;\r\n // wmModalCloseTriggered does not bubble, prevent nested modals from closing all at once\r\n @Event({ bubbles: false }) wmModalCloseTriggered!: EventEmitter;\r\n @Event() wmCloseTriggered!: EventEmitter; // deprecated in favor of wmModalCloseTriggered\r\n @Event() wmModalPrimaryTriggered!: EventEmitter;\r\n @Event() wmPrimaryTriggered!: EventEmitter; // deprecated in favor of wmModalPrimaryTriggered\r\n @Event() wmModalSecondaryTriggered!: EventEmitter;\r\n @Event() wmSecondaryTriggered!: EventEmitter; // deprecated in favor of wmModalSecondaryTriggered\r\n\r\n get focusOnOpenEl(): HTMLElement {\r\n let customElementToFocus: HTMLElement | null = null;\r\n\r\n if (this.elementToFocus === \"primary\" || this.elementToFocus === \"secondary\") {\r\n customElementToFocus = this.el.querySelector<HTMLElement>(`#wm-${this.elementToFocus}-${this.uid}`);\r\n } else if (this.elementToFocus) {\r\n customElementToFocus = this.el.querySelector<HTMLElement>(\"#\" + this.elementToFocus);\r\n !customElementToFocus &&\r\n console.warn(\r\n \"Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.\"\r\n );\r\n }\r\n\r\n const closeButtonEl = this.el.querySelector<HTMLElement>(`#wm-modal-close-${this.uid}`)!;\r\n return customElementToFocus ? customElementToFocus : closeButtonEl;\r\n }\r\n\r\n //App can open modal by toggling the prop\r\n @Watch(\"open\")\r\n @Watch(\"isOpen\")\r\n toggleModal() {\r\n this.tempOpen ? this.showModal() : this.hideModal();\r\n }\r\n\r\n //The below not implemented in light of the fact that the app does often need to keep track of the modal's state itself so that it can update the data displayed in the body:\r\n //App can also open modal by emitting wmShowModal event. Event needs to include the modal's unique id as the event detail, or else all modals on the page will open when wmShowModal event is dispatched.\r\n // @Listen(\"wmShowModal\", { target: \"window\" })\r\n // doesEventMatchId(ev: CustomEvent) {\r\n // ev.detail === this.uid && this.showModal();\r\n // }\r\n\r\n @Listen(\"click\")\r\n handleClick(ev: MouseEvent & { target: HTMLElement }) {\r\n this.tempOpen && ev.target === this.overlayEl && this.focusOnOpenEl.focus();\r\n }\r\n\r\n @Listen(\"keydown\")\r\n closeModalOnEscape(ev: KeyboardEvent) {\r\n if (ev.key === \"Escape\") {\r\n // stops propagation prevents nested modal from closing all at once\r\n ev.stopPropagation();\r\n this.wmModalCloseTriggered.emit();\r\n this.wmCloseTriggered.emit(); // deprecated\r\n this.open = false;\r\n }\r\n }\r\n\r\n showModal() {\r\n this.setAriaDescribedbyOnModal();\r\n this.setElToFocusOnClose(); //Record where the user was before the modal opened so that focus can return to it when the modal closes\r\n document.body.style.overflow = \"hidden\"; //Keeps the page below the modal from scrolling\r\n\r\n //Focus listeners as a general catch for keeping focus in case of errors in finding element with id passed in by dev (element is removed from DOM, etc.) or other scenarios\r\n document.body.tabIndex = 0;\r\n document.body.removeEventListener(\"focus\", this.bodyFocusListener, true);\r\n document.body.addEventListener(\"focus\", this.bodyFocusListener, true);\r\n\r\n window.requestAnimationFrame(() => {\r\n // nested requestAnimationFrames allow all elements to become visible on page before assigning focus\r\n window.requestAnimationFrame(() => this.focusOnOpenEl.focus()); //Bring focus to element inside modal\r\n });\r\n }\r\n\r\n //Close the modal and focus the triggering element when the modal buttons emit their events\r\n hideModal() {\r\n document.body.style.overflow = \"visible\";\r\n document.body.tabIndex = -1;\r\n document.body.removeEventListener(\"focus\", this.bodyFocusListener, true);\r\n window.requestAnimationFrame(() => this.focusOnCloseEl.focus()); //Return focus\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.isOpen) {\r\n console.warn(\"wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.\");\r\n }\r\n if (this.isTypeDialog) {\r\n console.warn(\"wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.\");\r\n }\r\n if (this.elementToFocus === \"primary\" || this.elementToFocus === \"secondary\") {\r\n if (!this.el.id) {\r\n console.error(\r\n \"You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.\"\r\n );\r\n }\r\n }\r\n\r\n this.el.focus = () => {\r\n this.focusOnOpenEl.focus();\r\n };\r\n\r\n this.uid = this.el.id ? this.el.id : generateId();\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.tempOpen) {\r\n this.showModal();\r\n }\r\n }\r\n\r\n @Method()\r\n async emitCloseEvent() {\r\n this.wmModalCloseTriggered.emit();\r\n this.wmCloseTriggered.emit(); // deprecated\r\n }\r\n\r\n @Method()\r\n async emitPrimaryEvent() {\r\n this.wmModalPrimaryTriggered.emit();\r\n this.wmPrimaryTriggered.emit(); // deprecated\r\n }\r\n\r\n @Method()\r\n async emitSecondaryEvent() {\r\n this.wmModalSecondaryTriggered.emit();\r\n this.wmSecondaryTriggered.emit(); // deprecated\r\n }\r\n\r\n setAriaDescribedbyOnModal() {\r\n const modalBody = document.getElementById(`content-${this.uid}`);\r\n\r\n if (!modalBody) {\r\n console.warn(\r\n \"Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.\"\r\n );\r\n } else {\r\n this.el.setAttribute(\"aria-describedby\", `wm-modal-heading-text-${this.uid} content-${this.uid}`);\r\n }\r\n }\r\n\r\n setElToFocusOnClose() {\r\n const elToFocus = document.activeElement as HTMLElement;\r\n if (elToFocus.tagName === \"WM-MENUITEM\") {\r\n this.focusOnCloseEl = elToFocus.parentElement!;\r\n } else {\r\n this.focusOnCloseEl = checkForActiveElInShadow(elToFocus);\r\n }\r\n }\r\n\r\n redirectFocusFromBody() {\r\n if ((document.activeElement as HTMLElement).tagName === \"BODY\") {\r\n this.focusOnOpenEl.focus();\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host\r\n class={`${this.tempOpen ? \"\" : \"hide \"}${\"wm-\" + this.tempModalType}`}\r\n role=\"dialog\"\r\n aria-describedby={`wm-modal-heading-text-${this.uid}`}\r\n aria-modal=\"true\"\r\n tabindex={this.tempOpen ? 0 : null}\r\n onFocus={() => {\r\n this.focusLastElement.emit();\r\n }}\r\n >\r\n <div class=\"overlay\" ref={(el) => (this.overlayEl = el as HTMLDivElement)} />\r\n <div\r\n class=\"sr-only\"\r\n tabIndex={0}\r\n onFocus={() => {\r\n this.focusFirstElement.emit();\r\n }}\r\n />\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"sqDAAA,IAAMA,EAAa,u/E,ICQNC,EAAKC,EAAA,sB,mfAiBRC,KAAAC,kBAAgC,WAA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