@watermarkinsights/ripple 5.13.0 → 5.13.1-alpha.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 (476) hide show
  1. package/dist/cjs/app-globals-6l2OXl3R.js +92 -0
  2. package/dist/cjs/chartFunctions-uCzSt0yo.js +741 -0
  3. package/dist/cjs/functions-CqAwq8Fq.js +10526 -0
  4. package/dist/cjs/index-Cig4P4gJ.js +2086 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/interfaces-C7YbtGnk.js +37 -0
  7. package/dist/cjs/intl-BUs7ck9m.js +283 -0
  8. package/dist/cjs/loader.cjs.js +13 -0
  9. package/dist/cjs/priv-calendar.cjs.entry.js +568 -0
  10. package/dist/cjs/priv-chart-popover.cjs.entry.js +136 -0
  11. package/dist/cjs/priv-navigator-button_2.cjs.entry.js +54 -0
  12. package/dist/cjs/priv-option-list_2.cjs.entry.js +556 -0
  13. package/dist/cjs/ripple.cjs.js +25 -0
  14. package/dist/cjs/wm-action-menu_4.cjs.entry.js +701 -0
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +20 -0
  16. package/dist/cjs/wm-chart.cjs.entry.js +159 -0
  17. package/dist/cjs/wm-date-range.cjs.entry.js +479 -0
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +249 -0
  19. package/dist/cjs/wm-file-list.cjs.entry.js +20 -0
  20. package/dist/cjs/wm-file.cjs.entry.js +184 -0
  21. package/dist/cjs/wm-flyout.cjs.entry.js +169 -0
  22. package/dist/cjs/wm-input.cjs.entry.js +113 -0
  23. package/dist/cjs/wm-line-chart.cjs.entry.js +451 -0
  24. package/dist/cjs/wm-modal-footer.cjs.entry.js +46 -0
  25. package/dist/cjs/wm-modal-header.cjs.entry.js +38 -0
  26. package/dist/cjs/wm-modal-pss-footer.cjs.entry.js +42 -0
  27. package/dist/cjs/wm-modal-pss-header.cjs.entry.js +41 -0
  28. package/dist/cjs/wm-modal-pss.cjs.entry.js +137 -0
  29. package/dist/cjs/wm-modal.cjs.entry.js +135 -0
  30. package/dist/cjs/wm-navigation-hamburger.cjs.entry.js +50 -0
  31. package/dist/{ripple/wm-tab-panel.entry.js → cjs/wm-navigation-item.cjs.entry.js} +12 -24
  32. package/dist/cjs/wm-navigation.cjs.entry.js +118 -0
  33. package/dist/cjs/wm-navigator.cjs.entry.js +329 -0
  34. package/dist/{ripple/wm-search.entry.js → cjs/wm-nested-select.cjs.entry.js} +273 -171
  35. package/dist/cjs/wm-optgroup.cjs.entry.js +70 -0
  36. package/dist/cjs/wm-pagination.cjs.entry.js +225 -0
  37. package/dist/cjs/wm-progress-indicator.cjs.entry.js +109 -0
  38. package/dist/cjs/wm-progress-monitor.cjs.entry.js +73 -0
  39. package/dist/cjs/wm-progress-slice.cjs.entry.js +15 -0
  40. package/dist/cjs/wm-search.cjs.entry.js +210 -0
  41. package/dist/cjs/wm-select.cjs.entry.js +251 -0
  42. package/dist/cjs/wm-tab-item.cjs.entry.js +65 -0
  43. package/dist/cjs/wm-tab-list.cjs.entry.js +177 -0
  44. package/dist/cjs/wm-tab-panel.cjs.entry.js +34 -0
  45. package/dist/cjs/wm-tag-input.cjs.entry.js +879 -0
  46. package/dist/cjs/wm-tag-option.cjs.entry.js +37 -0
  47. package/dist/cjs/wm-textarea.cjs.entry.js +81 -0
  48. package/dist/cjs/wm-timepicker.cjs.entry.js +302 -0
  49. package/dist/cjs/wm-toggletip.cjs.entry.js +178 -0
  50. package/dist/cjs/wm-uploader.cjs.entry.js +315 -0
  51. package/dist/cjs/wm-wrapper.cjs.entry.js +19 -0
  52. package/dist/collection/collection-manifest.json +59 -0
  53. package/dist/collection/components/charts/chartFunctions.js +675 -0
  54. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +922 -0
  55. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +261 -0
  56. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +128 -0
  57. package/dist/collection/components/charts/wm-chart/wm-chart.css +1288 -0
  58. package/dist/collection/components/charts/wm-chart/wm-chart.js +445 -0
  59. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1080 -0
  60. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +742 -0
  61. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1288 -0
  62. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +271 -0
  63. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +922 -0
  64. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +154 -0
  65. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +124 -0
  66. package/dist/collection/components/datepickers/datepicker.css +1057 -0
  67. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1292 -0
  68. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +849 -0
  69. package/dist/collection/components/datepickers/wm-date-range.js +869 -0
  70. package/dist/collection/components/datepickers/wm-datepicker.js +538 -0
  71. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +931 -0
  72. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +791 -0
  73. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1194 -0
  74. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +644 -0
  75. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +843 -0
  76. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +265 -0
  77. package/dist/collection/components/selects/wm-option/wm-option.css +944 -0
  78. package/dist/collection/components/selects/wm-option/wm-option.js +539 -0
  79. package/dist/collection/components/selects/wm-select/wm-select.css +1117 -0
  80. package/dist/collection/components/selects/wm-select/wm-select.js +606 -0
  81. package/dist/collection/components/wm-action-menu/wm-action-menu.css +904 -0
  82. package/dist/collection/components/wm-action-menu/wm-action-menu.js +444 -0
  83. package/dist/collection/components/wm-button/wm-button.css +1371 -0
  84. package/dist/collection/components/wm-button/wm-button.js +510 -0
  85. package/dist/collection/components/wm-file/wm-file.css +940 -0
  86. package/dist/collection/components/wm-file/wm-file.js +423 -0
  87. package/dist/collection/components/wm-file-list/wm-file-list.css +833 -0
  88. package/dist/collection/components/wm-file-list/wm-file-list.js +47 -0
  89. package/dist/collection/components/wm-flyout/wm-flyout.css +1027 -0
  90. package/dist/collection/components/wm-flyout/wm-flyout.js +460 -0
  91. package/dist/collection/components/wm-input/wm-input.css +1017 -0
  92. package/dist/collection/components/wm-input/wm-input.js +498 -0
  93. package/dist/collection/components/wm-menuitem/wm-menuitem.css +904 -0
  94. package/dist/collection/components/wm-menuitem/wm-menuitem.js +425 -0
  95. package/dist/collection/components/wm-modal/wm-modal-footer.css +858 -0
  96. package/dist/collection/components/wm-modal/wm-modal-footer.js +152 -0
  97. package/dist/collection/components/wm-modal/wm-modal-header.css +857 -0
  98. package/dist/collection/components/wm-modal/wm-modal-header.js +83 -0
  99. package/dist/collection/components/wm-modal/wm-modal.css +905 -0
  100. package/dist/collection/components/wm-modal/wm-modal.js +356 -0
  101. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +865 -0
  102. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +148 -0
  103. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +859 -0
  104. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
  105. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +941 -0
  106. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
  107. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +860 -0
  108. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +120 -0
  109. package/dist/collection/components/wm-navigation/wm-navigation-item.css +869 -0
  110. package/dist/collection/components/wm-navigation/wm-navigation-item.js +99 -0
  111. package/dist/collection/components/wm-navigation/wm-navigation.css +911 -0
  112. package/dist/collection/components/wm-navigation/wm-navigation.js +192 -0
  113. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +863 -0
  114. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
  115. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +843 -0
  116. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +130 -0
  117. package/dist/collection/components/wm-navigator/wm-navigator.css +916 -0
  118. package/dist/collection/components/wm-navigator/wm-navigator.js +515 -0
  119. package/dist/collection/components/wm-pagination/wm-pagination.css +984 -0
  120. package/dist/collection/components/wm-pagination/wm-pagination.js +373 -0
  121. package/dist/collection/components/wm-search/wm-search.css +909 -0
  122. package/dist/collection/components/wm-search/wm-search.js +462 -0
  123. package/dist/collection/components/wm-snackbar/wm-snackbar.css +1091 -0
  124. package/dist/collection/components/wm-snackbar/wm-snackbar.js +279 -0
  125. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +882 -0
  126. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +187 -0
  127. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +854 -0
  128. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +276 -0
  129. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +838 -0
  130. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +97 -0
  131. package/dist/collection/components/wm-tag-input/wm-tag-input.css +1289 -0
  132. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1245 -0
  133. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +251 -0
  134. package/dist/collection/components/wm-textarea/wm-textarea.css +993 -0
  135. package/dist/collection/components/wm-textarea/wm-textarea.js +331 -0
  136. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1107 -0
  137. package/dist/collection/components/wm-timepicker/wm-timepicker.js +559 -0
  138. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1165 -0
  139. package/dist/collection/components/wm-toggletip/wm-toggletip.js +295 -0
  140. package/dist/collection/components/wm-uploader/wm-uploader.css +1673 -0
  141. package/dist/collection/components/wm-uploader/wm-uploader.js +618 -0
  142. package/dist/collection/components/wm-wrapper/wm-wrapper.js +28 -0
  143. package/dist/collection/dev/action-menu.js +0 -0
  144. package/dist/collection/dev/button.js +0 -0
  145. package/dist/collection/dev/chart-small.js +56 -0
  146. package/dist/collection/dev/chart.js +18 -0
  147. package/dist/collection/dev/date-range.js +6 -0
  148. package/dist/collection/dev/datepicker.js +46 -0
  149. package/dist/collection/dev/file-list.js +16 -0
  150. package/dist/collection/dev/file.js +0 -0
  151. package/dist/collection/dev/flyout.js +194 -0
  152. package/dist/collection/dev/input.js +6 -0
  153. package/dist/collection/dev/line-chart.js +0 -0
  154. package/dist/collection/dev/modal.js +48 -0
  155. package/dist/collection/dev/navigation.js +13 -0
  156. package/dist/collection/dev/navigator.js +34 -0
  157. package/dist/collection/dev/nested-select.js +36 -0
  158. package/dist/collection/dev/pagination.js +7 -0
  159. package/dist/collection/dev/progress-monitor.js +0 -0
  160. package/dist/collection/dev/pss-modal.js +8 -0
  161. package/dist/collection/dev/scripts.js +49 -0
  162. package/dist/collection/dev/search.js +72 -0
  163. package/dist/collection/dev/select.js +57 -0
  164. package/dist/collection/dev/snackbar.js +60 -0
  165. package/dist/collection/dev/tabs.js +44 -0
  166. package/dist/collection/dev/tag-input.js +32 -0
  167. package/dist/collection/dev/textarea.js +28 -0
  168. package/dist/collection/dev/timepicker.js +32 -0
  169. package/dist/collection/dev/toggletip.js +9 -0
  170. package/dist/collection/dev/uploader.js +139 -0
  171. package/dist/collection/global/__mocks__/functions.js +6 -0
  172. package/dist/collection/global/functions.js +841 -0
  173. package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +2 -84
  174. package/dist/{ripple/interfaces-CrANcZM9.js → collection/global/interfaces.js} +4 -6
  175. package/dist/collection/global/intl.js +274 -0
  176. package/dist/collection/global/services/__mocks__/http-service.js +130 -0
  177. package/dist/collection/global/services/http-service.js +50 -0
  178. package/dist/collection/lang/lang.js +5 -0
  179. package/dist/collection/lang/missing.js +43 -0
  180. package/dist/collection/lang/piglatin.js +101 -0
  181. package/dist/components/index.js +85 -0
  182. package/dist/components/p-BlQdbOh_.js +294 -0
  183. package/dist/components/p-BvE5BEYe.js +146 -0
  184. package/dist/components/p-BzGDMpdL.js +592 -0
  185. package/dist/{ripple/wm-modal-header.entry.js → components/p-CLem5EoD.js} +35 -29
  186. package/dist/components/p-COwzv5zO.js +34 -0
  187. package/dist/components/p-CWx2NF6K.js +231 -0
  188. package/dist/{ripple/wm-progress-monitor.entry.js → components/p-D9GMUh0-.js} +217 -57
  189. package/dist/{ripple/wm-option.entry.js → components/p-DCSxoWXP.js} +384 -134
  190. package/dist/components/p-DG_w4q3M.js +196 -0
  191. package/dist/{ripple/intl-7p27BJSM.js → components/p-DStPjkvu.js} +1 -1
  192. package/dist/components/p-DdlNyc6u.js +10485 -0
  193. package/dist/{ripple/wm-toggletip.entry.js → components/p-DvXS4oTB.js} +44 -171
  194. package/dist/components/p-HPnDWE3g.js +1686 -0
  195. package/dist/components/p-K9lgwbAO.js +724 -0
  196. package/dist/{ripple/wm-textarea.entry.js → components/p-e_A35rK5.js} +132 -57
  197. package/dist/components/priv-calendar.js +6 -0
  198. package/dist/components/priv-chart-popover.js +6 -0
  199. package/dist/components/priv-navigator-button.js +6 -0
  200. package/dist/components/priv-navigator-item.js +6 -0
  201. package/dist/components/priv-option-list.js +6 -0
  202. package/dist/components/wm-action-menu.js +6 -0
  203. package/dist/components/wm-button.js +6 -0
  204. package/dist/components/wm-chart-slice.js +41 -0
  205. package/dist/components/wm-chart.js +197 -0
  206. package/dist/components/wm-date-range.js +522 -0
  207. package/dist/components/wm-datepicker.js +287 -0
  208. package/dist/components/wm-file-list.js +38 -0
  209. package/dist/components/wm-file.js +228 -0
  210. package/dist/components/wm-flyout.js +208 -0
  211. package/dist/components/wm-input.js +152 -0
  212. package/dist/components/wm-line-chart.js +497 -0
  213. package/dist/components/wm-menuitem.js +6 -0
  214. package/dist/components/wm-modal-footer.js +73 -0
  215. package/dist/components/wm-modal-header.js +61 -0
  216. package/dist/components/wm-modal-pss-footer.js +69 -0
  217. package/dist/components/wm-modal-pss-header.js +64 -0
  218. package/dist/components/wm-modal-pss.js +162 -0
  219. package/dist/components/wm-modal.js +161 -0
  220. package/dist/components/wm-navigation-hamburger.js +70 -0
  221. package/dist/components/wm-navigation-item.js +40 -0
  222. package/dist/components/wm-navigation.js +144 -0
  223. package/dist/components/wm-navigator.js +369 -0
  224. package/dist/{ripple/wm-flyout.entry.js → components/wm-nested-select.js} +313 -137
  225. package/dist/components/wm-optgroup.js +107 -0
  226. package/dist/components/wm-option.js +6 -0
  227. package/dist/components/wm-pagination.js +251 -0
  228. package/dist/components/wm-progress-indicator.js +144 -0
  229. package/dist/components/wm-progress-monitor.js +93 -0
  230. package/dist/components/wm-progress-slice.js +37 -0
  231. package/dist/components/wm-search.js +250 -0
  232. package/dist/components/wm-select.js +6 -0
  233. package/dist/components/wm-snackbar.js +209 -0
  234. package/dist/components/wm-tab-item.js +85 -0
  235. package/dist/components/wm-tab-list.js +217 -0
  236. package/dist/components/wm-tab-panel.js +52 -0
  237. package/dist/components/wm-tag-input.js +919 -0
  238. package/dist/components/wm-tag-option.js +63 -0
  239. package/dist/components/wm-textarea.js +113 -0
  240. package/dist/components/wm-timepicker.js +333 -0
  241. package/dist/components/wm-toggletip.js +200 -0
  242. package/dist/components/wm-uploader.js +348 -0
  243. package/dist/components/wm-wrapper.js +34 -0
  244. package/dist/esm/app-globals-eAJzxs1b.js +90 -0
  245. package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-C4yzutWl.js} +3 -4
  246. package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-CU95tthb.js} +144 -7767
  247. package/dist/esm/index-EopL5zo4.js +2075 -0
  248. package/dist/esm/index.js +1 -0
  249. package/dist/esm/interfaces-CyJHzEjr.js +34 -0
  250. package/dist/esm/intl-CN471tL5.js +277 -0
  251. package/dist/esm/loader.js +11 -0
  252. package/dist/esm/polyfills/core-js.js +11 -0
  253. package/dist/esm/polyfills/dom.js +79 -0
  254. package/dist/esm/polyfills/es5-html-element.js +1 -0
  255. package/dist/esm/polyfills/index.js +34 -0
  256. package/dist/esm/polyfills/system.js +6 -0
  257. package/dist/esm/priv-calendar.entry.js +566 -0
  258. package/dist/esm/priv-chart-popover.entry.js +134 -0
  259. package/dist/esm/priv-navigator-button_2.entry.js +51 -0
  260. package/dist/esm/priv-option-list_2.entry.js +553 -0
  261. package/dist/esm/ripple.js +21 -0
  262. package/dist/esm/wm-action-menu_4.entry.js +696 -0
  263. package/dist/{ripple → esm}/wm-chart-slice.entry.js +1 -1
  264. package/dist/esm/wm-chart.entry.js +157 -0
  265. package/dist/esm/wm-date-range.entry.js +477 -0
  266. package/dist/esm/wm-datepicker.entry.js +247 -0
  267. package/dist/esm/wm-file-list.entry.js +18 -0
  268. package/dist/{ripple/wm-chart.entry.js → esm/wm-file.entry.js} +161 -136
  269. package/dist/esm/wm-flyout.entry.js +167 -0
  270. package/dist/esm/wm-input.entry.js +111 -0
  271. package/dist/esm/wm-line-chart.entry.js +449 -0
  272. package/dist/{ripple/wm-modal.entry.js → esm/wm-modal-footer.entry.js} +28 -117
  273. package/dist/{ripple/wm-input.entry.js → esm/wm-modal-header.entry.js} +24 -99
  274. package/dist/{ripple/wm-menuitem.entry.js → esm/wm-modal-pss-footer.entry.js} +28 -113
  275. package/dist/{ripple/wm-optgroup.entry.js → esm/wm-modal-pss-header.entry.js} +28 -57
  276. package/dist/esm/wm-modal-pss.entry.js +135 -0
  277. package/dist/esm/wm-modal.entry.js +133 -0
  278. package/dist/esm/wm-navigation-hamburger.entry.js +48 -0
  279. package/dist/{ripple/wm-file-list.entry.js → esm/wm-navigation-item.entry.js} +7 -7
  280. package/dist/{ripple/wm-file.entry.js → esm/wm-navigation.entry.js} +91 -157
  281. package/dist/esm/wm-navigator.entry.js +327 -0
  282. package/dist/{ripple/wm-select.entry.js → esm/wm-nested-select.entry.js} +193 -134
  283. package/dist/esm/wm-optgroup.entry.js +68 -0
  284. package/dist/esm/wm-pagination.entry.js +223 -0
  285. package/dist/esm/wm-progress-indicator.entry.js +107 -0
  286. package/dist/esm/wm-progress-monitor.entry.js +71 -0
  287. package/dist/{ripple → esm}/wm-progress-slice.entry.js +1 -1
  288. package/dist/esm/wm-search.entry.js +208 -0
  289. package/dist/esm/wm-select.entry.js +249 -0
  290. package/dist/esm/wm-tab-item.entry.js +63 -0
  291. package/dist/esm/wm-tab-list.entry.js +175 -0
  292. package/dist/esm/wm-tab-panel.entry.js +32 -0
  293. package/dist/esm/wm-tag-input.entry.js +877 -0
  294. package/dist/{ripple → esm}/wm-tag-option.entry.js +2 -2
  295. package/dist/esm/wm-textarea.entry.js +79 -0
  296. package/dist/esm/wm-timepicker.entry.js +300 -0
  297. package/dist/esm/wm-toggletip.entry.js +176 -0
  298. package/dist/esm/wm-uploader.entry.js +313 -0
  299. package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
  300. package/dist/esm-es5/app-globals-eAJzxs1b.js +1 -0
  301. package/dist/esm-es5/chartFunctions-C4yzutWl.js +1 -0
  302. package/dist/esm-es5/functions-CU95tthb.js +1 -0
  303. package/dist/esm-es5/index-EopL5zo4.js +1 -0
  304. package/dist/esm-es5/index.js +0 -0
  305. package/dist/esm-es5/interfaces-CyJHzEjr.js +1 -0
  306. package/dist/esm-es5/intl-CN471tL5.js +1 -0
  307. package/dist/esm-es5/loader.js +1 -0
  308. package/dist/esm-es5/priv-calendar.entry.js +1 -0
  309. package/dist/esm-es5/priv-chart-popover.entry.js +1 -0
  310. package/dist/esm-es5/priv-navigator-button_2.entry.js +1 -0
  311. package/dist/esm-es5/priv-option-list_2.entry.js +1 -0
  312. package/dist/esm-es5/ripple.js +1 -0
  313. package/dist/esm-es5/wm-action-menu_4.entry.js +1 -0
  314. package/dist/esm-es5/wm-chart-slice.entry.js +1 -0
  315. package/dist/esm-es5/wm-chart.entry.js +1 -0
  316. package/dist/esm-es5/wm-date-range.entry.js +1 -0
  317. package/dist/{ripple/wm-uploader.entry.js → esm-es5/wm-datepicker.entry.js} +1 -313
  318. package/dist/{ripple/wm-tab-item.entry.js → esm-es5/wm-file-list.entry.js} +1 -63
  319. package/dist/esm-es5/wm-file.entry.js +1 -0
  320. package/dist/esm-es5/wm-flyout.entry.js +1 -0
  321. package/dist/esm-es5/wm-input.entry.js +1 -0
  322. package/dist/esm-es5/wm-line-chart.entry.js +1 -0
  323. package/dist/{ripple/wm-navigation.entry.js → esm-es5/wm-modal-footer.entry.js} +1 -116
  324. package/dist/esm-es5/wm-modal-header.entry.js +1 -0
  325. package/dist/esm-es5/wm-modal-pss-footer.entry.js +1 -0
  326. package/dist/esm-es5/wm-modal-pss-header.entry.js +1 -0
  327. package/dist/esm-es5/wm-modal-pss.entry.js +1 -0
  328. package/dist/esm-es5/wm-modal.entry.js +1 -0
  329. package/dist/esm-es5/wm-navigation-hamburger.entry.js +1 -0
  330. package/dist/esm-es5/wm-navigation-item.entry.js +1 -0
  331. package/dist/esm-es5/wm-navigation.entry.js +1 -0
  332. package/dist/esm-es5/wm-navigator.entry.js +1 -0
  333. package/dist/esm-es5/wm-nested-select.entry.js +1 -0
  334. package/dist/esm-es5/wm-optgroup.entry.js +1 -0
  335. package/dist/esm-es5/wm-pagination.entry.js +1 -0
  336. package/dist/{ripple/wm-modal-footer.entry.js → esm-es5/wm-progress-indicator.entry.js} +1 -44
  337. package/dist/esm-es5/wm-progress-monitor.entry.js +1 -0
  338. package/dist/esm-es5/wm-progress-slice.entry.js +1 -0
  339. package/dist/esm-es5/wm-search.entry.js +1 -0
  340. package/dist/esm-es5/wm-select.entry.js +1 -0
  341. package/dist/esm-es5/wm-tab-item.entry.js +1 -0
  342. package/dist/esm-es5/wm-tab-list.entry.js +1 -0
  343. package/dist/esm-es5/wm-tab-panel.entry.js +1 -0
  344. package/dist/esm-es5/wm-tag-input.entry.js +1 -0
  345. package/dist/esm-es5/wm-tag-option.entry.js +1 -0
  346. package/dist/esm-es5/wm-textarea.entry.js +1 -0
  347. package/dist/esm-es5/wm-timepicker.entry.js +1 -0
  348. package/dist/esm-es5/wm-toggletip.entry.js +1 -0
  349. package/dist/esm-es5/wm-uploader.entry.js +1 -0
  350. package/dist/esm-es5/wm-wrapper.entry.js +1 -0
  351. package/dist/index.cjs.js +1 -0
  352. package/dist/index.js +1 -0
  353. package/dist/loader/cdn.js +2 -0
  354. package/dist/loader/index.cjs.js +2 -0
  355. package/dist/loader/index.d.ts +24 -0
  356. package/dist/loader/index.es2017.js +2 -0
  357. package/dist/loader/index.js +3 -0
  358. package/dist/ripple/index.esm.js +0 -1
  359. package/dist/ripple/p-007883c7.entry.js +1 -0
  360. package/dist/ripple/p-01456c1a.system.entry.js +1 -0
  361. package/dist/ripple/p-0b716fc3.system.entry.js +1 -0
  362. package/dist/ripple/p-11c9e7ee.system.entry.js +1 -0
  363. package/dist/ripple/p-176778bc.system.entry.js +1 -0
  364. package/dist/ripple/p-1f7e1851.entry.js +1 -0
  365. package/dist/ripple/p-28e8965b.system.entry.js +1 -0
  366. package/dist/ripple/p-29302f19.entry.js +1 -0
  367. package/dist/ripple/p-2bd007af.system.entry.js +1 -0
  368. package/dist/ripple/p-2f629074.system.entry.js +1 -0
  369. package/dist/ripple/{priv-navigator-item.entry.js → p-3042aae4.entry.js} +1 -30
  370. package/dist/ripple/p-340b73a9.system.entry.js +1 -0
  371. package/dist/ripple/p-369b764a.entry.js +1 -0
  372. package/dist/ripple/p-384d9208.system.entry.js +1 -0
  373. package/dist/ripple/p-3b08f15d.system.entry.js +1 -0
  374. package/dist/ripple/p-3d459e5a.entry.js +1 -0
  375. package/dist/ripple/p-3e1202c6.entry.js +1 -0
  376. package/dist/ripple/p-3e9a2ef6.system.entry.js +1 -0
  377. package/dist/ripple/p-418e3d1a.system.entry.js +1 -0
  378. package/dist/ripple/p-44d2ecd5.entry.js +1 -0
  379. package/dist/ripple/p-4841e9cd.entry.js +1 -0
  380. package/dist/ripple/p-492a8a9f.entry.js +1 -0
  381. package/dist/ripple/p-4a28da80.system.entry.js +1 -0
  382. package/dist/ripple/{priv-option-list.entry.js → p-4b264fb2.entry.js} +1 -385
  383. package/dist/ripple/p-4b4671e7.entry.js +1 -0
  384. package/dist/ripple/p-4b5bb9c8.entry.js +1 -0
  385. package/dist/ripple/{wm-modal-pss-header.entry.js → p-4f4868cb.system.entry.js} +1 -39
  386. package/dist/ripple/p-54aeadde.entry.js +1 -0
  387. package/dist/ripple/p-56422175.entry.js +1 -0
  388. package/dist/ripple/p-568bb1f9.entry.js +1 -0
  389. package/dist/ripple/p-5802a317.system.entry.js +1 -0
  390. package/dist/ripple/p-5ae17300.system.entry.js +1 -0
  391. package/dist/ripple/p-5e3fbe45.entry.js +1 -0
  392. package/dist/ripple/p-60363868.entry.js +1 -0
  393. package/dist/ripple/p-792f7c79.entry.js +1 -0
  394. package/dist/ripple/p-7aa1c452.system.entry.js +1 -0
  395. package/dist/ripple/p-7fbbb63a.system.entry.js +1 -0
  396. package/dist/ripple/p-812615ae.entry.js +1 -0
  397. package/dist/ripple/{wm-snackbar.entry.js → p-86b22f7b.entry.js} +1 -185
  398. package/dist/ripple/p-8cbefd04.entry.js +1 -0
  399. package/dist/ripple/{wm-progress-indicator.entry.js → p-8ee4401f.entry.js} +1 -107
  400. package/dist/ripple/{priv-chart-popover.entry.js → p-94e4dc77.system.entry.js} +1 -134
  401. package/dist/ripple/p-9a8e3525.entry.js +1 -0
  402. package/dist/ripple/p-9c14176e.system.entry.js +1 -0
  403. package/dist/ripple/p-9c993a3e.system.entry.js +1 -0
  404. package/dist/ripple/p-BIzU753x.system.js +1 -0
  405. package/dist/ripple/p-BNmjUWhs.js +1 -0
  406. package/dist/ripple/p-CDk__KSi.system.js +1 -0
  407. package/dist/ripple/p-CFV9VgE2.system.js +1 -0
  408. package/dist/ripple/p-CGHKc6U6.js +1 -0
  409. package/dist/ripple/p-CTau6pR2.system.js +2 -0
  410. package/dist/ripple/p-CU95tthb.js +1 -0
  411. package/dist/ripple/p-CcozwjO1.js +1 -0
  412. package/dist/ripple/p-CwkTkxrj.system.js +1 -0
  413. package/dist/ripple/p-CyJHzEjr.js +1 -0
  414. package/dist/ripple/p-EopL5zo4.js +2 -0
  415. package/dist/ripple/p-GtT-372c.system.js +1 -0
  416. package/dist/ripple/p-YWpyar7R.system.js +1 -0
  417. package/dist/ripple/p-a4d4a752.entry.js +1 -0
  418. package/dist/ripple/p-a7b4f720.system.entry.js +1 -0
  419. package/dist/ripple/p-adffc8d9.system.entry.js +1 -0
  420. package/dist/ripple/p-b53e397f.entry.js +1 -0
  421. package/dist/ripple/p-b6956929.system.entry.js +1 -0
  422. package/dist/ripple/p-b79f5594.system.entry.js +1 -0
  423. package/dist/ripple/p-b94e08f4.system.entry.js +1 -0
  424. package/dist/ripple/p-bb930411.entry.js +1 -0
  425. package/dist/ripple/p-bd0f8d31.system.entry.js +1 -0
  426. package/dist/ripple/p-be146306.system.entry.js +1 -0
  427. package/dist/ripple/p-c59fa446.system.entry.js +1 -0
  428. package/dist/ripple/p-c7269416.entry.js +1 -0
  429. package/dist/ripple/p-c7f446e9.system.entry.js +1 -0
  430. package/dist/ripple/p-ca8c26b0.entry.js +1 -0
  431. package/dist/ripple/p-cccfdbb8.entry.js +1 -0
  432. package/dist/ripple/p-cfb2bbf1.system.entry.js +1 -0
  433. package/dist/ripple/p-d298ef0a.system.entry.js +1 -0
  434. package/dist/ripple/p-d66f8dfc.system.entry.js +1 -0
  435. package/dist/ripple/p-d715f567.system.entry.js +1 -0
  436. package/dist/ripple/p-d8cd69fb.entry.js +1 -0
  437. package/dist/ripple/p-d9033c6b.entry.js +1 -0
  438. package/dist/ripple/p-da5ad94c.system.entry.js +1 -0
  439. package/dist/ripple/p-da6646bf.entry.js +1 -0
  440. package/dist/ripple/p-dc44a726.entry.js +1 -0
  441. package/dist/ripple/p-e04561b5.system.entry.js +1 -0
  442. package/dist/ripple/p-e8cdf66c.entry.js +1 -0
  443. package/dist/ripple/p-ec1c0b3e.system.entry.js +1 -0
  444. package/dist/ripple/p-ef9c66dd.entry.js +1 -0
  445. package/dist/ripple/p-f44dafc1.entry.js +1 -0
  446. package/dist/ripple/p-f4c59921.system.entry.js +1 -0
  447. package/dist/ripple/p-f6e9cb0e.entry.js +1 -0
  448. package/dist/ripple/p-faa45b92.system.entry.js +1 -0
  449. package/dist/ripple/p-faf34fd1.system.entry.js +1 -0
  450. package/dist/ripple/{wm-tab-list.entry.js → p-fd006ae2.entry.js} +1 -175
  451. package/dist/ripple/p-fd9c8220.system.entry.js +1 -0
  452. package/dist/ripple/p-fe1ac4e0.entry.js +1 -0
  453. package/dist/ripple/p-fe5c9681.entry.js +1 -0
  454. package/dist/ripple/p-feb343ad.system.entry.js +1 -0
  455. package/dist/ripple/p-ff3cbb1d.entry.js +1 -0
  456. package/dist/ripple/p-rbkCjczS.system.js +1 -0
  457. package/dist/ripple/ripple.esm.js +1 -48
  458. package/dist/ripple/ripple.js +127 -0
  459. package/package.json +2 -2
  460. package/dist/ripple/index-CU5QNCKv.js +0 -4167
  461. package/dist/ripple/priv-calendar.entry.js +0 -566
  462. package/dist/ripple/priv-navigator-button.entry.js +0 -24
  463. package/dist/ripple/wm-action-menu.entry.js +0 -201
  464. package/dist/ripple/wm-button.entry.js +0 -197
  465. package/dist/ripple/wm-date-range.entry.js +0 -477
  466. package/dist/ripple/wm-datepicker.entry.js +0 -247
  467. package/dist/ripple/wm-line-chart.entry.js +0 -449
  468. package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
  469. package/dist/ripple/wm-modal-pss.entry.js +0 -135
  470. package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
  471. package/dist/ripple/wm-navigation-item.entry.js +0 -18
  472. package/dist/ripple/wm-navigator.entry.js +0 -368
  473. package/dist/ripple/wm-nested-select.entry.js +0 -308
  474. package/dist/ripple/wm-pagination.entry.js +0 -223
  475. package/dist/ripple/wm-tag-input.entry.js +0 -877
  476. package/dist/ripple/wm-timepicker.entry.js +0 -300
