@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,942 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import { forceUpdate } from "@stencil/core";
3
- import { intl, hasRoomRight, shouldOpenUp } from "../../../global/functions";
4
- export class PrivDatepicker {
5
- constructor() {
6
- this.popupClicked = true;
7
- this.buttonClicked = true;
8
- this.prevClicked = true;
9
- this.nextClicked = true;
10
- this.openUp = false;
11
- this.calendar_months = [
12
- intl.formatMessage({
13
- id: "date.january",
14
- defaultMessage: "January",
15
- description: "Month of the year",
16
- }),
17
- intl.formatMessage({
18
- id: "date.february",
19
- defaultMessage: "February",
20
- description: "Month of the year",
21
- }),
22
- intl.formatMessage({
23
- id: "date.march",
24
- defaultMessage: "March",
25
- description: "Month of the year",
26
- }),
27
- intl.formatMessage({
28
- id: "date.april",
29
- defaultMessage: "April",
30
- description: "Month of the year",
31
- }),
32
- intl.formatMessage({
33
- id: "date.may",
34
- defaultMessage: "May",
35
- description: "Month of the year",
36
- }),
37
- intl.formatMessage({
38
- id: "date.june",
39
- defaultMessage: "June",
40
- description: "Month of the year",
41
- }),
42
- intl.formatMessage({
43
- id: "date.july",
44
- defaultMessage: "July",
45
- description: "Month of the year",
46
- }),
47
- intl.formatMessage({
48
- id: "date.august",
49
- defaultMessage: "August",
50
- description: "Month of the year",
51
- }),
52
- intl.formatMessage({
53
- id: "date.september",
54
- defaultMessage: "September",
55
- description: "Month of the year",
56
- }),
57
- intl.formatMessage({
58
- id: "date.october",
59
- defaultMessage: "October",
60
- description: "Month of the year",
61
- }),
62
- intl.formatMessage({
63
- id: "date.november",
64
- defaultMessage: "November",
65
- description: "Month of the year",
66
- }),
67
- intl.formatMessage({
68
- id: "date.december",
69
- defaultMessage: "December",
70
- description: "Month of the year",
71
- }),
72
- ];
73
- this.weekdays = [
74
- intl.formatMessage({ id: "date.sunday", defaultMessage: "Sunday" }),
75
- intl.formatMessage({ id: "date.monday", defaultMessage: "Monday" }),
76
- intl.formatMessage({ id: "date.tuesday", defaultMessage: "Tuesday" }),
77
- intl.formatMessage({ id: "date.wednesday", defaultMessage: "Wednesday" }),
78
- intl.formatMessage({ id: "date.thursday", defaultMessage: "Thursday" }),
79
- intl.formatMessage({ id: "date.friday", defaultMessage: "Friday" }),
80
- intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
81
- ];
82
- this.renderCalendarDate = (date, index) => {
83
- let monthOfDate = this.removeZeroes(String(date[1]));
84
- let dayOfDate = this.removeZeroes(String(date[2]));
85
- let isThisMonth = monthOfDate === this.monthInFocus ? "current-month" : "";
86
- const dateId = date[0] + date[1] + date[2];
87
- const isToday = this.isDateToday(date);
88
- return (h("div", { role: "gridcell", id: `cell-${dateId}`, class: `date-cell ${isThisMonth}`, "aria-selected": false, "aria-label": `${isToday
89
- ? `${intl.formatMessage({
90
- id: "date.today",
91
- defaultMessage: "today",
92
- description: "calendar button",
93
- })}, `
94
- : ""}${this.weekdays[index]}, ${this.calendar_months[monthOfDate - 1]} ${dayOfDate}, ${date[0]}`, onClick: (ev) => {
95
- this.handleTriggeredDate(ev.target);
96
- }, onKeyDown: (ev) => this.trapFocusEnd(ev), "data-month": date[1], "data-year": date[0], onBlur: (ev) => ev.stopPropagation(), tabIndex: -1 }, dayOfDate));
97
- };
98
- this.disabled = false;
99
- this.isExpanded = false;
100
- this.view = "day";
101
- this.date = new Date();
102
- this.selectedYear = this.date.getUTCFullYear();
103
- this.selectedMonth = this.date.getUTCMonth() + 1;
104
- this.selectedDay = this.date.getUTCDate();
105
- this.monthInFocus = this.selectedMonth;
106
- this.yearInFocus = this.selectedYear;
107
- this.dayInFocus = this.selectedDay;
108
- this.monthNumInFocus = this.selectedMonth;
109
- }
110
- handleKey(ev) {
111
- this.prevClicked = false;
112
- this.nextClicked = false;
113
- switch (ev.key) {
114
- case "Enter":
115
- ev.preventDefault();
116
- //Clunky exception for blur validation. Remove when blur reworked.
117
- !ev.target.id.includes("popup-title") && ev.target.click();
118
- break;
119
- case "Escape":
120
- ev.preventDefault();
121
- if (this.isExpanded) {
122
- ev.stopPropagation(); // prevents closing of parent modal
123
- this.closePopup(true);
124
- }
125
- break;
126
- case "PageUp":
127
- ev.preventDefault();
128
- this.backOneMonth();
129
- break;
130
- case "PageDown":
131
- ev.preventDefault();
132
- this.forwardOneMonth();
133
- break;
134
- case "Home":
135
- ev.preventDefault();
136
- this.unfocusCell();
137
- this.dayInFocus = 1;
138
- forceUpdate(this.el);
139
- break;
140
- case "End":
141
- ev.preventDefault();
142
- this.unfocusCell();
143
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
144
- forceUpdate(this.el);
145
- break;
146
- case "ArrowLeft":
147
- ev.preventDefault();
148
- if (this.view === "day") {
149
- this.unfocusCell();
150
- if (this.dayInFocus === 1) {
151
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
152
- this.monthInFocus = newMonth.month;
153
- this.yearInFocus = newMonth.year;
154
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus);
155
- }
156
- else {
157
- this.dayInFocus -= 1;
158
- }
159
- }
160
- else {
161
- this.unfocusMonth();
162
- if (this.monthNumInFocus === 0) {
163
- this.monthNumInFocus = 11;
164
- }
165
- else {
166
- this.monthNumInFocus -= 1;
167
- }
168
- }
169
- break;
170
- case "ArrowRight":
171
- ev.preventDefault();
172
- if (this.view === "day") {
173
- this.unfocusCell();
174
- if (this.dayInFocus === this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
175
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
176
- this.monthInFocus = newMonth.month;
177
- this.yearInFocus = newMonth.year;
178
- this.dayInFocus = 1;
179
- }
180
- else {
181
- this.dayInFocus += 1;
182
- }
183
- }
184
- else {
185
- this.unfocusMonth();
186
- if (this.monthNumInFocus === 11) {
187
- this.monthNumInFocus = 0;
188
- }
189
- else {
190
- this.monthNumInFocus += 1;
191
- }
192
- }
193
- break;
194
- case "ArrowUp":
195
- ev.preventDefault();
196
- if (this.view === "day") {
197
- this.unfocusCell();
198
- if (this.dayInFocus < 8) {
199
- const newMonth = this.getPreviousMonth(this.monthInFocus, this.yearInFocus);
200
- this.monthInFocus = newMonth.month;
201
- this.yearInFocus = newMonth.year;
202
- const numDaysToSubtract = 7 - this.dayInFocus;
203
- this.dayInFocus = this.getMonthDays(this.monthInFocus, this.yearInFocus) - numDaysToSubtract;
204
- }
205
- else {
206
- this.dayInFocus -= 7;
207
- }
208
- }
209
- else {
210
- this.unfocusMonth();
211
- if (this.monthNumInFocus < 3) {
212
- this.monthNumInFocus += 9;
213
- }
214
- else {
215
- this.monthNumInFocus -= 3;
216
- }
217
- }
218
- break;
219
- case "ArrowDown":
220
- ev.preventDefault();
221
- if (!this.isExpanded) {
222
- this.openPopup();
223
- }
224
- else {
225
- if (this.view === "day") {
226
- //If the down arrow is pressed from the month button or the arrow buttons, focus should shift to the current cell in focus
227
- if (!(document.activeElement.shadowRoot || document).activeElement.classList.contains("date-cell")) {
228
- this.focusCell();
229
- break;
230
- }
231
- this.unfocusCell();
232
- const changeoverDate = this.getMonthDays(this.monthInFocus, this.yearInFocus) - 7;
233
- if (this.dayInFocus > changeoverDate) {
234
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
235
- this.monthInFocus = newMonth.month;
236
- this.yearInFocus = newMonth.year;
237
- this.dayInFocus = this.dayInFocus - changeoverDate;
238
- }
239
- else {
240
- this.dayInFocus += 7;
241
- }
242
- }
243
- else {
244
- //If the down arrow is pressed from the arrow buttons or the title box, focus should shift to the current month in focus
245
- const activeEl = (document.activeElement.shadowRoot || document).activeElement;
246
- if (activeEl.tagName === "BUTTON" || activeEl.id.includes("popup-title-year")) {
247
- this.focusMonth();
248
- break;
249
- }
250
- this.unfocusMonth();
251
- if (this.monthNumInFocus > 8) {
252
- this.monthNumInFocus -= 9;
253
- }
254
- else {
255
- this.monthNumInFocus += 3;
256
- }
257
- }
258
- }
259
- break;
260
- }
261
- }
262
- blurHandler(ev) {
263
- if (!this.popupClicked && !this.buttonClicked && this.isExpanded) {
264
- this.closePopup();
265
- // in this case, the PointerEvent target is identical to the blur events relatedTarget, and is passed on as such
266
- this.popupBlurred.emit({ relatedTarget: ev.target });
267
- }
268
- this.popupClicked = false;
269
- this.buttonClicked = false;
270
- }
271
- handleBlurOnWindow(ev) {
272
- // for cases where the user clicks or uses a shortcut to leave the document
273
- if (this.isExpanded) {
274
- this.closePopup();
275
- this.popupBlurred.emit({ relatedTarget: ev.target });
276
- }
277
- }
278
- componentDidUpdate() {
279
- this.handleSelectedDate();
280
- if (this.isExpanded) {
281
- this.prevClicked
282
- ? this.prevButton.focus()
283
- : this.nextClicked
284
- ? this.nextButton.focus()
285
- : this.view === "day"
286
- ? this.focusCell()
287
- : this.focusMonth();
288
- }
289
- }
290
- componentDidLoad() {
291
- this.handleSelectedDate();
292
- }
293
- zeroPad(value, length) {
294
- if (!String.prototype.padStart) {
295
- String.prototype.padStart = function padStart(targetLength, padString) {
296
- targetLength = targetLength - this.length;
297
- if (targetLength > padString.length) {
298
- padString += padString.repeat(targetLength / padString.length);
299
- }
300
- return padString.slice(0, targetLength) + String(this);
301
- };
302
- }
303
- return `${value.toString()}`.padStart(length, "0");
304
- }
305
- removeZeroes(date) {
306
- return +date < 10 ? +date.slice(1) : +date;
307
- }
308
- isDateToday(date) {
309
- const today = new Date();
310
- const todayDateArray = [
311
- today.getFullYear().toString(),
312
- (today.getMonth() + 1).toString(),
313
- today.getDate().toString(),
314
- ];
315
- //Compare today's date to date and return true if they match
316
- return todayDateArray.reduce((result, val, index) => result && this.removeZeroes(date[index]).toString() === val, true);
317
- }
318
- togglePopup() {
319
- this.isExpanded ? this.closePopup() : this.openPopup();
320
- this.buttonClicked = true;
321
- }
322
- closePopup(returnFocus = false) {
323
- this.isExpanded = false;
324
- this.popupEl.classList.remove("open");
325
- window.setTimeout(() => {
326
- //not using display none in order to get measurements of the popup while hidden
327
- this.popupEl.style.visibility = "hidden";
328
- }, 250);
329
- //Reset values so that menu reopens to day view with selected date in focus
330
- if (this.view === "day") {
331
- this.unfocusCell();
332
- }
333
- this.monthInFocus = this.selectedMonth;
334
- this.yearInFocus = this.selectedYear;
335
- this.dayInFocus = this.selectedDay;
336
- this.changeView("day");
337
- if (returnFocus) {
338
- this.buttonEl.focus();
339
- }
340
- }
341
- openPopup() {
342
- this.panelPosition();
343
- this.setDateValuesForView();
344
- this.prevClicked = false;
345
- this.nextClicked = false;
346
- this.popupEl.style.visibility = "visible";
347
- window.requestAnimationFrame(() => {
348
- this.popupEl.classList.add("open");
349
- });
350
- this.isExpanded = true;
351
- this.focusCell();
352
- }
353
- getMonthDays(month, year) {
354
- const months30 = [4, 6, 9, 11];
355
- const leapYear = year % 4 === 0;
356
- return month === 2 ? (leapYear ? 29 : 28) : months30.includes(month) ? 30 : 31;
357
- }
358
- // 1 => Sunday, 7 => Saturday
359
- getMonthFirstDay(month, year) {
360
- return +new Date(year, month - 1, 1, 12, 0, 0).getDay() + 1;
361
- }
362
- getPreviousMonth(month, year) {
363
- const prevMonth = month > 1 ? month - 1 : 12;
364
- const prevMonthYear = month > 1 ? year : year - 1;
365
- return { month: prevMonth, year: prevMonthYear };
366
- }
367
- getNextMonth(month, year) {
368
- const nextMonth = month < 12 ? month + 1 : 1;
369
- const nextMonthYear = month < 12 ? year : year + 1;
370
- return { month: nextMonth, year: nextMonthYear };
371
- }
372
- getCalendarDates(month, year) {
373
- // Get number of days in the month and the month's first day
374
- const monthDays = this.getMonthDays(month, year);
375
- const monthFirstDay = this.getMonthFirstDay(month, year);
376
- // Get number of days to be displayed from previous and next months
377
- // These ensure a total of 42 days (6 weeks) displayed on the calendar
378
- const daysFromPrevMonth = monthFirstDay - 1;
379
- let daysFromNextMonth = 42 - (daysFromPrevMonth + monthDays);
380
- daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth;
381
- // Get the previous and next months and years
382
- const { month: prevMonth, year: prevMonthYear } = this.getPreviousMonth(month, year);
383
- const { month: nextMonth, year: nextMonthYear } = this.getNextMonth(month, year);
384
- // Get number of days in previous month
385
- const prevMonthDays = this.getMonthDays(prevMonth, prevMonthYear);
386
- // 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.
387
- const prevMonthDates = [...new Array(daysFromPrevMonth).fill("1")].map((_, index) => {
388
- const day = index + 1 + (prevMonthDays - daysFromPrevMonth);
389
- return [prevMonthYear.toString(), this.zeroPad(prevMonth, 2), this.zeroPad(day, 2)];
390
- });
391
- // 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.
392
- const thisMonthDates = [...new Array(monthDays).fill("1")].map((_, index) => {
393
- const day = index + 1;
394
- return [year.toString(), this.zeroPad(month, 2), this.zeroPad(day, 2)];
395
- });
396
- // 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.
397
- const nextMonthDates = [...new Array(daysFromNextMonth).fill("1")].map((_, index) => {
398
- const day = index + 1;
399
- return [nextMonthYear.toString(), this.zeroPad(nextMonth, 2), this.zeroPad(day, 2)];
400
- });
401
- // Combines all dates from previous, current and next months
402
- return [...prevMonthDates, ...thisMonthDates, ...nextMonthDates];
403
- }
404
- forwardOneMonth() {
405
- this.unfocusCell();
406
- const newMonth = this.getNextMonth(this.monthInFocus, this.yearInFocus);
407
- this.monthInFocus = newMonth.month;
408
- this.yearInFocus = newMonth.year;
409
- const totalDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
410
- if (this.dayInFocus > this.getMonthDays(this.monthInFocus, this.yearInFocus)) {
411
- this.dayInFocus = totalDays;
412
- }
413
- this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
414
- }
415
- backOneMonth() {
416
- this.unfocusCell();
417
- const newMonth = this.getPreviousMonth(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(`Viewing ${this.calendar_months[this.monthInFocus - 1]}, ${this.yearInFocus}`);
425
- }
426
- handleTriggeredDate(el) {
427
- this.cellTriggered.emit(el);
428
- // change of input value will trigger the function updating selectedDate
429
- this.closePopup(true);
430
- }
431
- handleSelectedDate() {
432
- //Remove old selection status
433
- if (this.selectedDate) {
434
- this.selectedDate.removeAttribute("aria-selected");
435
- }
436
- //Update selected date to new date inputted/selected
437
- this.selectedDate = this.getCellById(this.selectedYear, this.selectedMonth, this.selectedDay);
438
- if (this.selectedDate) {
439
- this.selectedDate.setAttribute("aria-selected", "true");
440
- }
441
- }
442
- getCellById(year, month, day) {
443
- const id = year + this.zeroPad(month, 2) + this.zeroPad(day, 2);
444
- return this.el.querySelector(`#cell-${id}`);
445
- }
446
- unfocusCell() {
447
- const cellToUnfocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
448
- cellToUnfocus.tabIndex = -1;
449
- }
450
- focusCell() {
451
- //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.
452
- const maxDays = this.getMonthDays(this.monthInFocus, this.yearInFocus);
453
- this.dayInFocus = this.dayInFocus > maxDays ? maxDays : this.dayInFocus;
454
- const cellToFocus = this.getCellById(this.yearInFocus, this.monthInFocus, this.dayInFocus);
455
- if (cellToFocus) {
456
- cellToFocus.tabIndex = 0;
457
- cellToFocus.focus();
458
- }
459
- }
460
- unfocusMonth() {
461
- const monthToUnfocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
462
- monthToUnfocus.tabIndex = -1;
463
- }
464
- focusMonth() {
465
- const monthToFocus = this.el.querySelector(`#month-${this.monthNumInFocus}`);
466
- monthToFocus.tabIndex = 0;
467
- monthToFocus.focus();
468
- }
469
- trapFocusLeft(ev) {
470
- if (ev.shiftKey && ev.key === "Tab") {
471
- ev.preventDefault();
472
- this.focusCellInView();
473
- }
474
- }
475
- trapFocusEnd(ev) {
476
- if (!ev.shiftKey && ev.key === "Tab") {
477
- ev.preventDefault();
478
- this.prevButton.focus();
479
- }
480
- }
481
- trapFocusRight(ev) {
482
- if (!ev.shiftKey && ev.key === "Tab") {
483
- ev.preventDefault();
484
- this.focusCellInView();
485
- }
486
- }
487
- focusCellInView() {
488
- if (this.view === "day") {
489
- this.focusCell();
490
- }
491
- else {
492
- this.focusMonth();
493
- }
494
- }
495
- toggleBusyAttribute(state) {
496
- this.el.querySelector("#wm-container").setAttribute("aria-busy", state);
497
- }
498
- setDateValuesForView() {
499
- this.selectedYear = this.date.getUTCFullYear();
500
- this.selectedMonth = this.date.getUTCMonth() + 1;
501
- this.selectedDay = this.date.getUTCDate();
502
- this.monthInFocus = this.selectedMonth;
503
- this.yearInFocus = this.selectedYear;
504
- this.dayInFocus = this.selectedDay;
505
- this.monthNumInFocus = this.selectedMonth - 1;
506
- }
507
- updateLiveRegion(text) {
508
- let liveRegion = this.el.querySelector("#live-region");
509
- liveRegion.innerHTML = text;
510
- }
511
- panelPosition() {
512
- const parentDatepickerEl = this.el.getRootNode().host;
513
- const labelHeight = parentDatepickerEl.shadowRoot.querySelector(".label-wrapper").clientHeight;
514
- this.openUp = shouldOpenUp(parentDatepickerEl, this.popupEl.clientHeight, labelHeight);
515
- if (hasRoomRight(parentDatepickerEl, 336)) {
516
- this.popupEl.style.left = "0";
517
- this.popupEl.style.right = "auto";
518
- }
519
- else {
520
- this.popupEl.style.right = "0";
521
- this.popupEl.style.left = "auto";
522
- }
523
- }
524
- changeView(newView) {
525
- this.view = newView;
526
- //Ensure month view always opens to the month last visited in date view
527
- this.monthNumInFocus = this.monthInFocus - 1;
528
- }
529
- renderMonths(month, index) {
530
- 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: () => {
531
- this.monthInFocus = index + 1;
532
- this.changeView("day");
533
- } }, month));
534
- }
535
- render() {
536
- const dates = this.getCalendarDates(this.monthInFocus, this.yearInFocus);
537
- 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({
538
- id: "date.calendarView",
539
- defaultMessage: "Calendar View",
540
- description: "Calendar button",
541
- }) })), 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: () => {
542
- this.prevClicked = true;
543
- this.popupClicked = true;
544
- this.backOneMonth();
545
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), ref: (el) => (this.prevButton = el), class: "arw-btn", "aria-label": intl.formatMessage({
546
- id: "date.selectPreviousMonth",
547
- defaultMessage: "Select previous month",
548
- description: "Calendar button",
549
- }) }, h("span", { class: "mdi" }, "\uF141")), h("div", { id: "popup-title-month", class: "title-box", tabindex: 0, role: "button", onKeyDown: (ev) => {
550
- if (ev.key === "Enter" || ev.key === " ") {
551
- ev.preventDefault();
552
- this.changeView("month");
553
- }
554
- }, onClick: this.changeView.bind(this, "month"), "aria-label": `${intl.formatMessage({
555
- id: "date.currentMonth",
556
- defaultMessage: "current month",
557
- description: "Calendar button",
558
- })}: ${this.calendar_months[this.monthInFocus - 1]}
559
- ${this.yearInFocus}.`, "aria-describedby": "month-title" }, h("span", { class: "title", "aria-hidden": "true" }, this.calendar_months[this.monthInFocus - 1], " ", this.yearInFocus)), h("button", { onClick: () => {
560
- this.nextClicked = true;
561
- this.popupClicked = true;
562
- this.forwardOneMonth();
563
- }, onKeyDown: (ev) => this.trapFocusRight(ev), "aria-label": intl.formatMessage({
564
- id: "date.selectNextMonth",
565
- defaultMessage: "Select next month",
566
- description: "Calendar button",
567
- }), 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({
568
- id: "date.su",
569
- defaultMessage: "Su",
570
- description: "Abbreviated day of the week",
571
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
572
- id: "date.mo",
573
- defaultMessage: "Mo",
574
- description: "Abbreviated day of the week",
575
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
576
- id: "date.tu",
577
- defaultMessage: "Tu",
578
- description: "Abbreviated day of the week",
579
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
580
- id: "date.we",
581
- defaultMessage: "We",
582
- description: "Abbreviated day of the week",
583
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
584
- id: "date.th",
585
- defaultMessage: "Th",
586
- description: "Abbreviated day of the week",
587
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
588
- id: "date.fr",
589
- defaultMessage: "Fr",
590
- description: "Abbreviated day of the week",
591
- }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
592
- id: "date.sa",
593
- defaultMessage: "Sa",
594
- description: "Abbreviated day of the week",
595
- }))))), 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: () => {
596
- this.prevClicked = true;
597
- this.popupClicked = true;
598
- this.yearInFocus -= 1;
599
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
600
- }, onKeyDown: (ev) => this.trapFocusLeft(ev), "aria-label": intl.formatMessage({
601
- id: "date.selectPreviousYear",
602
- defaultMessage: "Select previous year",
603
- description: "Calendar button",
604
- }), 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) => {
605
- if (ev.key === "Enter" || ev.key === " ") {
606
- ev.preventDefault();
607
- this.changeView("day");
608
- }
609
- }, "aria-labelledby": "year-title" }, h("span", { class: "title" }, this.yearInFocus)), h("button", { onClick: () => {
610
- this.nextClicked = true;
611
- this.popupClicked = true;
612
- this.yearInFocus += 1;
613
- this.updateLiveRegion(`${this.yearInFocus} selected.`);
614
- }, "aria-label": intl.formatMessage({
615
- id: "date.selectNextYear",
616
- defaultMessage: "Select next year",
617
- description: "Calendar button",
618
- }), 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
619
- .slice(0, 3)
620
- .map((month, index) => this.renderMonths(month, index))), h("div", { role: "row", class: "month-row" }, this.calendar_months
621
- .slice(3, 6)
622
- .map((month, index) => this.renderMonths(month, index + 3))), h("div", { role: "row", class: "month-row" }, this.calendar_months
623
- .slice(6, 9)
624
- .map((month, index) => this.renderMonths(month, index + 6))), h("div", { role: "row", class: "month-row" }, this.calendar_months
625
- .slice(9)
626
- .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({
627
- id: "date.selectMonth",
628
- defaultMessage: "Activate to select a month.",
629
- description: "Calendar button",
630
- })), h("div", { id: "year-title", class: "sr-only" }, intl.formatMessage({
631
- id: "date.selectYear",
632
- defaultMessage: "Activate to select a year.",
633
- description: "Calendar button",
634
- })), h("div", { id: "application", class: "sr-only" }, intl.formatMessage({
635
- id: "date.instructions",
636
- 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.",
637
- }))));
638
- }
639
- static get is() { return "priv-datepicker"; }
640
- static get originalStyleUrls() {
641
- return {
642
- "$": ["priv-datepicker.scss"]
643
- };
644
- }
645
- static get styleUrls() {
646
- return {
647
- "$": ["priv-datepicker.css"]
648
- };
649
- }
650
- static get properties() {
651
- return {
652
- "disabled": {
653
- "type": "boolean",
654
- "mutable": false,
655
- "complexType": {
656
- "original": "boolean",
657
- "resolved": "boolean",
658
- "references": {}
659
- },
660
- "required": false,
661
- "optional": false,
662
- "docs": {
663
- "tags": [],
664
- "text": ""
665
- },
666
- "attribute": "disabled",
667
- "reflect": false,
668
- "defaultValue": "false"
669
- },
670
- "isExpanded": {
671
- "type": "boolean",
672
- "mutable": true,
673
- "complexType": {
674
- "original": "boolean",
675
- "resolved": "boolean",
676
- "references": {}
677
- },
678
- "required": false,
679
- "optional": false,
680
- "docs": {
681
- "tags": [],
682
- "text": ""
683
- },
684
- "attribute": "is-expanded",
685
- "reflect": true,
686
- "defaultValue": "false"
687
- },
688
- "view": {
689
- "type": "string",
690
- "mutable": true,
691
- "complexType": {
692
- "original": "string",
693
- "resolved": "string",
694
- "references": {}
695
- },
696
- "required": false,
697
- "optional": false,
698
- "docs": {
699
- "tags": [],
700
- "text": ""
701
- },
702
- "attribute": "view",
703
- "reflect": false,
704
- "defaultValue": "\"day\""
705
- },
706
- "date": {
707
- "type": "unknown",
708
- "mutable": false,
709
- "complexType": {
710
- "original": "Date",
711
- "resolved": "Date",
712
- "references": {
713
- "Date": {
714
- "location": "global",
715
- "id": "global::Date"
716
- }
717
- }
718
- },
719
- "required": false,
720
- "optional": false,
721
- "docs": {
722
- "tags": [],
723
- "text": ""
724
- },
725
- "defaultValue": "new Date()"
726
- },
727
- "selectedYear": {
728
- "type": "number",
729
- "mutable": true,
730
- "complexType": {
731
- "original": "number",
732
- "resolved": "number",
733
- "references": {}
734
- },
735
- "required": false,
736
- "optional": false,
737
- "docs": {
738
- "tags": [],
739
- "text": ""
740
- },
741
- "attribute": "selected-year",
742
- "reflect": false,
743
- "defaultValue": "this.date.getUTCFullYear()"
744
- },
745
- "selectedMonth": {
746
- "type": "number",
747
- "mutable": true,
748
- "complexType": {
749
- "original": "number",
750
- "resolved": "number",
751
- "references": {}
752
- },
753
- "required": false,
754
- "optional": false,
755
- "docs": {
756
- "tags": [],
757
- "text": ""
758
- },
759
- "attribute": "selected-month",
760
- "reflect": false,
761
- "defaultValue": "this.date.getUTCMonth() + 1"
762
- },
763
- "selectedDay": {
764
- "type": "number",
765
- "mutable": true,
766
- "complexType": {
767
- "original": "number",
768
- "resolved": "number",
769
- "references": {}
770
- },
771
- "required": false,
772
- "optional": false,
773
- "docs": {
774
- "tags": [],
775
- "text": ""
776
- },
777
- "attribute": "selected-day",
778
- "reflect": false,
779
- "defaultValue": "this.date.getUTCDate()"
780
- },
781
- "monthInFocus": {
782
- "type": "number",
783
- "mutable": true,
784
- "complexType": {
785
- "original": "number",
786
- "resolved": "number",
787
- "references": {}
788
- },
789
- "required": false,
790
- "optional": false,
791
- "docs": {
792
- "tags": [],
793
- "text": ""
794
- },
795
- "attribute": "month-in-focus",
796
- "reflect": false,
797
- "defaultValue": "this.selectedMonth"
798
- },
799
- "yearInFocus": {
800
- "type": "number",
801
- "mutable": true,
802
- "complexType": {
803
- "original": "number",
804
- "resolved": "number",
805
- "references": {}
806
- },
807
- "required": false,
808
- "optional": false,
809
- "docs": {
810
- "tags": [],
811
- "text": ""
812
- },
813
- "attribute": "year-in-focus",
814
- "reflect": false,
815
- "defaultValue": "this.selectedYear"
816
- },
817
- "dayInFocus": {
818
- "type": "number",
819
- "mutable": true,
820
- "complexType": {
821
- "original": "number",
822
- "resolved": "number",
823
- "references": {}
824
- },
825
- "required": false,
826
- "optional": false,
827
- "docs": {
828
- "tags": [],
829
- "text": ""
830
- },
831
- "attribute": "day-in-focus",
832
- "reflect": false,
833
- "defaultValue": "this.selectedDay"
834
- }
835
- };
836
- }
837
- static get states() {
838
- return {
839
- "monthNumInFocus": {}
840
- };
841
- }
842
- static get events() {
843
- return [{
844
- "method": "cellTriggered",
845
- "name": "cellTriggered",
846
- "bubbles": true,
847
- "cancelable": true,
848
- "composed": true,
849
- "docs": {
850
- "tags": [],
851
- "text": ""
852
- },
853
- "complexType": {
854
- "original": "HTMLElement",
855
- "resolved": "HTMLElement",
856
- "references": {
857
- "HTMLElement": {
858
- "location": "global",
859
- "id": "global::HTMLElement"
860
- }
861
- }
862
- }
863
- }, {
864
- "method": "toggleButtonClicked",
865
- "name": "toggleButtonClicked",
866
- "bubbles": true,
867
- "cancelable": true,
868
- "composed": true,
869
- "docs": {
870
- "tags": [],
871
- "text": ""
872
- },
873
- "complexType": {
874
- "original": "HTMLButtonElement",
875
- "resolved": "HTMLButtonElement",
876
- "references": {
877
- "HTMLButtonElement": {
878
- "location": "global",
879
- "id": "global::HTMLButtonElement"
880
- }
881
- }
882
- }
883
- }, {
884
- "method": "popupClosed",
885
- "name": "popupClosed",
886
- "bubbles": true,
887
- "cancelable": true,
888
- "composed": true,
889
- "docs": {
890
- "tags": [],
891
- "text": ""
892
- },
893
- "complexType": {
894
- "original": "any",
895
- "resolved": "any",
896
- "references": {}
897
- }
898
- }, {
899
- "method": "popupBlurred",
900
- "name": "popupBlurred",
901
- "bubbles": true,
902
- "cancelable": true,
903
- "composed": true,
904
- "docs": {
905
- "tags": [],
906
- "text": ""
907
- },
908
- "complexType": {
909
- "original": "{ relatedTarget: EventTarget | null }",
910
- "resolved": "{ relatedTarget: EventTarget | null; }",
911
- "references": {
912
- "EventTarget": {
913
- "location": "global",
914
- "id": "global::EventTarget"
915
- }
916
- }
917
- }
918
- }];
919
- }
920
- static get elementRef() { return "el"; }
921
- static get listeners() {
922
- return [{
923
- "name": "keydown",
924
- "method": "handleKey",
925
- "target": undefined,
926
- "capture": false,
927
- "passive": false
928
- }, {
929
- "name": "click",
930
- "method": "blurHandler",
931
- "target": "document",
932
- "capture": false,
933
- "passive": false
934
- }, {
935
- "name": "blur",
936
- "method": "handleBlurOnWindow",
937
- "target": "window",
938
- "capture": false,
939
- "passive": false
940
- }];
941
- }
942
- }