@watermarkinsights/ripple 5.2.0 → 5.3.0-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 (399) hide show
  1. package/dist/{esm/global-cb4fb91c.js → cjs/app-globals-7025eb63.js} +10 -1
  2. package/dist/cjs/{chartFunctions-2195a9d2.js → chartFunctions-9075d687.js} +3 -3
  3. package/dist/cjs/{functions-48a748f0.js → functions-b73604c3.js} +297 -7
  4. package/dist/cjs/index-3c3d6c9f.js +1810 -0
  5. package/dist/cjs/{interfaces-ad9e80a6.js → interfaces-85d78ae9.js} +3 -4
  6. package/dist/cjs/{intl-29d2cc42.js → intl-b20d5420.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +5 -4
  8. package/dist/cjs/priv-calendar.cjs.entry.js +554 -0
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
  10. package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
  11. package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
  12. package/dist/cjs/ripple.cjs.js +13 -12
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +9 -7
  14. package/dist/cjs/wm-button.cjs.entry.js +6 -5
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-chart.cjs.entry.js +7 -6
  17. package/dist/cjs/wm-date-range.cjs.entry.js +446 -0
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +90 -20
  19. package/dist/cjs/wm-file-list.cjs.entry.js +5 -4
  20. package/dist/cjs/wm-file.cjs.entry.js +5 -4
  21. package/dist/cjs/wm-input.cjs.entry.js +6 -5
  22. package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
  23. package/dist/cjs/wm-modal-footer.cjs.entry.js +4 -3
  24. package/dist/cjs/wm-modal-header.cjs.entry.js +6 -5
  25. package/dist/cjs/wm-modal.cjs.entry.js +6 -5
  26. package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
  27. package/dist/cjs/wm-navigator.cjs.entry.js +5 -4
  28. package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
  29. package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
  30. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
  31. package/dist/cjs/wm-search.cjs.entry.js +7 -6
  32. package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
  33. package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
  34. package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
  35. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
  36. package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
  37. package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
  38. package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
  39. package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
  40. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  41. package/dist/collection/collection-manifest.json +5 -4
  42. package/dist/collection/components/charts/chartFunctions.js +1 -1
  43. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  44. package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
  45. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  47. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  48. package/dist/collection/components/{wm-datepicker/wm-datepicker.css → datepickers/datepicker.css} +40 -28
  49. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +479 -0
  50. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +816 -0
  51. package/dist/collection/components/datepickers/wm-date-range.js +804 -0
  52. package/dist/collection/components/{wm-datepicker → datepickers}/wm-datepicker.js +114 -29
  53. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  54. package/dist/collection/components/wm-button/wm-button.js +1 -1
  55. package/dist/collection/components/wm-file/wm-file.js +1 -1
  56. package/dist/collection/components/wm-file-list/wm-file-list.js +5 -5
  57. package/dist/collection/components/wm-input/wm-input.js +1 -1
  58. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  59. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  60. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  61. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  62. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  63. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  64. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  65. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  66. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  67. package/dist/collection/components/wm-option/wm-option.js +1 -1
  68. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  69. package/dist/collection/components/wm-search/wm-search.js +5 -4
  70. package/dist/collection/components/wm-select/wm-select.js +2 -2
  71. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  72. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  73. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  74. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  75. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  76. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  77. package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
  78. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  79. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  80. package/dist/collection/dev/action-menu.js +0 -0
  81. package/dist/collection/dev/button.js +0 -0
  82. package/dist/collection/dev/chart-small.js +56 -0
  83. package/dist/collection/dev/chart.js +37 -0
  84. package/dist/collection/dev/date-range.js +6 -0
  85. package/dist/collection/dev/datepicker.js +46 -0
  86. package/dist/collection/dev/file-list.js +16 -0
  87. package/dist/collection/dev/file.js +0 -0
  88. package/dist/collection/dev/input.js +6 -0
  89. package/dist/collection/dev/line-chart.js +0 -0
  90. package/dist/collection/dev/modal.js +75 -0
  91. package/dist/collection/dev/navigation.js +13 -0
  92. package/dist/collection/dev/navigator.js +34 -0
  93. package/dist/collection/dev/pagination.js +7 -0
  94. package/dist/collection/dev/progress-monitor.js +0 -0
  95. package/dist/collection/dev/scripts.js +31 -748
  96. package/dist/collection/dev/search.js +72 -0
  97. package/dist/collection/dev/select.js +57 -0
  98. package/dist/collection/dev/snackbar.js +38 -0
  99. package/dist/collection/dev/tabs.js +44 -0
  100. package/dist/collection/dev/tag-input.js +32 -0
  101. package/dist/collection/dev/textarea.js +28 -0
  102. package/dist/collection/dev/timepicker.js +32 -0
  103. package/dist/collection/dev/toggletip.js +0 -0
  104. package/dist/collection/dev/uploader.js +139 -0
  105. package/dist/collection/global/functions.js +187 -0
  106. package/dist/collection/global/interfaces.js +3 -4
  107. package/dist/{cjs/global-d5e26274.js → esm/app-globals-0c592c57.js} +7 -2
  108. package/dist/esm/{chartFunctions-d2d8f1b2.js → chartFunctions-730742b7.js} +3 -3
  109. package/dist/esm/{functions-58918a32.js → functions-eda88c5f.js} +292 -8
  110. package/dist/esm/index-0ed3ed7d.js +1780 -0
  111. package/dist/esm/{interfaces-9b75fb61.js → interfaces-cc5b177f.js} +3 -4
  112. package/dist/esm/{intl-f9d79dff.js → intl-de8432e2.js} +1 -1
  113. package/dist/esm/loader.js +6 -5
  114. package/dist/esm/polyfills/core-js.js +0 -0
  115. package/dist/esm/polyfills/dom.js +0 -0
  116. package/dist/esm/polyfills/es5-html-element.js +0 -0
  117. package/dist/esm/polyfills/index.js +0 -0
  118. package/dist/esm/polyfills/system.js +0 -0
  119. package/dist/esm/priv-calendar.entry.js +550 -0
  120. package/dist/esm/priv-chart-popover.entry.js +6 -5
  121. package/dist/esm/priv-navigator-button.entry.js +4 -3
  122. package/dist/esm/priv-navigator-item.entry.js +4 -3
  123. package/dist/esm/ripple.js +14 -13
  124. package/dist/esm/wm-action-menu_2.entry.js +9 -7
  125. package/dist/esm/wm-button.entry.js +6 -5
  126. package/dist/esm/wm-chart-slice.entry.js +1 -1
  127. package/dist/esm/wm-chart.entry.js +7 -6
  128. package/dist/esm/wm-date-range.entry.js +442 -0
  129. package/dist/esm/wm-datepicker.entry.js +90 -20
  130. package/dist/esm/wm-file-list.entry.js +5 -4
  131. package/dist/esm/wm-file.entry.js +5 -4
  132. package/dist/esm/wm-input.entry.js +6 -5
  133. package/dist/esm/wm-line-chart.entry.js +15 -14
  134. package/dist/esm/wm-modal-footer.entry.js +4 -3
  135. package/dist/esm/wm-modal-header.entry.js +6 -5
  136. package/dist/esm/wm-modal.entry.js +6 -5
  137. package/dist/esm/wm-navigation_3.entry.js +13 -10
  138. package/dist/esm/wm-navigator.entry.js +5 -4
  139. package/dist/esm/wm-option_2.entry.js +10 -8
  140. package/dist/esm/wm-pagination.entry.js +5 -4
  141. package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
  142. package/dist/esm/wm-search.entry.js +7 -6
  143. package/dist/esm/wm-snackbar.entry.js +7 -6
  144. package/dist/esm/wm-tab-item_3.entry.js +11 -8
  145. package/dist/esm/wm-tag-input.entry.js +8 -7
  146. package/dist/esm/wm-tag-option.entry.js +2 -2
  147. package/dist/esm/wm-textarea.entry.js +6 -5
  148. package/dist/esm/wm-timepicker.entry.js +6 -5
  149. package/dist/esm/wm-toggletip.entry.js +6 -5
  150. package/dist/esm/wm-uploader.entry.js +7 -6
  151. package/dist/esm/wm-wrapper.entry.js +1 -1
  152. package/dist/esm-es5/app-globals-0c592c57.js +1 -0
  153. package/dist/esm-es5/{chartFunctions-d2d8f1b2.js → chartFunctions-730742b7.js} +1 -1
  154. package/dist/esm-es5/functions-eda88c5f.js +1 -0
  155. package/dist/esm-es5/index-0ed3ed7d.js +1 -0
  156. package/dist/esm-es5/{intl-f9d79dff.js → intl-de8432e2.js} +1 -1
  157. package/dist/esm-es5/loader.js +1 -1
  158. package/dist/esm-es5/priv-calendar.entry.js +1 -0
  159. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  160. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  161. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  162. package/dist/esm-es5/ripple.js +1 -1
  163. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  164. package/dist/esm-es5/wm-button.entry.js +1 -1
  165. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  166. package/dist/esm-es5/wm-chart.entry.js +1 -1
  167. package/dist/esm-es5/wm-date-range.entry.js +1 -0
  168. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  169. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  170. package/dist/esm-es5/wm-file.entry.js +1 -1
  171. package/dist/esm-es5/wm-input.entry.js +1 -1
  172. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  173. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  174. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  175. package/dist/esm-es5/wm-modal.entry.js +1 -1
  176. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  177. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  178. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  179. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  180. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  181. package/dist/esm-es5/wm-search.entry.js +1 -1
  182. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  183. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  184. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  185. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  186. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  187. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  188. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  189. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  190. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  191. package/dist/loader/cdn.js +1 -2
  192. package/dist/loader/index.cjs.js +1 -2
  193. package/dist/loader/index.d.ts +3 -0
  194. package/dist/loader/index.es2017.js +1 -2
  195. package/dist/loader/index.js +1 -2
  196. package/dist/ripple/p-0096e233.system.entry.js +1 -0
  197. package/dist/ripple/p-0ad27de3.system.entry.js +1 -0
  198. package/dist/ripple/p-0ccf9f96.entry.js +1 -0
  199. package/dist/ripple/{p-65420b71.entry.js → p-0e1523db.entry.js} +1 -1
  200. package/dist/ripple/{p-406f1e79.system.entry.js → p-0f117524.system.entry.js} +1 -1
  201. package/dist/ripple/p-0f7a85f4.entry.js +1 -0
  202. package/dist/ripple/p-13760c2c.entry.js +1 -0
  203. package/dist/ripple/p-14bab3fa.system.entry.js +1 -0
  204. package/dist/ripple/{p-add75652.system.entry.js → p-181068af.system.entry.js} +1 -1
  205. package/dist/ripple/p-1e536698.js +1 -0
  206. package/dist/ripple/{p-f9689d7a.entry.js → p-245f0080.entry.js} +1 -1
  207. package/dist/ripple/p-2c18b6d1.system.entry.js +1 -0
  208. package/dist/ripple/{p-fa3d10db.js → p-3036a712.js} +1 -1
  209. package/dist/ripple/p-340b18ea.entry.js +1 -0
  210. package/dist/ripple/p-37c39a40.system.entry.js +1 -0
  211. package/dist/ripple/{p-011a4acc.system.entry.js → p-39f4fca0.system.entry.js} +1 -1
  212. package/dist/ripple/p-3f5e94e3.system.js +1 -0
  213. package/dist/ripple/{p-a99b05de.system.entry.js → p-47d993b9.system.entry.js} +1 -1
  214. package/dist/ripple/p-48beea19.system.js +1 -0
  215. package/dist/ripple/{p-3a070f35.entry.js → p-4aae5688.entry.js} +1 -1
  216. package/dist/ripple/p-4ea963f3.system.entry.js +1 -0
  217. package/dist/ripple/p-501d3115.entry.js +1 -0
  218. package/dist/ripple/p-527581c5.entry.js +1 -0
  219. package/dist/ripple/p-563b5820.entry.js +1 -0
  220. package/dist/ripple/p-57695dba.js +2 -0
  221. package/dist/ripple/{p-6a9f7651.entry.js → p-5ab8174c.entry.js} +1 -1
  222. package/dist/ripple/p-5c6c325e.system.entry.js +1 -0
  223. package/dist/ripple/p-5f4c8d63.system.entry.js +1 -0
  224. package/dist/ripple/p-68e3e7c0.entry.js +1 -0
  225. package/dist/ripple/p-68fec757.system.entry.js +1 -0
  226. package/dist/ripple/p-6982bc34.entry.js +1 -0
  227. package/dist/ripple/p-6a793c40.system.entry.js +1 -0
  228. package/dist/ripple/p-6c31f0ad.system.entry.js +1 -0
  229. package/dist/ripple/p-6daf1bd3.system.entry.js +1 -0
  230. package/dist/ripple/p-6e406e8b.entry.js +1 -0
  231. package/dist/ripple/p-77210f26.entry.js +1 -0
  232. package/dist/ripple/p-7a844f5d.system.js +2 -0
  233. package/dist/ripple/{p-a03df46c.entry.js → p-7b5ac088.entry.js} +1 -1
  234. package/dist/ripple/p-7d5aaa73.system.entry.js +1 -0
  235. package/dist/ripple/p-80c92919.system.entry.js +1 -0
  236. package/dist/ripple/p-81fd2ed5.system.entry.js +1 -0
  237. package/dist/ripple/p-84d294d1.system.js +1 -0
  238. package/dist/ripple/p-85178a0d.entry.js +1 -0
  239. package/dist/ripple/p-8768ba4d.system.entry.js +1 -0
  240. package/dist/ripple/p-8af21b69.entry.js +1 -0
  241. package/dist/ripple/{p-eda4d59c.js → p-96cc3c63.js} +1 -1
  242. package/dist/ripple/{p-abe3242c.entry.js → p-98e77431.entry.js} +1 -1
  243. package/dist/ripple/p-a30eef53.entry.js +1 -0
  244. package/dist/ripple/{p-0ba8d3b6.system.entry.js → p-a36f5e7d.system.entry.js} +1 -1
  245. package/dist/ripple/p-ad6c979f.entry.js +1 -0
  246. package/dist/ripple/p-af8c1cfa.entry.js +1 -0
  247. package/dist/ripple/p-b19be746.entry.js +1 -0
  248. package/dist/ripple/p-b483ec14.entry.js +1 -0
  249. package/dist/ripple/p-b4a34241.entry.js +1 -0
  250. package/dist/ripple/{p-c9943d2e.system.entry.js → p-b6dcc6d8.system.entry.js} +1 -1
  251. package/dist/ripple/p-be28a95e.system.entry.js +1 -0
  252. package/dist/ripple/p-c6d970a4.entry.js +1 -0
  253. package/dist/ripple/{p-0d15e3f0.system.js → p-ce028b38.system.js} +1 -1
  254. package/dist/ripple/p-dba63006.system.entry.js +1 -0
  255. package/dist/ripple/p-dbb37269.system.entry.js +1 -0
  256. package/dist/ripple/{p-aecd5a1a.system.js → p-e0929c38.system.js} +1 -1
  257. package/dist/ripple/p-e19f8c43.js +1 -0
  258. package/dist/ripple/{p-02b625f6.system.entry.js → p-e3a15de3.system.entry.js} +1 -1
  259. package/dist/ripple/p-e3d66797.entry.js +1 -0
  260. package/dist/ripple/p-e64276f2.entry.js +1 -0
  261. package/dist/ripple/p-e9978b2f.entry.js +1 -0
  262. package/dist/ripple/p-ecbd3ea9.system.entry.js +1 -0
  263. package/dist/ripple/p-ecd26b33.system.entry.js +1 -0
  264. package/dist/ripple/p-ee49cb03.entry.js +1 -0
  265. package/dist/ripple/p-f0fbb86b.system.entry.js +1 -0
  266. package/dist/ripple/{p-7e56da2e.system.entry.js → p-f170963b.system.entry.js} +1 -1
  267. package/dist/ripple/{p-29509665.system.entry.js → p-f4f3bf9f.system.entry.js} +1 -1
  268. package/dist/ripple/{p-3e9fcb47.entry.js → p-f95bc54b.entry.js} +1 -1
  269. package/dist/ripple/{p-4fc6019b.system.entry.js → p-fd34619f.system.entry.js} +1 -1
  270. package/dist/ripple/{p-25446670.entry.js → p-ff095cec.entry.js} +1 -1
  271. package/dist/ripple/ripple.esm.js +1 -1
  272. package/dist/ripple/ripple.js +1 -1
  273. package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +72 -0
  274. package/dist/types/components/datepickers/wm-date-range.d.ts +68 -0
  275. package/dist/types/components/{wm-datepicker → datepickers}/wm-datepicker.d.ts +16 -2
  276. package/dist/types/components/wm-file-list/wm-file-list.d.ts +1 -1
  277. package/dist/types/components.d.ts +111 -57
  278. package/dist/types/global/functions.d.ts +25 -0
  279. package/dist/types/global/interfaces.d.ts +14 -0
  280. package/dist/types/stencil-public-runtime.d.ts +3 -10
  281. package/package.json +1 -1
  282. package/dist/cjs/index-f8ef86de.js +0 -2578
  283. package/dist/cjs/priv-datepicker.cjs.entry.js +0 -654
  284. package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
  285. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
  286. package/dist/collection/components/charts/screenshots.e2e.js +0 -96
  287. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
  288. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
  289. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
  290. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
  291. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
  292. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
  293. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
  294. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
  295. package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
  296. package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
  297. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +0 -323
  298. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +0 -942
  299. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +0 -76
  300. package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +0 -382
  301. package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +0 -21
  302. package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
  303. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
  304. package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
  305. package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
  306. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
  307. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
  308. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
  309. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
  310. package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
  311. package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
  312. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
  313. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
  314. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
  315. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
  316. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
  317. package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
  318. package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
  319. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
  320. package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
  321. package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
  322. package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
  323. package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
  324. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
  325. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
  326. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
  327. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
  328. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
  329. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
  330. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
  331. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
  332. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
  333. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
  334. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
  335. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
  336. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
  337. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
  338. package/dist/collection/global/functions.spec.js +0 -126
  339. package/dist/collection/lang/lang.spec.js +0 -20
  340. package/dist/esm/index-f164fbca.js +0 -2548
  341. package/dist/esm/priv-datepicker.entry.js +0 -650
  342. package/dist/esm-es5/functions-58918a32.js +0 -1
  343. package/dist/esm-es5/global-cb4fb91c.js +0 -1
  344. package/dist/esm-es5/index-f164fbca.js +0 -1
  345. package/dist/esm-es5/priv-datepicker.entry.js +0 -1
  346. package/dist/ripple/p-0fe97e85.system.js +0 -2
  347. package/dist/ripple/p-105f479a.system.entry.js +0 -1
  348. package/dist/ripple/p-1453ea51.system.entry.js +0 -1
  349. package/dist/ripple/p-194bdaa4.system.entry.js +0 -1
  350. package/dist/ripple/p-30a9ba6e.entry.js +0 -1
  351. package/dist/ripple/p-31f97455.system.entry.js +0 -1
  352. package/dist/ripple/p-39dc88f3.system.entry.js +0 -1
  353. package/dist/ripple/p-3dfc4242.entry.js +0 -1
  354. package/dist/ripple/p-4428c4f0.entry.js +0 -1
  355. package/dist/ripple/p-45126063.system.entry.js +0 -1
  356. package/dist/ripple/p-4bc27adf.entry.js +0 -1
  357. package/dist/ripple/p-4de51706.js +0 -2
  358. package/dist/ripple/p-4fb3748d.js +0 -1
  359. package/dist/ripple/p-5a4f76e1.entry.js +0 -1
  360. package/dist/ripple/p-5ca67373.entry.js +0 -1
  361. package/dist/ripple/p-5ceb9894.entry.js +0 -1
  362. package/dist/ripple/p-5f89831f.system.entry.js +0 -1
  363. package/dist/ripple/p-63d5db34.entry.js +0 -1
  364. package/dist/ripple/p-63fabfed.entry.js +0 -1
  365. package/dist/ripple/p-75592b7a.entry.js +0 -1
  366. package/dist/ripple/p-7e8daaac.entry.js +0 -1
  367. package/dist/ripple/p-7ea95937.entry.js +0 -1
  368. package/dist/ripple/p-7f1efb21.entry.js +0 -1
  369. package/dist/ripple/p-82d5ea8d.system.entry.js +0 -1
  370. package/dist/ripple/p-82f7eca7.entry.js +0 -1
  371. package/dist/ripple/p-88406560.system.entry.js +0 -1
  372. package/dist/ripple/p-895bfa1f.system.js +0 -1
  373. package/dist/ripple/p-8d840770.system.js +0 -1
  374. package/dist/ripple/p-8e1fd831.entry.js +0 -1
  375. package/dist/ripple/p-95e3ee3d.js +0 -1
  376. package/dist/ripple/p-994dc497.system.entry.js +0 -1
  377. package/dist/ripple/p-9dff37db.system.entry.js +0 -1
  378. package/dist/ripple/p-a71bc14f.entry.js +0 -1
  379. package/dist/ripple/p-b0579a2a.system.entry.js +0 -1
  380. package/dist/ripple/p-b1a4f626.system.entry.js +0 -1
  381. package/dist/ripple/p-b3dfb34a.entry.js +0 -1
  382. package/dist/ripple/p-b4cb2b12.entry.js +0 -1
  383. package/dist/ripple/p-c717d895.entry.js +0 -1
  384. package/dist/ripple/p-cd5fdcb1.entry.js +0 -1
  385. package/dist/ripple/p-cd659e3e.system.entry.js +0 -1
  386. package/dist/ripple/p-d02bc2f2.system.entry.js +0 -1
  387. package/dist/ripple/p-d87de822.system.entry.js +0 -1
  388. package/dist/ripple/p-da9937f5.system.js +0 -1
  389. package/dist/ripple/p-dd479c47.entry.js +0 -1
  390. package/dist/ripple/p-df78942e.entry.js +0 -1
  391. package/dist/ripple/p-e1b60b9e.system.entry.js +0 -1
  392. package/dist/ripple/p-e5de7cae.system.entry.js +0 -1
  393. package/dist/ripple/p-eb9cb021.system.entry.js +0 -1
  394. package/dist/ripple/p-ef3e35fa.entry.js +0 -1
  395. package/dist/ripple/p-f2556f03.system.entry.js +0 -1
  396. package/dist/ripple/p-f7ac9698.system.entry.js +0 -1
  397. /package/dist/esm-es5/{interfaces-9b75fb61.js → interfaces-cc5b177f.js} +0 -0
  398. /package/dist/ripple/{p-196eb2f3.js → p-2732bddd.js} +0 -0
  399. /package/dist/ripple/{p-1402cfa2.system.js → p-42fa7a77.system.js} +0 -0
@@ -1,650 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, f as forceUpdate, g as getElement } from './index-f164fbca.js';
2
- import { i as intl, m as shouldOpenUp, C as hasRoomRight } from './functions-58918a32.js';
3
-
4
- const privDatepickerCss = ".toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-datepicker-toggle-background);border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.toggle span::after{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:\"\\f0ed\";font-size:1.5rem;color:var(--wmcolor-datepicker-toggle-icon);padding:0;line-height:2.5rem}.toggle:hover{-webkit-box-shadow:none;box-shadow:none;background:var(--wmcolor-datepicker-toggle-background-hover)}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-datepicker-toggle-background-disabled)}.toggle:disabled .calendar::after{color:var(--wmcolor-datepicker-toggle-icon-disabled)}[dir=RTL] .toggle{right:auto;left:0}.toggle::-moz-focus-inner{border:0}.toggle:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:var(--wmcolor-datepicker-background)}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:var(--wmcolor-datepicker-selector-background);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:var(--wmcolor-datepicker-selector-border);color:var(--wmcolor-datepicker-selector-text)}.popup .calendar-header .title-box:after{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:\"\\f140\";padding-left:0.75rem;font-size:1.12rem}.popup .calendar-header .title-box.year:after{content:\"\\f143\"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:var(--wmcolor-datepicker-navigation-text);background:var(--wmcolor-datepicker-navigation-background);padding:0;-webkit-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi{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;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn:hover{background-color:var(--wmcolor-datepicker-navigation-background-hover)}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:var(--wmcolor-datepicker-day-text-outside)}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:var(--wmcolor-datepicker-weekdays-background)}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:var(--wmcolor-datepicker-weekdays-text);border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:hover{background-color:var(--wmcolor-datepicker-day-background-hover)}.popup .day-view .date-grid .date-cell.current-month{color:var(--wmcolor-datepicker-day-text)}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .day-view .date-grid .date-cell:active{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .month-view .months{border-top:2px solid;border-top-color:var(--wmcolor-datepicker-month-border);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:var(--wmcolor-datepicker-month-text)}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month:hover{border-right-color:transparent;background-color:var(--wmcolor-datepicker-month-background-hover)}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:var(--wmcolor-datepicker-month-background-selected);color:var(--wmcolor-datepicker-month-text-selected)}.popup button:focus-visible,.popup .title-box:focus-visible,.popup .date-cell:focus-visible,.popup .month:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-2px;border:none;z-index:11}.popup button:focus-visible[aria-selected=true],.popup .title-box:focus-visible[aria-selected=true],.popup .date-cell:focus-visible[aria-selected=true],.popup .month:focus-visible[aria-selected=true]{outline-offset:2px}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}";
5
-
6
- const PrivDatepicker = class {
7
- constructor(hostRef) {
8
- registerInstance(this, hostRef);
9
- this.cellTriggered = createEvent(this, "cellTriggered", 7);
10
- this.toggleButtonClicked = createEvent(this, "toggleButtonClicked", 7);
11
- this.popupClosed = createEvent(this, "popupClosed", 7);
12
- this.popupBlurred = createEvent(this, "popupBlurred", 7);
13
- this.popupClicked = true;
14
- this.buttonClicked = true;
15
- this.prevClicked = true;
16
- this.nextClicked = true;
17
- this.openUp = false;
18
- this.calendar_months = [
19
- intl.formatMessage({
20
- id: "date.january",
21
- defaultMessage: "January",
22
- description: "Month of the year",
23
- }),
24
- intl.formatMessage({
25
- id: "date.february",
26
- defaultMessage: "February",
27
- description: "Month of the year",
28
- }),
29
- intl.formatMessage({
30
- id: "date.march",
31
- defaultMessage: "March",
32
- description: "Month of the year",
33
- }),
34
- intl.formatMessage({
35
- id: "date.april",
36
- defaultMessage: "April",
37
- description: "Month of the year",
38
- }),
39
- intl.formatMessage({
40
- id: "date.may",
41
- defaultMessage: "May",
42
- description: "Month of the year",
43
- }),
44
- intl.formatMessage({
45
- id: "date.june",
46
- defaultMessage: "June",
47
- description: "Month of the year",
48
- }),
49
- intl.formatMessage({
50
- id: "date.july",
51
- defaultMessage: "July",
52
- description: "Month of the year",
53
- }),
54
- intl.formatMessage({
55
- id: "date.august",
56
- defaultMessage: "August",
57
- description: "Month of the year",
58
- }),
59
- intl.formatMessage({
60
- id: "date.september",
61
- defaultMessage: "September",
62
- description: "Month of the year",
63
- }),
64
- intl.formatMessage({
65
- id: "date.october",
66
- defaultMessage: "October",
67
- description: "Month of the year",
68
- }),
69
- intl.formatMessage({
70
- id: "date.november",
71
- defaultMessage: "November",
72
- description: "Month of the year",
73
- }),
74
- intl.formatMessage({
75
- id: "date.december",
76
- defaultMessage: "December",
77
- description: "Month of the year",
78
- }),
79
- ];
80
- this.weekdays = [
81
- intl.formatMessage({ id: "date.sunday", defaultMessage: "Sunday" }),
82
- intl.formatMessage({ id: "date.monday", defaultMessage: "Monday" }),
83
- intl.formatMessage({ id: "date.tuesday", defaultMessage: "Tuesday" }),
84
- intl.formatMessage({ id: "date.wednesday", defaultMessage: "Wednesday" }),
85
- intl.formatMessage({ id: "date.thursday", defaultMessage: "Thursday" }),
86
- intl.formatMessage({ id: "date.friday", defaultMessage: "Friday" }),
87
- intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
88
- ];
89
- this.renderCalendarDate = (date, index) => {
90
- let monthOfDate = this.removeZeroes(String(date[1]));
91
- let dayOfDate = this.removeZeroes(String(date[2]));
92
- let isThisMonth = monthOfDate === this.monthInFocus ? "current-month" : "";
93
- const dateId = date[0] + date[1] + date[2];
94
- const isToday = this.isDateToday(date);
95
- return (h("div", { role: "gridcell", id: `cell-${dateId}`, class: `date-cell ${isThisMonth}`, "aria-selected": false, "aria-label": `${isToday
96
- ? `${intl.formatMessage({
97
- id: "date.today",
98
- defaultMessage: "today",
99
- description: "calendar button",
100
- })}, `
101
- : ""}${this.weekdays[index]}, ${this.calendar_months[monthOfDate - 1]} ${dayOfDate}, ${date[0]}`, onClick: (ev) => {
102
- this.handleTriggeredDate(ev.target);
103
- }, onKeyDown: (ev) => this.trapFocusEnd(ev), "data-month": date[1], "data-year": date[0], onBlur: (ev) => ev.stopPropagation(), tabIndex: -1 }, dayOfDate));
104
- };
105
- this.disabled = false;
106
- this.isExpanded = false;
107
- this.view = "day";
108
- this.date = new Date();
109
- this.selectedYear = this.date.getUTCFullYear();
110
- this.selectedMonth = this.date.getUTCMonth() + 1;
111
- this.selectedDay = this.date.getUTCDate();
112
- this.monthInFocus = this.selectedMonth;
113
- this.yearInFocus = this.selectedYear;
114
- this.dayInFocus = this.selectedDay;
115
- this.monthNumInFocus = this.selectedMonth;
116
- }
117
- handleKey(ev) {
118
- this.prevClicked = false;
119
- this.nextClicked = false;
120
- switch (ev.key) {
121
- case "Enter":
122
- ev.preventDefault();
123
- //Clunky exception for blur validation. Remove when blur reworked.
124
- !ev.target.id.includes("popup-title") && ev.target.click();
125
- break;
126
- case "Escape":
127
- ev.preventDefault();
128
- if (this.isExpanded) {
129
- ev.stopPropagation(); // prevents closing of parent modal
130
- this.closePopup(true);
131
- }
132
- break;
133
- case "PageUp":
134
- ev.preventDefault();
135
- this.backOneMonth();
136
- break;
137
- case "PageDown":
138
- ev.preventDefault();
139
- this.forwardOneMonth();
140
- break;
141
- case "Home":
142
- ev.preventDefault();
143
- this.unfocusCell();
144
- this.dayInFocus = 1;
145
- forceUpdate(this.el);
146
- break;
147
- case "End":
148
- ev.preventDefault();
149
- this.unfocusCell();
150
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
151
- forceUpdate(this.el);
152
- break;
153
- case "ArrowLeft":
154
- ev.preventDefault();
155
- if (this.view === "day") {
156
- this.unfocusCell();
157
- if (this.dayInFocus === 1) {
158
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
159
- this.monthInFocus = newMonth.month;
160
- this.yearInFocus = newMonth.year;
161
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
162
- }
163
- else {
164
- this.dayInFocus -= 1;
165
- }
166
- }
167
- else {
168
- this.unfocusMonth();
169
- if (this.monthNumInFocus === 0) {
170
- this.monthNumInFocus = 11;
171
- }
172
- else {
173
- this.monthNumInFocus -= 1;
174
- }
175
- }
176
- break;
177
- case "ArrowRight":
178
- ev.preventDefault();
179
- if (this.view === "day") {
180
- this.unfocusCell();
181
- if (this.dayInFocus === this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
182
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
183
- this.monthInFocus = newMonth.month;
184
- this.yearInFocus = newMonth.year;
185
- this.dayInFocus = 1;
186
- }
187
- else {
188
- this.dayInFocus += 1;
189
- }
190
- }
191
- else {
192
- this.unfocusMonth();
193
- if (this.monthNumInFocus === 11) {
194
- this.monthNumInFocus = 0;
195
- }
196
- else {
197
- this.monthNumInFocus += 1;
198
- }
199
- }
200
- break;
201
- case "ArrowUp":
202
- ev.preventDefault();
203
- if (this.view === "day") {
204
- this.unfocusCell();
205
- if (this.dayInFocus < 8) {
206
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
207
- this.monthInFocus = newMonth.month;
208
- this.yearInFocus = newMonth.year;
209
- const numDaysToSubtract = 7 - this.dayInFocus;
210
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus) - numDaysToSubtract;
211
- }
212
- else {
213
- this.dayInFocus -= 7;
214
- }
215
- }
216
- else {
217
- this.unfocusMonth();
218
- if (this.monthNumInFocus < 3) {
219
- this.monthNumInFocus += 9;
220
- }
221
- else {
222
- this.monthNumInFocus -= 3;
223
- }
224
- }
225
- break;
226
- case "ArrowDown":
227
- ev.preventDefault();
228
- if (!this.isExpanded) {
229
- this.openPopup();
230
- }
231
- else {
232
- if (this.view === "day") {
233
- //If the down arrow is pressed from the month button or the arrow buttons, focus should shift to the current cell in focus
234
- if (!(document.activeElement.shadowRoot || document).activeElement.classList.contains("date-cell")) {
235
- this.focusCell();
236
- break;
237
- }
238
- this.unfocusCell();
239
- const changeoverDate = this.getMonthDays(this.monthInFocus, this.yearInFocus) - 7;
240
- if (this.dayInFocus > changeoverDate) {
241
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
242
- this.monthInFocus = newMonth.month;
243
- this.yearInFocus = newMonth.year;
244
- this.dayInFocus = this.dayInFocus - changeoverDate;
245
- }
246
- else {
247
- this.dayInFocus += 7;
248
- }
249
- }
250
- else {
251
- //If the down arrow is pressed from the arrow buttons or the title box, focus should shift to the current month in focus
252
- const activeEl = (document.activeElement.shadowRoot || document).activeElement;
253
- if (activeEl.tagName === "BUTTON" || activeEl.id.includes("popup-title-year")) {
254
- this.focusMonth();
255
- break;
256
- }
257
- this.unfocusMonth();
258
- if (this.monthNumInFocus > 8) {
259
- this.monthNumInFocus -= 9;
260
- }
261
- else {
262
- this.monthNumInFocus += 3;
263
- }
264
- }
265
- }
266
- break;
267
- }
268
- }
269
- blurHandler(ev) {
270
- if (!this.popupClicked && !this.buttonClicked && this.isExpanded) {
271
- this.closePopup();
272
- // in this case, the PointerEvent target is identical to the blur events relatedTarget, and is passed on as such
273
- this.popupBlurred.emit({ relatedTarget: ev.target });
274
- }
275
- this.popupClicked = false;
276
- this.buttonClicked = false;
277
- }
278
- handleBlurOnWindow(ev) {
279
- // for cases where the user clicks or uses a shortcut to leave the document
280
- if (this.isExpanded) {
281
- this.closePopup();
282
- this.popupBlurred.emit({ relatedTarget: ev.target });
283
- }
284
- }
285
- componentDidUpdate() {
286
- this.handleSelectedDate();
287
- if (this.isExpanded) {
288
- this.prevClicked
289
- ? this.prevButton.focus()
290
- : this.nextClicked
291
- ? this.nextButton.focus()
292
- : this.view === "day"
293
- ? this.focusCell()
294
- : this.focusMonth();
295
- }
296
- }
297
- componentDidLoad() {
298
- this.handleSelectedDate();
299
- }
300
- zeroPad(value, length) {
301
- if (!String.prototype.padStart) {
302
- String.prototype.padStart = function padStart(targetLength, padString) {
303
- targetLength = targetLength - this.length;
304
- if (targetLength > padString.length) {
305
- padString += padString.repeat(targetLength / padString.length);
306
- }
307
- return padString.slice(0, targetLength) + String(this);
308
- };
309
- }
310
- return `${value.toString()}`.padStart(length, "0");
311
- }
312
- removeZeroes(date) {
313
- return +date < 10 ? +date.slice(1) : +date;
314
- }
315
- isDateToday(date) {
316
- const today = new Date();
317
- const todayDateArray = [
318
- today.getFullYear().toString(),
319
- (today.getMonth() + 1).toString(),
320
- today.getDate().toString(),
321
- ];
322
- //Compare today's date to date and return true if they match
323
- return todayDateArray.reduce((result, val, index) => result && this.removeZeroes(date[index]).toString() === val, true);
324
- }
325
- togglePopup() {
326
- this.isExpanded ? this.closePopup() : this.openPopup();
327
- this.buttonClicked = true;
328
- }
329
- closePopup(returnFocus = false) {
330
- this.isExpanded = false;
331
- this.popupEl.classList.remove("open");
332
- window.setTimeout(() => {
333
- //not using display none in order to get measurements of the popup while hidden
334
- this.popupEl.style.visibility = "hidden";
335
- }, 250);
336
- //Reset values so that menu reopens to day view with selected date in focus
337
- if (this.view === "day") {
338
- this.unfocusCell();
339
- }
340
- this.monthInFocus = this.selectedMonth;
341
- this.yearInFocus = this.selectedYear;
342
- this.dayInFocus = this.selectedDay;
343
- this.changeView("day");
344
- if (returnFocus) {
345
- this.buttonEl.focus();
346
- }
347
- }
348
- openPopup() {
349
- this.panelPosition();
350
- this.setDateValuesForView();
351
- this.prevClicked = false;
352
- this.nextClicked = false;
353
- this.popupEl.style.visibility = "visible";
354
- window.requestAnimationFrame(() => {
355
- this.popupEl.classList.add("open");
356
- });
357
- this.isExpanded = true;
358
- this.focusCell();
359
- }
360
- getMonthDays(month, year) {
361
- const months30 = [4, 6, 9, 11];
362
- const leapYear = year % 4 === 0;
363
- return month === 2 ? (leapYear ? 29 : 28) : months30.includes(month) ? 30 : 31;
364
- }
365
- // 1 => Sunday, 7 => Saturday
366
- getMonthFirstDay(month, year) {
367
- return +new Date(year, month - 1, 1, 12, 0, 0).getDay() + 1;
368
- }
369
- getPreviousMonth(month, year) {
370
- const prevMonth = month > 1 ? month - 1 : 12;
371
- const prevMonthYear = month > 1 ? year : year - 1;
372
- return { month: prevMonth, year: prevMonthYear };
373
- }
374
- getNextMonth(month, year) {
375
- const nextMonth = month < 12 ? month + 1 : 1;
376
- const nextMonthYear = month < 12 ? year : year + 1;
377
- return { month: nextMonth, year: nextMonthYear };
378
- }
379
- getCalendarDates(month, year) {
380
- // Get number of days in the month and the month's first day
381
- const monthDays = this.getMonthDays(month, year);
382
- const monthFirstDay = this.getMonthFirstDay(month, year);
383
- // Get number of days to be displayed from previous and next months
384
- // These ensure a total of 42 days (6 weeks) displayed on the calendar
385
- const daysFromPrevMonth = monthFirstDay - 1;
386
- let daysFromNextMonth = 42 - (daysFromPrevMonth + monthDays);
387
- daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;
388
- // Get the previous and next months and years
389
- const { month: prevMonth, year: prevMonthYear } = this.getPreviousMonth(month, year);
390
- const { month: nextMonth, year: nextMonthYear } = this.getNextMonth(month, year);
391
- // Get number of days in previous month
392
- const prevMonthDays = this.getMonthDays(prevMonth, prevMonthYear);
393
- // 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.
394
- const prevMonthDates = [...new Array(daysFromPrevMonth).fill("1")].map((_, index) => {
395
- const day = index + 1 + (prevMonthDays - daysFromPrevMonth);
396
- return [prevMonthYear.toString(), this.zeroPad(prevMonth, 2), this.zeroPad(day, 2)];
397
- });
398
- // 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.
399
- const thisMonthDates = [...new Array(monthDays).fill("1")].map((_, index) => {
400
- const day = index + 1;
401
- return [year.toString(), this.zeroPad(month, 2), this.zeroPad(day, 2)];
402
- });
403
- // 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.
404
- const nextMonthDates = [...new Array(daysFromNextMonth).fill("1")].map((_, index) => {
405
- const day = index + 1;
406
- return [nextMonthYear.toString(), this.zeroPad(nextMonth, 2), this.zeroPad(day, 2)];
407
- });
408
- // Combines all dates from previous, current and next months
409
- return [...prevMonthDates, ...thisMonthDates, ...nextMonthDates];
410
- }
411
- forwardOneMonth() {
412
- this.unfocusCell();
413
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
414
- this.monthInFocus = newMonth.month;
415
- this.yearInFocus = newMonth.year;
416
- const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
417
- if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
418
- this.dayInFocus = totalDays;
419
- }
420
- this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
421
- }
422
- backOneMonth() {
423
- this.unfocusCell();
424
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
425
- this.monthInFocus = newMonth.month;
426
- this.yearInFocus = newMonth.year;
427
- const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
428
- if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
429
- this.dayInFocus = totalDays;
430
- }
431
- this.updateLiveRegion(`Viewing ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
432
- }
433
- handleTriggeredDate(el) {
434
- this.cellTriggered.emit(el);
435
- // change of input value will trigger the function updating selectedDate
436
- this.closePopup(true);
437
- }
438
- handleSelectedDate() {
439
- //Remove old selection status
440
- if (this.selectedDate) {
441
- this.selectedDate.removeAttribute("aria-selected");
442
- }
443
- //Update selected date to new date inputted/selected
444
- this.selectedDate = this.getCellById(this.selectedYear, this.selectedMonth, this.selectedDay);
445
- if (this.selectedDate) {
446
- this.selectedDate.setAttribute("aria-selected", "true");
447
- }
448
- }
449
- getCellById(year, month, day) {
450
- const id = year + this.zeroPad(month, 2) + this.zeroPad(day, 2);
451
- return this.el.querySelector(`#cell-${id}`);
452
- }
453
- unfocusCell() {
454
- const cellToUnfocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
455
- cellToUnfocus.tabIndex = -1;
456
- }
457
- focusCell() {
458
- //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.
459
- const maxDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
460
- this.dayInFocus = this.dayInFocus > maxDays ? maxDays : this.dayInFocus;
461
- const cellToFocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
462
- if (cellToFocus) {
463
- cellToFocus.tabIndex = 0;
464
- cellToFocus.focus();
465
- }
466
- }
467
- unfocusMonth() {
468
- const monthToUnfocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
469
- monthToUnfocus.tabIndex = -1;
470
- }
471
- focusMonth() {
472
- const monthToFocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
473
- monthToFocus.tabIndex = 0;
474
- monthToFocus.focus();
475
- }
476
- trapFocusLeft(ev) {
477
- if (ev.shiftKey && ev.key === "Tab") {
478
- ev.preventDefault();
479
- this.focusCellInView();
480
- }
481
- }
482
- trapFocusEnd(ev) {
483
- if (!ev.shiftKey && ev.key === "Tab") {
484
- ev.preventDefault();
485
- this.prevButton.focus();
486
- }
487
- }
488
- trapFocusRight(ev) {
489
- if (!ev.shiftKey && ev.key === "Tab") {
490
- ev.preventDefault();
491
- this.focusCellInView();
492
- }
493
- }
494
- focusCellInView() {
495
- if (this.view === "day") {
496
- this.focusCell();
497
- }
498
- else {
499
- this.focusMonth();
500
- }
501
- }
502
- toggleBusyAttribute(state) {
503
- this.el.querySelector("#wm-container").setAttribute("aria-busy", state);
504
- }
505
- setDateValuesForView() {
506
- this.selectedYear = this.date.getUTCFullYear();
507
- this.selectedMonth = this.date.getUTCMonth() + 1;
508
- this.selectedDay = this.date.getUTCDate();
509
- this.monthInFocus = this.selectedMonth;
510
- this.yearInFocus = this.selectedYear;
511
- this.dayInFocus = this.selectedDay;
512
- this.monthNumInFocus = this.selectedMonth - 1;
513
- }
514
- updateLiveRegion(text) {
515
- let liveRegion = this.el.querySelector("#live-region");
516
- liveRegion.innerHTML = text;
517
- }
518
- panelPosition() {
519
- const parentDatepickerEl = this.el.getRootNode().host;
520
- const labelHeight = parentDatepickerEl.shadowRoot.querySelector(".label-wrapper").clientHeight;
521
- this.openUp = shouldOpenUp(parentDatepickerEl, this.popupEl.clientHeight, labelHeight);
522
- if (hasRoomRight(parentDatepickerEl, 336)) {
523
- this.popupEl.style.left = "0";
524
- this.popupEl.style.right = "auto";
525
- }
526
- else {
527
- this.popupEl.style.right = "0";
528
- this.popupEl.style.left = "auto";
529
- }
530
- }
531
- changeView(newView) {
532
- this.view = newView;
533
- //Ensure month view always opens to the month last visited in date view
534
- this.monthNumInFocus = this.monthInFocus - 1;
535
- }
536
- renderMonths(month, index) {
537
- return (h("div", { id: `month-${index}`, class: `month ${this.selectedMonth - 1 === index ? "selected" : ""}`, role: "gridcell", tabindex: index + 1 === this.monthInFocus ? 0 : -1, onKeyDown: (ev) => this.trapFocusEnd(ev), onBlur: (ev) => ev.stopPropagation(), onClick: () => {
538
- this.monthInFocus = index + 1;
539
- this.changeView("day");
540
- } }, month));
541
- }
542
- render() {
543
- const dates = this.getCalendarDates(this.monthInFocus, this.yearInFocus);
544
- return (h("div", { class: "container", id: "wm-container" }, h("button", { disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "date-input", ref: (el) => (this.buttonEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { class: "calendar", title: intl.formatMessage({
545
- id: "date.calendarView",
546
- defaultMessage: "Calendar View",
547
- description: "Calendar button",
548
- }) })), h("div", { class: `popup ${this.view}-view ${this.openUp ? "expand-upwards" : ""}`, id: "popup", ref: (el) => (this.popupEl = el), onClick: () => (this.popupClicked = true), role: "application", "aria-describedby": "application" }, this.view === "day" ? (h("div", { class: "day-view" }, h("div", { class: "calendar-header" }, h("button", { onClick: () => {
549
- this.prevClicked = true;
550
- this.popupClicked = true;
551
- this.backOneMonth();
552
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), ref: (el) => (this.prevButton = el), class: "arw-btn", "aria-label": intl.formatMessage({
553
- id: "date.selectPreviousMonth",
554
- defaultMessage: "Select previous month",
555
- description: "Calendar button",
556
- }) }, h("span", { class: "mdi" }, "\uF141")), h("div", { id: "popup-title-month", class: "title-box", tabindex: 0, role: "button", onKeyDown: (ev) => {
557
- if (ev.key === "Enter" || ev.key === " ") {
558
- ev.preventDefault();
559
- this.changeView("month");
560
- }
561
- }, onClick: this.changeView.bind(this, "month"), "aria-label": `${intl.formatMessage({
562
- id: "date.currentMonth",
563
- defaultMessage: "current month",
564
- description: "Calendar button",
565
- })}: ${this.calendar_months[this.monthInFocus - 1]}
566
- ${this.yearInFocus}.`, "aria-describedby": "month-title" }, h("span", { class: "title", "aria-hidden": "true" }, this.calendar_months[this.monthInFocus - 1], " ", this.yearInFocus)), h("button", { onClick: () => {
567
- this.nextClicked = true;
568
- this.popupClicked = true;
569
- this.forwardOneMonth();
570
- }, onKeyDown: (ev) => this.trapFocusRight(ev), "aria-label": intl.formatMessage({
571
- id: "date.selectNextMonth",
572
- defaultMessage: "Select next month",
573
- description: "Calendar button",
574
- }), ref: (el) => (this.nextButton = el), class: "arw-btn" }, h("span", { class: "mdi" }, "\uF142"))), h("div", { "aria-labelledby": "popup-title-month", role: "grid", class: "date-grid" }, h("div", { role: "rowgroup", class: "date-header" }, h("div", { role: "row", class: "header-row" }, h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
575
- id: "date.su",
576
- defaultMessage: "Su",
577
- description: "Abbreviated day of the week",
578
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
579
- id: "date.mo",
580
- defaultMessage: "Mo",
581
- description: "Abbreviated day of the week",
582
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
583
- id: "date.tu",
584
- defaultMessage: "Tu",
585
- description: "Abbreviated day of the week",
586
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
587
- id: "date.we",
588
- defaultMessage: "We",
589
- description: "Abbreviated day of the week",
590
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
591
- id: "date.th",
592
- defaultMessage: "Th",
593
- description: "Abbreviated day of the week",
594
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
595
- id: "date.fr",
596
- defaultMessage: "Fr",
597
- description: "Abbreviated day of the week",
598
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
599
- id: "date.sa",
600
- defaultMessage: "Sa",
601
- description: "Abbreviated day of the week",
602
- }))))), h("div", { role: "rowgroup" }, h("div", { role: "row", class: "date-row" }, dates.slice(0, 7).map((date, i) => this.renderCalendarDate(date, i))), h("div", { role: "row" }, dates.slice(7, 14).map((date, i) => this.renderCalendarDate(date, i))), h("div", { role: "row" }, dates.slice(14, 21).map((date, i) => this.renderCalendarDate(date, i))), h("div", { role: "row" }, dates.slice(21, 28).map((date, i) => this.renderCalendarDate(date, i))), h("div", { role: "row" }, dates.slice(28, 35).map((date, i) => this.renderCalendarDate(date, i))), dates.length > 35 ? (h("div", { role: "row" }, dates.slice(35).map((date, i) => this.renderCalendarDate(date, i)))) : (""))))) : (h("div", { class: "month-view" }, h("div", { class: "calendar-header" }, h("button", { onClick: () => {
603
- this.prevClicked = true;
604
- this.popupClicked = true;
605
- this.yearInFocus -= 1;
606
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
607
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), "aria-label": intl.formatMessage({
608
- id: "date.selectPreviousYear",
609
- defaultMessage: "Select previous year",
610
- description: "Calendar button",
611
- }), ref: (el) => (this.prevButton = el), class: "arw-btn" }, h("span", { class: "mdi" }, "\uF141")), h("div", { id: "popup-title-year", tabindex: 0, class: "title-box year", role: "button", onClick: this.changeView.bind(this, "day"), onKeyDown: (ev) => {
612
- if (ev.key === "Enter" || ev.key === " ") {
613
- ev.preventDefault();
614
- this.changeView("day");
615
- }
616
- }, "aria-labelledby": "year-title" }, h("span", { class: "title" }, this.yearInFocus)), h("button", { onClick: () => {
617
- this.nextClicked = true;
618
- this.popupClicked = true;
619
- this.yearInFocus += 1;
620
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
621
- }, "aria-label": intl.formatMessage({
622
- id: "date.selectNextYear",
623
- defaultMessage: "Select next year",
624
- description: "Calendar button",
625
- }), onKeyDown: (ev) => this.trapFocusRight(ev), ref: (el) => (this.nextButton = el), class: "arw-btn" }, h("span", { class: "mdi" }, "\uF142"))), h("div", { "aria-labelledby": "popup-title-year", role: "grid", class: "months" }, h("div", { role: "row", class: "month-row" }, this.calendar_months
626
- .slice(0, 3)
627
- .map((month, index) => this.renderMonths(month, index))), h("div", { role: "row", class: "month-row" }, this.calendar_months
628
- .slice(3, 6)
629
- .map((month, index) => this.renderMonths(month, index + 3))), h("div", { role: "row", class: "month-row" }, this.calendar_months
630
- .slice(6, 9)
631
- .map((month, index) => this.renderMonths(month, index + 6))), h("div", { role: "row", class: "month-row" }, this.calendar_months
632
- .slice(9)
633
- .map((month, index) => this.renderMonths(month, index + 9))))))), this.isExpanded && h("div", { id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { id: "month-title", class: "sr-only" }, intl.formatMessage({
634
- id: "date.selectMonth",
635
- defaultMessage: "Activate to select a month.",
636
- description: "Calendar button",
637
- })), h("div", { id: "year-title", class: "sr-only" }, intl.formatMessage({
638
- id: "date.selectYear",
639
- defaultMessage: "Activate to select a year.",
640
- description: "Calendar button",
641
- })), h("div", { id: "application", class: "sr-only" }, intl.formatMessage({
642
- id: "date.instructions",
643
- defaultMessage: "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.",
644
- }))));
645
- }
646
- get el() { return getElement(this); }
647
- };
648
- PrivDatepicker.style = privDatepickerCss;
649
-
650
- export { PrivDatepicker as priv_datepicker };