@@ -0,0 +1,849 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { intl, dateFind, getMonthLength, makeISO, calendar_months, weekdays } from "../../../global/functions";
3
+ export class PrivCalendar {
4
+ constructor() {
5
+ this.today = this.dateToISO(new Date());
6
+ this.disabled = false;
7
+ this.view = "day";
8
+ this.focusDate = this.today; // ISO date
9
+ this.calType = "single";
10
+ this.calName = "";
11
+ this.calInstructions = intl.formatMessage({
12
+ id: "date.instructions",
13
+ 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.",
14
+ });
15
+ this._focus = {
16
+ year: {
17
+ asString: () => dateFind.year.asString(this.focusDate),
18
+ asInt: () => dateFind.year.asInt(this.focusDate),
19
+ set: (y) => {
20
+ const m = this._focus.month.asInt();
21
+ const d = this._focus.day.asInt();
22
+ this.focusDate = makeISO(y, m, d);
23
+ },
24
+ increase: (n) => {
25
+ const newDate = dateFind.year.increase(this.focusDate, n);
26
+ this.focusDate = newDate;
27
+ },
28
+ decrease: (n) => {
29
+ const newDate = dateFind.year.decrease(this.focusDate, n);
30
+ this.focusDate = newDate;
31
+ },
32
+ },
33
+ month: {
34
+ asString: () => dateFind.month.asString(this.focusDate),
35
+ asInt: () => dateFind.month.asInt(this.focusDate),
36
+ set: (m) => {
37
+ const y = this._focus.year.asInt();
38
+ const d = this._focus.day.asInt();
39
+ this.focusDate = makeISO(y, m, d);
40
+ },
41
+ increase: (n) => {
42
+ const newDate = dateFind.month.increase(this.focusDate, n);
43
+ this.focusDate = newDate;
44
+ },
45
+ decrease: (n) => {
46
+ const newDate = dateFind.month.decrease(this.focusDate, n);
47
+ this.focusDate = newDate;
48
+ },
49
+ },
50
+ day: {
51
+ asString: () => dateFind.day.asString(this.focusDate),
52
+ asInt: () => dateFind.day.asInt(this.focusDate),
53
+ set: (d) => {
54
+ const y = this._focus.year.asInt();
55
+ const m = this._focus.month.asInt();
56
+ d = d === -1 ? getMonthLength(m, y) : d;
57
+ this.focusDate = makeISO(y, m, d);
58
+ },
59
+ increase: (n) => {
60
+ const newDate = dateFind.day.increase(this.focusDate, n);
61
+ this.focusDate = newDate;
62
+ },
63
+ decrease: (n) => {
64
+ const newDate = dateFind.day.decrease(this.focusDate, n);
65
+ this.focusDate = newDate;
66
+ },
67
+ },
68
+ };
69
+ this.monthButtonFocus = {
70
+ set: (i) => {
71
+ const buttons = Array.from(this.el.querySelectorAll(".month"));
72
+ const selButton = buttons.filter((b) => b.classList.contains("focused"))[0];
73
+ selButton.classList.remove("selected");
74
+ selButton.tabIndex = -1;
75
+ buttons[i - 1].classList.add("selected");
76
+ buttons[i - 1].tabIndex = 0;
77
+ buttons[i - 1].focus();
78
+ },
79
+ increase: (i) => {
80
+ const buttons = Array.from(this.el.querySelectorAll(".month"));
81
+ const selButton = buttons.filter((b) => b.classList.contains("focused"))[0];
82
+ const oldIndex = buttons.indexOf(selButton);
83
+ const newIndex = (oldIndex + i) % 12;
84
+ if (newIndex < oldIndex) {
85
+ this._focus.year.increase(1);
86
+ }
87
+ selButton.classList.remove("focused");
88
+ selButton.tabIndex = -1;
89
+ buttons[newIndex].classList.add("focused");
90
+ buttons[newIndex].tabIndex = 0;
91
+ buttons[newIndex].focus();
92
+ },
93
+ decrease: (i) => {
94
+ const buttons = Array.from(this.el.querySelectorAll(".month"));
95
+ const selButton = buttons.filter((b) => b.classList.contains("focused"))[0];
96
+ const oldIndex = buttons.indexOf(selButton);
97
+ // ensure no neg values for modulo
98
+ let newIndex = oldIndex + 24;
99
+ newIndex = (newIndex - i) % 12;
100
+ if (newIndex > oldIndex) {
101
+ this._focus.year.decrease(1);
102
+ }
103
+ selButton.classList.remove("focused");
104
+ selButton.tabIndex = -1;
105
+ buttons[newIndex].classList.add("focused");
106
+ buttons[newIndex].tabIndex = 0;
107
+ buttons[newIndex].focus();
108
+ },
109
+ };
110
+ this.renderCalendarDate = (date, index, eitherStart, eitherEnd) => {
111
+ if (date === "placeholder") {
112
+ return h("div", { role: "gridcell" });
113
+ }
114
+ const monthOfDate = dateFind.month.asInt(date);
115
+ const dayOfDate = dateFind.day.asInt(date);
116
+ const yearOfDate = dateFind.year.asInt(date);
117
+ const isStartDate = eitherStart && eitherStart === date;
118
+ let selected = isStartDate ? "true" : "false";
119
+ const classesArr = ["date-cell"];
120
+ const isFocused = date === this.focusDate;
121
+ const isToday = date === this.today;
122
+ if (isToday)
123
+ classesArr.push("today");
124
+ if (this.calType === "range") {
125
+ const isEndDate = eitherStart && eitherEnd && eitherEnd === date && eitherStart < eitherEnd;
126
+ selected = isEndDate ? "true" : selected;
127
+ const isFirstOfMonth = dayOfDate === 1;
128
+ const isLastOfMonth = dayOfDate === getMonthLength(monthOfDate, yearOfDate);
129
+ const isInRange = this.isInRange(date);
130
+ const isInRangePreview = this.isInRangePreview(date);
131
+ const isPreviewStartOrEnd = !eitherEnd && eitherStart && this.hoverDate && date === this.hoverDate;
132
+ const isPreviewStart = isPreviewStartOrEnd && this.hoverDate < eitherStart;
133
+ const isPreviewEnd = isPreviewStartOrEnd && this.hoverDate > eitherStart;
134
+ if (isFirstOfMonth)
135
+ classesArr.push("first-of-month");
136
+ if (isLastOfMonth)
137
+ classesArr.push("last-of-month");
138
+ if (isStartDate) {
139
+ if (isInRangePreview && !isEndDate && this.hoverDate && this.hoverDate < eitherStart) {
140
+ // invert the arrow direction if user mouses over a prior date
141
+ classesArr.push("range-end");
142
+ }
143
+ else {
144
+ classesArr.push("range-start");
145
+ }
146
+ }
147
+ if (isEndDate)
148
+ classesArr.push("range-end");
149
+ if (isInRange)
150
+ classesArr.push("in-range");
151
+ if (isInRangePreview)
152
+ classesArr.push("in-range preview");
153
+ if (isPreviewStart)
154
+ classesArr.push("preview-start");
155
+ if (isPreviewEnd)
156
+ classesArr.push("preview-end");
157
+ }
158
+ const classes = classesArr.join(" ");
159
+ return (h("div", { role: "gridcell", id: `cell-${date}`, class: classes, "aria-selected": selected, "aria-label": `${isToday
160
+ ? `${intl.formatMessage({
161
+ id: "date.today",
162
+ defaultMessage: "today",
163
+ description: "calendar button",
164
+ })}, `
165
+ : ""}${weekdays[index]}, ${calendar_months[monthOfDate - 1]} ${dayOfDate}, ${yearOfDate}`, onClick: (ev) => {
166
+ this.handleDateClick(ev.target);
167
+ }, onMouseOver: () => this.cellHovered.emit(date), "data-month": dateFind.month.asString(date), "data-year": dateFind.year.asString(date), onBlur: (ev) => ev.stopPropagation(), tabIndex: isFocused ? 0 : -1 }, dayOfDate));
168
+ };
169
+ }
170
+ setCalName() {
171
+ const cals = this.el.parentElement.querySelectorAll("priv-calendar");
172
+ let calname;
173
+ // if the parent el only contains one calendar
174
+ if (cals.length === 1) {
175
+ calname = intl.formatMessage({
176
+ id: "date.calName",
177
+ defaultMessage: "Calendar. ",
178
+ });
179
+ // if this calendar is the first of the two
180
+ }
181
+ else if (cals[0] === this.el) {
182
+ calname = intl.formatMessage({
183
+ id: "date.firstCalName",
184
+ defaultMessage: "First calendar. ",
185
+ });
186
+ }
187
+ else {
188
+ calname = intl.formatMessage({
189
+ id: "date.secondCalName",
190
+ defaultMessage: "Second calendar. ",
191
+ });
192
+ }
193
+ this.calName = calname;
194
+ }
195
+ setCalType() {
196
+ const cals = this.el.parentElement.querySelectorAll("priv-calendar");
197
+ // if the parent el only contains one calendar
198
+ this.calType = cals.length === 1 ? "single" : "range";
199
+ }
200
+ componentWillLoad() {
201
+ this.setCalName();
202
+ this.setCalType();
203
+ }
204
+ handleFocusDate(newVal, oldVal) {
205
+ if (this.view === "day") {
206
+ const oldCell = this.getCell(oldVal);
207
+ if (oldCell)
208
+ oldCell.tabIndex = -1;
209
+ const newCell = this.getCell(newVal);
210
+ if (newCell)
211
+ newCell.tabIndex = 0;
212
+ }
213
+ else {
214
+ const oldMonthEl = this.el.querySelector(`#month-${dateFind.month.asInt(oldVal)}`);
215
+ if (oldMonthEl)
216
+ oldMonthEl.tabIndex = -1;
217
+ const newMonthEl = this.el.querySelector(`#month-${dateFind.month.asInt(newVal)}`);
218
+ if (newMonthEl)
219
+ newMonthEl.tabIndex = 0;
220
+ //monthToFocus.focus();
221
+ }
222
+ this.dateFocus.emit();
223
+ }
224
+ get otherCalEl() {
225
+ const bothCals = this.el.parentElement.querySelectorAll("priv-calendar");
226
+ let val;
227
+ if (bothCals.length === 2) {
228
+ val = bothCals[0] === this.el ? bothCals[1] : bothCals[0];
229
+ }
230
+ // returns undefined for wm-datepicker
231
+ // or possibly on first load if everything hasn't loaded yet
232
+ return val;
233
+ }
234
+ get headerButtonEls() {
235
+ return Array.from(this.el.querySelectorAll(".header-btn"));
236
+ }
237
+ handleKey(ev) {
238
+ switch (ev.key) {
239
+ case " ":
240
+ case "Enter":
241
+ ev.preventDefault();
242
+ //Clunky exception for blur validation. Remove when blur reworked.
243
+ !ev.target.id.includes("popup-title") && ev.target.click();
244
+ break;
245
+ case "PageUp":
246
+ ev.preventDefault();
247
+ if (this.view === "day") {
248
+ this._focus.month.decrease(1);
249
+ this.focusCell();
250
+ }
251
+ else {
252
+ this._focus.year.decrease(1);
253
+ }
254
+ break;
255
+ case "PageDown":
256
+ ev.preventDefault();
257
+ if (this.view === "day") {
258
+ this._focus.month.increase(1);
259
+ this.focusCell();
260
+ }
261
+ else {
262
+ this._focus.year.increase(1);
263
+ }
264
+ break;
265
+ case "Home":
266
+ ev.preventDefault();
267
+ if (this.view === "day") {
268
+ this._focus.day.set(1);
269
+ this.focusCell();
270
+ }
271
+ else {
272
+ this.monthButtonFocus.set(1);
273
+ }
274
+ break;
275
+ case "End":
276
+ ev.preventDefault();
277
+ if (this.view === "day") {
278
+ this._focus.day.set(-1);
279
+ this.focusCell();
280
+ }
281
+ else {
282
+ this.monthButtonFocus.set(12);
283
+ }
284
+ break;
285
+ case "ArrowLeft":
286
+ ev.preventDefault();
287
+ if (this.view === "day") {
288
+ this._focus.day.decrease(1);
289
+ // if the month changes as a result of this navigation, calendar must render the correct month before the proper cell can be focused
290
+ this.focusCell();
291
+ }
292
+ else {
293
+ this.monthButtonFocus.decrease(1);
294
+ }
295
+ break;
296
+ case "ArrowRight":
297
+ ev.preventDefault();
298
+ if (this.view === "day") {
299
+ this._focus.day.increase(1);
300
+ this.focusCell();
301
+ }
302
+ else {
303
+ this.monthButtonFocus.increase(1);
304
+ }
305
+ break;
306
+ case "ArrowUp":
307
+ ev.preventDefault();
308
+ if (this.view === "day") {
309
+ this._focus.day.decrease(7);
310
+ this.focusCell();
311
+ }
312
+ else {
313
+ this.monthButtonFocus.decrease(3);
314
+ }
315
+ break;
316
+ case "ArrowDown":
317
+ ev.preventDefault();
318
+ if (this.view === "day") {
319
+ //If the down arrow is pressed from the month button or the arrow buttons, focus should shift to the current cell in focus
320
+ if (!(document.activeElement.shadowRoot || document).activeElement.classList.contains("date-cell")) {
321
+ this.focusCell();
322
+ break;
323
+ }
324
+ this._focus.day.increase(7);
325
+ this.focusCell();
326
+ }
327
+ else {
328
+ //If the down arrow is pressed from the arrow buttons or the title box, focus should shift to the current month in focus
329
+ const activeEl = (document.activeElement.shadowRoot || document).activeElement;
330
+ if (activeEl.classList.contains("header-btn")) {
331
+ this.focusCell();
332
+ break;
333
+ }
334
+ this.monthButtonFocus.increase(3);
335
+ }
336
+ break;
337
+ }
338
+ }
339
+ handleDateClick(el) {
340
+ const detail = { cal: this.el, cell: el };
341
+ this.cellTriggered.emit(detail);
342
+ // change of input value will trigger the function updating selectedDate
343
+ }
344
+ removeZeroes(date) {
345
+ return +date < 10 ? +date.slice(1) : +date;
346
+ }
347
+ dateToISO(date) {
348
+ const dateArr = [
349
+ date.getUTCFullYear().toString().padStart(4, "0"),
350
+ (date.getUTCMonth() + 1).toString().padStart(2, "0"),
351
+ date.getUTCDate().toString().padStart(2, "0"),
352
+ ];
353
+ return dateArr.join("-");
354
+ }
355
+ isInRange(date) {
356
+ if (this.otherCalEl) {
357
+ const eitherStart = this.startDate || this.otherCalEl.startDate;
358
+ const eitherEnd = this.endDate || this.otherCalEl.endDate;
359
+ if (eitherStart && eitherEnd) {
360
+ // if both dates exist the range is shown
361
+ return eitherStart <= date && date <= eitherEnd;
362
+ }
363
+ }
364
+ return false;
365
+ }
366
+ isInRangePreview(date) {
367
+ if (this.otherCalEl) {
368
+ const eitherStart = this.startDate || this.otherCalEl.startDate;
369
+ const eitherEnd = this.endDate || this.otherCalEl.endDate;
370
+ // no preview if there's an existing range
371
+ if (eitherStart && eitherEnd)
372
+ return false;
373
+ if (eitherStart && this.hoverDate) {
374
+ // if only startDate exists, the hovered date functions as the other end of the range
375
+ if (this.hoverDate > eitherStart) {
376
+ return eitherStart <= date && date <= this.hoverDate;
377
+ }
378
+ else if (this.hoverDate < eitherStart) {
379
+ // user is mousing over a date prior to the start date
380
+ // start date considered as end of range
381
+ return this.hoverDate <= date && date <= eitherStart;
382
+ } // if neither < or > then it's the same date and should return false
383
+ }
384
+ else if (eitherEnd && this.hoverDate) {
385
+ // if only endDate exists, the hovered date functions as the other end of the range
386
+ if (this.hoverDate < eitherEnd) {
387
+ return this.hoverDate <= date && date <= eitherEnd;
388
+ }
389
+ else if (this.hoverDate > eitherEnd) {
390
+ // user is mousing over a date later than the end date
391
+ // end date considered as beggining of range
392
+ return eitherEnd <= date && date <= this.hoverDate;
393
+ }
394
+ }
395
+ }
396
+ return false;
397
+ }
398
+ // 1 => Sunday, 7 => Saturday
399
+ getMonthFirstDay(month, year) {
400
+ return +new Date(year, month - 1, 1, 12, 0, 0).getDay() + 1;
401
+ }
402
+ getCalendarDates(date) {
403
+ const month = dateFind.month.asInt(date);
404
+ const year = dateFind.year.asInt(date);
405
+ // Get number of days in the month and the month's first day
406
+ const monthDays = getMonthLength(month, year);
407
+ // Builds dates to be displayed from current month.
408
+ const dates = [...new Array(monthDays).fill(undefined)].map((_, index) => {
409
+ const day = index + 1;
410
+ return makeISO(year, month, day);
411
+ });
412
+ // Get number of empty cells from previous and next months
413
+ // These ensure a total of 42 days (6 weeks) displayed on the calendar
414
+ const monthFirstDay = this.getMonthFirstDay(month, year);
415
+ const numBefore = monthFirstDay - 1;
416
+ const cellsBefore = numBefore > 0 ? new Array(numBefore).fill("placeholder") : [];
417
+ let numAfter = 42 - (numBefore + monthDays);
418
+ numAfter = numAfter > 6 ? numAfter - 7 : numAfter;
419
+ const cellsAfter = numAfter > 0 ? new Array(numAfter).fill("placeholder") : [];
420
+ return [...cellsBefore, ...dates, ...cellsAfter];
421
+ }
422
+ getCell(date) {
423
+ return this.el.querySelector(`#cell-${date}`);
424
+ }
425
+ async focusFirstFocusable() {
426
+ this.prevBtnEl.focus();
427
+ }
428
+ async focusLastFocusable() {
429
+ this.focusCell();
430
+ }
431
+ async focusCell() {
432
+ requestAnimationFrame(() => {
433
+ // 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.
434
+ const maxDays = getMonthLength(this._focus.month.asInt(), this._focus.year.asInt());
435
+ const dayToFocus = this._focus.day.asInt();
436
+ if (dayToFocus > maxDays) {
437
+ this._focus.day.set(maxDays);
438
+ }
439
+ if (this.view == "day") {
440
+ const cellToFocus = this.getCell(this.focusDate);
441
+ if (cellToFocus) {
442
+ cellToFocus.tabIndex = 0;
443
+ cellToFocus.focus();
444
+ }
445
+ this.cellHovered.emit(this.focusDate);
446
+ }
447
+ else {
448
+ const monthToFocus = this.el.querySelector(`#month-${this._focus.month.asInt()}`);
449
+ if (monthToFocus) {
450
+ monthToFocus.tabIndex = 0;
451
+ monthToFocus.focus();
452
+ }
453
+ }
454
+ });
455
+ }
456
+ toggleBusyAttribute(state) {
457
+ this.el.querySelector("#wm-container").setAttribute("aria-busy", state);
458
+ }
459
+ renderMonth(month, index) {
460
+ return (h("button", { id: `month-${index + 1}`, class: `month ${this._focus.month.asInt() === index + 1 ? "selected focused" : ""}`, role: "gridcell", tabindex: index + 1 === this._focus.month.asInt() ? 0 : -1, onBlur: (ev) => ev.stopPropagation(), onClick: () => {
461
+ this._focus.month.set(index + 1);
462
+ this.view = "day";
463
+ this.focusCell();
464
+ } }, month));
465
+ }
466
+ renderDayView() {
467
+ const dates = this.getCalendarDates(this.focusDate);
468
+ // the start and end date, set in either of the calendars
469
+ const eitherStart = this.startDate || (this.otherCalEl && this.otherCalEl.startDate);
470
+ const eitherEnd = this.endDate || (this.otherCalEl && this.otherCalEl.endDate);
471
+ return (h("div", { class: "popup day-view" }, h("div", { class: "calendar-header" }, h("button", { onClick: () => {
472
+ this._focus.month.decrease(1);
473
+ }, class: "header-btn arw-btn", ref: (el) => (this.prevBtnEl = el), "aria-label": intl.formatMessage({
474
+ id: "date.selectPreviousMonth",
475
+ defaultMessage: "Select previous month",
476
+ description: "Calendar button",
477
+ }) }, h("span", { class: "svg-icon svg-previous" })), h("div", { id: "popup-title-month", class: "header-btn title-box", tabindex: "0", role: "button", onKeyDown: (ev) => {
478
+ if (ev.key === "Enter" || ev.key === " ") {
479
+ ev.preventDefault();
480
+ this.view = "month";
481
+ }
482
+ }, onClick: () => (this.view = "month"), "aria-label": `${intl.formatMessage({
483
+ id: "date.currentMonth",
484
+ defaultMessage: "current month",
485
+ description: "Calendar button",
486
+ })}: ${calendar_months[this._focus.month.asInt() - 1]}
487
+ ${this._focus.year.asString()}.`, "aria-describedby": "month-title" }, h("span", { class: "title", "aria-hidden": "true" }, calendar_months[this._focus.month.asInt() - 1], " ", this._focus.year.asString()), h("span", { class: "svg-icon svg-expand-more" })), h("button", { onClick: () => {
488
+ this._focus.month.increase(1);
489
+ }, "aria-label": intl.formatMessage({
490
+ id: "date.selectNextMonth",
491
+ defaultMessage: "Select next month",
492
+ description: "Calendar button",
493
+ }), class: "header-btn arw-btn" }, h("span", { class: "svg-icon svg-next" }))), 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({
494
+ id: "date.su",
495
+ defaultMessage: "Su",
496
+ description: "Abbreviated day of the week",
497
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
498
+ id: "date.mo",
499
+ defaultMessage: "Mo",
500
+ description: "Abbreviated day of the week",
501
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
502
+ id: "date.tu",
503
+ defaultMessage: "Tu",
504
+ description: "Abbreviated day of the week",
505
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
506
+ id: "date.we",
507
+ defaultMessage: "We",
508
+ description: "Abbreviated day of the week",
509
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
510
+ id: "date.th",
511
+ defaultMessage: "Th",
512
+ description: "Abbreviated day of the week",
513
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
514
+ id: "date.fr",
515
+ defaultMessage: "Fr",
516
+ description: "Abbreviated day of the week",
517
+ }))), h("div", { role: "columnheader", class: "header-cell" }, h("span", null, intl.formatMessage({
518
+ id: "date.sa",
519
+ defaultMessage: "Sa",
520
+ description: "Abbreviated day of the week",
521
+ }))))), h("div", { role: "rowgroup" }, h("div", { role: "row", class: "date-row" }, dates.slice(0, 7).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(7, 14).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(14, 21).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(21, 28).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd))), h("div", { role: "row" }, dates.slice(28, 35).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd))), dates.length > 35 ? (h("div", { role: "row" }, dates.slice(35).map((date, i) => this.renderCalendarDate(date, i, eitherStart, eitherEnd)))) : ("")))));
522
+ }
523
+ renderMonthView() {
524
+ return (h("div", { class: "month-view" }, h("div", { class: "calendar-header" }, h("button", { onClick: () => {
525
+ this._focus.year.decrease(1);
526
+ }, "aria-label": intl.formatMessage({
527
+ id: "date.selectPreviousYear",
528
+ defaultMessage: "Select previous year",
529
+ description: "Calendar button",
530
+ }), class: "header-btn arw-btn", ref: (el) => (this.prevBtnEl = el) }, h("span", { class: "svg-icon svg-previous" })), h("div", { id: "popup-title-year", tabindex: "0", class: "header-btn title-box year", role: "button", onClick: () => (this.view = "day"), onKeyDown: (ev) => {
531
+ if (ev.key === "Enter" || ev.key === " ") {
532
+ ev.preventDefault();
533
+ this.view = "day";
534
+ }
535
+ }, "aria-labelledby": "year-title" }, h("span", { class: "title" }, this._focus.year.asString()), h("span", { class: "svg-icon svg-expand-less" })), h("button", { onClick: () => {
536
+ this._focus.year.increase(1);
537
+ }, "aria-label": intl.formatMessage({
538
+ id: "date.selectNextYear",
539
+ defaultMessage: "Select next year",
540
+ description: "Calendar button",
541
+ }), class: "header-btn arw-btn" }, h("span", { class: "svg-icon svg-next" }))), h("div", { "aria-labelledby": "popup-title-year", role: "grid", class: "months" }, h("div", { role: "row", class: "month-row" }, calendar_months.slice(0, 3).map((month, index) => this.renderMonth(month, index))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(3, 6).map((month, index) => this.renderMonth(month, index + 3))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(6, 9).map((month, index) => this.renderMonth(month, index + 6))), h("div", { role: "row", class: "month-row" }, calendar_months.slice(9).map((month, index) => this.renderMonth(month, index + 9))))));
542
+ }
543
+ render() {
544
+ return (h(Host, { key: '500ef2d223ffe8e8b5ff8303b45f26b7538adb06', onMouseOut: (ev) => {
545
+ // @ts-ignore
546
+ if (!this.el.parentElement.contains(ev.toElement))
547
+ this.outOfCal.emit();
548
+ }, role: "application", "aria-describedby": "application" }, this.view === "day" ? this.renderDayView() : this.renderMonthView(), h("div", { key: 'd91690922cc11ad991937dd87cd618d175bca76f', id: "application", class: "sr-only" }, this.calName, this.calInstructions)));
549
+ }
550
+ static get is() { return "priv-calendar"; }
551
+ static get originalStyleUrls() {
552
+ return {
553
+ "$": ["priv-calendar.scss"]
554
+ };
555
+ }
556
+ static get styleUrls() {
557
+ return {
558
+ "$": ["priv-calendar.css"]
559
+ };
560
+ }
561
+ static get properties() {
562
+ return {
563
+ "disabled": {
564
+ "type": "boolean",
565
+ "attribute": "disabled",
566
+ "mutable": false,
567
+ "complexType": {
568
+ "original": "boolean",
569
+ "resolved": "boolean",
570
+ "references": {}
571
+ },
572
+ "required": false,
573
+ "optional": false,
574
+ "docs": {
575
+ "tags": [],
576
+ "text": ""
577
+ },
578
+ "getter": false,
579
+ "setter": false,
580
+ "reflect": false,
581
+ "defaultValue": "false"
582
+ },
583
+ "view": {
584
+ "type": "string",
585
+ "attribute": "view",
586
+ "mutable": true,
587
+ "complexType": {
588
+ "original": "string",
589
+ "resolved": "string",
590
+ "references": {}
591
+ },
592
+ "required": false,
593
+ "optional": false,
594
+ "docs": {
595
+ "tags": [],
596
+ "text": ""
597
+ },
598
+ "getter": false,
599
+ "setter": false,
600
+ "reflect": false,
601
+ "defaultValue": "\"day\""
602
+ },
603
+ "focusDate": {
604
+ "type": "string",
605
+ "attribute": "focus-date",
606
+ "mutable": true,
607
+ "complexType": {
608
+ "original": "string",
609
+ "resolved": "string",
610
+ "references": {}
611
+ },
612
+ "required": false,
613
+ "optional": false,
614
+ "docs": {
615
+ "tags": [],
616
+ "text": ""
617
+ },
618
+ "getter": false,
619
+ "setter": false,
620
+ "reflect": false,
621
+ "defaultValue": "this.today"
622
+ },
623
+ "startDate": {
624
+ "type": "string",
625
+ "attribute": "start-date",
626
+ "mutable": false,
627
+ "complexType": {
628
+ "original": "string",
629
+ "resolved": "string | undefined",
630
+ "references": {}
631
+ },
632
+ "required": false,
633
+ "optional": true,
634
+ "docs": {
635
+ "tags": [],
636
+ "text": ""
637
+ },
638
+ "getter": false,
639
+ "setter": false,
640
+ "reflect": false
641
+ },
642
+ "endDate": {
643
+ "type": "string",
644
+ "attribute": "end-date",
645
+ "mutable": false,
646
+ "complexType": {
647
+ "original": "string",
648
+ "resolved": "string | undefined",
649
+ "references": {}
650
+ },
651
+ "required": false,
652
+ "optional": true,
653
+ "docs": {
654
+ "tags": [],
655
+ "text": ""
656
+ },
657
+ "getter": false,
658
+ "setter": false,
659
+ "reflect": false
660
+ },
661
+ "hoverDate": {
662
+ "type": "string",
663
+ "attribute": "hover-date",
664
+ "mutable": false,
665
+ "complexType": {
666
+ "original": "string",
667
+ "resolved": "string | undefined",
668
+ "references": {}
669
+ },
670
+ "required": false,
671
+ "optional": true,
672
+ "docs": {
673
+ "tags": [],
674
+ "text": ""
675
+ },
676
+ "getter": false,
677
+ "setter": false,
678
+ "reflect": false
679
+ }
680
+ };
681
+ }
682
+ static get events() {
683
+ return [{
684
+ "method": "cellTriggered",
685
+ "name": "cellTriggered",
686
+ "bubbles": true,
687
+ "cancelable": true,
688
+ "composed": true,
689
+ "docs": {
690
+ "tags": [],
691
+ "text": ""
692
+ },
693
+ "complexType": {
694
+ "original": "{ cal: HTMLPrivCalendarElement; cell: HTMLElement }",
695
+ "resolved": "{ cal: HTMLPrivCalendarElement; cell: HTMLElement; }",
696
+ "references": {
697
+ "HTMLPrivCalendarElement": {
698
+ "location": "global",
699
+ "id": "global::HTMLPrivCalendarElement"
700
+ },
701
+ "HTMLElement": {
702
+ "location": "global",
703
+ "id": "global::HTMLElement"
704
+ }
705
+ }
706
+ }
707
+ }, {
708
+ "method": "cellHovered",
709
+ "name": "cellHovered",
710
+ "bubbles": true,
711
+ "cancelable": true,
712
+ "composed": true,
713
+ "docs": {
714
+ "tags": [],
715
+ "text": ""
716
+ },
717
+ "complexType": {
718
+ "original": "string",
719
+ "resolved": "string",
720
+ "references": {}
721
+ }
722
+ }, {
723
+ "method": "outOfCal",
724
+ "name": "outOfCal",
725
+ "bubbles": true,
726
+ "cancelable": true,
727
+ "composed": true,
728
+ "docs": {
729
+ "tags": [],
730
+ "text": ""
731
+ },
732
+ "complexType": {
733
+ "original": "string",
734
+ "resolved": "string",
735
+ "references": {}
736
+ }
737
+ }, {
738
+ "method": "popupBlurred",
739
+ "name": "popupBlurred",
740
+ "bubbles": true,
741
+ "cancelable": true,
742
+ "composed": true,
743
+ "docs": {
744
+ "tags": [],
745
+ "text": ""
746
+ },
747
+ "complexType": {
748
+ "original": "{ relatedTarget: EventTarget | null }",
749
+ "resolved": "{ relatedTarget: EventTarget | null; }",
750
+ "references": {
751
+ "EventTarget": {
752
+ "location": "global",
753
+ "id": "global::EventTarget"
754
+ }
755
+ }
756
+ }
757
+ }, {
758
+ "method": "dateFocus",
759
+ "name": "dateFocus",
760
+ "bubbles": true,
761
+ "cancelable": true,
762
+ "composed": true,
763
+ "docs": {
764
+ "tags": [],
765
+ "text": ""
766
+ },
767
+ "complexType": {
768
+ "original": "any",
769
+ "resolved": "any",
770
+ "references": {}
771
+ }
772
+ }];
773
+ }
774
+ static get methods() {
775
+ return {
776
+ "focusFirstFocusable": {
777
+ "complexType": {
778
+ "signature": "() => Promise<void>",
779
+ "parameters": [],
780
+ "references": {
781
+ "Promise": {
782
+ "location": "global",
783
+ "id": "global::Promise"
784
+ }
785
+ },
786
+ "return": "Promise<void>"
787
+ },
788
+ "docs": {
789
+ "text": "",
790
+ "tags": []
791
+ }
792
+ },
793
+ "focusLastFocusable": {
794
+ "complexType": {
795
+ "signature": "() => Promise<void>",
796
+ "parameters": [],
797
+ "references": {
798
+ "Promise": {
799
+ "location": "global",
800
+ "id": "global::Promise"
801
+ }
802
+ },
803
+ "return": "Promise<void>"
804
+ },
805
+ "docs": {
806
+ "text": "",
807
+ "tags": []
808
+ }
809
+ },
810
+ "focusCell": {
811
+ "complexType": {
812
+ "signature": "() => Promise<void>",
813
+ "parameters": [],
814
+ "references": {
815
+ "Promise": {
816
+ "location": "global",
817
+ "id": "global::Promise"
818
+ },
819
+ "HTMLTableCellElement": {
820
+ "location": "global",
821
+ "id": "global::HTMLTableCellElement"
822
+ }
823
+ },
824
+ "return": "Promise<void>"
825
+ },
826
+ "docs": {
827
+ "text": "",
828
+ "tags": []
829
+ }
830
+ }
831
+ };
832
+ }
833
+ static get elementRef() { return "el"; }
834
+ static get watchers() {
835
+ return [{
836
+ "propName": "focusDate",
837
+ "methodName": "handleFocusDate"
838
+ }];
839
+ }
840
+ static get listeners() {
841
+ return [{
842
+ "name": "keydown",
843
+ "method": "handleKey",
844
+ "target": undefined,
845
+ "capture": false,
846
+ "passive": false
847
+ }];
848
+ }
849
+ }