@watermarkinsights/ripple 0.0.1 → 0.1.0-alpha.1

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 (460) hide show
  1. package/dist/cjs/app-globals-3db2fdd3.js +103 -0
  2. package/dist/cjs/chartFunctions-0d47b1f4.js +906 -0
  3. package/dist/cjs/functions-761cb9f2.js +10694 -0
  4. package/dist/cjs/index-bb947bd5.js +1843 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/interfaces-33cd6161.js +82 -0
  7. package/dist/cjs/intl-9e9388a7.js +291 -0
  8. package/dist/cjs/loader.cjs.js +15 -0
  9. package/dist/cjs/priv-calendar.cjs.entry.js +580 -0
  10. package/dist/cjs/priv-chart-popover-old.cjs.entry.js +146 -0
  11. package/dist/cjs/priv-chart-popover_2.cjs.entry.js +204 -0
  12. package/dist/cjs/priv-navigator-button.cjs.entry.js +29 -0
  13. package/dist/cjs/priv-navigator-item.cjs.entry.js +35 -0
  14. package/dist/cjs/priv-option-list.cjs.entry.js +391 -0
  15. package/dist/cjs/ripple.cjs.js +25 -0
  16. package/dist/cjs/wm-action-menu_2.cjs.entry.js +525 -0
  17. package/dist/cjs/wm-button.cjs.entry.js +280 -0
  18. package/dist/cjs/wm-chart-bar.cjs.entry.js +444 -0
  19. package/dist/cjs/wm-chart-column.cjs.entry.js +629 -0
  20. package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
  21. package/dist/cjs/wm-chart-stack.cjs.entry.js +447 -0
  22. package/dist/cjs/wm-chart.cjs.entry.js +163 -0
  23. package/dist/cjs/wm-date-range.cjs.entry.js +591 -0
  24. package/dist/cjs/wm-datepicker.cjs.entry.js +399 -0
  25. package/dist/{ripple/wm-tab-panel.entry.js → cjs/wm-file-list.cjs.entry.js} +15 -24
  26. package/dist/cjs/wm-file.cjs.entry.js +210 -0
  27. package/dist/cjs/wm-flyout.cjs.entry.js +178 -0
  28. package/dist/{ripple/wm-modal.entry.js → cjs/wm-input.cjs.entry.js} +108 -110
  29. package/dist/cjs/wm-line-chart.cjs.entry.js +541 -0
  30. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +220 -0
  31. package/dist/cjs/wm-modal_3.cjs.entry.js +238 -0
  32. package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
  33. package/dist/cjs/wm-navigator.cjs.entry.js +334 -0
  34. package/dist/cjs/wm-nested-select.cjs.entry.js +322 -0
  35. package/dist/{ripple/wm-textarea.entry.js → cjs/wm-optgroup.cjs.entry.js} +62 -57
  36. package/dist/cjs/wm-option_2.cjs.entry.js +536 -0
  37. package/dist/{ripple/wm-navigation.entry.js → cjs/wm-pagination.cjs.entry.js} +204 -91
  38. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
  39. package/dist/{ripple/wm-flyout.entry.js → cjs/wm-search.cjs.entry.js} +168 -139
  40. package/dist/{ripple/wm-datepicker.entry.js → cjs/wm-snackbar.cjs.entry.js} +152 -223
  41. package/dist/cjs/wm-tab-item_3.cjs.entry.js +357 -0
  42. package/dist/cjs/wm-tag-input.cjs.entry.js +985 -0
  43. package/dist/cjs/wm-tag-option.cjs.entry.js +51 -0
  44. package/dist/{ripple/wm-modal-pss.entry.js → cjs/wm-textarea.cjs.entry.js} +70 -111
  45. package/dist/{ripple/wm-progress-indicator.entry.js → cjs/wm-timepicker.cjs.entry.js} +296 -78
  46. package/dist/cjs/wm-toggletip.cjs.entry.js +252 -0
  47. package/dist/cjs/wm-uploader.cjs.entry.js +341 -0
  48. package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
  49. package/dist/collection/collection-manifest.json +207 -0
  50. package/dist/collection/components/charts/chartFunctions.js +831 -0
  51. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +995 -0
  52. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +345 -0
  53. package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +990 -0
  54. package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +268 -0
  55. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +177 -0
  56. package/dist/collection/components/charts/wm-chart/wm-chart.css +1326 -0
  57. package/dist/collection/components/charts/wm-chart/wm-chart.js +549 -0
  58. package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1236 -0
  59. package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +725 -0
  60. package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +1335 -0
  61. package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +914 -0
  62. package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +1006 -0
  63. package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +310 -0
  64. package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.css +1466 -0
  65. package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +709 -0
  66. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1208 -0
  67. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +999 -0
  68. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1326 -0
  69. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +320 -0
  70. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +967 -0
  71. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +232 -0
  72. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +167 -0
  73. package/dist/collection/components/datepickers/datepicker.css +1147 -0
  74. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1415 -0
  75. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +857 -0
  76. package/dist/collection/components/datepickers/wm-date-range.js +1158 -0
  77. package/dist/collection/components/datepickers/wm-datepicker.js +875 -0
  78. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +999 -0
  79. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +784 -0
  80. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1259 -0
  81. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +805 -0
  82. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +909 -0
  83. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +363 -0
  84. package/dist/collection/components/selects/wm-option/wm-option.css +1033 -0
  85. package/dist/collection/components/selects/wm-option/wm-option.js +665 -0
  86. package/dist/collection/components/selects/wm-select/wm-select.css +1174 -0
  87. package/dist/collection/components/selects/wm-select/wm-select.js +878 -0
  88. package/dist/collection/components/wm-action-menu/wm-action-menu.css +1690 -0
  89. package/dist/collection/components/wm-action-menu/wm-action-menu.js +932 -0
  90. package/dist/collection/components/wm-button/wm-button.css +1630 -0
  91. package/dist/collection/components/wm-button/wm-button.js +794 -0
  92. package/dist/collection/components/wm-file/wm-file.css +1086 -0
  93. package/dist/collection/components/wm-file/wm-file.js +536 -0
  94. package/dist/collection/components/wm-file-list/wm-file-list.css +899 -0
  95. package/dist/collection/components/wm-file-list/wm-file-list.js +118 -0
  96. package/dist/collection/components/wm-flyout/wm-flyout.css +1091 -0
  97. package/dist/collection/components/wm-flyout/wm-flyout.js +651 -0
  98. package/dist/collection/components/wm-input/wm-input.css +1095 -0
  99. package/dist/collection/components/wm-input/wm-input.js +653 -0
  100. package/dist/collection/components/wm-menuitem/wm-menuitem.css +982 -0
  101. package/dist/collection/components/wm-menuitem/wm-menuitem.js +515 -0
  102. package/dist/collection/components/wm-modal/wm-modal-footer.css +927 -0
  103. package/dist/collection/components/wm-modal/wm-modal-footer.js +199 -0
  104. package/dist/collection/components/wm-modal/wm-modal-header.css +926 -0
  105. package/dist/collection/components/wm-modal/wm-modal-header.js +110 -0
  106. package/dist/collection/components/wm-modal/wm-modal.css +983 -0
  107. package/dist/collection/components/wm-modal/wm-modal.js +534 -0
  108. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +931 -0
  109. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +142 -0
  110. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +925 -0
  111. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
  112. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1007 -0
  113. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
  114. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +926 -0
  115. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +153 -0
  116. package/dist/collection/components/wm-navigation/wm-navigation-item.css +935 -0
  117. package/dist/collection/components/wm-navigation/wm-navigation-item.js +140 -0
  118. package/dist/collection/components/wm-navigation/wm-navigation.css +977 -0
  119. package/dist/collection/components/wm-navigation/wm-navigation.js +246 -0
  120. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +929 -0
  121. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
  122. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +918 -0
  123. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +128 -0
  124. package/dist/collection/components/wm-navigator/wm-navigator.css +990 -0
  125. package/dist/collection/components/wm-navigator/wm-navigator.js +597 -0
  126. package/dist/collection/components/wm-pagination/wm-pagination.css +1044 -0
  127. package/dist/collection/components/wm-pagination/wm-pagination.js +487 -0
  128. package/dist/collection/components/wm-search/wm-search.css +983 -0
  129. package/dist/collection/components/wm-search/wm-search.js +604 -0
  130. package/dist/collection/components/wm-snackbar/wm-snackbar.css +1150 -0
  131. package/dist/collection/components/wm-snackbar/wm-snackbar.js +363 -0
  132. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +958 -0
  133. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +233 -0
  134. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +966 -0
  135. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +461 -0
  136. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +906 -0
  137. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +132 -0
  138. package/dist/collection/components/wm-tag-input/wm-tag-input.css +1423 -0
  139. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1511 -0
  140. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +328 -0
  141. package/dist/collection/components/wm-textarea/wm-textarea.css +1065 -0
  142. package/dist/collection/components/wm-textarea/wm-textarea.js +423 -0
  143. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1174 -0
  144. package/dist/collection/components/wm-timepicker/wm-timepicker.js +728 -0
  145. package/dist/collection/components/wm-toggletip/wm-toggletip.css +1296 -0
  146. package/dist/collection/components/wm-toggletip/wm-toggletip.js +455 -0
  147. package/dist/collection/components/wm-uploader/wm-uploader.css +1987 -0
  148. package/dist/collection/components/wm-uploader/wm-uploader.js +760 -0
  149. package/dist/collection/components/wm-wrapper/wm-wrapper.js +31 -0
  150. package/dist/collection/dev/action-menu.js +18 -0
  151. package/dist/collection/dev/button.js +12 -0
  152. package/dist/collection/dev/chart-bar.js +430 -0
  153. package/dist/collection/dev/chart-column.js +459 -0
  154. package/dist/collection/dev/chart-small.js +56 -0
  155. package/dist/collection/dev/chart-stack.js +205 -0
  156. package/dist/collection/dev/chart.js +18 -0
  157. package/dist/collection/dev/date-range.js +14 -0
  158. package/dist/collection/dev/datepicker.js +46 -0
  159. package/dist/collection/dev/file-list.js +16 -0
  160. package/dist/collection/dev/file.js +0 -0
  161. package/dist/collection/dev/flyout.js +194 -0
  162. package/dist/collection/dev/input.js +6 -0
  163. package/dist/collection/dev/line-chart.js +45 -0
  164. package/dist/collection/dev/modal.js +48 -0
  165. package/dist/collection/dev/navigation.js +13 -0
  166. package/dist/collection/dev/navigator.js +34 -0
  167. package/dist/collection/dev/nested-select.js +36 -0
  168. package/dist/collection/dev/pagination.js +7 -0
  169. package/dist/collection/dev/progress-monitor.js +0 -0
  170. package/dist/collection/dev/pss-modal.js +8 -0
  171. package/dist/collection/dev/scripts.js +49 -0
  172. package/dist/collection/dev/search.js +72 -0
  173. package/dist/collection/dev/select.js +57 -0
  174. package/dist/collection/dev/snackbar.js +68 -0
  175. package/dist/collection/dev/tabs.js +44 -0
  176. package/dist/collection/dev/tag-input.js +32 -0
  177. package/dist/collection/dev/textarea.js +28 -0
  178. package/dist/collection/dev/timepicker.js +32 -0
  179. package/dist/collection/dev/toggletip.js +9 -0
  180. package/dist/collection/dev/uploader.js +139 -0
  181. package/dist/collection/global/__mocks__/functions.js +6 -0
  182. package/dist/collection/global/functions.js +907 -0
  183. package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +16 -87
  184. package/dist/collection/global/interfaces.js +94 -0
  185. package/dist/collection/global/intl.js +281 -0
  186. package/dist/collection/global/services/__mocks__/http-service.js +130 -0
  187. package/dist/collection/global/services/http-service.js +50 -0
  188. package/dist/collection/lang/lang.js +5 -0
  189. package/dist/collection/lang/missing.js +43 -0
  190. package/dist/collection/lang/piglatin.js +101 -0
  191. package/dist/docs/docs.d.ts +435 -0
  192. package/dist/docs/docs.json +14178 -0
  193. package/dist/docs/props-reference.json +2079 -0
  194. package/dist/docs/skill/index.md +33 -0
  195. package/dist/docs/skill/wm-action-menu.md +116 -0
  196. package/dist/docs/skill/wm-button.md +121 -0
  197. package/dist/docs/skill/wm-chart-bar.md +156 -0
  198. package/dist/docs/skill/wm-chart-column.md +122 -0
  199. package/dist/docs/skill/wm-chart-legend.md +91 -0
  200. package/dist/docs/skill/wm-chart-slice.md +101 -0
  201. package/dist/docs/skill/wm-chart-stack.md +147 -0
  202. package/dist/docs/skill/wm-chart.md +139 -0
  203. package/dist/docs/skill/wm-date-range.md +176 -0
  204. package/dist/docs/skill/wm-datepicker.md +153 -0
  205. package/dist/docs/skill/wm-file-list.md +105 -0
  206. package/dist/docs/skill/wm-file.md +91 -0
  207. package/dist/docs/skill/wm-flyout.md +209 -0
  208. package/dist/docs/skill/wm-input.md +134 -0
  209. package/dist/docs/skill/wm-line-chart.md +135 -0
  210. package/dist/docs/skill/wm-menuitem.md +64 -0
  211. package/dist/docs/skill/wm-modal-footer.md +81 -0
  212. package/dist/docs/skill/wm-modal-header.md +71 -0
  213. package/dist/docs/skill/wm-modal.md +172 -0
  214. package/dist/docs/skill/wm-navigation-hamburger.md +61 -0
  215. package/dist/docs/skill/wm-navigation-item.md +78 -0
  216. package/dist/docs/skill/wm-navigation.md +82 -0
  217. package/dist/docs/skill/wm-navigator.md +106 -0
  218. package/dist/docs/skill/wm-nested-select.md +160 -0
  219. package/dist/docs/skill/wm-optgroup.md +72 -0
  220. package/dist/docs/skill/wm-option.md +67 -0
  221. package/dist/docs/skill/wm-pagination.md +114 -0
  222. package/dist/docs/skill/wm-progress-indicator.md +75 -0
  223. package/dist/docs/skill/wm-progress-monitor.md +120 -0
  224. package/dist/docs/skill/wm-progress-slice.md +67 -0
  225. package/dist/docs/skill/wm-search.md +180 -0
  226. package/dist/docs/skill/wm-select.md +169 -0
  227. package/dist/docs/skill/wm-snackbar.md +130 -0
  228. package/dist/docs/skill/wm-tab-item.md +45 -0
  229. package/dist/docs/skill/wm-tab-list.md +139 -0
  230. package/dist/docs/skill/wm-tab-panel.md +39 -0
  231. package/dist/docs/skill/wm-tag-input.md +187 -0
  232. package/dist/docs/skill/wm-tag-option.md +60 -0
  233. package/dist/docs/skill/wm-textarea.md +102 -0
  234. package/dist/docs/skill/wm-timepicker.md +156 -0
  235. package/dist/docs/skill/wm-toggletip.md +98 -0
  236. package/dist/docs/skill/wm-uploader.md +154 -0
  237. package/dist/docs/skill/wm-wrapper.md +5 -0
  238. package/dist/esm/app-globals-a1092590.js +101 -0
  239. package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-58637dc9.js} +159 -3
  240. package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-65f1594c.js} +374 -7830
  241. package/dist/esm/index-3425d80d.js +1813 -0
  242. package/dist/esm/index.js +1 -0
  243. package/dist/esm/interfaces-8778346d.js +77 -0
  244. package/dist/{ripple/intl-7p27BJSM.js → esm/intl-d518f362.js} +11 -4
  245. package/dist/esm/loader.js +11 -0
  246. package/dist/{ripple → esm}/priv-calendar.entry.js +143 -133
  247. package/dist/esm/priv-chart-popover-old.entry.js +142 -0
  248. package/dist/esm/priv-chart-popover_2.entry.js +199 -0
  249. package/dist/{ripple → esm}/priv-navigator-button.entry.js +5 -4
  250. package/dist/{ripple → esm}/priv-navigator-item.entry.js +5 -4
  251. package/dist/{ripple → esm}/priv-option-list.entry.js +18 -16
  252. package/dist/esm/ripple.js +20 -0
  253. package/dist/esm/wm-action-menu_2.entry.js +520 -0
  254. package/dist/{ripple/wm-modal-header.entry.js → esm/wm-button.entry.js} +264 -24
  255. package/dist/esm/wm-chart-bar.entry.js +440 -0
  256. package/dist/esm/wm-chart-column.entry.js +625 -0
  257. package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
  258. package/dist/esm/wm-chart-stack.entry.js +443 -0
  259. package/dist/esm/wm-chart.entry.js +159 -0
  260. package/dist/{ripple → esm}/wm-date-range.entry.js +224 -114
  261. package/dist/esm/wm-datepicker.entry.js +395 -0
  262. package/dist/{ripple → esm}/wm-file-list.entry.js +5 -4
  263. package/dist/{ripple → esm}/wm-file.entry.js +48 -24
  264. package/dist/esm/wm-flyout.entry.js +174 -0
  265. package/dist/{ripple → esm}/wm-input.entry.js +23 -7
  266. package/dist/{ripple → esm}/wm-line-chart.entry.js +182 -94
  267. package/dist/esm/wm-modal-pss_3.entry.js +214 -0
  268. package/dist/esm/wm-modal_3.entry.js +232 -0
  269. package/dist/esm/wm-navigation_3.entry.js +182 -0
  270. package/dist/{ripple → esm}/wm-navigator.entry.js +26 -64
  271. package/dist/{ripple → esm}/wm-nested-select.entry.js +35 -25
  272. package/dist/{ripple → esm}/wm-optgroup.entry.js +17 -5
  273. package/dist/esm/wm-option_2.entry.js +531 -0
  274. package/dist/{ripple → esm}/wm-pagination.entry.js +16 -14
  275. package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
  276. package/dist/{ripple → esm}/wm-search.entry.js +15 -31
  277. package/dist/{ripple → esm}/wm-snackbar.entry.js +32 -45
  278. package/dist/esm/wm-tab-item_3.entry.js +351 -0
  279. package/dist/{ripple → esm}/wm-tag-input.entry.js +169 -65
  280. package/dist/{ripple → esm}/wm-tag-option.entry.js +14 -2
  281. package/dist/{ripple/wm-menuitem.entry.js → esm/wm-textarea.entry.js} +65 -100
  282. package/dist/{ripple → esm}/wm-timepicker.entry.js +33 -12
  283. package/dist/{ripple → esm}/wm-toggletip.entry.js +105 -33
  284. package/dist/esm/wm-uploader.entry.js +337 -0
  285. package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
  286. package/dist/index.cjs.js +1 -0
  287. package/dist/index.js +1 -0
  288. package/dist/loader/cdn.js +1 -0
  289. package/dist/loader/index.cjs.js +1 -0
  290. package/dist/loader/index.d.ts +24 -0
  291. package/dist/loader/index.es2017.js +1 -0
  292. package/dist/loader/index.js +2 -0
  293. package/dist/loader/package.json +11 -0
  294. package/dist/ripple/index.esm.js +0 -1
  295. package/dist/ripple/p-0d364411.entry.js +1 -0
  296. package/dist/ripple/p-156c4d1d.entry.js +1 -0
  297. package/dist/ripple/{wm-modal-footer.entry.js → p-26d8c356.entry.js} +1 -44
  298. package/dist/ripple/p-2b23ce49.entry.js +1 -0
  299. package/dist/ripple/p-2b7cc2c1.entry.js +1 -0
  300. package/dist/ripple/p-34bde06a.entry.js +1 -0
  301. package/dist/ripple/p-35db9386.entry.js +1 -0
  302. package/dist/ripple/p-38a987ac.entry.js +1 -0
  303. package/dist/ripple/p-38b05894.entry.js +1 -0
  304. package/dist/ripple/p-38dee4ab.entry.js +1 -0
  305. package/dist/ripple/p-3a19d019.entry.js +1 -0
  306. package/dist/ripple/p-451d4de2.js +1 -0
  307. package/dist/ripple/p-507f2cf4.entry.js +1 -0
  308. package/dist/ripple/p-59f74ead.entry.js +1 -0
  309. package/dist/ripple/p-5c2fc42a.entry.js +1 -0
  310. package/dist/ripple/p-680d7606.entry.js +1 -0
  311. package/dist/ripple/p-683264db.js +1 -0
  312. package/dist/ripple/p-6db681c8.entry.js +1 -0
  313. package/dist/ripple/p-6e3c2bbc.js +1 -0
  314. package/dist/ripple/p-6f1cabab.entry.js +1 -0
  315. package/dist/ripple/p-72d135ee.entry.js +1 -0
  316. package/dist/ripple/p-7799953c.entry.js +1 -0
  317. package/dist/ripple/p-83c3db60.js +2 -0
  318. package/dist/ripple/{wm-progress-monitor.entry.js → p-83cdad78.entry.js} +1 -71
  319. package/dist/ripple/p-87ef0cfa.entry.js +1 -0
  320. package/dist/ripple/p-88e44511.entry.js +1 -0
  321. package/dist/ripple/p-8f8e4eb8.entry.js +1 -0
  322. package/dist/ripple/p-936adffb.entry.js +1 -0
  323. package/dist/ripple/p-9755192c.entry.js +1 -0
  324. package/dist/ripple/p-9c5c591b.js +1 -0
  325. package/dist/ripple/p-9ea38d96.entry.js +1 -0
  326. package/dist/ripple/p-be3e4e7c.entry.js +1 -0
  327. package/dist/ripple/p-c9c7df12.entry.js +1 -0
  328. package/dist/ripple/p-d7a1be0b.entry.js +1 -0
  329. package/dist/ripple/p-dab86523.entry.js +1 -0
  330. package/dist/ripple/{wm-tab-list.entry.js → p-e4aa6e27.entry.js} +1 -175
  331. package/dist/ripple/p-ebe9f38c.js +1 -0
  332. package/dist/ripple/p-ed053612.entry.js +1 -0
  333. package/dist/ripple/p-f43f621b.entry.js +1 -0
  334. package/dist/ripple/p-f48d30d6.entry.js +1 -0
  335. package/dist/ripple/{wm-action-menu.entry.js → p-f6aad57c.entry.js} +1 -201
  336. package/dist/ripple/p-f6e1beb5.entry.js +1 -0
  337. package/dist/ripple/p-fc843bb8.entry.js +1 -0
  338. package/dist/ripple/{priv-chart-popover.entry.js → p-fd997764.entry.js} +1 -134
  339. package/dist/ripple/p-fffb46ad.entry.js +1 -0
  340. package/dist/ripple/ripple.esm.js +1 -48
  341. package/dist/types/components/charts/chartFunctions.d.ts +15 -2
  342. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +25 -11
  343. package/dist/types/components/charts/priv-chart-popover-old/priv-chart-popover-old.d.ts +31 -0
  344. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +52 -0
  345. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +113 -1
  346. package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +195 -0
  347. package/dist/types/components/charts/wm-chart-column/wm-chart-column.d.ts +184 -0
  348. package/dist/types/components/charts/wm-chart-legend/wm-chart-legend.d.ts +110 -0
  349. package/dist/types/components/charts/wm-chart-stack/wm-chart-stack.d.ts +194 -0
  350. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +156 -11
  351. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +53 -1
  352. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +85 -0
  353. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +44 -0
  354. package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +19 -3
  355. package/dist/types/components/datepickers/wm-date-range.d.ts +205 -14
  356. package/dist/types/components/datepickers/wm-datepicker.d.ts +189 -11
  357. package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +6 -0
  358. package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +165 -1
  359. package/dist/types/components/selects/wm-optgroup/wm-optgroup.d.ts +87 -0
  360. package/dist/types/components/selects/wm-option/wm-option.d.ts +117 -0
  361. package/dist/types/components/selects/wm-select/wm-select.d.ts +193 -12
  362. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +207 -2
  363. package/dist/types/components/wm-button/wm-button.d.ts +191 -0
  364. package/dist/types/components/wm-file/wm-file.d.ts +110 -1
  365. package/dist/types/components/wm-file-list/wm-file-list.d.ts +72 -0
  366. package/dist/types/components/wm-flyout/wm-flyout.d.ts +205 -0
  367. package/dist/types/components/wm-input/wm-input.d.ts +161 -1
  368. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +79 -0
  369. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +54 -0
  370. package/dist/types/components/wm-modal/wm-modal-header.d.ts +30 -0
  371. package/dist/types/components/wm-modal/wm-modal.d.ts +160 -0
  372. package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +4 -0
  373. package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +4 -0
  374. package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +6 -0
  375. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +34 -0
  376. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +41 -0
  377. package/dist/types/components/wm-navigation/wm-navigation.d.ts +57 -0
  378. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +4 -0
  379. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +4 -0
  380. package/dist/types/components/wm-navigator/wm-navigator.d.ts +93 -4
  381. package/dist/types/components/wm-pagination/wm-pagination.d.ts +100 -1
  382. package/dist/types/components/wm-search/wm-search.d.ts +158 -6
  383. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +103 -1
  384. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +55 -3
  385. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +119 -20
  386. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +35 -2
  387. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +199 -5
  388. package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +68 -0
  389. package/dist/types/components/wm-textarea/wm-textarea.d.ts +99 -0
  390. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +147 -0
  391. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +88 -2
  392. package/dist/types/components/wm-uploader/wm-uploader.d.ts +145 -3
  393. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +3 -0
  394. package/dist/types/components.d.ts +11523 -95
  395. package/dist/types/global/functions.d.ts +7 -2
  396. package/dist/types/global/interfaces.d.ts +92 -2
  397. package/dist/types/global/intl.d.ts +3 -0
  398. package/dist/types/stencil-public-runtime.d.ts +0 -28
  399. package/package.json +4 -33
  400. package/dist/components/index.d.ts +0 -33
  401. package/dist/components/priv-calendar.d.ts +0 -11
  402. package/dist/components/priv-chart-popover.d.ts +0 -11
  403. package/dist/components/priv-navigator-button.d.ts +0 -11
  404. package/dist/components/priv-navigator-item.d.ts +0 -11
  405. package/dist/components/priv-option-list.d.ts +0 -11
  406. package/dist/components/wm-action-menu.d.ts +0 -11
  407. package/dist/components/wm-button.d.ts +0 -11
  408. package/dist/components/wm-chart-slice.d.ts +0 -11
  409. package/dist/components/wm-chart.d.ts +0 -11
  410. package/dist/components/wm-date-range.d.ts +0 -11
  411. package/dist/components/wm-datepicker.d.ts +0 -11
  412. package/dist/components/wm-file-list.d.ts +0 -11
  413. package/dist/components/wm-file.d.ts +0 -11
  414. package/dist/components/wm-flyout.d.ts +0 -11
  415. package/dist/components/wm-input.d.ts +0 -11
  416. package/dist/components/wm-line-chart.d.ts +0 -11
  417. package/dist/components/wm-menuitem.d.ts +0 -11
  418. package/dist/components/wm-modal-footer.d.ts +0 -11
  419. package/dist/components/wm-modal-header.d.ts +0 -11
  420. package/dist/components/wm-modal-pss-footer.d.ts +0 -11
  421. package/dist/components/wm-modal-pss-header.d.ts +0 -11
  422. package/dist/components/wm-modal-pss.d.ts +0 -11
  423. package/dist/components/wm-modal.d.ts +0 -11
  424. package/dist/components/wm-navigation-hamburger.d.ts +0 -11
  425. package/dist/components/wm-navigation-item.d.ts +0 -11
  426. package/dist/components/wm-navigation.d.ts +0 -11
  427. package/dist/components/wm-navigator.d.ts +0 -11
  428. package/dist/components/wm-nested-select.d.ts +0 -11
  429. package/dist/components/wm-optgroup.d.ts +0 -11
  430. package/dist/components/wm-option.d.ts +0 -11
  431. package/dist/components/wm-pagination.d.ts +0 -11
  432. package/dist/components/wm-progress-indicator.d.ts +0 -11
  433. package/dist/components/wm-progress-monitor.d.ts +0 -11
  434. package/dist/components/wm-progress-slice.d.ts +0 -11
  435. package/dist/components/wm-search.d.ts +0 -11
  436. package/dist/components/wm-select.d.ts +0 -11
  437. package/dist/components/wm-snackbar.d.ts +0 -11
  438. package/dist/components/wm-tab-item.d.ts +0 -11
  439. package/dist/components/wm-tab-list.d.ts +0 -11
  440. package/dist/components/wm-tab-panel.d.ts +0 -11
  441. package/dist/components/wm-tag-input.d.ts +0 -11
  442. package/dist/components/wm-tag-option.d.ts +0 -11
  443. package/dist/components/wm-textarea.d.ts +0 -11
  444. package/dist/components/wm-timepicker.d.ts +0 -11
  445. package/dist/components/wm-toggletip.d.ts +0 -11
  446. package/dist/components/wm-uploader.d.ts +0 -11
  447. package/dist/components/wm-wrapper.d.ts +0 -11
  448. package/dist/ripple/index-CU5QNCKv.js +0 -4167
  449. package/dist/ripple/interfaces-CrANcZM9.js +0 -53
  450. package/dist/ripple/wm-button.entry.js +0 -197
  451. package/dist/ripple/wm-chart.entry.js +0 -157
  452. package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
  453. package/dist/ripple/wm-modal-pss-header.entry.js +0 -39
  454. package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
  455. package/dist/ripple/wm-navigation-item.entry.js +0 -18
  456. package/dist/ripple/wm-option.entry.js +0 -171
  457. package/dist/ripple/wm-progress-slice.entry.js +0 -13
  458. package/dist/ripple/wm-select.entry.js +0 -249
  459. package/dist/ripple/wm-tab-item.entry.js +0 -63
  460. package/dist/ripple/wm-uploader.entry.js +0 -313
