@watermarkinsights/ripple 5.13.0 → 5.13.1-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 (435) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/app-globals-12979223.js +92 -0
  3. package/dist/cjs/chartFunctions-5a8c4095.js +742 -0
  4. package/dist/cjs/functions-0774d303.js +10479 -0
  5. package/dist/cjs/index-788526f5.js +1863 -0
  6. package/dist/cjs/index.cjs.js +2 -0
  7. package/dist/cjs/interfaces-85d78ae9.js +37 -0
  8. package/dist/cjs/intl-4a204fe7.js +283 -0
  9. package/dist/cjs/loader.cjs.js +15 -0
  10. package/dist/cjs/priv-calendar.cjs.entry.js +574 -0
  11. package/dist/{ripple/wm-optgroup.entry.js → cjs/priv-chart-popover.cjs.entry.js} +120 -48
  12. package/dist/{ripple/wm-modal-footer.entry.js → cjs/priv-navigator-button.cjs.entry.js} +20 -35
  13. package/dist/{ripple/wm-navigator.entry.js → cjs/priv-navigator-item.cjs.entry.js} +24 -357
  14. package/dist/{ripple/wm-search.entry.js → cjs/priv-option-list.cjs.entry.js} +365 -180
  15. package/dist/cjs/ripple.cjs.js +25 -0
  16. package/dist/cjs/wm-action-menu_2.cjs.entry.js +335 -0
  17. package/dist/cjs/wm-button.cjs.entry.js +207 -0
  18. package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
  19. package/dist/cjs/wm-chart.cjs.entry.js +163 -0
  20. package/dist/cjs/wm-date-range.cjs.entry.js +484 -0
  21. package/dist/cjs/wm-datepicker.cjs.entry.js +254 -0
  22. package/dist/cjs/wm-file-list.cjs.entry.js +23 -0
  23. package/dist/cjs/wm-file.cjs.entry.js +194 -0
  24. package/dist/cjs/wm-flyout.cjs.entry.js +180 -0
  25. package/dist/cjs/wm-input.cjs.entry.js +125 -0
  26. package/dist/cjs/wm-line-chart.cjs.entry.js +461 -0
  27. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +217 -0
  28. package/dist/cjs/wm-modal_3.cjs.entry.js +217 -0
  29. package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
  30. package/dist/cjs/wm-navigator.cjs.entry.js +327 -0
  31. package/dist/cjs/wm-nested-select.cjs.entry.js +315 -0
  32. package/dist/cjs/wm-optgroup.cjs.entry.js +74 -0
  33. package/dist/cjs/wm-option_2.cjs.entry.js +427 -0
  34. package/dist/cjs/wm-pagination.cjs.entry.js +228 -0
  35. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
  36. package/dist/cjs/wm-search.cjs.entry.js +194 -0
  37. package/dist/cjs/wm-snackbar.cjs.entry.js +189 -0
  38. package/dist/cjs/wm-tab-item_3.cjs.entry.js +263 -0
  39. package/dist/cjs/wm-tag-input.cjs.entry.js +892 -0
  40. package/dist/cjs/wm-tag-option.cjs.entry.js +43 -0
  41. package/dist/cjs/wm-textarea.cjs.entry.js +88 -0
  42. package/dist/cjs/wm-timepicker.cjs.entry.js +307 -0
  43. package/dist/cjs/wm-toggletip.cjs.entry.js +183 -0
  44. package/dist/cjs/wm-uploader.cjs.entry.js +325 -0
  45. package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
  46. package/dist/collection/collection-manifest.json +197 -0
  47. package/dist/collection/components/charts/chartFunctions.js +675 -0
  48. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +1044 -0
  49. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +257 -0
  50. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +125 -0
  51. package/dist/collection/components/charts/wm-chart/wm-chart.css +1497 -0
  52. package/dist/collection/components/charts/wm-chart/wm-chart.js +422 -0
  53. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1202 -0
  54. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +723 -0
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1497 -0
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +264 -0
  57. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +1060 -0
  58. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +151 -0
  59. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +121 -0
  60. package/dist/collection/components/datepickers/datepicker.css +1179 -0
  61. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1414 -0
  62. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +840 -0
  63. package/dist/collection/components/datepickers/wm-date-range.js +849 -0
  64. package/dist/collection/components/datepickers/wm-datepicker.js +524 -0
  65. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +1053 -0
  66. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +780 -0
  67. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1316 -0
  68. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +620 -0
  69. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +965 -0
  70. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +258 -0
  71. package/dist/collection/components/selects/wm-option/wm-option.css +1066 -0
  72. package/dist/collection/components/selects/wm-option/wm-option.js +530 -0
  73. package/dist/collection/components/selects/wm-select/wm-select.css +1239 -0
  74. package/dist/collection/components/selects/wm-select/wm-select.js +584 -0
  75. package/dist/collection/components/wm-action-menu/wm-action-menu.css +1026 -0
  76. package/dist/collection/components/wm-action-menu/wm-action-menu.js +435 -0
  77. package/dist/collection/components/wm-button/wm-button.css +1571 -0
  78. package/dist/collection/components/wm-button/wm-button.js +489 -0
  79. package/dist/collection/components/wm-file/wm-file.css +1062 -0
  80. package/dist/collection/components/wm-file/wm-file.js +412 -0
  81. package/dist/collection/components/wm-file-list/wm-file-list.css +955 -0
  82. package/dist/collection/components/wm-file-list/wm-file-list.js +45 -0
  83. package/dist/collection/components/wm-flyout/wm-flyout.css +1149 -0
  84. package/dist/collection/components/wm-flyout/wm-flyout.js +448 -0
  85. package/dist/collection/components/wm-input/wm-input.css +1139 -0
  86. package/dist/collection/components/wm-input/wm-input.js +471 -0
  87. package/dist/collection/components/wm-menuitem/wm-menuitem.css +1026 -0
  88. package/dist/collection/components/wm-menuitem/wm-menuitem.js +419 -0
  89. package/dist/collection/components/wm-modal/wm-modal-footer.css +980 -0
  90. package/dist/collection/components/wm-modal/wm-modal-footer.js +142 -0
  91. package/dist/collection/components/wm-modal/wm-modal-header.css +979 -0
  92. package/dist/collection/components/wm-modal/wm-modal-header.js +79 -0
  93. package/dist/collection/components/wm-modal/wm-modal.css +1027 -0
  94. package/dist/collection/components/wm-modal/wm-modal.js +350 -0
  95. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +987 -0
  96. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +138 -0
  97. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +981 -0
  98. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +82 -0
  99. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1063 -0
  100. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +362 -0
  101. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +982 -0
  102. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +119 -0
  103. package/dist/collection/components/wm-navigation/wm-navigation-item.css +991 -0
  104. package/dist/collection/components/wm-navigation/wm-navigation-item.js +98 -0
  105. package/dist/collection/components/wm-navigation/wm-navigation.css +1033 -0
  106. package/dist/collection/components/wm-navigation/wm-navigation.js +190 -0
  107. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +985 -0
  108. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +86 -0
  109. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +965 -0
  110. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -0
  111. package/dist/collection/components/wm-navigator/wm-navigator.css +1038 -0
  112. package/dist/collection/components/wm-navigator/wm-navigator.js +496 -0
  113. package/dist/collection/components/wm-pagination/wm-pagination.css +1106 -0
  114. package/dist/collection/components/wm-pagination/wm-pagination.js +363 -0
  115. package/dist/collection/components/wm-search/wm-search.css +1031 -0
  116. package/dist/collection/components/wm-search/wm-search.js +427 -0
  117. package/dist/collection/components/wm-snackbar/wm-snackbar.css +1213 -0
  118. package/dist/collection/components/wm-snackbar/wm-snackbar.js +276 -0
  119. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +1004 -0
  120. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +175 -0
  121. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +976 -0
  122. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +273 -0
  123. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +960 -0
  124. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +87 -0
  125. package/dist/collection/components/wm-tag-input/wm-tag-input.css +1411 -0
  126. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1227 -0
  127. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +243 -0
  128. package/dist/collection/components/wm-textarea/wm-textarea.css +1115 -0
  129. package/dist/collection/components/wm-textarea/wm-textarea.js +313 -0
  130. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1229 -0
  131. package/dist/collection/components/wm-timepicker/wm-timepicker.js +547 -0
  132. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1287 -0
  133. package/dist/collection/components/wm-toggletip/wm-toggletip.js +289 -0
  134. package/dist/collection/components/wm-uploader/wm-uploader.css +1873 -0
  135. package/dist/collection/components/wm-uploader/wm-uploader.js +603 -0
  136. package/dist/collection/components/wm-wrapper/wm-wrapper.js +28 -0
  137. package/dist/collection/dev/action-menu.js +0 -0
  138. package/dist/collection/dev/button.js +0 -0
  139. package/dist/collection/dev/chart-small.js +56 -0
  140. package/dist/collection/dev/chart.js +18 -0
  141. package/dist/collection/dev/date-range.js +6 -0
  142. package/dist/collection/dev/datepicker.js +46 -0
  143. package/dist/collection/dev/file-list.js +16 -0
  144. package/dist/collection/dev/file.js +0 -0
  145. package/dist/collection/dev/flyout.js +194 -0
  146. package/dist/collection/dev/input.js +6 -0
  147. package/dist/collection/dev/line-chart.js +0 -0
  148. package/dist/collection/dev/modal.js +48 -0
  149. package/dist/collection/dev/navigation.js +13 -0
  150. package/dist/collection/dev/navigator.js +34 -0
  151. package/dist/collection/dev/nested-select.js +36 -0
  152. package/dist/collection/dev/pagination.js +7 -0
  153. package/dist/collection/dev/progress-monitor.js +0 -0
  154. package/dist/collection/dev/pss-modal.js +8 -0
  155. package/dist/collection/dev/scripts.js +49 -0
  156. package/dist/collection/dev/search.js +72 -0
  157. package/dist/collection/dev/select.js +57 -0
  158. package/dist/collection/dev/snackbar.js +60 -0
  159. package/dist/collection/dev/tabs.js +44 -0
  160. package/dist/collection/dev/tag-input.js +32 -0
  161. package/dist/collection/dev/textarea.js +28 -0
  162. package/dist/collection/dev/timepicker.js +32 -0
  163. package/dist/collection/dev/toggletip.js +9 -0
  164. package/dist/collection/dev/uploader.js +139 -0
  165. package/dist/collection/global/__mocks__/functions.js +6 -0
  166. package/dist/collection/global/functions.js +841 -0
  167. package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +2 -84
  168. package/dist/{ripple/interfaces-CrANcZM9.js → collection/global/interfaces.js} +4 -6
  169. package/dist/collection/global/intl.js +274 -0
  170. package/dist/collection/global/services/__mocks__/http-service.js +130 -0
  171. package/dist/collection/global/services/http-service.js +50 -0
  172. package/dist/collection/lang/lang.js +5 -0
  173. package/dist/collection/lang/missing.js +43 -0
  174. package/dist/collection/lang/piglatin.js +101 -0
  175. package/dist/esm/app-globals-8110c96f.js +90 -0
  176. package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-4095a787.js} +3 -3
  177. package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-682e95b4.js} +390 -8060
  178. package/dist/esm/index-130e07bb.js +1832 -0
  179. package/dist/esm/index.js +1 -0
  180. package/dist/esm/interfaces-cc5b177f.js +34 -0
  181. package/dist/{ripple/intl-7p27BJSM.js → esm/intl-e0444831.js} +1 -1
  182. package/dist/esm/loader.js +11 -0
  183. package/dist/esm/polyfills/core-js.js +11 -0
  184. package/dist/esm/polyfills/dom.js +79 -0
  185. package/dist/esm/polyfills/es5-html-element.js +1 -0
  186. package/dist/esm/polyfills/index.js +34 -0
  187. package/dist/esm/polyfills/system.js +6 -0
  188. package/dist/esm/priv-calendar.entry.js +570 -0
  189. package/dist/{ripple/wm-menuitem.entry.js → esm/priv-chart-popover.entry.js} +109 -98
  190. package/dist/{ripple/wm-modal-header.entry.js → esm/priv-navigator-button.entry.js} +14 -25
  191. package/dist/{ripple/wm-toggletip.entry.js → esm/priv-navigator-item.entry.js} +19 -164
  192. package/dist/{ripple/wm-option.entry.js → esm/priv-option-list.entry.js} +347 -129
  193. package/dist/esm/ripple.js +20 -0
  194. package/dist/esm/wm-action-menu_2.entry.js +330 -0
  195. package/dist/esm/wm-button.entry.js +203 -0
  196. package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
  197. package/dist/esm/wm-chart.entry.js +159 -0
  198. package/dist/esm/wm-date-range.entry.js +480 -0
  199. package/dist/esm/wm-datepicker.entry.js +250 -0
  200. package/dist/esm/wm-file-list.entry.js +19 -0
  201. package/dist/{ripple/wm-chart.entry.js → esm/wm-file.entry.js} +169 -136
  202. package/dist/esm/wm-flyout.entry.js +176 -0
  203. package/dist/esm/wm-input.entry.js +121 -0
  204. package/dist/esm/wm-line-chart.entry.js +457 -0
  205. package/dist/esm/wm-modal-pss_3.entry.js +211 -0
  206. package/dist/esm/wm-modal_3.entry.js +211 -0
  207. package/dist/esm/wm-navigation_3.entry.js +182 -0
  208. package/dist/esm/wm-navigator.entry.js +323 -0
  209. package/dist/{ripple/wm-select.entry.js → esm/wm-nested-select.entry.js} +199 -137
  210. package/dist/esm/wm-optgroup.entry.js +70 -0
  211. package/dist/esm/wm-option_2.entry.js +422 -0
  212. package/dist/esm/wm-pagination.entry.js +224 -0
  213. package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
  214. package/dist/esm/wm-search.entry.js +190 -0
  215. package/dist/esm/wm-snackbar.entry.js +185 -0
  216. package/dist/esm/wm-tab-item_3.entry.js +257 -0
  217. package/dist/esm/wm-tag-input.entry.js +888 -0
  218. package/dist/{ripple → esm}/wm-tag-option.entry.js +6 -2
  219. package/dist/esm/wm-textarea.entry.js +84 -0
  220. package/dist/esm/wm-timepicker.entry.js +303 -0
  221. package/dist/esm/wm-toggletip.entry.js +179 -0
  222. package/dist/esm/wm-uploader.entry.js +321 -0
  223. package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
  224. package/dist/esm-es5/app-globals-8110c96f.js +1 -0
  225. package/dist/esm-es5/chartFunctions-4095a787.js +1 -0
  226. package/dist/esm-es5/functions-682e95b4.js +1 -0
  227. package/dist/esm-es5/index-130e07bb.js +1 -0
  228. package/dist/esm-es5/index.js +0 -0
  229. package/dist/esm-es5/interfaces-cc5b177f.js +1 -0
  230. package/dist/esm-es5/intl-e0444831.js +1 -0
  231. package/dist/esm-es5/loader.js +1 -0
  232. package/dist/esm-es5/priv-calendar.entry.js +1 -0
  233. package/dist/esm-es5/priv-chart-popover.entry.js +1 -0
  234. package/dist/esm-es5/priv-navigator-button.entry.js +1 -0
  235. package/dist/{ripple/wm-progress-monitor.entry.js → esm-es5/priv-navigator-item.entry.js} +1 -71
  236. package/dist/esm-es5/priv-option-list.entry.js +1 -0
  237. package/dist/esm-es5/ripple.js +1 -0
  238. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -0
  239. package/dist/esm-es5/wm-button.entry.js +1 -0
  240. package/dist/esm-es5/wm-chart-slice.entry.js +1 -0
  241. package/dist/esm-es5/wm-chart.entry.js +1 -0
  242. package/dist/esm-es5/wm-date-range.entry.js +1 -0
  243. package/dist/{ripple/wm-uploader.entry.js → esm-es5/wm-datepicker.entry.js} +1 -313
  244. package/dist/{ripple/wm-tab-item.entry.js → esm-es5/wm-file-list.entry.js} +1 -63
  245. package/dist/esm-es5/wm-file.entry.js +1 -0
  246. package/dist/{ripple/wm-input.entry.js → esm-es5/wm-flyout.entry.js} +1 -111
  247. package/dist/esm-es5/wm-input.entry.js +1 -0
  248. package/dist/esm-es5/wm-line-chart.entry.js +1 -0
  249. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -0
  250. package/dist/esm-es5/wm-modal_3.entry.js +1 -0
  251. package/dist/esm-es5/wm-navigation_3.entry.js +1 -0
  252. package/dist/esm-es5/wm-navigator.entry.js +1 -0
  253. package/dist/esm-es5/wm-nested-select.entry.js +1 -0
  254. package/dist/esm-es5/wm-optgroup.entry.js +1 -0
  255. package/dist/esm-es5/wm-option_2.entry.js +1 -0
  256. package/dist/esm-es5/wm-pagination.entry.js +1 -0
  257. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -0
  258. package/dist/esm-es5/wm-search.entry.js +1 -0
  259. package/dist/esm-es5/wm-snackbar.entry.js +1 -0
  260. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -0
  261. package/dist/esm-es5/wm-tag-input.entry.js +1 -0
  262. package/dist/esm-es5/wm-tag-option.entry.js +1 -0
  263. package/dist/esm-es5/wm-textarea.entry.js +1 -0
  264. package/dist/esm-es5/wm-timepicker.entry.js +1 -0
  265. package/dist/esm-es5/wm-toggletip.entry.js +1 -0
  266. package/dist/esm-es5/wm-uploader.entry.js +1 -0
  267. package/dist/esm-es5/wm-wrapper.entry.js +1 -0
  268. package/dist/index.cjs.js +1 -0
  269. package/dist/index.js +1 -0
  270. package/dist/loader/cdn.js +2 -0
  271. package/dist/loader/index.cjs.js +2 -0
  272. package/dist/loader/index.d.ts +24 -0
  273. package/dist/loader/index.es2017.js +2 -0
  274. package/dist/loader/index.js +3 -0
  275. package/dist/loader/package.json +11 -0
  276. package/dist/ripple/index.esm.js +0 -1
  277. package/dist/ripple/p-00baa278.entry.js +1 -0
  278. package/dist/ripple/{wm-flyout.entry.js → p-015af452.system.entry.js} +1 -167
  279. package/dist/ripple/p-039a53d7.entry.js +1 -0
  280. package/dist/ripple/p-043901ab.system.entry.js +1 -0
  281. package/dist/ripple/p-0528bf4d.entry.js +1 -0
  282. package/dist/ripple/p-0d4c017e.system.entry.js +1 -0
  283. package/dist/ripple/p-11aef4e8.entry.js +1 -0
  284. package/dist/ripple/p-13b1d775.entry.js +1 -0
  285. package/dist/ripple/p-14b3b062.system.entry.js +1 -0
  286. package/dist/ripple/p-15712a55.entry.js +1 -0
  287. package/dist/ripple/p-187c694f.js +1 -0
  288. package/dist/ripple/{wm-navigation-item.entry.js → p-18d6408f.system.entry.js} +1 -18
  289. package/dist/ripple/p-199fd014.system.entry.js +1 -0
  290. package/dist/ripple/p-1d43bc57.system.entry.js +1 -0
  291. package/dist/ripple/p-2732bddd.js +1 -0
  292. package/dist/ripple/p-29d32ee5.system.js +1 -0
  293. package/dist/ripple/p-31da9108.system.entry.js +1 -0
  294. package/dist/ripple/p-371c36f5.entry.js +1 -0
  295. package/dist/ripple/p-37301ba0.system.js +1 -0
  296. package/dist/ripple/p-42fa7a77.system.js +1 -0
  297. package/dist/ripple/p-43a28379.entry.js +1 -0
  298. package/dist/ripple/p-44577815.entry.js +1 -0
  299. package/dist/ripple/p-45f831ef.entry.js +1 -0
  300. package/dist/ripple/p-50ea2036.system.js +1 -0
  301. package/dist/ripple/p-55f880af.entry.js +1 -0
  302. package/dist/ripple/p-5642cfb5.system.entry.js +1 -0
  303. package/dist/ripple/p-5a564d92.system.entry.js +1 -0
  304. package/dist/ripple/p-5f09e972.entry.js +1 -0
  305. package/dist/ripple/p-61f8a6d4.system.entry.js +1 -0
  306. package/dist/ripple/p-6439b435.system.entry.js +1 -0
  307. package/dist/ripple/p-6747a274.system.js +1 -0
  308. package/dist/ripple/p-704bacb9.system.entry.js +1 -0
  309. package/dist/ripple/p-72b88618.system.entry.js +1 -0
  310. package/dist/ripple/p-733c7bd5.system.js +1 -0
  311. package/dist/ripple/p-7360ce37.entry.js +1 -0
  312. package/dist/ripple/p-7a08da5c.system.js +1 -0
  313. package/dist/ripple/{priv-option-list.entry.js → p-7a6f535f.system.entry.js} +1 -385
  314. package/dist/ripple/p-7c9bf5f6.system.entry.js +1 -0
  315. package/dist/ripple/p-8194ee04.entry.js +1 -0
  316. package/dist/ripple/p-823d7b4e.system.entry.js +1 -0
  317. package/dist/ripple/p-8303bd1e.entry.js +1 -0
  318. package/dist/ripple/{wm-modal-pss-header.entry.js → p-849384be.system.entry.js} +1 -39
  319. package/dist/ripple/p-8cd5206a.entry.js +1 -0
  320. package/dist/ripple/p-8dde12bd.entry.js +1 -0
  321. package/dist/ripple/p-91a8e524.system.entry.js +1 -0
  322. package/dist/ripple/p-927df284.system.entry.js +1 -0
  323. package/dist/ripple/p-932922ed.system.entry.js +1 -0
  324. package/dist/ripple/p-95d5618f.js +1 -0
  325. package/dist/ripple/p-9859635f.entry.js +1 -0
  326. package/dist/ripple/{wm-modal.entry.js → p-9d8c5fb4.system.entry.js} +1 -133
  327. package/dist/ripple/p-9e7e5948.system.entry.js +1 -0
  328. package/dist/ripple/p-a02cdb4f.js +1 -0
  329. package/dist/ripple/p-a399fb79.entry.js +1 -0
  330. package/dist/ripple/p-a4c26c21.entry.js +1 -0
  331. package/dist/ripple/{wm-modal-pss-footer.entry.js → p-a685a5fa.entry.js} +1 -40
  332. package/dist/ripple/p-a70f8d7a.entry.js +1 -0
  333. package/dist/ripple/p-ac241e42.system.entry.js +1 -0
  334. package/dist/ripple/p-afa213ca.entry.js +1 -0
  335. package/dist/ripple/p-b1e4f8d0.entry.js +1 -0
  336. package/dist/ripple/p-b4a9a118.entry.js +1 -0
  337. package/dist/ripple/p-b73936b2.system.entry.js +1 -0
  338. package/dist/ripple/p-bb00a18f.js +1 -0
  339. package/dist/ripple/p-bbb37d6e.entry.js +1 -0
  340. package/dist/ripple/{wm-file.entry.js → p-c3ab1c4b.system.entry.js} +1 -182
  341. package/dist/ripple/p-cd0cc88d.entry.js +1 -0
  342. package/dist/ripple/{wm-nested-select.entry.js → p-cd5c59ef.system.entry.js} +1 -308
  343. package/dist/ripple/p-cef8a45b.system.js +2 -0
  344. package/dist/ripple/p-cf77cdd0.system.entry.js +1 -0
  345. package/dist/ripple/p-d1950a60.entry.js +1 -0
  346. package/dist/ripple/p-d4ac08de.system.entry.js +1 -0
  347. package/dist/ripple/p-d8f0c9b4.system.entry.js +1 -0
  348. package/dist/ripple/p-d9da0502.js +2 -0
  349. package/dist/ripple/p-dbd8a6c4.system.entry.js +1 -0
  350. package/dist/ripple/p-dc600a24.entry.js +1 -0
  351. package/dist/ripple/p-dc82b6d2.entry.js +1 -0
  352. package/dist/ripple/p-e12e6b00.system.entry.js +1 -0
  353. package/dist/ripple/p-e7ee2171.system.entry.js +1 -0
  354. package/dist/ripple/p-e8f5c8cd.entry.js +1 -0
  355. package/dist/ripple/{priv-navigator-item.entry.js → p-e9c4ed97.entry.js} +1 -30
  356. package/dist/ripple/p-ec4c1020.system.entry.js +1 -0
  357. package/dist/ripple/p-ee01e771.entry.js +1 -0
  358. package/dist/ripple/p-f2c40a23.system.entry.js +1 -0
  359. package/dist/ripple/p-f65448ac.entry.js +1 -0
  360. package/dist/ripple/p-feaa4c19.entry.js +1 -0
  361. package/dist/ripple/ripple.esm.js +1 -48
  362. package/dist/ripple/ripple.js +127 -0
  363. package/dist/types/stencil-public-runtime.d.ts +0 -28
  364. package/package.json +12 -32
  365. package/LICENSE +0 -21
  366. package/dist/components/index.d.ts +0 -33
  367. package/dist/components/priv-calendar.d.ts +0 -11
  368. package/dist/components/priv-chart-popover.d.ts +0 -11
  369. package/dist/components/priv-navigator-button.d.ts +0 -11
  370. package/dist/components/priv-navigator-item.d.ts +0 -11
  371. package/dist/components/priv-option-list.d.ts +0 -11
  372. package/dist/components/wm-action-menu.d.ts +0 -11
  373. package/dist/components/wm-button.d.ts +0 -11
  374. package/dist/components/wm-chart-slice.d.ts +0 -11
  375. package/dist/components/wm-chart.d.ts +0 -11
  376. package/dist/components/wm-date-range.d.ts +0 -11
  377. package/dist/components/wm-datepicker.d.ts +0 -11
  378. package/dist/components/wm-file-list.d.ts +0 -11
  379. package/dist/components/wm-file.d.ts +0 -11
  380. package/dist/components/wm-flyout.d.ts +0 -11
  381. package/dist/components/wm-input.d.ts +0 -11
  382. package/dist/components/wm-line-chart.d.ts +0 -11
  383. package/dist/components/wm-menuitem.d.ts +0 -11
  384. package/dist/components/wm-modal-footer.d.ts +0 -11
  385. package/dist/components/wm-modal-header.d.ts +0 -11
  386. package/dist/components/wm-modal-pss-footer.d.ts +0 -11
  387. package/dist/components/wm-modal-pss-header.d.ts +0 -11
  388. package/dist/components/wm-modal-pss.d.ts +0 -11
  389. package/dist/components/wm-modal.d.ts +0 -11
  390. package/dist/components/wm-navigation-hamburger.d.ts +0 -11
  391. package/dist/components/wm-navigation-item.d.ts +0 -11
  392. package/dist/components/wm-navigation.d.ts +0 -11
  393. package/dist/components/wm-navigator.d.ts +0 -11
  394. package/dist/components/wm-nested-select.d.ts +0 -11
  395. package/dist/components/wm-optgroup.d.ts +0 -11
  396. package/dist/components/wm-option.d.ts +0 -11
  397. package/dist/components/wm-pagination.d.ts +0 -11
  398. package/dist/components/wm-progress-indicator.d.ts +0 -11
  399. package/dist/components/wm-progress-monitor.d.ts +0 -11
  400. package/dist/components/wm-progress-slice.d.ts +0 -11
  401. package/dist/components/wm-search.d.ts +0 -11
  402. package/dist/components/wm-select.d.ts +0 -11
  403. package/dist/components/wm-snackbar.d.ts +0 -11
  404. package/dist/components/wm-tab-item.d.ts +0 -11
  405. package/dist/components/wm-tab-list.d.ts +0 -11
  406. package/dist/components/wm-tab-panel.d.ts +0 -11
  407. package/dist/components/wm-tag-input.d.ts +0 -11
  408. package/dist/components/wm-tag-option.d.ts +0 -11
  409. package/dist/components/wm-textarea.d.ts +0 -11
  410. package/dist/components/wm-timepicker.d.ts +0 -11
  411. package/dist/components/wm-toggletip.d.ts +0 -11
  412. package/dist/components/wm-uploader.d.ts +0 -11
  413. package/dist/components/wm-wrapper.d.ts +0 -11
  414. package/dist/ripple/index-CU5QNCKv.js +0 -4167
  415. package/dist/ripple/priv-calendar.entry.js +0 -566
  416. package/dist/ripple/priv-chart-popover.entry.js +0 -134
  417. package/dist/ripple/priv-navigator-button.entry.js +0 -24
  418. package/dist/ripple/wm-action-menu.entry.js +0 -201
  419. package/dist/ripple/wm-button.entry.js +0 -197
  420. package/dist/ripple/wm-date-range.entry.js +0 -477
  421. package/dist/ripple/wm-datepicker.entry.js +0 -247
  422. package/dist/ripple/wm-file-list.entry.js +0 -18
  423. package/dist/ripple/wm-line-chart.entry.js +0 -449
  424. package/dist/ripple/wm-modal-pss.entry.js +0 -135
  425. package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
  426. package/dist/ripple/wm-navigation.entry.js +0 -116
  427. package/dist/ripple/wm-pagination.entry.js +0 -223
  428. package/dist/ripple/wm-progress-indicator.entry.js +0 -107
  429. package/dist/ripple/wm-progress-slice.entry.js +0 -13
  430. package/dist/ripple/wm-snackbar.entry.js +0 -185
  431. package/dist/ripple/wm-tab-list.entry.js +0 -175
  432. package/dist/ripple/wm-tab-panel.entry.js +0 -32
  433. package/dist/ripple/wm-tag-input.entry.js +0 -877
  434. package/dist/ripple/wm-textarea.entry.js +0 -79
  435. package/dist/ripple/wm-timepicker.entry.js +0 -300
