@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,654 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-f8ef86de.js');
6
- const functions = require('./functions-48a748f0.js');
7
-
8
- 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}";
9
-
10
- const PrivDatepicker = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.cellTriggered = index.createEvent(this, "cellTriggered", 7);
14
- this.toggleButtonClicked = index.createEvent(this, "toggleButtonClicked", 7);
15
- this.popupClosed = index.createEvent(this, "popupClosed", 7);
16
- this.popupBlurred = index.createEvent(this, "popupBlurred", 7);
17
- this.popupClicked = true;
18
- this.buttonClicked = true;
19
- this.prevClicked = true;
20
- this.nextClicked = true;
21
- this.openUp = false;
22
- this.calendar_months = [
23
- functions.intl.formatMessage({
24
- id: "date.january",
25
- defaultMessage: "January",
26
- description: "Month of the year",
27
- }),
28
- functions.intl.formatMessage({
29
- id: "date.february",
30
- defaultMessage: "February",
31
- description: "Month of the year",
32
- }),
33
- functions.intl.formatMessage({
34
- id: "date.march",
35
- defaultMessage: "March",
36
- description: "Month of the year",
37
- }),
38
- functions.intl.formatMessage({
39
- id: "date.april",
40
- defaultMessage: "April",
41
- description: "Month of the year",
42
- }),
43
- functions.intl.formatMessage({
44
- id: "date.may",
45
- defaultMessage: "May",
46
- description: "Month of the year",
47
- }),
48
- functions.intl.formatMessage({
49
- id: "date.june",
50
- defaultMessage: "June",
51
- description: "Month of the year",
52
- }),
53
- functions.intl.formatMessage({
54
- id: "date.july",
55
- defaultMessage: "July",
56
- description: "Month of the year",
57
- }),
58
- functions.intl.formatMessage({
59
- id: "date.august",
60
- defaultMessage: "August",
61
- description: "Month of the year",
62
- }),
63
- functions.intl.formatMessage({
64
- id: "date.september",
65
- defaultMessage: "September",
66
- description: "Month of the year",
67
- }),
68
- functions.intl.formatMessage({
69
- id: "date.october",
70
- defaultMessage: "October",
71
- description: "Month of the year",
72
- }),
73
- functions.intl.formatMessage({
74
- id: "date.november",
75
- defaultMessage: "November",
76
- description: "Month of the year",
77
- }),
78
- functions.intl.formatMessage({
79
- id: "date.december",
80
- defaultMessage: "December",
81
- description: "Month of the year",
82
- }),
83
- ];
84
- this.weekdays = [
85
- functions.intl.formatMessage({ id: "date.sunday", defaultMessage: "Sunday" }),
86
- functions.intl.formatMessage({ id: "date.monday", defaultMessage: "Monday" }),
87
- functions.intl.formatMessage({ id: "date.tuesday", defaultMessage: "Tuesday" }),
88
- functions.intl.formatMessage({ id: "date.wednesday", defaultMessage: "Wednesday" }),
89
- functions.intl.formatMessage({ id: "date.thursday", defaultMessage: "Thursday" }),
90
- functions.intl.formatMessage({ id: "date.friday", defaultMessage: "Friday" }),
91
- functions.intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
92
- ];
93
- this.renderCalendarDate = (date, index$1) => {
94
- let monthOfDate = this.removeZeroes(String(date[1]));
95
- let dayOfDate = this.removeZeroes(String(date[2]));
96
- let isThisMonth = monthOfDate === this.monthInFocus ? "current-month" : "";
97
- const dateId = date[0] + date[1] + date[2];
98
- const isToday = this.isDateToday(date);
99
- return (index.h("div", { role: "gridcell", id: `cell-${dateId}`, class: `date-cell ${isThisMonth}`, "aria-selected": false, "aria-label": `${isToday
100
- ? `${functions.intl.formatMessage({
101
- id: "date.today",
102
- defaultMessage: "today",
103
- description: "calendar button",
104
- })}, `
105
- : ""}${this.weekdays[index$1]}, ${this.calendar_months[monthOfDate - 1]} ${dayOfDate}, ${date[0]}`, onClick: (ev) => {
106
- this.handleTriggeredDate(ev.target);
107
- }, onKeyDown: (ev) => this.trapFocusEnd(ev), "data-month": date[1], "data-year": date[0], onBlur: (ev) => ev.stopPropagation(), tabIndex: -1 }, dayOfDate));
108
- };
109
- this.disabled = false;
110
- this.isExpanded = false;
111
- this.view = "day";
112
- this.date = new Date();
113
- this.selectedYear = this.date.getUTCFullYear();
114
- this.selectedMonth = this.date.getUTCMonth() + 1;
115
- this.selectedDay = this.date.getUTCDate();
116
- this.monthInFocus = this.selectedMonth;
117
- this.yearInFocus = this.selectedYear;
118
- this.dayInFocus = this.selectedDay;
119
- this.monthNumInFocus = this.selectedMonth;
120
- }
121
- handleKey(ev) {
122
- this.prevClicked = false;
123
- this.nextClicked = false;
124
- switch (ev.key) {
125
- case "Enter":
126
- ev.preventDefault();
127
- //Clunky exception for blur validation. Remove when blur reworked.
128
- !ev.target.id.includes("popup-title") && ev.target.click();
129
- break;
130
- case "Escape":
131
- ev.preventDefault();
132
- if (this.isExpanded) {
133
- ev.stopPropagation(); // prevents closing of parent modal
134
- this.closePopup(true);
135
- }
136
- break;
137
- case "PageUp":
138
- ev.preventDefault();
139
- this.backOneMonth();
140
- break;
141
- case "PageDown":
142
- ev.preventDefault();
143
- this.forwardOneMonth();
144
- break;
145
- case "Home":
146
- ev.preventDefault();
147
- this.unfocusCell();
148
- this.dayInFocus = 1;
149
- index.forceUpdate(this.el);
150
- break;
151
- case "End":
152
- ev.preventDefault();
153
- this.unfocusCell();
154
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
155
- index.forceUpdate(this.el);
156
- break;
157
- case "ArrowLeft":
158
- ev.preventDefault();
159
- if (this.view === "day") {
160
- this.unfocusCell();
161
- if (this.dayInFocus === 1) {
162
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
163
- this.monthInFocus = newMonth.month;
164
- this.yearInFocus = newMonth.year;
165
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
166
- }
167
- else {
168
- this.dayInFocus -= 1;
169
- }
170
- }
171
- else {
172
- this.unfocusMonth();
173
- if (this.monthNumInFocus === 0) {
174
- this.monthNumInFocus = 11;
175
- }
176
- else {
177
- this.monthNumInFocus -= 1;
178
- }
179
- }
180
- break;
181
- case "ArrowRight":
182
- ev.preventDefault();
183
- if (this.view === "day") {
184
- this.unfocusCell();
185
- if (this.dayInFocus === this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
186
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
187
- this.monthInFocus = newMonth.month;
188
- this.yearInFocus = newMonth.year;
189
- this.dayInFocus = 1;
190
- }
191
- else {
192
- this.dayInFocus += 1;
193
- }
194
- }
195
- else {
196
- this.unfocusMonth();
197
- if (this.monthNumInFocus === 11) {
198
- this.monthNumInFocus = 0;
199
- }
200
- else {
201
- this.monthNumInFocus += 1;
202
- }
203
- }
204
- break;
205
- case "ArrowUp":
206
- ev.preventDefault();
207
- if (this.view === "day") {
208
- this.unfocusCell();
209
- if (this.dayInFocus < 8) {
210
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
211
- this.monthInFocus = newMonth.month;
212
- this.yearInFocus = newMonth.year;
213
- const numDaysToSubtract = 7 - this.dayInFocus;
214
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus) - numDaysToSubtract;
215
- }
216
- else {
217
- this.dayInFocus -= 7;
218
- }
219
- }
220
- else {
221
- this.unfocusMonth();
222
- if (this.monthNumInFocus < 3) {
223
- this.monthNumInFocus += 9;
224
- }
225
- else {
226
- this.monthNumInFocus -= 3;
227
- }
228
- }
229
- break;
230
- case "ArrowDown":
231
- ev.preventDefault();
232
- if (!this.isExpanded) {
233
- this.openPopup();
234
- }
235
- else {
236
- if (this.view === "day") {
237
- //If the down arrow is pressed from the month button or the arrow buttons, focus should shift to the current cell in focus
238
- if (!(document.activeElement.shadowRoot || document).activeElement.classList.contains("date-cell")) {
239
- this.focusCell();
240
- break;
241
- }
242
- this.unfocusCell();
243
- const changeoverDate = this.getMonthDays(this.monthInFocus, this.yearInFocus) - 7;
244
- if (this.dayInFocus > changeoverDate) {
245
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
246
- this.monthInFocus = newMonth.month;
247
- this.yearInFocus = newMonth.year;
248
- this.dayInFocus = this.dayInFocus - changeoverDate;
249
- }
250
- else {
251
- this.dayInFocus += 7;
252
- }
253
- }
254
- else {
255
- //If the down arrow is pressed from the arrow buttons or the title box, focus should shift to the current month in focus
256
- const activeEl = (document.activeElement.shadowRoot || document).activeElement;
257
- if (activeEl.tagName === "BUTTON" || activeEl.id.includes("popup-title-year")) {
258
- this.focusMonth();
259
- break;
260
- }
261
- this.unfocusMonth();
262
- if (this.monthNumInFocus > 8) {
263
- this.monthNumInFocus -= 9;
264
- }
265
- else {
266
- this.monthNumInFocus += 3;
267
- }
268
- }
269
- }
270
- break;
271
- }
272
- }
273
- blurHandler(ev) {
274
- if (!this.popupClicked && !this.buttonClicked && this.isExpanded) {
275
- this.closePopup();
276
- // in this case, the PointerEvent target is identical to the blur events relatedTarget, and is passed on as such
277
- this.popupBlurred.emit({ relatedTarget: ev.target });
278
- }
279
- this.popupClicked = false;
280
- this.buttonClicked = false;
281
- }
282
- handleBlurOnWindow(ev) {
283
- // for cases where the user clicks or uses a shortcut to leave the document
284
- if (this.isExpanded) {
285
- this.closePopup();
286
- this.popupBlurred.emit({ relatedTarget: ev.target });
287
- }
288
- }
289
- componentDidUpdate() {
290
- this.handleSelectedDate();
291
- if (this.isExpanded) {
292
- this.prevClicked
293
- ? this.prevButton.focus()
294
- : this.nextClicked
295
- ? this.nextButton.focus()
296
- : this.view === "day"
297
- ? this.focusCell()
298
- : this.focusMonth();
299
- }
300
- }
301
- componentDidLoad() {
302
- this.handleSelectedDate();
303
- }
304
- zeroPad(value, length) {
305
- if (!String.prototype.padStart) {
306
- String.prototype.padStart = function padStart(targetLength, padString) {
307
- targetLength = targetLength - this.length;
308
- if (targetLength > padString.length) {
309
- padString += padString.repeat(targetLength / padString.length);
310
- }
311
- return padString.slice(0, targetLength) + String(this);
312
- };
313
- }
314
- return `${value.toString()}`.padStart(length, "0");
315
- }
316
- removeZeroes(date) {
317
- return +date < 10 ? +date.slice(1) : +date;
318
- }
319
- isDateToday(date) {
320
- const today = new Date();
321
- const todayDateArray = [
322
- today.getFullYear().toString(),
323
- (today.getMonth() + 1).toString(),
324
- today.getDate().toString(),
325
- ];
326
- //Compare today's date to date and return true if they match
327
- return todayDateArray.reduce((result, val, index) => result && this.removeZeroes(date[index]).toString() === val, true);
328
- }
329
- togglePopup() {
330
- this.isExpanded ? this.closePopup() : this.openPopup();
331
- this.buttonClicked = true;
332
- }
333
- closePopup(returnFocus = false) {
334
- this.isExpanded = false;
335
- this.popupEl.classList.remove("open");
336
- window.setTimeout(() => {
337
- //not using display none in order to get measurements of the popup while hidden
338
- this.popupEl.style.visibility = "hidden";
339
- }, 250);
340
- //Reset values so that menu reopens to day view with selected date in focus
341
- if (this.view === "day") {
342
- this.unfocusCell();
343
- }
344
- this.monthInFocus = this.selectedMonth;
345
- this.yearInFocus = this.selectedYear;
346
- this.dayInFocus = this.selectedDay;
347
- this.changeView("day");
348
- if (returnFocus) {
349
- this.buttonEl.focus();
350
- }
351
- }
352
- openPopup() {
353
- this.panelPosition();
354
- this.setDateValuesForView();
355
- this.prevClicked = false;
356
- this.nextClicked = false;
357
- this.popupEl.style.visibility = "visible";
358
- window.requestAnimationFrame(() => {
359
- this.popupEl.classList.add("open");
360
- });
361
- this.isExpanded = true;
362
- this.focusCell();
363
- }
364
- getMonthDays(month, year) {
365
- const months30 = [4, 6, 9, 11];
366
- const leapYear = year % 4 === 0;
367
- return month === 2 ? (leapYear ? 29 : 28) : months30.includes(month) ? 30 : 31;
368
- }
369
- // 1 => Sunday, 7 => Saturday
370
- getMonthFirstDay(month, year) {
371
- return +new Date(year, month - 1, 1, 12, 0, 0).getDay() + 1;
372
- }
373
- getPreviousMonth(month, year) {
374
- const prevMonth = month > 1 ? month - 1 : 12;
375
- const prevMonthYear = month > 1 ? year : year - 1;
376
- return { month: prevMonth, year: prevMonthYear };
377
- }
378
- getNextMonth(month, year) {
379
- const nextMonth = month < 12 ? month + 1 : 1;
380
- const nextMonthYear = month < 12 ? year : year + 1;
381
- return { month: nextMonth, year: nextMonthYear };
382
- }
383
- getCalendarDates(month, year) {
384
- // Get number of days in the month and the month's first day
385
- const monthDays = this.getMonthDays(month, year);
386
- const monthFirstDay = this.getMonthFirstDay(month, year);
387
- // Get number of days to be displayed from previous and next months
388
- // These ensure a total of 42 days (6 weeks) displayed on the calendar
389
- const daysFromPrevMonth = monthFirstDay - 1;
390
- let daysFromNextMonth = 42 - (daysFromPrevMonth + monthDays);
391
- daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;
392
- // Get the previous and next months and years
393
- const { month: prevMonth, year: prevMonthYear } = this.getPreviousMonth(month, year);
394
- const { month: nextMonth, year: nextMonthYear } = this.getNextMonth(month, year);
395
- // Get number of days in previous month
396
- const prevMonthDays = this.getMonthDays(prevMonth, prevMonthYear);
397
- // 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.
398
- const prevMonthDates = [...new Array(daysFromPrevMonth).fill("1")].map((_, index) => {
399
- const day = index + 1 + (prevMonthDays - daysFromPrevMonth);
400
- return [prevMonthYear.toString(), this.zeroPad(prevMonth, 2), this.zeroPad(day, 2)];
401
- });
402
- // 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.
403
- const thisMonthDates = [...new Array(monthDays).fill("1")].map((_, index) => {
404
- const day = index + 1;
405
- return [year.toString(), this.zeroPad(month, 2), this.zeroPad(day, 2)];
406
- });
407
- // 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.
408
- const nextMonthDates = [...new Array(daysFromNextMonth).fill("1")].map((_, index) => {
409
- const day = index + 1;
410
- return [nextMonthYear.toString(), this.zeroPad(nextMonth, 2), this.zeroPad(day, 2)];
411
- });
412
- // Combines all dates from previous, current and next months
413
- return [...prevMonthDates, ...thisMonthDates, ...nextMonthDates];
414
- }
415
- forwardOneMonth() {
416
- this.unfocusCell();
417
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
418
- this.monthInFocus = newMonth.month;
419
- this.yearInFocus = newMonth.year;
420
- const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
421
- if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
422
- this.dayInFocus = totalDays;
423
- }
424
- this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
425
- }
426
- backOneMonth() {
427
- this.unfocusCell();
428
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
429
- this.monthInFocus = newMonth.month;
430
- this.yearInFocus = newMonth.year;
431
- const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
432
- if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
433
- this.dayInFocus = totalDays;
434
- }
435
- this.updateLiveRegion(`Viewing ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
436
- }
437
- handleTriggeredDate(el) {
438
- this.cellTriggered.emit(el);
439
- // change of input value will trigger the function updating selectedDate
440
- this.closePopup(true);
441
- }
442
- handleSelectedDate() {
443
- //Remove old selection status
444
- if (this.selectedDate) {
445
- this.selectedDate.removeAttribute("aria-selected");
446
- }
447
- //Update selected date to new date inputted/selected
448
- this.selectedDate = this.getCellById(this.selectedYear, this.selectedMonth, this.selectedDay);
449
- if (this.selectedDate) {
450
- this.selectedDate.setAttribute("aria-selected", "true");
451
- }
452
- }
453
- getCellById(year, month, day) {
454
- const id = year + this.zeroPad(month, 2) + this.zeroPad(day, 2);
455
- return this.el.querySelector(`#cell-${id}`);
456
- }
457
- unfocusCell() {
458
- const cellToUnfocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
459
- cellToUnfocus.tabIndex = -1;
460
- }
461
- focusCell() {
462
- //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.
463
- const maxDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
464
- this.dayInFocus = this.dayInFocus > maxDays ? maxDays : this.dayInFocus;
465
- const cellToFocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
466
- if (cellToFocus) {
467
- cellToFocus.tabIndex = 0;
468
- cellToFocus.focus();
469
- }
470
- }
471
- unfocusMonth() {
472
- const monthToUnfocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
473
- monthToUnfocus.tabIndex = -1;
474
- }
475
- focusMonth() {
476
- const monthToFocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
477
- monthToFocus.tabIndex = 0;
478
- monthToFocus.focus();
479
- }
480
- trapFocusLeft(ev) {
481
- if (ev.shiftKey && ev.key === "Tab") {
482
- ev.preventDefault();
483
- this.focusCellInView();
484
- }
485
- }
486
- trapFocusEnd(ev) {
487
- if (!ev.shiftKey && ev.key === "Tab") {
488
- ev.preventDefault();
489
- this.prevButton.focus();
490
- }
491
- }
492
- trapFocusRight(ev) {
493
- if (!ev.shiftKey && ev.key === "Tab") {
494
- ev.preventDefault();
495
- this.focusCellInView();
496
- }
497
- }
498
- focusCellInView() {
499
- if (this.view === "day") {
500
- this.focusCell();
501
- }
502
- else {
503
- this.focusMonth();
504
- }
505
- }
506
- toggleBusyAttribute(state) {
507
- this.el.querySelector("#wm-container").setAttribute("aria-busy", state);
508
- }
509
- setDateValuesForView() {
510
- this.selectedYear = this.date.getUTCFullYear();
511
- this.selectedMonth = this.date.getUTCMonth() + 1;
512
- this.selectedDay = this.date.getUTCDate();
513
- this.monthInFocus = this.selectedMonth;
514
- this.yearInFocus = this.selectedYear;
515
- this.dayInFocus = this.selectedDay;
516
- this.monthNumInFocus = this.selectedMonth - 1;
517
- }
518
- updateLiveRegion(text) {
519
- let liveRegion = this.el.querySelector("#live-region");
520
- liveRegion.innerHTML = text;
521
- }
522
- panelPosition() {
523
- const parentDatepickerEl = this.el.getRootNode().host;
524
- const labelHeight = parentDatepickerEl.shadowRoot.querySelector(".label-wrapper").clientHeight;
525
- this.openUp = functions.shouldOpenUp(parentDatepickerEl, this.popupEl.clientHeight, labelHeight);
526
- if (functions.hasRoomRight(parentDatepickerEl, 336)) {
527
- this.popupEl.style.left = "0";
528
- this.popupEl.style.right = "auto";
529
- }
530
- else {
531
- this.popupEl.style.right = "0";
532
- this.popupEl.style.left = "auto";
533
- }
534
- }
535
- changeView(newView) {
536
- this.view = newView;
537
- //Ensure month view always opens to the month last visited in date view
538
- this.monthNumInFocus = this.monthInFocus - 1;
539
- }
540
- renderMonths(month, index$1) {
541
- return (index.h("div", { id: `month-${index$1}`, class: `month ${this.selectedMonth - 1 === index$1 ? "selected" : ""}`, role: "gridcell", tabindex: index$1 + 1 === this.monthInFocus ? 0 : -1, onKeyDown: (ev) => this.trapFocusEnd(ev), onBlur: (ev) => ev.stopPropagation(), onClick: () => {
542
- this.monthInFocus = index$1 + 1;
543
- this.changeView("day");
544
- } }, month));
545
- }
546
- render() {
547
- const dates = this.getCalendarDates(this.monthInFocus, this.yearInFocus);
548
- return (index.h("div", { class: "container", id: "wm-container" }, index.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" }, index.h("span", { class: "calendar", title: functions.intl.formatMessage({
549
- id: "date.calendarView",
550
- defaultMessage: "Calendar View",
551
- description: "Calendar button",
552
- }) })), index.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" ? (index.h("div", { class: "day-view" }, index.h("div", { class: "calendar-header" }, index.h("button", { onClick: () => {
553
- this.prevClicked = true;
554
- this.popupClicked = true;
555
- this.backOneMonth();
556
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), ref: (el) => (this.prevButton = el), class: "arw-btn", "aria-label": functions.intl.formatMessage({
557
- id: "date.selectPreviousMonth",
558
- defaultMessage: "Select previous month",
559
- description: "Calendar button",
560
- }) }, index.h("span", { class: "mdi" }, "\uF141")), index.h("div", { id: "popup-title-month", class: "title-box", tabindex: 0, role: "button", onKeyDown: (ev) => {
561
- if (ev.key === "Enter" || ev.key === " ") {
562
- ev.preventDefault();
563
- this.changeView("month");
564
- }
565
- }, onClick: this.changeView.bind(this, "month"), "aria-label": `${functions.intl.formatMessage({
566
- id: "date.currentMonth",
567
- defaultMessage: "current month",
568
- description: "Calendar button",
569
- })}: ${this.calendar_months[this.monthInFocus - 1]}
570
- ${this.yearInFocus}.`, "aria-describedby": "month-title" }, index.h("span", { class: "title", "aria-hidden": "true" }, this.calendar_months[this.monthInFocus - 1], " ", this.yearInFocus)), index.h("button", { onClick: () => {
571
- this.nextClicked = true;
572
- this.popupClicked = true;
573
- this.forwardOneMonth();
574
- }, onKeyDown: (ev) => this.trapFocusRight(ev), "aria-label": functions.intl.formatMessage({
575
- id: "date.selectNextMonth",
576
- defaultMessage: "Select next month",
577
- description: "Calendar button",
578
- }), ref: (el) => (this.nextButton = el), class: "arw-btn" }, index.h("span", { class: "mdi" }, "\uF142"))), index.h("div", { "aria-labelledby": "popup-title-month", role: "grid", class: "date-grid" }, index.h("div", { role: "rowgroup", class: "date-header" }, index.h("div", { role: "row", class: "header-row" }, index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
579
- id: "date.su",
580
- defaultMessage: "Su",
581
- description: "Abbreviated day of the week",
582
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
583
- id: "date.mo",
584
- defaultMessage: "Mo",
585
- description: "Abbreviated day of the week",
586
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
587
- id: "date.tu",
588
- defaultMessage: "Tu",
589
- description: "Abbreviated day of the week",
590
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
591
- id: "date.we",
592
- defaultMessage: "We",
593
- description: "Abbreviated day of the week",
594
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
595
- id: "date.th",
596
- defaultMessage: "Th",
597
- description: "Abbreviated day of the week",
598
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
599
- id: "date.fr",
600
- defaultMessage: "Fr",
601
- description: "Abbreviated day of the week",
602
- }))), index.h("div", { role: "columnheader", class: "header-cell" }, index.h("span", null, functions.intl.formatMessage({
603
- id: "date.sa",
604
- defaultMessage: "Sa",
605
- description: "Abbreviated day of the week",
606
- }))))), index.h("div", { role: "rowgroup" }, index.h("div", { role: "row", class: "date-row" }, dates.slice(0, 7).map((date, i) => this.renderCalendarDate(date, i))), index.h("div", { role: "row" }, dates.slice(7, 14).map((date, i) => this.renderCalendarDate(date, i))), index.h("div", { role: "row" }, dates.slice(14, 21).map((date, i) => this.renderCalendarDate(date, i))), index.h("div", { role: "row" }, dates.slice(21, 28).map((date, i) => this.renderCalendarDate(date, i))), index.h("div", { role: "row" }, dates.slice(28, 35).map((date, i) => this.renderCalendarDate(date, i))), dates.length > 35 ? (index.h("div", { role: "row" }, dates.slice(35).map((date, i) => this.renderCalendarDate(date, i)))) : (""))))) : (index.h("div", { class: "month-view" }, index.h("div", { class: "calendar-header" }, index.h("button", { onClick: () => {
607
- this.prevClicked = true;
608
- this.popupClicked = true;
609
- this.yearInFocus -= 1;
610
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
611
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), "aria-label": functions.intl.formatMessage({
612
- id: "date.selectPreviousYear",
613
- defaultMessage: "Select previous year",
614
- description: "Calendar button",
615
- }), ref: (el) => (this.prevButton = el), class: "arw-btn" }, index.h("span", { class: "mdi" }, "\uF141")), index.h("div", { id: "popup-title-year", tabindex: 0, class: "title-box year", role: "button", onClick: this.changeView.bind(this, "day"), onKeyDown: (ev) => {
616
- if (ev.key === "Enter" || ev.key === " ") {
617
- ev.preventDefault();
618
- this.changeView("day");
619
- }
620
- }, "aria-labelledby": "year-title" }, index.h("span", { class: "title" }, this.yearInFocus)), index.h("button", { onClick: () => {
621
- this.nextClicked = true;
622
- this.popupClicked = true;
623
- this.yearInFocus += 1;
624
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
625
- }, "aria-label": functions.intl.formatMessage({
626
- id: "date.selectNextYear",
627
- defaultMessage: "Select next year",
628
- description: "Calendar button",
629
- }), onKeyDown: (ev) => this.trapFocusRight(ev), ref: (el) => (this.nextButton = el), class: "arw-btn" }, index.h("span", { class: "mdi" }, "\uF142"))), index.h("div", { "aria-labelledby": "popup-title-year", role: "grid", class: "months" }, index.h("div", { role: "row", class: "month-row" }, this.calendar_months
630
- .slice(0, 3)
631
- .map((month, index) => this.renderMonths(month, index))), index.h("div", { role: "row", class: "month-row" }, this.calendar_months
632
- .slice(3, 6)
633
- .map((month, index) => this.renderMonths(month, index + 3))), index.h("div", { role: "row", class: "month-row" }, this.calendar_months
634
- .slice(6, 9)
635
- .map((month, index) => this.renderMonths(month, index + 6))), index.h("div", { role: "row", class: "month-row" }, this.calendar_months
636
- .slice(9)
637
- .map((month, index) => this.renderMonths(month, index + 9))))))), this.isExpanded && index.h("div", { id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), index.h("div", { id: "month-title", class: "sr-only" }, functions.intl.formatMessage({
638
- id: "date.selectMonth",
639
- defaultMessage: "Activate to select a month.",
640
- description: "Calendar button",
641
- })), index.h("div", { id: "year-title", class: "sr-only" }, functions.intl.formatMessage({
642
- id: "date.selectYear",
643
- defaultMessage: "Activate to select a year.",
644
- description: "Calendar button",
645
- })), index.h("div", { id: "application", class: "sr-only" }, functions.intl.formatMessage({
646
- id: "date.instructions",
647
- 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.",
648
- }))));
649
- }
650
- get el() { return index.getElement(this); }
651
- };
652
- PrivDatepicker.style = privDatepickerCss;
653
-
654
- exports.priv_datepicker = PrivDatepicker;