@@ -0,0 +1,1158 @@
1
+ import { h, Host, } from "@stencil/core";
2
+ import { intl, dateFind, toBool, handleDisabledAttribute, dateToISO, calendar_months, debounce, findAllScrollableParents, findPositioningBoundary, } from "../../global/functions";
3
+ /**
4
+ * Two linked date inputs (start and end) with a shared calendar popup for selecting a date
5
+ * range. Users can type or click to set each date. Provides separate error states for start
6
+ * and end, and emits distinct blur events for each input. Use instead of two native
7
+ * `<input type="date">` elements when a range is required.
8
+ *
9
+ * @category Form Inputs
10
+ *
11
+ * @keyboardInteraction
12
+ * - **Input fields**: Tab moves focus between start input, end input, and the calendar toggle.
13
+ * - **Calendar toggle**: Space / Enter opens the calendar; Escape closes it and returns focus.
14
+ * - **Day grid**: Arrow keys navigate dates; Enter selects. After selecting the first date,
15
+ * the calendar resets for a second selection. Selecting a date earlier than the first date
16
+ * automatically swaps start and end.
17
+ * - **Month/year selectors**: Arrow keys cycle values; Tab/Shift+Tab move focus through controls.
18
+ *
19
+ * @accessibility
20
+ * - `label-start` and `label-end` are required for accessibility — always provide both even if
21
+ * visually implied by context.
22
+ * - The calendar toggle announces "Select range" to screen readers and reflects `aria-expanded`.
23
+ * - Validation errors are announced via an `aria-live` region when `error-message` changes.
24
+ * - The calendar popup hides its toggle when there is no room to display it; users can still
25
+ * type dates directly into the inputs.
26
+ *
27
+ * @usageNotes
28
+ * - Set `value-start` and `value-end` in the format specified by `date-format` (default
29
+ * `mm/dd/yyyy`). For programmatic pre-population, prefer ISO format via `preselected` and
30
+ * convert with the `reformatDate` method.
31
+ * - `wmRangeSelection` emits a detail object with `startDate` and `endDate`, each in ISO, US,
32
+ * and INT formats.
33
+ * - The same-date re-selection rule: clicking the same date as `date1` a second time resets the
34
+ * range selection so the user can pick a new `date1`.
35
+ *
36
+ * @example {html} Basic date range
37
+ * <wm-date-range label-start="Start date" label-end="End date"></wm-date-range>
38
+ *
39
+ * @example {react} Basic date range
40
+ * // The component does not update its own values after a calendar selection --
41
+ * // the app must call reformatDate and set valueStart/valueEnd imperatively via a ref.
42
+ * const ref = useRef(null);
43
+ *
44
+ * function getFormatName(format) {
45
+ * const map = { 'mm/dd/yyyy': 'US', 'dd/mm/yyyy': 'INT', 'yyyy/mm/dd': 'ISO' };
46
+ * return format ? map[format] : 'US';
47
+ * }
48
+ *
49
+ * // event.detail is { startDate: { iso, us, int }, endDate: { iso, us, int } }
50
+ * const handleRangeSelection = async (event) => {
51
+ * const dr = ref.current;
52
+ * const fmt = getFormatName(dr.getAttribute('date-format'));
53
+ * dr.valueStart = await dr.reformatDate('ISO', fmt, event.detail.startDate.iso);
54
+ * dr.valueEnd = await dr.reformatDate('ISO', fmt, event.detail.endDate.iso);
55
+ * dr.errorMessage = '';
56
+ * };
57
+ *
58
+ * const handleInputBlurred = async (field) => {
59
+ * const dr = ref.current;
60
+ * const fmt = getFormatName(dr.getAttribute('date-format'));
61
+ * const value = field === 'start' ? dr.valueStart : dr.valueEnd;
62
+ * if (value) {
63
+ * const iso = await dr.reformatDate(fmt, 'ISO', value);
64
+ * if (await dr.isValidISO(iso)) {
65
+ * const display = await dr.reformatDate('ISO', fmt, iso);
66
+ * if (field === 'start') dr.valueStart = display;
67
+ * else dr.valueEnd = display;
68
+ * dr.errorMessage = '';
69
+ * dr.invalidStart = false;
70
+ * dr.invalidEnd = false;
71
+ * } else {
72
+ * dr.errorMessage = `Please enter a valid date in the format ${dr.getAttribute('date-format') ?? 'mm/dd/yyyy'}`;
73
+ * if (field === 'start') dr.invalidStart = true;
74
+ * else dr.invalidEnd = true;
75
+ * }
76
+ * }
77
+ * };
78
+ *
79
+ * <WmDateRange
80
+ * ref={ref}
81
+ * labelStart="Start date"
82
+ * labelEnd="End date"
83
+ * onWmRangeSelection={handleRangeSelection}
84
+ * onWmStartInputBlur={() => handleInputBlurred('start')}
85
+ * onWmEndInputBlur={() => handleInputBlurred('end')}
86
+ * />
87
+ *
88
+ * @example {html} Required fields with validation
89
+ * <wm-date-range label-start="From" label-end="To" required-field></wm-date-range>
90
+ *
91
+ * @example {react} Required fields with validation
92
+ * <WmDateRange
93
+ * ref={ref}
94
+ * labelStart="From"
95
+ * labelEnd="To"
96
+ * requiredField={true}
97
+ * onWmRangeSelection={handleRangeSelection}
98
+ * onWmStartInputBlur={() => handleInputBlurred('start')}
99
+ * onWmEndInputBlur={() => handleInputBlurred('end')}
100
+ * />
101
+ *
102
+ * @example {html} International date format
103
+ * <wm-date-range label-start="Start" label-end="End" date-format="dd/mm/yyyy"></wm-date-range>
104
+ *
105
+ * @example {react} International date format
106
+ * <WmDateRange labelStart="Start" labelEnd="End" dateFormat="dd/mm/yyyy" />
107
+ *
108
+ * @example {html} Disabled
109
+ * <wm-date-range label-start="Start" label-end="End" disabled></wm-date-range>
110
+ *
111
+ * @example {react} Disabled
112
+ * <WmDateRange labelStart="Start" labelEnd="End" disabled={true} />
113
+ *
114
+ */
115
+ export class DateRange {
116
+ constructor() {
117
+ this.calWidth = 681; // 673 + 8px of room
118
+ this.hasAnchor = CSS.supports("top", "anchor(bottom)");
119
+ this.popupMaxHeight = 413; // maximum height when a month spans 6 rows of days
120
+ this.fit = null;
121
+ this.debouncedCheckCanOpen = debounce(() => {
122
+ var _a;
123
+ if (!((_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.isConnected))
124
+ return; // bail if the component was unmounted before the debounce fired
125
+ this.canOpen = this.measureFit() !== null;
126
+ }, 100);
127
+ this.pf_repositionRAF = null;
128
+ this.formats = { "mm/dd/yyyy": "US", "dd/mm/yyyy": "INT", "yyyy/mm/dd": "ISO" };
129
+ this.dateFormat = "mm/dd/yyyy";
130
+ this.disabled = false;
131
+ this.errorMessage = undefined;
132
+ this.invalidStart = false;
133
+ this.invalidEnd = false;
134
+ this.labelStart = "";
135
+ this.labelEnd = "";
136
+ this.preselected = undefined;
137
+ this.requiredField = false;
138
+ this.valueStart = "";
139
+ this.valueEnd = "";
140
+ this.isExpanded = false;
141
+ this.canOpen = true;
142
+ }
143
+ pf_reposition() {
144
+ if (this.hasAnchor || !this.isExpanded)
145
+ return;
146
+ // rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
147
+ // without thrashing layout when scroll fires many times per frame.
148
+ if (this.pf_repositionRAF !== null)
149
+ return;
150
+ this.pf_repositionRAF = requestAnimationFrame(() => {
151
+ this.pf_repositionRAF = null;
152
+ this.pf_positionDropdown();
153
+ });
154
+ }
155
+ // Returns the closest scrollable ancestor that can yield at least `neededScroll` of additional scroll.
156
+ findScrollable(neededScroll) {
157
+ // Scrolling an ancestor above the positioning boundary (e.g. a scrollable container behind
158
+ // an open modal dialog) won't move the anchor, so those don't count.
159
+ const boundary = findPositioningBoundary(this.el);
160
+ for (const parent of findAllScrollableParents(this.el)) {
161
+ if (boundary && parent !== boundary && !boundary.contains(parent))
162
+ continue;
163
+ const available = parent.scrollHeight - parent.scrollTop - parent.clientHeight;
164
+ if (available >= neededScroll)
165
+ return parent;
166
+ }
167
+ return null;
168
+ }
169
+ measureFit() {
170
+ // Safari has issues with position-try, so the component measures where to place the popover itself.
171
+ // see https://docs.google.com/document/d/1nCW9mgjPmw0mdif8jyfkjuXbAds_OL2slvS3EhNJsBg/edit?tab=t.0#heading=h.wkyhkgchgk3d
172
+ const rect = this.anchorEl.getBoundingClientRect();
173
+ const vw = document.documentElement.clientWidth;
174
+ const vh = document.documentElement.clientHeight;
175
+ const spaceBelow = vh - rect.bottom;
176
+ const spaceAbove = rect.top;
177
+ const fitsBelow = spaceBelow >= this.popupMaxHeight; // (1) enough viewport room below
178
+ const fitsAbove = spaceAbove >= this.popupMaxHeight; // (2) enough viewport room above
179
+ const canScroll = this.findScrollable(this.popupMaxHeight - spaceBelow) !== null; // (3) a scrollable ancestor can supply the missing room
180
+ const fitsCentered = vw >= this.calWidth && vh >= this.popupMaxHeight; // (4) the viewport is big enough to fit the popover centered over the input
181
+ // (1) below; (2) above; (3) below and scroll into view; (4) centered over input; (5) no placement works → caller hides the toggle
182
+ const vertical = fitsBelow
183
+ ? "below"
184
+ : fitsAbove
185
+ ? "above"
186
+ : canScroll
187
+ ? "below-scroll"
188
+ : fitsCentered
189
+ ? "over"
190
+ : null;
191
+ if (!vertical)
192
+ return null;
193
+ const fitsLeftAligned = rect.left + this.calWidth <= vw; // (a) left edge aligns to input's left edge
194
+ const fitsRightAligned = rect.right - this.calWidth >= 0; // (b) right edge aligns to input's right edge
195
+ // (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room; (d) no placement works → caller hides the toggle
196
+ const horizontal = fitsLeftAligned
197
+ ? "left"
198
+ : fitsRightAligned
199
+ ? "right"
200
+ : vw >= this.calWidth
201
+ ? rect.left > vw - rect.right
202
+ ? "clip-left"
203
+ : "clip-right"
204
+ : null;
205
+ if (!horizontal)
206
+ return null;
207
+ return { vertical, horizontal };
208
+ }
209
+ checkCanOpen() {
210
+ this.debouncedCheckCanOpen();
211
+ }
212
+ get _disabled() {
213
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
214
+ return toBool(this.disabled);
215
+ }
216
+ get focusDates() {
217
+ // the date the first calendar will open to. either:
218
+ // - value-start
219
+ // - a date provided by the dev via prop preselected
220
+ // - today's date
221
+ const isoStart = this.toISO(this.valueStart);
222
+ // fallback:
223
+ let startFocusDate = dateToISO(new Date());
224
+ if (this._isValidISO(isoStart)) {
225
+ startFocusDate = isoStart;
226
+ }
227
+ else if (this.preselected && this._isValidISO(this.preselected)) {
228
+ startFocusDate = this.preselected;
229
+ }
230
+ // the date the second calendar will open to. either:
231
+ // - value-end, if exists and not same month as value-start
232
+ // - the month after the first calendar
233
+ let firstOfNextMonth = this.toJSDate(startFocusDate);
234
+ if (firstOfNextMonth.getUTCMonth() == 11) {
235
+ firstOfNextMonth.setYear(firstOfNextMonth.getUTCFullYear() + 1);
236
+ }
237
+ firstOfNextMonth.setMonth((firstOfNextMonth.getUTCMonth() + 1) % 12, 1);
238
+ let endFocusDate = dateToISO(firstOfNextMonth); // fallback
239
+ const isoEnd = this.toISO(this.valueEnd);
240
+ if (this._isValidISO(isoEnd)) {
241
+ const sameMonth = this.isSameMonth(startFocusDate, isoEnd);
242
+ if (!sameMonth) {
243
+ endFocusDate = isoEnd;
244
+ // if there is a valueEnd and no valueStart, set valueStart to the month before valueEnd;
245
+ if (!isoStart) {
246
+ let firstOfPrevMonth = this.toJSDate(endFocusDate);
247
+ let month = firstOfPrevMonth.getUTCMonth() - 1;
248
+ if (month == -1) {
249
+ month = 11;
250
+ firstOfPrevMonth.setYear(firstOfPrevMonth.getUTCFullYear() - 1);
251
+ }
252
+ firstOfPrevMonth.setMonth(month, 1);
253
+ startFocusDate = dateToISO(firstOfPrevMonth);
254
+ }
255
+ }
256
+ }
257
+ return [startFocusDate, endFocusDate];
258
+ }
259
+ // same month of the same year
260
+ isSameMonth(date1, date2) {
261
+ if (date1 && date2) {
262
+ return date1.slice(0, -3) === date2.slice(0, -3);
263
+ }
264
+ else {
265
+ return false;
266
+ }
267
+ }
268
+ toJSDate(date) {
269
+ if (date && this._isValidISO(date)) {
270
+ let newDate = new Date();
271
+ newDate.setUTCFullYear(parseInt(date.split("-")[0]), parseInt(date.split("-")[1]) - 1, parseInt(date.split("-")[2]));
272
+ return newDate;
273
+ }
274
+ else {
275
+ return undefined;
276
+ }
277
+ }
278
+ toISO(date) {
279
+ // returns the input when it can't reformat
280
+ return this._reformatDate(this.formats[this.dateFormat], "ISO", date);
281
+ }
282
+ handleDisabled() {
283
+ handleDisabledAttribute(this.el, this._disabled);
284
+ }
285
+ updateValueStart() {
286
+ this.startInputEl.value = this.valueStart ? this.valueStart : "";
287
+ }
288
+ updateValueEnd() {
289
+ this.endInputEl.value = this.valueEnd ? this.valueEnd : "";
290
+ }
291
+ handleErrorMessage() {
292
+ if (this.errorMessage) {
293
+ setTimeout(() => this.announce(this.errorMessage), 100);
294
+ }
295
+ }
296
+ pf_positionDropdown() {
297
+ var _a, _b, _c, _d, _e, _f;
298
+ // polyfill for browsers without anchor() support (older Firefox).
299
+ const rect = this.anchorEl.getBoundingClientRect();
300
+ const vw = document.documentElement.clientWidth;
301
+ const vh = document.documentElement.clientHeight;
302
+ const gap = 2;
303
+ this.el.style.removeProperty("--popup-translate-y");
304
+ this.el.style.removeProperty("--popup-left");
305
+ // VERTICAL
306
+ if (((_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) === "above") {
307
+ this.el.style.setProperty("--popup-translate-y", rect.top - this.popupMaxHeight - gap + "px");
308
+ }
309
+ else if (((_b = this.fit) === null || _b === void 0 ? void 0 : _b.vertical) === "over") {
310
+ this.el.style.setProperty("--popup-translate-y", (vh - this.popupMaxHeight) / 2 + "px");
311
+ }
312
+ else {
313
+ this.el.style.setProperty("--popup-translate-y", rect.bottom + gap + "px");
314
+ }
315
+ // HORIZONTAL
316
+ if (((_c = this.fit) === null || _c === void 0 ? void 0 : _c.vertical) === "over") {
317
+ this.el.style.setProperty("--popup-left", (vw - this.calWidth) / 2 + "px");
318
+ }
319
+ else if (((_d = this.fit) === null || _d === void 0 ? void 0 : _d.horizontal) === "right") {
320
+ this.el.style.setProperty("--popup-left", rect.right - this.calWidth + "px");
321
+ }
322
+ else if (((_e = this.fit) === null || _e === void 0 ? void 0 : _e.horizontal) === "clip-left") {
323
+ this.el.style.setProperty("--popup-left", "0px");
324
+ }
325
+ else if (((_f = this.fit) === null || _f === void 0 ? void 0 : _f.horizontal) === "clip-right") {
326
+ this.el.style.setProperty("--popup-left", vw - this.calWidth + "px");
327
+ }
328
+ else {
329
+ this.el.style.setProperty("--popup-left", rect.left + "px");
330
+ }
331
+ }
332
+ handleToggle(ev) {
333
+ if (ev.newState === "open") {
334
+ this.fit = this.measureFit();
335
+ if (!this.fit) {
336
+ // Resize check should have hidden the toggle, but if anchor moved since then, bail out.
337
+ this.canOpen = false;
338
+ this.popupEl.hidePopover();
339
+ return;
340
+ }
341
+ if (!this.hasAnchor) {
342
+ this.pf_positionDropdown();
343
+ }
344
+ requestAnimationFrame(() => {
345
+ var _a, _b;
346
+ this.isExpanded = true;
347
+ // state stuff
348
+ this.startCalEl.focusDate = this.focusDates[0];
349
+ this.endCalEl.focusDate = this.focusDates[1];
350
+ this.startCalEl.focusCell();
351
+ if (this.valueStart) {
352
+ const startISO = this.toISO(this.valueStart);
353
+ if (this._isValidISO(startISO)) {
354
+ this.startCalEl.startDate = startISO;
355
+ }
356
+ if (this.valueEnd) {
357
+ const endISO = this.toISO(this.valueEnd);
358
+ if (this._isValidISO(endISO)) {
359
+ if (this.isSameMonth(startISO, endISO)) {
360
+ this.startCalEl.endDate = endISO;
361
+ }
362
+ else {
363
+ this.endCalEl.endDate = endISO;
364
+ }
365
+ }
366
+ }
367
+ }
368
+ if (((_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) === "below-scroll") {
369
+ const scrollAmount = this.anchorEl.getBoundingClientRect().bottom + this.popupMaxHeight + 2 - document.documentElement.clientHeight;
370
+ if (scrollAmount > 0)
371
+ (_b = this.findScrollable(scrollAmount)) === null || _b === void 0 ? void 0 : _b.scrollBy({ top: scrollAmount, behavior: "smooth" });
372
+ }
373
+ });
374
+ }
375
+ else {
376
+ if (this.pf_repositionRAF !== null) {
377
+ cancelAnimationFrame(this.pf_repositionRAF);
378
+ this.pf_repositionRAF = null;
379
+ }
380
+ this.fit = null;
381
+ // reset
382
+ // clearing these in case the user closes without finishing the process
383
+ this.date1 = undefined;
384
+ this.date2 = undefined;
385
+ this.startCalEl.startDate = undefined;
386
+ this.startCalEl.endDate = undefined;
387
+ this.startCalEl.hoverDate = undefined;
388
+ this.endCalEl.startDate = undefined;
389
+ this.endCalEl.endDate = undefined;
390
+ this.endCalEl.hoverDate = undefined;
391
+ this.startCalEl.view = "month";
392
+ this.endCalEl.view = "month";
393
+ this.isExpanded = false;
394
+ }
395
+ }
396
+ closePopup(returnFocus = false) {
397
+ this.popupEl.hidePopover();
398
+ if (returnFocus) {
399
+ this.toggleEl.focus();
400
+ }
401
+ }
402
+ handleFocus() {
403
+ this.wrapperEl.classList.add("focus");
404
+ }
405
+ handleBlur() {
406
+ this.wrapperEl.classList.remove("focus");
407
+ }
408
+ handleStartInputBlur() {
409
+ this.wmStartInputBlur.emit();
410
+ }
411
+ handleEndInputBlur() {
412
+ this.wmEndInputBlur.emit();
413
+ }
414
+ handleStartInput(ev) {
415
+ // keep component's value in sync with input's value
416
+ this.valueStart = ev.target.value;
417
+ }
418
+ handleEndInput(ev) {
419
+ // keep component's value in sync with input's value
420
+ this.valueEnd = ev.target.value;
421
+ }
422
+ handleDateFocus(ev) {
423
+ const cal = ev.target;
424
+ const newFocusVal = cal.focusDate;
425
+ // keeping calendars in sync
426
+ // (left one should always be before right one)
427
+ const startYearMonth = this.startCalEl.focusDate.slice(0, -3);
428
+ const endYearMonth = this.endCalEl.focusDate.slice(0, -3);
429
+ if (cal == this.startCalEl) {
430
+ if (startYearMonth >= endYearMonth) {
431
+ this.endCalEl.focusDate = dateFind.month.increase(this.startCalEl.focusDate, 1);
432
+ }
433
+ }
434
+ else if (cal == this.endCalEl) {
435
+ if (endYearMonth <= startYearMonth) {
436
+ this.startCalEl.focusDate = dateFind.month.decrease(this.endCalEl.focusDate, 1);
437
+ }
438
+ }
439
+ // SR announcements
440
+ if (this.oldFocusVal) {
441
+ const newYear = dateFind.year.asInt(newFocusVal);
442
+ const oldYear = dateFind.year.asInt(this.oldFocusVal);
443
+ const newMonth = dateFind.month.asInt(newFocusVal);
444
+ const oldMonth = dateFind.month.asInt(this.oldFocusVal);
445
+ if (cal.view === "month") {
446
+ if (newYear != oldYear || newMonth != oldMonth) {
447
+ this.liveRegionEl.innerHTML = intl.formatMessage({
448
+ id: "date.viewingMonth",
449
+ defaultMessage: "Viewing {month}, {year}",
450
+ description: "Announcement indicating current month and year visible in a date picker",
451
+ }, {
452
+ month: calendar_months[newMonth - 1],
453
+ year: newYear,
454
+ });
455
+ }
456
+ }
457
+ else {
458
+ if (newYear != oldYear) {
459
+ this.liveRegionEl.innerHTML = intl.formatMessage({
460
+ id: "date.yearSelected",
461
+ defaultMessage: "{year} selected.",
462
+ description: "Announcement after the user selects a year in a date picker",
463
+ }, { year: newYear });
464
+ }
465
+ else if (newMonth != oldMonth) {
466
+ this.liveRegionEl.innerHTML = `${calendar_months[newMonth - 1]}, ${newYear}`;
467
+ }
468
+ }
469
+ }
470
+ this.oldFocusVal = cal.focusDate;
471
+ }
472
+ handlePopupBlurred(ev) {
473
+ // emit blur event when leaving component from priv-calendar
474
+ if (ev.detail.relatedTarget !== this.el) {
475
+ const event = new CustomEvent("blur");
476
+ // @ts-ignore
477
+ event.relatedTarget = ev.detail.relatedTarget;
478
+ this.el.dispatchEvent(event);
479
+ }
480
+ }
481
+ handleKeydown(ev) {
482
+ if (ev.key === "Escape" && this.isExpanded) {
483
+ ev.preventDefault();
484
+ ev.stopPropagation(); // prevents closing of parent modal
485
+ this.closePopup(true);
486
+ }
487
+ }
488
+ handleCellTriggered(ev) {
489
+ const cal = ev.detail.cal;
490
+ const dateElement = ev.detail.cell;
491
+ const newDate = dateElement.getAttribute("data-year") +
492
+ "-" +
493
+ dateElement.getAttribute("data-month") +
494
+ "-" +
495
+ dateElement.textContent.padStart(2, "0");
496
+ if (this.startCalEl.endDate || this.endCalEl.endDate) {
497
+ // there were already 2 dates, user is setting a new range.
498
+ // set calendar state
499
+ this.startCalEl.startDate = undefined;
500
+ this.startCalEl.endDate = undefined;
501
+ this.endCalEl.startDate = undefined;
502
+ this.endCalEl.endDate = undefined;
503
+ cal.startDate = newDate;
504
+ // set component state
505
+ this.date1 = newDate;
506
+ this.date2 = undefined;
507
+ }
508
+ else if (this.date1 && newDate !== this.date1) {
509
+ // user is setting the end of the range
510
+ // ignore if same date as first is selected
511
+ // (acts as if it was re-selected as the first date)
512
+ // reorder if necessary
513
+ if (this.date1 > newDate) {
514
+ this.date2 = this.date1;
515
+ this.date1 = newDate;
516
+ }
517
+ else {
518
+ this.date2 = newDate;
519
+ }
520
+ const detail = {
521
+ startDate: {
522
+ iso: this.date1,
523
+ us: this._reformatDate("ISO", "US", this.date1),
524
+ int: this._reformatDate("ISO", "INT", this.date1),
525
+ },
526
+ endDate: {
527
+ iso: this.date2,
528
+ us: this._reformatDate("ISO", "US", this.date2),
529
+ int: this._reformatDate("ISO", "INT", this.date2),
530
+ },
531
+ };
532
+ this.wmRangeSelection.emit(detail);
533
+ this.closePopup(true);
534
+ this.date1 = undefined;
535
+ this.date2 = undefined;
536
+ }
537
+ else {
538
+ // calendars were clear, user sets first date
539
+ cal.startDate = newDate;
540
+ // component state
541
+ this.date1 = newDate;
542
+ }
543
+ // Create events to trigger onInput and onChange on host element, to get the updated value
544
+ // Because there are more ways to input than just typing, we are firing this event upon cellTriggered
545
+ const inputEvent = new CustomEvent("input");
546
+ this.el.dispatchEvent(inputEvent);
547
+ const changeEvent = new CustomEvent("change");
548
+ this.el.dispatchEvent(changeEvent);
549
+ }
550
+ handleOutOfCal() {
551
+ this.startCalEl.hoverDate = undefined;
552
+ this.endCalEl.hoverDate = undefined;
553
+ }
554
+ handleCellHovered(ev) {
555
+ this.startCalEl.hoverDate = this.startCalEl.startDate === ev.detail ? undefined : ev.detail;
556
+ this.endCalEl.hoverDate = this.endCalEl.startDate === ev.detail ? undefined : ev.detail;
557
+ }
558
+ /**
559
+ * @description Converts a date string between `"US"` (mm/dd/yyyy), `"INT"` (dd/mm/yyyy),
560
+ * and `"ISO"` (YYYY-MM-DD). Direct US ↔ INT conversion is not supported — route through
561
+ * ISO as an intermediate step.
562
+ * @param inputFormat - Format of the input date string (`"US"`, `"INT"`, or `"ISO"`).
563
+ * @param outputFormat - Desired output format (`"US"`, `"INT"`, or `"ISO"`).
564
+ * @param date - The date string to reformat.
565
+ * @returns The reformatted date string, an empty string if `date` is omitted, or the original
566
+ * string unchanged if it cannot be parsed.
567
+ */
568
+ async reformatDate(inputFormat, outputFormat, date) {
569
+ return this._reformatDate(inputFormat, outputFormat, date);
570
+ }
571
+ _reformatDate(inputFormat, outputFormat, date) {
572
+ // this function reformats date strings to/from the storage format ONLY. US -> INT and vice versa is not supported.
573
+ if (inputFormat !== "ISO" && outputFormat !== "ISO")
574
+ return "";
575
+ // return if missing args
576
+ if (!inputFormat || !outputFormat || !date)
577
+ return "";
578
+ // 1, 2, or 4 digits, separator, 1 or 2 digits, separator, then 1 or 2 or 4 digits
579
+ const parsableEntry = /^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;
580
+ if (!parsableEntry.test(date)) {
581
+ return date;
582
+ }
583
+ else {
584
+ const dateArr = date.replace(/[\-\.]/gi, "/").split("/");
585
+ switch (outputFormat) {
586
+ case "US":
587
+ return dateArr[1].padStart(2, "0") + "/" + dateArr[2].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
588
+ case "INT":
589
+ return dateArr[2].padStart(2, "0") + "/" + dateArr[1].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
590
+ case "ISO":
591
+ if (inputFormat === "US") {
592
+ return dateArr[2].padStart(4, "20") + "-" + dateArr[0].padStart(2, "0") + "-" + dateArr[1].padStart(2, "0");
593
+ }
594
+ else if (inputFormat === "INT") {
595
+ return dateArr[2].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[0].padStart(2, "0");
596
+ }
597
+ else if (inputFormat === "ISO") {
598
+ return dateArr[0].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[2].padStart(2, "0");
599
+ }
600
+ default:
601
+ return dateArr.join("/");
602
+ }
603
+ }
604
+ }
605
+ /**
606
+ * @description Validates whether a string is a well-formed, calendar-correct ISO date
607
+ * (YYYY-MM-DD). Accounts for invalid day-of-month values and leap years.
608
+ * @param input - The string to validate.
609
+ * @returns `true` if the string is a valid ISO date, `false` otherwise.
610
+ */
611
+ async isValidISO(input) {
612
+ return this._isValidISO(input);
613
+ }
614
+ _isValidISO(input) {
615
+ const ISOFormat = /^\d\d\d\d[-]\d\d[-]\d\d$/;
616
+ if (!input || !ISOFormat.test(input)) {
617
+ return false;
618
+ }
619
+ else {
620
+ // Parse the ISO date parts to integers
621
+ const parts = input.split("-");
622
+ const day = parseInt(parts[2], 10);
623
+ const month = parseInt(parts[1], 10);
624
+ const year = parseInt(parts[0], 10);
625
+ // Check the ranges of month and year
626
+ if (year < 1000 || year > 3000 || month == 0 || month > 12)
627
+ return false;
628
+ let monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
629
+ // Adjust for leap years
630
+ if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
631
+ monthLength[1] = 29;
632
+ // Check the range of the day
633
+ return day > 0 && day <= monthLength[month - 1];
634
+ }
635
+ }
636
+ componentWillLoad() {
637
+ if (this.labelStart === "" || this.labelEnd === "") {
638
+ console.error("For accessibility reasons you must specify labels for the date range inputs.");
639
+ }
640
+ handleDisabledAttribute(this.el, this._disabled);
641
+ }
642
+ componentDidLoad() {
643
+ this.checkCanOpen();
644
+ }
645
+ disconnectedCallback() {
646
+ if (this.pf_repositionRAF !== null) {
647
+ cancelAnimationFrame(this.pf_repositionRAF);
648
+ this.pf_repositionRAF = null;
649
+ }
650
+ }
651
+ announce(message) {
652
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
653
+ if (this.liveRegionEl.textContent === message) {
654
+ message += "\u00A0";
655
+ }
656
+ this.liveRegionEl.textContent = message;
657
+ }
658
+ render() {
659
+ var _a, _b, _c, _d;
660
+ return (h(Host, { key: '3e1687aff3f56da8c73421741c52ef52f035f162', "aria-busy": "false" }, h("div", { key: 'd1d6789b54c5d3590e6355196ad01803df7352d6', ref: (d) => (this.wrapperEl = d), class: "wrapper" }, h("div", { key: 'd164da838915bbd5799f7909930086bd3a238993', class: "range-wrapper cal", ref: (el) => (this.anchorEl = el) }, h("div", { key: 'c72c3b48368a249b36949135196773df6ad260b5', class: "label-wrapper", id: "start-label-wrapper" }, h("label", { key: '48f737f4349b53f5c33a02542726455f5de1b5e6', id: "startlabel", htmlFor: "start-date-input", class: "label" }, this.labelStart, this.requiredField && (h("span", { key: 'a90bf29ebb1db201eff3856ceea730c00bb28155', "aria-hidden": "true", class: "required" }, "*")))), h("div", { key: '513315a6a4d0bc157b24913a6e4a37be84344380', class: "label-wrapper", id: "end-label-wrapper" }, h("label", { key: '2c6e766a9102d994708fd16ff81db2bc05f9ddae', id: "endlabel", htmlFor: "end-date-input", class: "label" }, this.labelEnd, this.requiredField && (h("span", { key: 'c2091c35d51aab2a0a3423e4d39c935bfa924ba0', "aria-hidden": "true", class: "required" }, "*")))), h("input", { key: '7371333b0672de66973d9c1e6872de55d0e6bfa8', 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": "date-format-hint error", "aria-label": this.labelStart, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '0bdb73fe0cfb0b8e2a0f5821d3f61e085cbf03ce', id: "hyphen" }, "\u00A0-\u00A0"), h("input", { key: '026e02beb23a58abc8fc379a04b8d5a1a3ee0df3', 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": "date-format-hint error", "aria-label": this.labelEnd, "aria-required": this.requiredField ? "true" : null }), h("div", { key: 'b3e729e81e1a74fa2f66bc15c395f21a0d883155', class: "toggle-wrapper", id: "toggle-wrapper" }, this.canOpen && (h("button", { key: '8a438955889c24424e094e66f357fdaf729c0110', disabled: this.disabled, "aria-describedby": "start-date-input end-date-input", "aria-label": intl.formatMessage({
661
+ id: "date.selectRange",
662
+ defaultMessage: "Select range",
663
+ description: "Button text for screen readers.",
664
+ }), ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: '9610b8b4de37268fb8f4f7f39664cb1673fd4d2f', class: "svg-icon svg-date" }), h("span", { key: 'f58324e44bfe336d9cb35af62d996e90ef0b2a5a', class: "calendar", title: intl.formatMessage({
665
+ id: "date.calendarView",
666
+ defaultMessage: "Calendar View",
667
+ description: "Calendar button",
668
+ }) })))), h("div", { key: 'a01184671037bcb749a3ee32e780ffa77b79cd7e', class: `popup-wrapper popup-range ${this.startCalEl && this.startCalEl.view}-view ${this.isExpanded ? "is-open" : ""} ${!this.hasAnchor && !this.isExpanded ? "hidden" : ""} ${(_b = (_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) !== null && _b !== void 0 ? _b : ""} ${(_d = (_c = this.fit) === null || _c === void 0 ? void 0 : _c.horizontal) !== null && _d !== void 0 ? _d : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), popover: "auto",
669
+ // @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
670
+ onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: '21ce85875c3d4b72cc7736cc37ad1858c4829396', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), h("priv-calendar", { key: '5c415999f7022a396c798c35ba9f8bff31c0e8dd', ref: (el) => (this.startCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("priv-calendar", { key: '1d7940ad00f6a08359bdfe6565d6c6f14e338a1b', ref: (el) => (this.endCalEl = el), onDateFocus: (ev) => this.handleDateFocus(ev) }), h("div", { key: '7ddffad403a7b15453265393ffd75d30e5a8094e', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() }))), h("div", { key: '1ee500d7ba5184364d2fa7e646b099f276e78eb1' }, h("div", { key: 'e398394e27a972cf07acb2ac4a4fd8469f0fbf81', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '96474b7b8099835d6ec7e099baa379f90317e8be', id: "month-title", class: "sr-only" }, intl.formatMessage({
671
+ id: "date.selectMonth",
672
+ defaultMessage: "Activate to select a month.",
673
+ description: "Calendar button",
674
+ })), h("div", { key: 'e683b6345f48ef97b0c062511759c27f44e46283', id: "year-title", class: "sr-only" }, intl.formatMessage({
675
+ id: "date.selectYear",
676
+ defaultMessage: "Activate to select a year.",
677
+ description: "Calendar button",
678
+ }))), h("div", { key: 'd04401dfd0806daf831ae72a8fec744ee3dac81a', id: "error", class: "error" }, this.errorMessage), h("span", { key: '62e4628e91a44c389f97293a751bd26e24400b46', id: "date-format-hint", class: "sr-only" }, this.dateFormat), h("div", { key: '4f7d347e2cf19bee4282fcf8863c807a124752f8', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }))));
679
+ }
680
+ static get is() { return "wm-date-range"; }
681
+ static get encapsulation() { return "shadow"; }
682
+ static get delegatesFocus() { return true; }
683
+ static get originalStyleUrls() {
684
+ return {
685
+ "$": ["datepicker.scss"]
686
+ };
687
+ }
688
+ static get styleUrls() {
689
+ return {
690
+ "$": ["datepicker.css"]
691
+ };
692
+ }
693
+ static get properties() {
694
+ return {
695
+ "dateFormat": {
696
+ "type": "string",
697
+ "mutable": false,
698
+ "complexType": {
699
+ "original": "string",
700
+ "resolved": "string",
701
+ "references": {}
702
+ },
703
+ "required": false,
704
+ "optional": false,
705
+ "docs": {
706
+ "tags": [{
707
+ "name": "description",
708
+ "text": "The date format shown in the input placeholders and announced to screen readers."
709
+ }, {
710
+ "name": "default",
711
+ "text": "\"mm/dd/yyyy\""
712
+ }],
713
+ "text": ""
714
+ },
715
+ "attribute": "date-format",
716
+ "reflect": false,
717
+ "defaultValue": "\"mm/dd/yyyy\""
718
+ },
719
+ "disabled": {
720
+ "type": "boolean",
721
+ "mutable": false,
722
+ "complexType": {
723
+ "original": "boolean",
724
+ "resolved": "boolean",
725
+ "references": {}
726
+ },
727
+ "required": false,
728
+ "optional": false,
729
+ "docs": {
730
+ "tags": [{
731
+ "name": "description",
732
+ "text": "Disables the entire date range component, preventing all interaction."
733
+ }, {
734
+ "name": "default",
735
+ "text": "false"
736
+ }],
737
+ "text": ""
738
+ },
739
+ "attribute": "disabled",
740
+ "reflect": false,
741
+ "defaultValue": "false"
742
+ },
743
+ "errorMessage": {
744
+ "type": "string",
745
+ "mutable": false,
746
+ "complexType": {
747
+ "original": "string",
748
+ "resolved": "string | undefined",
749
+ "references": {}
750
+ },
751
+ "required": false,
752
+ "optional": true,
753
+ "docs": {
754
+ "tags": [{
755
+ "name": "description",
756
+ "text": "Puts the component in an error state and displays this message below both\ninputs. Use with `invalid-start` and/or `invalid-end` to highlight specific fields."
757
+ }],
758
+ "text": ""
759
+ },
760
+ "attribute": "error-message",
761
+ "reflect": true
762
+ },
763
+ "invalidStart": {
764
+ "type": "boolean",
765
+ "mutable": false,
766
+ "complexType": {
767
+ "original": "boolean",
768
+ "resolved": "boolean",
769
+ "references": {}
770
+ },
771
+ "required": false,
772
+ "optional": false,
773
+ "docs": {
774
+ "tags": [{
775
+ "name": "description",
776
+ "text": "Puts the start date input in an error state (red border). Use with\n`error-message`."
777
+ }, {
778
+ "name": "default",
779
+ "text": "false"
780
+ }],
781
+ "text": ""
782
+ },
783
+ "attribute": "invalid-start",
784
+ "reflect": false,
785
+ "defaultValue": "false"
786
+ },
787
+ "invalidEnd": {
788
+ "type": "boolean",
789
+ "mutable": false,
790
+ "complexType": {
791
+ "original": "boolean",
792
+ "resolved": "boolean",
793
+ "references": {}
794
+ },
795
+ "required": false,
796
+ "optional": false,
797
+ "docs": {
798
+ "tags": [{
799
+ "name": "description",
800
+ "text": "Puts the end date input in an error state (red border). Use with\n`error-message`."
801
+ }, {
802
+ "name": "default",
803
+ "text": "false"
804
+ }],
805
+ "text": ""
806
+ },
807
+ "attribute": "invalid-end",
808
+ "reflect": false,
809
+ "defaultValue": "false"
810
+ },
811
+ "labelStart": {
812
+ "type": "string",
813
+ "mutable": false,
814
+ "complexType": {
815
+ "original": "string",
816
+ "resolved": "string",
817
+ "references": {}
818
+ },
819
+ "required": false,
820
+ "optional": false,
821
+ "docs": {
822
+ "tags": [{
823
+ "name": "description",
824
+ "text": "Visible label for the start date input. Required for accessibility."
825
+ }, {
826
+ "name": "required",
827
+ "text": undefined
828
+ }],
829
+ "text": ""
830
+ },
831
+ "attribute": "label-start",
832
+ "reflect": false,
833
+ "defaultValue": "\"\""
834
+ },
835
+ "labelEnd": {
836
+ "type": "string",
837
+ "mutable": false,
838
+ "complexType": {
839
+ "original": "string",
840
+ "resolved": "string",
841
+ "references": {}
842
+ },
843
+ "required": false,
844
+ "optional": false,
845
+ "docs": {
846
+ "tags": [{
847
+ "name": "description",
848
+ "text": "Visible label for the end date input. Required for accessibility."
849
+ }, {
850
+ "name": "required",
851
+ "text": undefined
852
+ }],
853
+ "text": ""
854
+ },
855
+ "attribute": "label-end",
856
+ "reflect": false,
857
+ "defaultValue": "\"\""
858
+ },
859
+ "preselected": {
860
+ "type": "string",
861
+ "mutable": false,
862
+ "complexType": {
863
+ "original": "string",
864
+ "resolved": "string | undefined",
865
+ "references": {}
866
+ },
867
+ "required": false,
868
+ "optional": true,
869
+ "docs": {
870
+ "tags": [{
871
+ "name": "description",
872
+ "text": "The ISO date (YYYY-MM-DD) the calendar popup opens to when first opened and\nno `value-start` is set. Falls back to today's date if omitted."
873
+ }],
874
+ "text": ""
875
+ },
876
+ "attribute": "preselected",
877
+ "reflect": false
878
+ },
879
+ "requiredField": {
880
+ "type": "boolean",
881
+ "mutable": false,
882
+ "complexType": {
883
+ "original": "boolean",
884
+ "resolved": "boolean",
885
+ "references": {}
886
+ },
887
+ "required": false,
888
+ "optional": false,
889
+ "docs": {
890
+ "tags": [{
891
+ "name": "description",
892
+ "text": "Displays a required-field asterisk (*) next to each label."
893
+ }, {
894
+ "name": "default",
895
+ "text": "false"
896
+ }],
897
+ "text": ""
898
+ },
899
+ "attribute": "required-field",
900
+ "reflect": false,
901
+ "defaultValue": "false"
902
+ },
903
+ "valueStart": {
904
+ "type": "string",
905
+ "mutable": true,
906
+ "complexType": {
907
+ "original": "string",
908
+ "resolved": "string | undefined",
909
+ "references": {}
910
+ },
911
+ "required": false,
912
+ "optional": true,
913
+ "docs": {
914
+ "tags": [{
915
+ "name": "description",
916
+ "text": "The value of the start date input, in the format specified by `date-format`.\nUpdated as the user types or picks from the calendar."
917
+ }],
918
+ "text": ""
919
+ },
920
+ "attribute": "value-start",
921
+ "reflect": false,
922
+ "defaultValue": "\"\""
923
+ },
924
+ "valueEnd": {
925
+ "type": "string",
926
+ "mutable": true,
927
+ "complexType": {
928
+ "original": "string",
929
+ "resolved": "string | undefined",
930
+ "references": {}
931
+ },
932
+ "required": false,
933
+ "optional": true,
934
+ "docs": {
935
+ "tags": [{
936
+ "name": "description",
937
+ "text": "The value of the end date input, in the format specified by `date-format`.\nUpdated as the user types or picks from the calendar."
938
+ }],
939
+ "text": ""
940
+ },
941
+ "attribute": "value-end",
942
+ "reflect": false,
943
+ "defaultValue": "\"\""
944
+ }
945
+ };
946
+ }
947
+ static get states() {
948
+ return {
949
+ "isExpanded": {},
950
+ "canOpen": {}
951
+ };
952
+ }
953
+ static get events() {
954
+ return [{
955
+ "method": "wmRangeSelection",
956
+ "name": "wmRangeSelection",
957
+ "bubbles": true,
958
+ "cancelable": true,
959
+ "composed": true,
960
+ "docs": {
961
+ "tags": [{
962
+ "name": "description",
963
+ "text": "Fires when the user completes a range selection from the calendar popup."
964
+ }, {
965
+ "name": "eventDetails",
966
+ "text": "{{ startDate: { iso: string, us: string, int: string }, endDate: { iso: string, us: string, int: string } }}\nstartDate and endDate \u2014 each formatted in ISO (YYYY-MM-DD), US (mm/dd/yyyy), and INT\n(dd/mm/yyyy). The dates are always returned in chronological order regardless of the order\nthey were clicked."
967
+ }],
968
+ "text": ""
969
+ },
970
+ "complexType": {
971
+ "original": "any",
972
+ "resolved": "any",
973
+ "references": {}
974
+ }
975
+ }, {
976
+ "method": "wmStartInputBlur",
977
+ "name": "wmStartInputBlur",
978
+ "bubbles": true,
979
+ "cancelable": true,
980
+ "composed": true,
981
+ "docs": {
982
+ "tags": [{
983
+ "name": "description",
984
+ "text": "Fires when the start date input loses focus."
985
+ }],
986
+ "text": ""
987
+ },
988
+ "complexType": {
989
+ "original": "any",
990
+ "resolved": "any",
991
+ "references": {}
992
+ }
993
+ }, {
994
+ "method": "wmEndInputBlur",
995
+ "name": "wmEndInputBlur",
996
+ "bubbles": true,
997
+ "cancelable": true,
998
+ "composed": true,
999
+ "docs": {
1000
+ "tags": [{
1001
+ "name": "description",
1002
+ "text": "Fires when the end date input loses focus."
1003
+ }],
1004
+ "text": ""
1005
+ },
1006
+ "complexType": {
1007
+ "original": "any",
1008
+ "resolved": "any",
1009
+ "references": {}
1010
+ }
1011
+ }];
1012
+ }
1013
+ static get methods() {
1014
+ return {
1015
+ "reformatDate": {
1016
+ "complexType": {
1017
+ "signature": "(inputFormat: string, outputFormat: string, date?: string) => Promise<string>",
1018
+ "parameters": [{
1019
+ "name": "inputFormat",
1020
+ "type": "string",
1021
+ "docs": "- Format of the input date string (`\"US\"`, `\"INT\"`, or `\"ISO\"`)."
1022
+ }, {
1023
+ "name": "outputFormat",
1024
+ "type": "string",
1025
+ "docs": "- Desired output format (`\"US\"`, `\"INT\"`, or `\"ISO\"`)."
1026
+ }, {
1027
+ "name": "date",
1028
+ "type": "string | undefined",
1029
+ "docs": "- The date string to reformat."
1030
+ }],
1031
+ "references": {
1032
+ "Promise": {
1033
+ "location": "global",
1034
+ "id": "global::Promise"
1035
+ }
1036
+ },
1037
+ "return": "Promise<string>"
1038
+ },
1039
+ "docs": {
1040
+ "text": "",
1041
+ "tags": [{
1042
+ "name": "description",
1043
+ "text": "Converts a date string between `\"US\"` (mm/dd/yyyy), `\"INT\"` (dd/mm/yyyy),\nand `\"ISO\"` (YYYY-MM-DD). Direct US \u2194 INT conversion is not supported \u2014 route through\nISO as an intermediate step."
1044
+ }, {
1045
+ "name": "param",
1046
+ "text": "inputFormat - Format of the input date string (`\"US\"`, `\"INT\"`, or `\"ISO\"`)."
1047
+ }, {
1048
+ "name": "param",
1049
+ "text": "outputFormat - Desired output format (`\"US\"`, `\"INT\"`, or `\"ISO\"`)."
1050
+ }, {
1051
+ "name": "param",
1052
+ "text": "date - The date string to reformat."
1053
+ }, {
1054
+ "name": "returns",
1055
+ "text": "The reformatted date string, an empty string if `date` is omitted, or the original\nstring unchanged if it cannot be parsed."
1056
+ }]
1057
+ }
1058
+ },
1059
+ "isValidISO": {
1060
+ "complexType": {
1061
+ "signature": "(input?: string) => Promise<boolean>",
1062
+ "parameters": [{
1063
+ "name": "input",
1064
+ "type": "string | undefined",
1065
+ "docs": "- The string to validate."
1066
+ }],
1067
+ "references": {
1068
+ "Promise": {
1069
+ "location": "global",
1070
+ "id": "global::Promise"
1071
+ }
1072
+ },
1073
+ "return": "Promise<boolean>"
1074
+ },
1075
+ "docs": {
1076
+ "text": "",
1077
+ "tags": [{
1078
+ "name": "description",
1079
+ "text": "Validates whether a string is a well-formed, calendar-correct ISO date\n(YYYY-MM-DD). Accounts for invalid day-of-month values and leap years."
1080
+ }, {
1081
+ "name": "param",
1082
+ "text": "input - The string to validate."
1083
+ }, {
1084
+ "name": "returns",
1085
+ "text": "`true` if the string is a valid ISO date, `false` otherwise."
1086
+ }]
1087
+ }
1088
+ }
1089
+ };
1090
+ }
1091
+ static get elementRef() { return "el"; }
1092
+ static get watchers() {
1093
+ return [{
1094
+ "propName": "disabled",
1095
+ "methodName": "handleDisabled"
1096
+ }, {
1097
+ "propName": "valueStart",
1098
+ "methodName": "updateValueStart"
1099
+ }, {
1100
+ "propName": "valueEnd",
1101
+ "methodName": "updateValueEnd"
1102
+ }, {
1103
+ "propName": "errorMessage",
1104
+ "methodName": "handleErrorMessage"
1105
+ }];
1106
+ }
1107
+ static get listeners() {
1108
+ return [{
1109
+ "name": "scroll",
1110
+ "method": "pf_reposition",
1111
+ "target": "window",
1112
+ "capture": true,
1113
+ "passive": true
1114
+ }, {
1115
+ "name": "resize",
1116
+ "method": "pf_reposition",
1117
+ "target": "window",
1118
+ "capture": false,
1119
+ "passive": true
1120
+ }, {
1121
+ "name": "resize",
1122
+ "method": "checkCanOpen",
1123
+ "target": "window",
1124
+ "capture": false,
1125
+ "passive": true
1126
+ }, {
1127
+ "name": "popupBlurred",
1128
+ "method": "handlePopupBlurred",
1129
+ "target": undefined,
1130
+ "capture": false,
1131
+ "passive": false
1132
+ }, {
1133
+ "name": "keydown",
1134
+ "method": "handleKeydown",
1135
+ "target": undefined,
1136
+ "capture": false,
1137
+ "passive": false
1138
+ }, {
1139
+ "name": "cellTriggered",
1140
+ "method": "handleCellTriggered",
1141
+ "target": undefined,
1142
+ "capture": false,
1143
+ "passive": false
1144
+ }, {
1145
+ "name": "outOfCal",
1146
+ "method": "handleOutOfCal",
1147
+ "target": undefined,
1148
+ "capture": false,
1149
+ "passive": false
1150
+ }, {
1151
+ "name": "cellHovered",
1152
+ "method": "handleCellHovered",
1153
+ "target": undefined,
1154
+ "capture": false,
1155
+ "passive": false
1156
+ }];
1157
+ }
1158
+ }