@@ -0,0 +1,849 @@
1
+ import { h, Host, Fragment, } from "@stencil/core";
2
+ import { intl, dateFind, toBool, handleDisabledAttribute, getContextMeasurements, findParentWithHiddenOverflow, dateToISO, shouldOpenUp, calendar_months, } from "../../global/functions";
3
+ export class DateRange {
4
+ constructor() {
5
+ this.openUp = false;
6
+ this.calWidth = 681; // 673 + 8px of room
7
+ this.popupClicked = false;
8
+ this.toggleButtonClicked = false;
9
+ this.formats = { "mm/dd/yyyy": "US", "dd/mm/yyyy": "INT", "yyyy/mm/dd": "ISO" };
10
+ this.dateFormat = "mm/dd/yyyy";
11
+ this.disabled = false;
12
+ this.errorMessage = undefined;
13
+ this.invalidStart = false;
14
+ this.invalidEnd = false;
15
+ this.labelStart = "";
16
+ this.labelEnd = "";
17
+ this.preselected = undefined;
18
+ this.requiredField = false;
19
+ this.valueStart = "";
20
+ this.valueEnd = "";
21
+ this.availSpace = 0;
22
+ this.isExpanded = false;
23
+ }
24
+ get _disabled() {
25
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
26
+ return toBool(this.disabled);
27
+ }
28
+ get focusDates() {
29
+ // the date the first calendar will open to. either:
30
+ // - value-start
31
+ // - a date provided by the dev via prop preselected
32
+ // - today's date
33
+ const isoStart = this.toISO(this.valueStart);
34
+ // fallback:
35
+ let startFocusDate = dateToISO(new Date());
36
+ if (this._isValidISO(isoStart)) {
37
+ startFocusDate = isoStart;
38
+ }
39
+ else if (this.preselected && this._isValidISO(this.preselected)) {
40
+ startFocusDate = this.preselected;
41
+ }
42
+ // the date the second calendar will open to. either:
43
+ // - value-end, if exists and not same month as value-start
44
+ // - the month after the first calendar
45
+ let firstOfNextMonth = this.toJSDate(startFocusDate);
46
+ if (firstOfNextMonth.getUTCMonth() == 11) {
47
+ firstOfNextMonth.setYear(firstOfNextMonth.getUTCFullYear() + 1);
48
+ }
49
+ firstOfNextMonth.setMonth((firstOfNextMonth.getUTCMonth() + 1) % 12, 1);
50
+ let endFocusDate = dateToISO(firstOfNextMonth); // fallback
51
+ const isoEnd = this.toISO(this.valueEnd);
52
+ if (this._isValidISO(isoEnd)) {
53
+ const sameMonth = this.isSameMonth(startFocusDate, isoEnd);
54
+ if (!sameMonth) {
55
+ endFocusDate = isoEnd;
56
+ // if there is a valueEnd and no valueStart, set valueStart to the month before valueEnd;
57
+ if (!isoStart) {
58
+ let firstOfPrevMonth = this.toJSDate(endFocusDate);
59
+ let month = firstOfPrevMonth.getUTCMonth() - 1;
60
+ if (month == -1) {
61
+ month = 11;
62
+ firstOfPrevMonth.setYear(firstOfPrevMonth.getUTCFullYear() - 1);
63
+ }
64
+ firstOfPrevMonth.setMonth(month, 1);
65
+ startFocusDate = dateToISO(firstOfPrevMonth);
66
+ }
67
+ }
68
+ }
69
+ return [startFocusDate, endFocusDate];
70
+ }
71
+ // same month of the same year
72
+ isSameMonth(date1, date2) {
73
+ if (date1 && date2) {
74
+ return date1.slice(0, -3) === date2.slice(0, -3);
75
+ }
76
+ else {
77
+ return false;
78
+ }
79
+ }
80
+ toJSDate(date) {
81
+ if (date && this._isValidISO(date)) {
82
+ let newDate = new Date();
83
+ newDate.setUTCFullYear(parseInt(date.split("-")[0]), parseInt(date.split("-")[1]) - 1, parseInt(date.split("-")[2]));
84
+ return newDate;
85
+ }
86
+ else {
87
+ return undefined;
88
+ }
89
+ }
90
+ toISO(date) {
91
+ // returns the input when it can't reformat
92
+ return this._reformatDate(this.formats[this.dateFormat], "ISO", date);
93
+ }
94
+ handleDisabled() {
95
+ handleDisabledAttribute(this.el, this._disabled);
96
+ }
97
+ updateValueStart() {
98
+ this.startInputEl.value = this.valueStart ? this.valueStart : "";
99
+ }
100
+ updateValueEnd() {
101
+ this.endInputEl.value = this.valueEnd ? this.valueEnd : "";
102
+ }
103
+ handleErrorMessage() {
104
+ if (this.errorMessage) {
105
+ setTimeout(() => this.announce(this.errorMessage), 100);
106
+ }
107
+ }
108
+ togglePopup() {
109
+ this.isExpanded ? this.closePopup() : this.openPopup();
110
+ this.toggleButtonClicked = true;
111
+ }
112
+ closePopup(returnFocus = false) {
113
+ // reset
114
+ // clearing these in case the user closes without finishing the process
115
+ this.date1 = undefined;
116
+ this.date2 = undefined;
117
+ this.startCalEl.startDate = undefined;
118
+ this.startCalEl.endDate = undefined;
119
+ this.startCalEl.hoverDate = undefined;
120
+ this.endCalEl.startDate = undefined;
121
+ this.endCalEl.endDate = undefined;
122
+ this.endCalEl.hoverDate = undefined;
123
+ this.isExpanded = false;
124
+ this.startCalEl.view = "day";
125
+ this.endCalEl.view = "day";
126
+ this.popupEl.classList.remove("open");
127
+ window.setTimeout(() => {
128
+ //not using display none in order to get measurements of the popup while hidden
129
+ this.popupEl.style.visibility = "hidden";
130
+ }, 250);
131
+ //Reset values so that menu reopens to day view with selected date in focus
132
+ if (returnFocus) {
133
+ this.toggleEl.focus();
134
+ }
135
+ }
136
+ openPopup() {
137
+ // display stuff
138
+ this.openUp = shouldOpenUp(this.el, this.popupEl.clientHeight, this.labelEl.clientHeight);
139
+ const { spaceLeft, spaceRight } = getContextMeasurements(this.el);
140
+ if (spaceRight >= this.calWidth - this.el.clientWidth) {
141
+ this.popupEl.style.left = "0";
142
+ this.popupEl.style.right = "auto";
143
+ }
144
+ else if (spaceLeft >= this.calWidth - this.el.clientWidth) {
145
+ this.popupEl.style.right = "0";
146
+ this.popupEl.style.left = "auto";
147
+ }
148
+ else {
149
+ const offset = (this.availSpace - this.calWidth) / 2 - spaceLeft;
150
+ this.popupEl.style.left = `${offset}px`;
151
+ this.popupEl.style.right = "auto";
152
+ }
153
+ this.popupEl.style.visibility = "visible";
154
+ window.requestAnimationFrame(() => {
155
+ this.popupEl.classList.add("open");
156
+ });
157
+ this.isExpanded = true;
158
+ // state stuff
159
+ this.startCalEl.focusDate = this.focusDates[0];
160
+ this.endCalEl.focusDate = this.focusDates[1];
161
+ this.startCalEl.focusCell();
162
+ if (this.valueStart) {
163
+ const startISO = this.toISO(this.valueStart);
164
+ if (this._isValidISO(startISO)) {
165
+ this.startCalEl.startDate = startISO;
166
+ }
167
+ if (this.valueEnd) {
168
+ const endISO = this.toISO(this.valueEnd);
169
+ if (this._isValidISO(endISO)) {
170
+ if (this.isSameMonth(startISO, endISO)) {
171
+ this.startCalEl.endDate = endISO;
172
+ }
173
+ else {
174
+ this.endCalEl.endDate = endISO;
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ handleFocus() {
181
+ this.wrapperEl.classList.add("focus");
182
+ }
183
+ handleBlur() {
184
+ this.wrapperEl.classList.remove("focus");
185
+ }
186
+ handleStartInputBlur() {
187
+ this.wmStartInputBlur.emit();
188
+ }
189
+ handleEndInputBlur() {
190
+ this.wmEndInputBlur.emit();
191
+ }
192
+ handleStartInput(ev) {
193
+ // keep component's value in sync with input's value
194
+ this.valueStart = ev.target.value;
195
+ }
196
+ handleEndInput(ev) {
197
+ // keep component's value in sync with input's value
198
+ this.valueEnd = ev.target.value;
199
+ }
200
+ handleKey(ev) {
201
+ switch (ev.key) {
202
+ case "Escape":
203
+ ev.preventDefault();
204
+ ev.stopPropagation(); // prevents closing of parent modal
205
+ this.closePopup(true);
206
+ break;
207
+ }
208
+ }
209
+ blurHandler() {
210
+ if (!this.popupClicked && !this.toggleButtonClicked && this.isExpanded) {
211
+ this.closePopup();
212
+ }
213
+ this.popupClicked = false;
214
+ this.toggleButtonClicked = false;
215
+ }
216
+ // for cases where the user clicks or uses a shortcut to leave the document
217
+ handleBlurOnWindow() {
218
+ if (this.isExpanded) {
219
+ this.closePopup();
220
+ }
221
+ }
222
+ handleDateFocus(ev) {
223
+ const cal = ev.target;
224
+ const newFocusVal = cal.focusDate;
225
+ // keeping calendars in sync
226
+ // (left one should always be before right one)
227
+ const startYearMonth = this.startCalEl.focusDate.slice(0, -3);
228
+ const endYearMonth = this.endCalEl.focusDate.slice(0, -3);
229
+ if (cal == this.startCalEl) {
230
+ if (startYearMonth >= endYearMonth) {
231
+ this.endCalEl.focusDate = dateFind.month.increase(this.startCalEl.focusDate, 1);
232
+ }
233
+ }
234
+ else if (cal == this.endCalEl) {
235
+ if (endYearMonth <= startYearMonth) {
236
+ this.startCalEl.focusDate = dateFind.month.decrease(this.endCalEl.focusDate, 1);
237
+ }
238
+ }
239
+ // SR announcements
240
+ if (this.oldFocusVal) {
241
+ const newYear = dateFind.year.asInt(newFocusVal);
242
+ const oldYear = dateFind.year.asInt(this.oldFocusVal);
243
+ const newMonth = dateFind.month.asInt(newFocusVal);
244
+ const oldMonth = dateFind.month.asInt(this.oldFocusVal);
245
+ if (cal.view === "day") {
246
+ if (newYear != oldYear || newMonth != oldMonth) {
247
+ this.liveRegionEl.innerHTML = intl.formatMessage({
248
+ id: "date.viewingMonth",
249
+ defaultMessage: "Viewing {month}, {year}",
250
+ description: "Announcement indicating current month and year visible in a date picker",
251
+ }, {
252
+ month: calendar_months[newMonth - 1],
253
+ year: newYear,
254
+ });
255
+ }
256
+ }
257
+ else {
258
+ if (newYear != oldYear) {
259
+ this.liveRegionEl.innerHTML = intl.formatMessage({
260
+ id: "date.yearSelected",
261
+ defaultMessage: "{year} selected.",
262
+ description: "Announcement after the user selects a year in a date picker",
263
+ }, { year: newYear });
264
+ }
265
+ else if (newMonth != oldMonth) {
266
+ this.liveRegionEl.innerHTML = `${calendar_months[newMonth - 1]}, ${newYear}`;
267
+ }
268
+ }
269
+ }
270
+ this.oldFocusVal = cal.focusDate;
271
+ }
272
+ handlePopupBlurred(ev) {
273
+ // emit blur event when leaving component from priv-calendar
274
+ if (ev.detail.relatedTarget !== this.el) {
275
+ const event = new CustomEvent("blur");
276
+ // @ts-ignore
277
+ event.relatedTarget = ev.detail.relatedTarget;
278
+ this.el.dispatchEvent(event);
279
+ }
280
+ }
281
+ handleCellTriggered(ev) {
282
+ const cal = ev.detail.cal;
283
+ const dateElement = ev.detail.cell;
284
+ const newDate = dateElement.getAttribute("data-year") +
285
+ "-" +
286
+ dateElement.getAttribute("data-month") +
287
+ "-" +
288
+ dateElement.textContent.padStart(2, "0");
289
+ if (this.startCalEl.endDate || this.endCalEl.endDate) {
290
+ // there were already 2 dates, user is setting a new range.
291
+ // set calendar state
292
+ this.startCalEl.startDate = undefined;
293
+ this.startCalEl.endDate = undefined;
294
+ this.endCalEl.startDate = undefined;
295
+ this.endCalEl.endDate = undefined;
296
+ cal.startDate = newDate;
297
+ // set component state
298
+ this.date1 = newDate;
299
+ this.date2 = undefined;
300
+ }
301
+ else if (this.date1 && newDate !== this.date1) {
302
+ // user is setting the end of the range
303
+ // ignore if same date as first is selected
304
+ // (acts as if it was re-selected as the first date)
305
+ // reorder if necessary
306
+ if (this.date1 > newDate) {
307
+ this.date2 = this.date1;
308
+ this.date1 = newDate;
309
+ }
310
+ else {
311
+ this.date2 = newDate;
312
+ }
313
+ const detail = {
314
+ startDate: {
315
+ iso: this.date1,
316
+ us: this._reformatDate("ISO", "US", this.date1),
317
+ int: this._reformatDate("ISO", "INT", this.date1),
318
+ },
319
+ endDate: {
320
+ iso: this.date2,
321
+ us: this._reformatDate("ISO", "US", this.date2),
322
+ int: this._reformatDate("ISO", "INT", this.date2),
323
+ },
324
+ };
325
+ this.wmRangeSelection.emit(detail);
326
+ this.closePopup(true);
327
+ this.date1 = undefined;
328
+ this.date2 = undefined;
329
+ }
330
+ else {
331
+ // calendars were clear, user sets first date
332
+ cal.startDate = newDate;
333
+ // component state
334
+ this.date1 = newDate;
335
+ }
336
+ // Create events to trigger onInput and onChange on host element, to get the updated value
337
+ // Because there are more ways to input than just typing, we are firing this event upon cellTriggered
338
+ const inputEvent = new CustomEvent("input");
339
+ this.el.dispatchEvent(inputEvent);
340
+ const changeEvent = new CustomEvent("change");
341
+ this.el.dispatchEvent(changeEvent);
342
+ }
343
+ handleOutOfCal() {
344
+ this.startCalEl.hoverDate = undefined;
345
+ this.endCalEl.hoverDate = undefined;
346
+ }
347
+ handleCellHovered(ev) {
348
+ this.startCalEl.hoverDate = this.startCalEl.startDate === ev.detail ? undefined : ev.detail;
349
+ this.endCalEl.hoverDate = this.endCalEl.startDate === ev.detail ? undefined : ev.detail;
350
+ }
351
+ async reformatDate(inputFormat, outputFormat, date) {
352
+ return this._reformatDate(inputFormat, outputFormat, date);
353
+ }
354
+ _reformatDate(inputFormat, outputFormat, date) {
355
+ // this function reformats date strings to/from the storage format ONLY. US -> INT and vice versa is not supported.
356
+ if (inputFormat !== "ISO" && outputFormat !== "ISO")
357
+ return "";
358
+ // return if missing args
359
+ if (!inputFormat || !outputFormat || !date)
360
+ return "";
361
+ // 1, 2, or 4 digits, separator, 1 or 2 digits, separator, then 1 or 2 or 4 digits
362
+ const parsableEntry = /^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;
363
+ if (!parsableEntry.test(date)) {
364
+ return date;
365
+ }
366
+ else {
367
+ const dateArr = date.replace(/[\-\.]/gi, "/").split("/");
368
+ switch (outputFormat) {
369
+ case "US":
370
+ return dateArr[1].padStart(2, "0") + "/" + dateArr[2].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
371
+ case "INT":
372
+ return dateArr[2].padStart(2, "0") + "/" + dateArr[1].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
373
+ case "ISO":
374
+ if (inputFormat === "US") {
375
+ return dateArr[2].padStart(4, "20") + "-" + dateArr[0].padStart(2, "0") + "-" + dateArr[1].padStart(2, "0");
376
+ }
377
+ else if (inputFormat === "INT") {
378
+ return dateArr[2].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[0].padStart(2, "0");
379
+ }
380
+ else if (inputFormat === "ISO") {
381
+ return dateArr[0].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[2].padStart(2, "0");
382
+ }
383
+ default:
384
+ return dateArr.join("/");
385
+ }
386
+ }
387
+ }
388
+ async isValidISO(input) {
389
+ return this._isValidISO(input);
390
+ }
391
+ _isValidISO(input) {
392
+ const ISOFormat = /^\d\d\d\d[-]\d\d[-]\d\d$/;
393
+ if (!input || !ISOFormat.test(input)) {
394
+ return false;
395
+ }
396
+ else {
397
+ // Parse the ISO date parts to integers
398
+ const parts = input.split("-");
399
+ const day = parseInt(parts[2], 10);
400
+ const month = parseInt(parts[1], 10);
401
+ const year = parseInt(parts[0], 10);
402
+ // Check the ranges of month and year
403
+ if (year < 1000 || year > 3000 || month == 0 || month > 12)
404
+ return false;
405
+ let monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
406
+ // Adjust for leap years
407
+ if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
408
+ monthLength[1] = 29;
409
+ // Check the range of the day
410
+ return day > 0 && day <= monthLength[month - 1];
411
+ }
412
+ }
413
+ setAvailSpace() {
414
+ this.availSpace = (this.hiddenOverflowParent || document.body).clientWidth;
415
+ }
416
+ componentWillLoad() {
417
+ if (this.labelStart === "" || this.labelEnd === "") {
418
+ console.error("For accessibility reasons you must specify labels for the date range inputs.");
419
+ }
420
+ handleDisabledAttribute(this.el, this._disabled);
421
+ this.hiddenOverflowParent = findParentWithHiddenOverflow(this.el);
422
+ if (this.hiddenOverflowParent) {
423
+ const resizeObserver = new ResizeObserver(() => {
424
+ this.availSpace = this.hiddenOverflowParent.clientWidth;
425
+ });
426
+ resizeObserver.observe(this.hiddenOverflowParent);
427
+ }
428
+ this.setAvailSpace();
429
+ }
430
+ announce(message) {
431
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
432
+ if (this.liveRegionEl.textContent === message) {
433
+ message += "\u00A0";
434
+ }
435
+ this.liveRegionEl.textContent = message;
436
+ }
437
+ renderCalendars() {
438
+ if (this.calWidth <= this.availSpace) {
439
+ return (h(Fragment, null, h("div", { class: `popup-wrapper ${this.startCalEl && this.startCalEl.view}-view ${this.openUp ? "expand-upwards" : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), onClick: () => (this.popupClicked = true), style: { display: "flex" } }, h("div", { class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), h("priv-calendar", { ref: (el) => (this.startCalEl = el), onClick: () => (this.popupClicked = true), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("priv-calendar", { ref: (el) => (this.endCalEl = el), onClick: () => (this.popupClicked = true), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("div", { class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() }))));
440
+ }
441
+ }
442
+ render() {
443
+ return (h(Host, { key: 'e15e7d0122385b7038ab66267c6bd97a0484403e', "aria-busy": "false" }, h("div", { key: '1074c893c309a965181575e65ddab158e7b34661', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: '318998d9218b262a13c2842a03c8e493f889b327', class: `range-wrapper ${this.calWidth <= this.availSpace ? "cal" : ""}` }, h("div", { key: 'e2df44669d920d0fa287d3020a0ad29485cd03d7', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: '34bdc1d6844cfca7b50c79c7dd2f7115889665a2', ref: (e) => (this.labelEl = e), id: "startlabel", htmlFor: "start-date-input", class: "label", title: `${this.labelStart} (${this.dateFormat})` }, this.labelStart, this.requiredField && (h("span", { key: '50d76500d1ddd31478ec3a1fb737fca8a2957e24', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: 'e7d8fcb4399881832d7a37042aee7a820512e2f0', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: '86b127ee4ecc42fca26521bf19777553c55bdc79', id: "endlabel", htmlFor: "end-date-input", class: "label", title: `${this.labelEnd} (${this.dateFormat})` }, this.labelEnd, this.requiredField && (h("span", { key: '14ccfb0e9fee57f645112e1925b47e6697852f76', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '4fbee8adcdd045ff543c530dcce96b8e1c812561', disabled: this._disabled, type: "text", id: "start-date-input", class: `date-input input ${this.invalidStart ? "invalid" : ""}`, name: "start-date", placeholder: this.dateFormat, value: this.valueStart, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleStartInput(ev), onBlur: () => this.handleStartInputBlur(), ref: (input) => (this.startInputEl = input), "aria-describedby": "error", "aria-label": this.labelStart, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '8532a1ee3ab5ed0eb678e0626d15ed59a30b159d', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '5083b4873f884f26221b756f1ab2b39f359aecdd', disabled: this._disabled, type: "text", id: "end-date-input", class: `date-input input ${this.invalidEnd ? "invalid" : ""}`, name: "end-date", placeholder: this.dateFormat, value: this.valueEnd, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleEndInput(ev), onBlur: () => this.handleEndInputBlur(), ref: (input) => (this.endInputEl = input), "aria-describedby": "error", "aria-label": this.labelEnd, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '4c6fefec380fae6c6964e10bc2e6eeae1dbb560a', class: "toggle-wrapper", id: "toggle-wrapper" }, this.calWidth <= this.availSpace && (h("button", { key: 'dd11cd572ddf6ce4c44af9bdffc6a129174ede8b', disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "start-date-input end-date-input", "aria-label": intl.formatMessage({
444
+ id: "date.selectRange",
445
+ defaultMessage: "Select range",
446
+ description: "Button text for screen readers.",
447
+ }), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { key: '4539c027127c567bfd09039e63975e849dd96fae', class: "svg-icon svg-date" }), h("span", { key: '0fcd41cd2415908975cc8b8f7cebd4bd47f01d3e', class: "calendar", title: intl.formatMessage({
448
+ id: "date.calendarView",
449
+ defaultMessage: "Calendar View",
450
+ description: "Calendar button",
451
+ }) })))), this.renderCalendars()), h("div", { key: '96d2b3a31aafb89abdbd80e58ecc0efab1a582c4' }, h("div", { key: '75a3aca3bd7ef18924b81f47ab017eef108c10df', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: 'f7af6d97177bdf7cef6516950eee49e242826e06', id: "month-title", class: "sr-only" }, intl.formatMessage({
452
+ id: "date.selectMonth",
453
+ defaultMessage: "Activate to select a month.",
454
+ description: "Calendar button",
455
+ })), h("div", { key: 'aab9385f49a28dc1306e59451234a9a7368aca4d', id: "year-title", class: "sr-only" }, intl.formatMessage({
456
+ id: "date.selectYear",
457
+ defaultMessage: "Activate to select a year.",
458
+ description: "Calendar button",
459
+ }))), h("div", { key: '21c76d46ebc51dbfd8b2658512f7e6f7ef4f4ae7', id: "error", class: "error" }, this.errorMessage), h("div", { key: '0312341364d0cf20c63be7f38724b64b13ffd424', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
460
+ }
461
+ static get is() { return "wm-date-range"; }
462
+ static get encapsulation() { return "shadow"; }
463
+ static get delegatesFocus() { return true; }
464
+ static get originalStyleUrls() {
465
+ return {
466
+ "$": ["datepicker.scss"]
467
+ };
468
+ }
469
+ static get styleUrls() {
470
+ return {
471
+ "$": ["datepicker.css"]
472
+ };
473
+ }
474
+ static get properties() {
475
+ return {
476
+ "dateFormat": {
477
+ "type": "string",
478
+ "mutable": false,
479
+ "complexType": {
480
+ "original": "string",
481
+ "resolved": "string",
482
+ "references": {}
483
+ },
484
+ "required": false,
485
+ "optional": false,
486
+ "docs": {
487
+ "tags": [],
488
+ "text": ""
489
+ },
490
+ "attribute": "date-format",
491
+ "reflect": false,
492
+ "defaultValue": "\"mm/dd/yyyy\""
493
+ },
494
+ "disabled": {
495
+ "type": "boolean",
496
+ "mutable": false,
497
+ "complexType": {
498
+ "original": "boolean",
499
+ "resolved": "boolean",
500
+ "references": {}
501
+ },
502
+ "required": false,
503
+ "optional": false,
504
+ "docs": {
505
+ "tags": [],
506
+ "text": ""
507
+ },
508
+ "attribute": "disabled",
509
+ "reflect": false,
510
+ "defaultValue": "false"
511
+ },
512
+ "errorMessage": {
513
+ "type": "string",
514
+ "mutable": false,
515
+ "complexType": {
516
+ "original": "string",
517
+ "resolved": "string | undefined",
518
+ "references": {}
519
+ },
520
+ "required": false,
521
+ "optional": true,
522
+ "docs": {
523
+ "tags": [],
524
+ "text": ""
525
+ },
526
+ "attribute": "error-message",
527
+ "reflect": true
528
+ },
529
+ "invalidStart": {
530
+ "type": "boolean",
531
+ "mutable": false,
532
+ "complexType": {
533
+ "original": "boolean",
534
+ "resolved": "boolean",
535
+ "references": {}
536
+ },
537
+ "required": false,
538
+ "optional": false,
539
+ "docs": {
540
+ "tags": [],
541
+ "text": ""
542
+ },
543
+ "attribute": "invalid-start",
544
+ "reflect": false,
545
+ "defaultValue": "false"
546
+ },
547
+ "invalidEnd": {
548
+ "type": "boolean",
549
+ "mutable": false,
550
+ "complexType": {
551
+ "original": "boolean",
552
+ "resolved": "boolean",
553
+ "references": {}
554
+ },
555
+ "required": false,
556
+ "optional": false,
557
+ "docs": {
558
+ "tags": [],
559
+ "text": ""
560
+ },
561
+ "attribute": "invalid-end",
562
+ "reflect": false,
563
+ "defaultValue": "false"
564
+ },
565
+ "labelStart": {
566
+ "type": "string",
567
+ "mutable": false,
568
+ "complexType": {
569
+ "original": "string",
570
+ "resolved": "string",
571
+ "references": {}
572
+ },
573
+ "required": false,
574
+ "optional": false,
575
+ "docs": {
576
+ "tags": [],
577
+ "text": ""
578
+ },
579
+ "attribute": "label-start",
580
+ "reflect": false,
581
+ "defaultValue": "\"\""
582
+ },
583
+ "labelEnd": {
584
+ "type": "string",
585
+ "mutable": false,
586
+ "complexType": {
587
+ "original": "string",
588
+ "resolved": "string",
589
+ "references": {}
590
+ },
591
+ "required": false,
592
+ "optional": false,
593
+ "docs": {
594
+ "tags": [],
595
+ "text": ""
596
+ },
597
+ "attribute": "label-end",
598
+ "reflect": false,
599
+ "defaultValue": "\"\""
600
+ },
601
+ "preselected": {
602
+ "type": "string",
603
+ "mutable": false,
604
+ "complexType": {
605
+ "original": "string",
606
+ "resolved": "string | undefined",
607
+ "references": {}
608
+ },
609
+ "required": false,
610
+ "optional": true,
611
+ "docs": {
612
+ "tags": [],
613
+ "text": ""
614
+ },
615
+ "attribute": "preselected",
616
+ "reflect": false
617
+ },
618
+ "requiredField": {
619
+ "type": "boolean",
620
+ "mutable": false,
621
+ "complexType": {
622
+ "original": "boolean",
623
+ "resolved": "boolean",
624
+ "references": {}
625
+ },
626
+ "required": false,
627
+ "optional": false,
628
+ "docs": {
629
+ "tags": [],
630
+ "text": ""
631
+ },
632
+ "attribute": "required-field",
633
+ "reflect": false,
634
+ "defaultValue": "false"
635
+ },
636
+ "valueStart": {
637
+ "type": "string",
638
+ "mutable": true,
639
+ "complexType": {
640
+ "original": "string",
641
+ "resolved": "string | undefined",
642
+ "references": {}
643
+ },
644
+ "required": false,
645
+ "optional": true,
646
+ "docs": {
647
+ "tags": [],
648
+ "text": ""
649
+ },
650
+ "attribute": "value-start",
651
+ "reflect": false,
652
+ "defaultValue": "\"\""
653
+ },
654
+ "valueEnd": {
655
+ "type": "string",
656
+ "mutable": true,
657
+ "complexType": {
658
+ "original": "string",
659
+ "resolved": "string | undefined",
660
+ "references": {}
661
+ },
662
+ "required": false,
663
+ "optional": true,
664
+ "docs": {
665
+ "tags": [],
666
+ "text": ""
667
+ },
668
+ "attribute": "value-end",
669
+ "reflect": false,
670
+ "defaultValue": "\"\""
671
+ }
672
+ };
673
+ }
674
+ static get states() {
675
+ return {
676
+ "availSpace": {},
677
+ "isExpanded": {}
678
+ };
679
+ }
680
+ static get events() {
681
+ return [{
682
+ "method": "wmRangeSelection",
683
+ "name": "wmRangeSelection",
684
+ "bubbles": true,
685
+ "cancelable": true,
686
+ "composed": true,
687
+ "docs": {
688
+ "tags": [],
689
+ "text": ""
690
+ },
691
+ "complexType": {
692
+ "original": "any",
693
+ "resolved": "any",
694
+ "references": {}
695
+ }
696
+ }, {
697
+ "method": "wmStartInputBlur",
698
+ "name": "wmStartInputBlur",
699
+ "bubbles": true,
700
+ "cancelable": true,
701
+ "composed": true,
702
+ "docs": {
703
+ "tags": [],
704
+ "text": ""
705
+ },
706
+ "complexType": {
707
+ "original": "any",
708
+ "resolved": "any",
709
+ "references": {}
710
+ }
711
+ }, {
712
+ "method": "wmEndInputBlur",
713
+ "name": "wmEndInputBlur",
714
+ "bubbles": true,
715
+ "cancelable": true,
716
+ "composed": true,
717
+ "docs": {
718
+ "tags": [],
719
+ "text": ""
720
+ },
721
+ "complexType": {
722
+ "original": "any",
723
+ "resolved": "any",
724
+ "references": {}
725
+ }
726
+ }];
727
+ }
728
+ static get methods() {
729
+ return {
730
+ "reformatDate": {
731
+ "complexType": {
732
+ "signature": "(inputFormat: string, outputFormat: string, date?: string) => Promise<string>",
733
+ "parameters": [{
734
+ "name": "inputFormat",
735
+ "type": "string",
736
+ "docs": ""
737
+ }, {
738
+ "name": "outputFormat",
739
+ "type": "string",
740
+ "docs": ""
741
+ }, {
742
+ "name": "date",
743
+ "type": "string | undefined",
744
+ "docs": ""
745
+ }],
746
+ "references": {
747
+ "Promise": {
748
+ "location": "global",
749
+ "id": "global::Promise"
750
+ }
751
+ },
752
+ "return": "Promise<string>"
753
+ },
754
+ "docs": {
755
+ "text": "",
756
+ "tags": []
757
+ }
758
+ },
759
+ "isValidISO": {
760
+ "complexType": {
761
+ "signature": "(input?: string) => Promise<boolean>",
762
+ "parameters": [{
763
+ "name": "input",
764
+ "type": "string | undefined",
765
+ "docs": ""
766
+ }],
767
+ "references": {
768
+ "Promise": {
769
+ "location": "global",
770
+ "id": "global::Promise"
771
+ }
772
+ },
773
+ "return": "Promise<boolean>"
774
+ },
775
+ "docs": {
776
+ "text": "",
777
+ "tags": []
778
+ }
779
+ }
780
+ };
781
+ }
782
+ static get elementRef() { return "el"; }
783
+ static get watchers() {
784
+ return [{
785
+ "propName": "disabled",
786
+ "methodName": "handleDisabled"
787
+ }, {
788
+ "propName": "valueStart",
789
+ "methodName": "updateValueStart"
790
+ }, {
791
+ "propName": "valueEnd",
792
+ "methodName": "updateValueEnd"
793
+ }, {
794
+ "propName": "errorMessage",
795
+ "methodName": "handleErrorMessage"
796
+ }];
797
+ }
798
+ static get listeners() {
799
+ return [{
800
+ "name": "keydown",
801
+ "method": "handleKey",
802
+ "target": undefined,
803
+ "capture": false,
804
+ "passive": false
805
+ }, {
806
+ "name": "click",
807
+ "method": "blurHandler",
808
+ "target": "document",
809
+ "capture": false,
810
+ "passive": false
811
+ }, {
812
+ "name": "blur",
813
+ "method": "handleBlurOnWindow",
814
+ "target": "window",
815
+ "capture": false,
816
+ "passive": false
817
+ }, {
818
+ "name": "popupBlurred",
819
+ "method": "handlePopupBlurred",
820
+ "target": undefined,
821
+ "capture": false,
822
+ "passive": false
823
+ }, {
824
+ "name": "cellTriggered",
825
+ "method": "handleCellTriggered",
826
+ "target": undefined,
827
+ "capture": false,
828
+ "passive": false
829
+ }, {
830
+ "name": "outOfCal",
831
+ "method": "handleOutOfCal",
832
+ "target": undefined,
833
+ "capture": false,
834
+ "passive": false
835
+ }, {
836
+ "name": "cellHovered",
837
+ "method": "handleCellHovered",
838
+ "target": undefined,
839
+ "capture": false,
840
+ "passive": false
841
+ }, {
842
+ "name": "resize",
843
+ "method": "setAvailSpace",
844
+ "target": "window",
845
+ "capture": false,
846
+ "passive": true
847
+ }];
848
+ }
849
+ }