@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.
- package/dist/cjs/app-globals-3db2fdd3.js +103 -0
- package/dist/cjs/chartFunctions-0d47b1f4.js +906 -0
- package/dist/cjs/functions-761cb9f2.js +10694 -0
- package/dist/cjs/index-bb947bd5.js +1843 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/interfaces-33cd6161.js +82 -0
- package/dist/cjs/intl-9e9388a7.js +291 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/priv-calendar.cjs.entry.js +580 -0
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +146 -0
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +204 -0
- package/dist/cjs/priv-navigator-button.cjs.entry.js +29 -0
- package/dist/cjs/priv-navigator-item.cjs.entry.js +35 -0
- package/dist/cjs/priv-option-list.cjs.entry.js +391 -0
- package/dist/cjs/ripple.cjs.js +25 -0
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +525 -0
- package/dist/cjs/wm-button.cjs.entry.js +280 -0
- package/dist/cjs/wm-chart-bar.cjs.entry.js +444 -0
- package/dist/cjs/wm-chart-column.cjs.entry.js +629 -0
- package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
- package/dist/cjs/wm-chart-stack.cjs.entry.js +447 -0
- package/dist/cjs/wm-chart.cjs.entry.js +163 -0
- package/dist/cjs/wm-date-range.cjs.entry.js +591 -0
- package/dist/cjs/wm-datepicker.cjs.entry.js +399 -0
- package/dist/{ripple/wm-tab-panel.entry.js → cjs/wm-file-list.cjs.entry.js} +15 -24
- package/dist/cjs/wm-file.cjs.entry.js +210 -0
- package/dist/cjs/wm-flyout.cjs.entry.js +178 -0
- package/dist/{ripple/wm-modal.entry.js → cjs/wm-input.cjs.entry.js} +108 -110
- package/dist/cjs/wm-line-chart.cjs.entry.js +541 -0
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +220 -0
- package/dist/cjs/wm-modal_3.cjs.entry.js +238 -0
- package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +334 -0
- package/dist/cjs/wm-nested-select.cjs.entry.js +322 -0
- package/dist/{ripple/wm-textarea.entry.js → cjs/wm-optgroup.cjs.entry.js} +62 -57
- package/dist/cjs/wm-option_2.cjs.entry.js +536 -0
- package/dist/{ripple/wm-navigation.entry.js → cjs/wm-pagination.cjs.entry.js} +204 -91
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
- package/dist/{ripple/wm-flyout.entry.js → cjs/wm-search.cjs.entry.js} +168 -139
- package/dist/{ripple/wm-datepicker.entry.js → cjs/wm-snackbar.cjs.entry.js} +152 -223
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +357 -0
- package/dist/cjs/wm-tag-input.cjs.entry.js +985 -0
- package/dist/cjs/wm-tag-option.cjs.entry.js +51 -0
- package/dist/{ripple/wm-modal-pss.entry.js → cjs/wm-textarea.cjs.entry.js} +70 -111
- package/dist/{ripple/wm-progress-indicator.entry.js → cjs/wm-timepicker.cjs.entry.js} +296 -78
- package/dist/cjs/wm-toggletip.cjs.entry.js +252 -0
- package/dist/cjs/wm-uploader.cjs.entry.js +341 -0
- package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
- package/dist/collection/collection-manifest.json +207 -0
- package/dist/collection/components/charts/chartFunctions.js +831 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +995 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +345 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +990 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +268 -0
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +177 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.css +1326 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +549 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1236 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +725 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +1335 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +914 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +1006 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +310 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.css +1466 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +709 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1208 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +999 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1326 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +320 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +967 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +232 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +167 -0
- package/dist/collection/components/datepickers/datepicker.css +1147 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1415 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +857 -0
- package/dist/collection/components/datepickers/wm-date-range.js +1158 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +875 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +999 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +784 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1259 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +805 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +909 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +363 -0
- package/dist/collection/components/selects/wm-option/wm-option.css +1033 -0
- package/dist/collection/components/selects/wm-option/wm-option.js +665 -0
- package/dist/collection/components/selects/wm-select/wm-select.css +1174 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +878 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +1690 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +932 -0
- package/dist/collection/components/wm-button/wm-button.css +1630 -0
- package/dist/collection/components/wm-button/wm-button.js +794 -0
- package/dist/collection/components/wm-file/wm-file.css +1086 -0
- package/dist/collection/components/wm-file/wm-file.js +536 -0
- package/dist/collection/components/wm-file-list/wm-file-list.css +899 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +118 -0
- package/dist/collection/components/wm-flyout/wm-flyout.css +1091 -0
- package/dist/collection/components/wm-flyout/wm-flyout.js +651 -0
- package/dist/collection/components/wm-input/wm-input.css +1095 -0
- package/dist/collection/components/wm-input/wm-input.js +653 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +982 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +515 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.css +927 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +199 -0
- package/dist/collection/components/wm-modal/wm-modal-header.css +926 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +110 -0
- package/dist/collection/components/wm-modal/wm-modal.css +983 -0
- package/dist/collection/components/wm-modal/wm-modal.js +534 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +931 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +142 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +925 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1007 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +926 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +153 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +935 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +140 -0
- package/dist/collection/components/wm-navigation/wm-navigation.css +977 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +246 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +929 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +918 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +128 -0
- package/dist/collection/components/wm-navigator/wm-navigator.css +990 -0
- package/dist/collection/components/wm-navigator/wm-navigator.js +597 -0
- package/dist/collection/components/wm-pagination/wm-pagination.css +1044 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +487 -0
- package/dist/collection/components/wm-search/wm-search.css +983 -0
- package/dist/collection/components/wm-search/wm-search.js +604 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +1150 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +363 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +958 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +233 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +966 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +461 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +906 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +132 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +1423 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1511 -0
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +328 -0
- package/dist/collection/components/wm-textarea/wm-textarea.css +1065 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +423 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +1174 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +728 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +1296 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +455 -0
- package/dist/collection/components/wm-uploader/wm-uploader.css +1987 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +760 -0
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +31 -0
- package/dist/collection/dev/action-menu.js +18 -0
- package/dist/collection/dev/button.js +12 -0
- package/dist/collection/dev/chart-bar.js +430 -0
- package/dist/collection/dev/chart-column.js +459 -0
- package/dist/collection/dev/chart-small.js +56 -0
- package/dist/collection/dev/chart-stack.js +205 -0
- package/dist/collection/dev/chart.js +18 -0
- package/dist/collection/dev/date-range.js +14 -0
- package/dist/collection/dev/datepicker.js +46 -0
- package/dist/collection/dev/file-list.js +16 -0
- package/dist/collection/dev/file.js +0 -0
- package/dist/collection/dev/flyout.js +194 -0
- package/dist/collection/dev/input.js +6 -0
- package/dist/collection/dev/line-chart.js +45 -0
- package/dist/collection/dev/modal.js +48 -0
- package/dist/collection/dev/navigation.js +13 -0
- package/dist/collection/dev/navigator.js +34 -0
- package/dist/collection/dev/nested-select.js +36 -0
- package/dist/collection/dev/pagination.js +7 -0
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/pss-modal.js +8 -0
- package/dist/collection/dev/scripts.js +49 -0
- package/dist/collection/dev/search.js +72 -0
- package/dist/collection/dev/select.js +57 -0
- package/dist/collection/dev/snackbar.js +68 -0
- package/dist/collection/dev/tabs.js +44 -0
- package/dist/collection/dev/tag-input.js +32 -0
- package/dist/collection/dev/textarea.js +28 -0
- package/dist/collection/dev/timepicker.js +32 -0
- package/dist/collection/dev/toggletip.js +9 -0
- package/dist/collection/dev/uploader.js +139 -0
- package/dist/collection/global/__mocks__/functions.js +6 -0
- package/dist/collection/global/functions.js +907 -0
- package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +16 -87
- package/dist/collection/global/interfaces.js +94 -0
- package/dist/collection/global/intl.js +281 -0
- package/dist/collection/global/services/__mocks__/http-service.js +130 -0
- package/dist/collection/global/services/http-service.js +50 -0
- package/dist/collection/lang/lang.js +5 -0
- package/dist/collection/lang/missing.js +43 -0
- package/dist/collection/lang/piglatin.js +101 -0
- package/dist/docs/docs.d.ts +435 -0
- package/dist/docs/docs.json +14178 -0
- package/dist/docs/props-reference.json +2079 -0
- package/dist/docs/skill/index.md +33 -0
- package/dist/docs/skill/wm-action-menu.md +116 -0
- package/dist/docs/skill/wm-button.md +121 -0
- package/dist/docs/skill/wm-chart-bar.md +156 -0
- package/dist/docs/skill/wm-chart-column.md +122 -0
- package/dist/docs/skill/wm-chart-legend.md +91 -0
- package/dist/docs/skill/wm-chart-slice.md +101 -0
- package/dist/docs/skill/wm-chart-stack.md +147 -0
- package/dist/docs/skill/wm-chart.md +139 -0
- package/dist/docs/skill/wm-date-range.md +176 -0
- package/dist/docs/skill/wm-datepicker.md +153 -0
- package/dist/docs/skill/wm-file-list.md +105 -0
- package/dist/docs/skill/wm-file.md +91 -0
- package/dist/docs/skill/wm-flyout.md +209 -0
- package/dist/docs/skill/wm-input.md +134 -0
- package/dist/docs/skill/wm-line-chart.md +135 -0
- package/dist/docs/skill/wm-menuitem.md +64 -0
- package/dist/docs/skill/wm-modal-footer.md +81 -0
- package/dist/docs/skill/wm-modal-header.md +71 -0
- package/dist/docs/skill/wm-modal.md +172 -0
- package/dist/docs/skill/wm-navigation-hamburger.md +61 -0
- package/dist/docs/skill/wm-navigation-item.md +78 -0
- package/dist/docs/skill/wm-navigation.md +82 -0
- package/dist/docs/skill/wm-navigator.md +106 -0
- package/dist/docs/skill/wm-nested-select.md +160 -0
- package/dist/docs/skill/wm-optgroup.md +72 -0
- package/dist/docs/skill/wm-option.md +67 -0
- package/dist/docs/skill/wm-pagination.md +114 -0
- package/dist/docs/skill/wm-progress-indicator.md +75 -0
- package/dist/docs/skill/wm-progress-monitor.md +120 -0
- package/dist/docs/skill/wm-progress-slice.md +67 -0
- package/dist/docs/skill/wm-search.md +180 -0
- package/dist/docs/skill/wm-select.md +169 -0
- package/dist/docs/skill/wm-snackbar.md +130 -0
- package/dist/docs/skill/wm-tab-item.md +45 -0
- package/dist/docs/skill/wm-tab-list.md +139 -0
- package/dist/docs/skill/wm-tab-panel.md +39 -0
- package/dist/docs/skill/wm-tag-input.md +187 -0
- package/dist/docs/skill/wm-tag-option.md +60 -0
- package/dist/docs/skill/wm-textarea.md +102 -0
- package/dist/docs/skill/wm-timepicker.md +156 -0
- package/dist/docs/skill/wm-toggletip.md +98 -0
- package/dist/docs/skill/wm-uploader.md +154 -0
- package/dist/docs/skill/wm-wrapper.md +5 -0
- package/dist/esm/app-globals-a1092590.js +101 -0
- package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-58637dc9.js} +159 -3
- package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-65f1594c.js} +374 -7830
- package/dist/esm/index-3425d80d.js +1813 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/interfaces-8778346d.js +77 -0
- package/dist/{ripple/intl-7p27BJSM.js → esm/intl-d518f362.js} +11 -4
- package/dist/esm/loader.js +11 -0
- package/dist/{ripple → esm}/priv-calendar.entry.js +143 -133
- package/dist/esm/priv-chart-popover-old.entry.js +142 -0
- package/dist/esm/priv-chart-popover_2.entry.js +199 -0
- package/dist/{ripple → esm}/priv-navigator-button.entry.js +5 -4
- package/dist/{ripple → esm}/priv-navigator-item.entry.js +5 -4
- package/dist/{ripple → esm}/priv-option-list.entry.js +18 -16
- package/dist/esm/ripple.js +20 -0
- package/dist/esm/wm-action-menu_2.entry.js +520 -0
- package/dist/{ripple/wm-modal-header.entry.js → esm/wm-button.entry.js} +264 -24
- package/dist/esm/wm-chart-bar.entry.js +440 -0
- package/dist/esm/wm-chart-column.entry.js +625 -0
- package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
- package/dist/esm/wm-chart-stack.entry.js +443 -0
- package/dist/esm/wm-chart.entry.js +159 -0
- package/dist/{ripple → esm}/wm-date-range.entry.js +224 -114
- package/dist/esm/wm-datepicker.entry.js +395 -0
- package/dist/{ripple → esm}/wm-file-list.entry.js +5 -4
- package/dist/{ripple → esm}/wm-file.entry.js +48 -24
- package/dist/esm/wm-flyout.entry.js +174 -0
- package/dist/{ripple → esm}/wm-input.entry.js +23 -7
- package/dist/{ripple → esm}/wm-line-chart.entry.js +182 -94
- package/dist/esm/wm-modal-pss_3.entry.js +214 -0
- package/dist/esm/wm-modal_3.entry.js +232 -0
- package/dist/esm/wm-navigation_3.entry.js +182 -0
- package/dist/{ripple → esm}/wm-navigator.entry.js +26 -64
- package/dist/{ripple → esm}/wm-nested-select.entry.js +35 -25
- package/dist/{ripple → esm}/wm-optgroup.entry.js +17 -5
- package/dist/esm/wm-option_2.entry.js +531 -0
- package/dist/{ripple → esm}/wm-pagination.entry.js +16 -14
- package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
- package/dist/{ripple → esm}/wm-search.entry.js +15 -31
- package/dist/{ripple → esm}/wm-snackbar.entry.js +32 -45
- package/dist/esm/wm-tab-item_3.entry.js +351 -0
- package/dist/{ripple → esm}/wm-tag-input.entry.js +169 -65
- package/dist/{ripple → esm}/wm-tag-option.entry.js +14 -2
- package/dist/{ripple/wm-menuitem.entry.js → esm/wm-textarea.entry.js} +65 -100
- package/dist/{ripple → esm}/wm-timepicker.entry.js +33 -12
- package/dist/{ripple → esm}/wm-toggletip.entry.js +105 -33
- package/dist/esm/wm-uploader.entry.js +337 -0
- package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/ripple/index.esm.js +0 -1
- package/dist/ripple/p-0d364411.entry.js +1 -0
- package/dist/ripple/p-156c4d1d.entry.js +1 -0
- package/dist/ripple/{wm-modal-footer.entry.js → p-26d8c356.entry.js} +1 -44
- package/dist/ripple/p-2b23ce49.entry.js +1 -0
- package/dist/ripple/p-2b7cc2c1.entry.js +1 -0
- package/dist/ripple/p-34bde06a.entry.js +1 -0
- package/dist/ripple/p-35db9386.entry.js +1 -0
- package/dist/ripple/p-38a987ac.entry.js +1 -0
- package/dist/ripple/p-38b05894.entry.js +1 -0
- package/dist/ripple/p-38dee4ab.entry.js +1 -0
- package/dist/ripple/p-3a19d019.entry.js +1 -0
- package/dist/ripple/p-451d4de2.js +1 -0
- package/dist/ripple/p-507f2cf4.entry.js +1 -0
- package/dist/ripple/p-59f74ead.entry.js +1 -0
- package/dist/ripple/p-5c2fc42a.entry.js +1 -0
- package/dist/ripple/p-680d7606.entry.js +1 -0
- package/dist/ripple/p-683264db.js +1 -0
- package/dist/ripple/p-6db681c8.entry.js +1 -0
- package/dist/ripple/p-6e3c2bbc.js +1 -0
- package/dist/ripple/p-6f1cabab.entry.js +1 -0
- package/dist/ripple/p-72d135ee.entry.js +1 -0
- package/dist/ripple/p-7799953c.entry.js +1 -0
- package/dist/ripple/p-83c3db60.js +2 -0
- package/dist/ripple/{wm-progress-monitor.entry.js → p-83cdad78.entry.js} +1 -71
- package/dist/ripple/p-87ef0cfa.entry.js +1 -0
- package/dist/ripple/p-88e44511.entry.js +1 -0
- package/dist/ripple/p-8f8e4eb8.entry.js +1 -0
- package/dist/ripple/p-936adffb.entry.js +1 -0
- package/dist/ripple/p-9755192c.entry.js +1 -0
- package/dist/ripple/p-9c5c591b.js +1 -0
- package/dist/ripple/p-9ea38d96.entry.js +1 -0
- package/dist/ripple/p-be3e4e7c.entry.js +1 -0
- package/dist/ripple/p-c9c7df12.entry.js +1 -0
- package/dist/ripple/p-d7a1be0b.entry.js +1 -0
- package/dist/ripple/p-dab86523.entry.js +1 -0
- package/dist/ripple/{wm-tab-list.entry.js → p-e4aa6e27.entry.js} +1 -175
- package/dist/ripple/p-ebe9f38c.js +1 -0
- package/dist/ripple/p-ed053612.entry.js +1 -0
- package/dist/ripple/p-f43f621b.entry.js +1 -0
- package/dist/ripple/p-f48d30d6.entry.js +1 -0
- package/dist/ripple/{wm-action-menu.entry.js → p-f6aad57c.entry.js} +1 -201
- package/dist/ripple/p-f6e1beb5.entry.js +1 -0
- package/dist/ripple/p-fc843bb8.entry.js +1 -0
- package/dist/ripple/{priv-chart-popover.entry.js → p-fd997764.entry.js} +1 -134
- package/dist/ripple/p-fffb46ad.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -48
- package/dist/types/components/charts/chartFunctions.d.ts +15 -2
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +25 -11
- package/dist/types/components/charts/priv-chart-popover-old/priv-chart-popover-old.d.ts +31 -0
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +52 -0
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +113 -1
- package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +195 -0
- package/dist/types/components/charts/wm-chart-column/wm-chart-column.d.ts +184 -0
- package/dist/types/components/charts/wm-chart-legend/wm-chart-legend.d.ts +110 -0
- package/dist/types/components/charts/wm-chart-stack/wm-chart-stack.d.ts +194 -0
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +156 -11
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +53 -1
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +85 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +44 -0
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +19 -3
- package/dist/types/components/datepickers/wm-date-range.d.ts +205 -14
- package/dist/types/components/datepickers/wm-datepicker.d.ts +189 -11
- package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +6 -0
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +165 -1
- package/dist/types/components/selects/wm-optgroup/wm-optgroup.d.ts +87 -0
- package/dist/types/components/selects/wm-option/wm-option.d.ts +117 -0
- package/dist/types/components/selects/wm-select/wm-select.d.ts +193 -12
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +207 -2
- package/dist/types/components/wm-button/wm-button.d.ts +191 -0
- package/dist/types/components/wm-file/wm-file.d.ts +110 -1
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +72 -0
- package/dist/types/components/wm-flyout/wm-flyout.d.ts +205 -0
- package/dist/types/components/wm-input/wm-input.d.ts +161 -1
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +79 -0
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +54 -0
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +30 -0
- package/dist/types/components/wm-modal/wm-modal.d.ts +160 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +6 -0
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +34 -0
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +41 -0
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +57 -0
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +4 -0
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +4 -0
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +93 -4
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +100 -1
- package/dist/types/components/wm-search/wm-search.d.ts +158 -6
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +103 -1
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +55 -3
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +119 -20
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +35 -2
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +199 -5
- package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +68 -0
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +99 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +147 -0
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +88 -2
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +145 -3
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +3 -0
- package/dist/types/components.d.ts +11523 -95
- package/dist/types/global/functions.d.ts +7 -2
- package/dist/types/global/interfaces.d.ts +92 -2
- package/dist/types/global/intl.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -28
- package/package.json +4 -33
- package/dist/components/index.d.ts +0 -33
- package/dist/components/priv-calendar.d.ts +0 -11
- package/dist/components/priv-chart-popover.d.ts +0 -11
- package/dist/components/priv-navigator-button.d.ts +0 -11
- package/dist/components/priv-navigator-item.d.ts +0 -11
- package/dist/components/priv-option-list.d.ts +0 -11
- package/dist/components/wm-action-menu.d.ts +0 -11
- package/dist/components/wm-button.d.ts +0 -11
- package/dist/components/wm-chart-slice.d.ts +0 -11
- package/dist/components/wm-chart.d.ts +0 -11
- package/dist/components/wm-date-range.d.ts +0 -11
- package/dist/components/wm-datepicker.d.ts +0 -11
- package/dist/components/wm-file-list.d.ts +0 -11
- package/dist/components/wm-file.d.ts +0 -11
- package/dist/components/wm-flyout.d.ts +0 -11
- package/dist/components/wm-input.d.ts +0 -11
- package/dist/components/wm-line-chart.d.ts +0 -11
- package/dist/components/wm-menuitem.d.ts +0 -11
- package/dist/components/wm-modal-footer.d.ts +0 -11
- package/dist/components/wm-modal-header.d.ts +0 -11
- package/dist/components/wm-modal-pss-footer.d.ts +0 -11
- package/dist/components/wm-modal-pss-header.d.ts +0 -11
- package/dist/components/wm-modal-pss.d.ts +0 -11
- package/dist/components/wm-modal.d.ts +0 -11
- package/dist/components/wm-navigation-hamburger.d.ts +0 -11
- package/dist/components/wm-navigation-item.d.ts +0 -11
- package/dist/components/wm-navigation.d.ts +0 -11
- package/dist/components/wm-navigator.d.ts +0 -11
- package/dist/components/wm-nested-select.d.ts +0 -11
- package/dist/components/wm-optgroup.d.ts +0 -11
- package/dist/components/wm-option.d.ts +0 -11
- package/dist/components/wm-pagination.d.ts +0 -11
- package/dist/components/wm-progress-indicator.d.ts +0 -11
- package/dist/components/wm-progress-monitor.d.ts +0 -11
- package/dist/components/wm-progress-slice.d.ts +0 -11
- package/dist/components/wm-search.d.ts +0 -11
- package/dist/components/wm-select.d.ts +0 -11
- package/dist/components/wm-snackbar.d.ts +0 -11
- package/dist/components/wm-tab-item.d.ts +0 -11
- package/dist/components/wm-tab-list.d.ts +0 -11
- package/dist/components/wm-tab-panel.d.ts +0 -11
- package/dist/components/wm-tag-input.d.ts +0 -11
- package/dist/components/wm-tag-option.d.ts +0 -11
- package/dist/components/wm-textarea.d.ts +0 -11
- package/dist/components/wm-timepicker.d.ts +0 -11
- package/dist/components/wm-toggletip.d.ts +0 -11
- package/dist/components/wm-uploader.d.ts +0 -11
- package/dist/components/wm-wrapper.d.ts +0 -11
- package/dist/ripple/index-CU5QNCKv.js +0 -4167
- package/dist/ripple/interfaces-CrANcZM9.js +0 -53
- package/dist/ripple/wm-button.entry.js +0 -197
- package/dist/ripple/wm-chart.entry.js +0 -157
- package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
- package/dist/ripple/wm-modal-pss-header.entry.js +0 -39
- package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
- package/dist/ripple/wm-navigation-item.entry.js +0 -18
- package/dist/ripple/wm-option.entry.js +0 -171
- package/dist/ripple/wm-progress-slice.entry.js +0 -13
- package/dist/ripple/wm-select.entry.js +0 -249
- package/dist/ripple/wm-tab-item.entry.js +0 -63
- package/dist/ripple/wm-uploader.entry.js +0 -313
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { intl, toBool, handleDisabledAttribute, dateToISO, showTooltip, hideTooltip, debounce, findAllScrollableParents, findPositioningBoundary, } from "../../global/functions";
|
|
3
|
+
/**
|
|
4
|
+
* Date input that lets users type a date or pick one from a calendar popup. Supports
|
|
5
|
+
* configurable date formats, pre-selection, validation, and full keyboard navigation of the calendar.
|
|
6
|
+
* Use instead of native `<input type="date">`.
|
|
7
|
+
*
|
|
8
|
+
* @category Form Inputs
|
|
9
|
+
*
|
|
10
|
+
* @keyboardInteraction
|
|
11
|
+
* - **Input field**: Tab moves focus to the calendar toggle button.
|
|
12
|
+
* - **Calendar toggle**: Space / Enter / Down Arrow opens the calendar; Shift+Tab returns to the input.
|
|
13
|
+
* - **Day grid**: Arrow keys navigate dates; Enter selects; Escape closes and returns focus to the toggle;
|
|
14
|
+
* Home/End jump to the first/last day of the month; Tab cycles through calendar controls.
|
|
15
|
+
* - **Month/year selectors**: Arrow keys cycle values; Tab/Shift+Tab move focus clockwise/counter-clockwise.
|
|
16
|
+
*
|
|
17
|
+
* @accessibility
|
|
18
|
+
* - `label` is required even when `label-position` is `"none"` — it becomes the input's `aria-label`.
|
|
19
|
+
* - The calendar toggle button announces "Select date" to screen readers and reflects `aria-expanded`.
|
|
20
|
+
* - Validation errors are announced via an `aria-live` region when `error-message` changes.
|
|
21
|
+
* - When the input value cannot be parsed as a valid date, the calendar opens to the current date.
|
|
22
|
+
*
|
|
23
|
+
* @usageNotes
|
|
24
|
+
* - Set `value` in the same format as `date-format` (default `mm/dd/yyyy`). For programmatic date
|
|
25
|
+
* setting, prefer ISO format via `preselected` and convert with the `reformatDate` method.
|
|
26
|
+
* - The calendar popup hides its toggle automatically when there is no room to display it; always
|
|
27
|
+
* allow users to type a date directly in the input as a fallback.
|
|
28
|
+
*
|
|
29
|
+
* @example {html} Basic datepicker
|
|
30
|
+
* <wm-datepicker label="Start date"></wm-datepicker>
|
|
31
|
+
*
|
|
32
|
+
* @example {react} Basic datepicker
|
|
33
|
+
* // The component does not update its own value after a calendar selection --
|
|
34
|
+
* // the app must call reformatDate and set value/errorMessage imperatively via a ref.
|
|
35
|
+
* const ref = useRef(null);
|
|
36
|
+
*
|
|
37
|
+
* function getFormatName(format) {
|
|
38
|
+
* const map = { 'mm/dd/yyyy': 'US', 'dd/mm/yyyy': 'INT', 'yyyy/mm/dd': 'ISO' };
|
|
39
|
+
* return format ? map[format] : 'US';
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* // event.detail is { date: string } -- ISO 8601 (YYYY-MM-DD)
|
|
43
|
+
* const handleDateSelected = async (event) => {
|
|
44
|
+
* const dp = ref.current;
|
|
45
|
+
* const fmt = getFormatName(dp.getAttribute('date-format'));
|
|
46
|
+
* dp.value = await dp.reformatDate('ISO', fmt, event.detail.date);
|
|
47
|
+
* dp.errorMessage = '';
|
|
48
|
+
* };
|
|
49
|
+
*
|
|
50
|
+
* const handleInputBlurred = async () => {
|
|
51
|
+
* const dp = ref.current;
|
|
52
|
+
* const fmt = getFormatName(dp.getAttribute('date-format'));
|
|
53
|
+
* if (dp.value) {
|
|
54
|
+
* const iso = await dp.reformatDate(fmt, 'ISO', dp.value);
|
|
55
|
+
* if (await dp.isValidIso(iso)) {
|
|
56
|
+
* dp.value = await dp.reformatDate('ISO', fmt, iso);
|
|
57
|
+
* dp.errorMessage = '';
|
|
58
|
+
* } else {
|
|
59
|
+
* dp.errorMessage = `Please enter a valid date in the format ${dp.getAttribute('date-format') ?? 'mm/dd/yyyy'}`;
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* };
|
|
63
|
+
*
|
|
64
|
+
* const handleBlur = () => {
|
|
65
|
+
* const dp = ref.current;
|
|
66
|
+
* if (dp.requiredField && dp.value === '') dp.errorMessage = 'A date is required';
|
|
67
|
+
* };
|
|
68
|
+
*
|
|
69
|
+
* <WmDatepicker
|
|
70
|
+
* ref={ref}
|
|
71
|
+
* label="Start date"
|
|
72
|
+
* onWmDatepickerDateSelected={handleDateSelected}
|
|
73
|
+
* onWmDatepickerInputBlurred={handleInputBlurred}
|
|
74
|
+
* onBlur={handleBlur}
|
|
75
|
+
* />
|
|
76
|
+
*
|
|
77
|
+
* @example {html} Required field with validation
|
|
78
|
+
* <wm-datepicker label="Date of birth" required-field></wm-datepicker>
|
|
79
|
+
*
|
|
80
|
+
* @example {react} Required field with validation
|
|
81
|
+
* <WmDatepicker
|
|
82
|
+
* ref={ref}
|
|
83
|
+
* label="Date of birth"
|
|
84
|
+
* requiredField={true}
|
|
85
|
+
* onWmDatepickerDateSelected={handleDateSelected}
|
|
86
|
+
* onWmDatepickerInputBlurred={handleInputBlurred}
|
|
87
|
+
* onBlur={handleBlur}
|
|
88
|
+
* />
|
|
89
|
+
*
|
|
90
|
+
* @example {html} With validation error
|
|
91
|
+
* <wm-datepicker label="Start date" required-field error-message="Please enter a valid start date"></wm-datepicker>
|
|
92
|
+
*
|
|
93
|
+
* @example {react} With validation error
|
|
94
|
+
* <WmDatepicker label="Start date" requiredField={true} errorMessage="Please enter a valid start date" />
|
|
95
|
+
*
|
|
96
|
+
* @example {html} Pre-opened to a specific date
|
|
97
|
+
* <wm-datepicker label="Enrollment date" preselected="2025-09-01"></wm-datepicker>
|
|
98
|
+
*
|
|
99
|
+
* @example {react} Pre-opened to a specific date
|
|
100
|
+
* <WmDatepicker label="Enrollment date" preselected="2025-09-01" />
|
|
101
|
+
*
|
|
102
|
+
* @example {html} International date format
|
|
103
|
+
* <wm-datepicker label="Graduation date" date-format="dd/mm/yyyy"></wm-datepicker>
|
|
104
|
+
*
|
|
105
|
+
* @example {react} International date format
|
|
106
|
+
* <WmDatepicker label="Graduation date" dateFormat="dd/mm/yyyy" />
|
|
107
|
+
*
|
|
108
|
+
* @example {html} Disabled
|
|
109
|
+
* <wm-datepicker label="Locked date" value="05/15/2024" disabled></wm-datepicker>
|
|
110
|
+
*
|
|
111
|
+
* @example {react} Disabled
|
|
112
|
+
* <WmDatepicker label="Locked date" value="05/15/2024" disabled={true} />
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
export class DatePicker {
|
|
116
|
+
constructor() {
|
|
117
|
+
this.calWidth = 336;
|
|
118
|
+
this.popupMaxHeight = 413; // maximum height when a month spans 6 rows of days
|
|
119
|
+
this.hasAnchor = CSS.supports("top", "anchor(bottom)");
|
|
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.value = "";
|
|
129
|
+
this.disabled = false;
|
|
130
|
+
this.dateFormat = "mm/dd/yyyy";
|
|
131
|
+
this.errorMessage = undefined;
|
|
132
|
+
this.labelPosition = "top";
|
|
133
|
+
this.label = "";
|
|
134
|
+
this.requiredField = false;
|
|
135
|
+
this.preselected = undefined;
|
|
136
|
+
this.isExpanded = false;
|
|
137
|
+
this.canOpen = true;
|
|
138
|
+
}
|
|
139
|
+
pf_reposition() {
|
|
140
|
+
if (this.hasAnchor || !this.isExpanded)
|
|
141
|
+
return;
|
|
142
|
+
// rAF-throttle: native anchor() re-resolves on every frame; this matches that cadence
|
|
143
|
+
// without thrashing layout when scroll fires many times per frame.
|
|
144
|
+
if (this.pf_repositionRAF !== null)
|
|
145
|
+
return;
|
|
146
|
+
this.pf_repositionRAF = requestAnimationFrame(() => {
|
|
147
|
+
this.pf_repositionRAF = null;
|
|
148
|
+
this.pf_positionDropdown();
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// Returns the closest scrollable ancestor that can yield at least `neededScroll` of additional scroll.
|
|
152
|
+
findScrollable(neededScroll) {
|
|
153
|
+
// Scrolling an ancestor above the positioning boundary (e.g. a scrollable container behind
|
|
154
|
+
// an open modal dialog) won't move the anchor, so those don't count.
|
|
155
|
+
const boundary = findPositioningBoundary(this.el);
|
|
156
|
+
for (const parent of findAllScrollableParents(this.el)) {
|
|
157
|
+
if (boundary && parent !== boundary && !boundary.contains(parent))
|
|
158
|
+
continue;
|
|
159
|
+
const available = parent.scrollHeight - parent.scrollTop - parent.clientHeight;
|
|
160
|
+
if (available >= neededScroll)
|
|
161
|
+
return parent;
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
measureFit() {
|
|
166
|
+
// Safari has issues with position-try, so the component measures where to place the popover itself.
|
|
167
|
+
// see https://docs.google.com/document/d/1nCW9mgjPmw0mdif8jyfkjuXbAds_OL2slvS3EhNJsBg/edit?tab=t.0#heading=h.wkyhkgchgk3d
|
|
168
|
+
const rect = this.anchorEl.getBoundingClientRect();
|
|
169
|
+
const vw = document.documentElement.clientWidth;
|
|
170
|
+
const vh = document.documentElement.clientHeight;
|
|
171
|
+
const spaceBelow = vh - rect.bottom;
|
|
172
|
+
const spaceAbove = rect.top;
|
|
173
|
+
const fitsBelow = spaceBelow >= this.popupMaxHeight; // (1) enough viewport room below
|
|
174
|
+
const fitsAbove = spaceAbove >= this.popupMaxHeight; // (2) enough viewport room above
|
|
175
|
+
const canScroll = this.findScrollable(this.popupMaxHeight - spaceBelow) !== null; // (3) a scrollable ancestor can supply the missing room
|
|
176
|
+
const fitsCentered = vw >= this.calWidth && vh >= this.popupMaxHeight; // (4) the viewport is big enough to fit the popover centered over the input
|
|
177
|
+
// (1) below; (2) above; (3) below and scroll into view; (4) centered over input; (5) no placement works → caller hides the toggle
|
|
178
|
+
const vertical = fitsBelow
|
|
179
|
+
? "below"
|
|
180
|
+
: fitsAbove
|
|
181
|
+
? "above"
|
|
182
|
+
: canScroll
|
|
183
|
+
? "below-scroll"
|
|
184
|
+
: fitsCentered
|
|
185
|
+
? "over"
|
|
186
|
+
: null;
|
|
187
|
+
if (!vertical)
|
|
188
|
+
return null;
|
|
189
|
+
const fitsLeftAligned = rect.left + this.calWidth <= vw; // (a) left edge aligns to input's left edge
|
|
190
|
+
const fitsRightAligned = rect.right - this.calWidth >= 0; // (b) right edge aligns to input's right edge
|
|
191
|
+
// (a) left-align; (b) right-align; (c) snap to the viewport edge with the most room; (d) no placement works → caller hides the toggle
|
|
192
|
+
const horizontal = fitsLeftAligned
|
|
193
|
+
? "left"
|
|
194
|
+
: fitsRightAligned
|
|
195
|
+
? "right"
|
|
196
|
+
: vw >= this.calWidth
|
|
197
|
+
? rect.left > vw - rect.right
|
|
198
|
+
? "clip-left"
|
|
199
|
+
: "clip-right"
|
|
200
|
+
: null;
|
|
201
|
+
if (!horizontal)
|
|
202
|
+
return null;
|
|
203
|
+
return { vertical, horizontal };
|
|
204
|
+
}
|
|
205
|
+
checkCanOpen() {
|
|
206
|
+
this.debouncedCheckCanOpen();
|
|
207
|
+
}
|
|
208
|
+
get isDisabled() {
|
|
209
|
+
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
210
|
+
return toBool(this.disabled);
|
|
211
|
+
}
|
|
212
|
+
get calendarDate() {
|
|
213
|
+
let calendarDate = dateToISO(new Date());
|
|
214
|
+
const dateFormatUnits = {
|
|
215
|
+
"mm/dd/yyyy": "US",
|
|
216
|
+
"dd/mm/yyyy": "INT",
|
|
217
|
+
"yyyy/mm/dd": "ISO",
|
|
218
|
+
};
|
|
219
|
+
const inputFormat = dateFormatUnits[this.dateFormat];
|
|
220
|
+
if (this.value &&
|
|
221
|
+
inputFormat &&
|
|
222
|
+
this.isValidIsoInternal(this.reformatDateInternal(inputFormat, "ISO", this.value))) {
|
|
223
|
+
// if component has value, and value can be parsed to valid ISO
|
|
224
|
+
calendarDate = this.reformatDateInternal(inputFormat, "ISO", this.value);
|
|
225
|
+
}
|
|
226
|
+
else if (this.preselected) {
|
|
227
|
+
calendarDate = this.preselected;
|
|
228
|
+
}
|
|
229
|
+
return calendarDate;
|
|
230
|
+
}
|
|
231
|
+
handleDisabledChange() {
|
|
232
|
+
handleDisabledAttribute(this.el, this.isDisabled);
|
|
233
|
+
}
|
|
234
|
+
updateValue() {
|
|
235
|
+
this.inputEl.value = this.value ? this.value : "";
|
|
236
|
+
}
|
|
237
|
+
announceError() {
|
|
238
|
+
if (this.errorMessage) {
|
|
239
|
+
setTimeout(() => this.announce(this.errorMessage), 100);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
pf_positionDropdown() {
|
|
243
|
+
var _a, _b, _c, _d, _e, _f;
|
|
244
|
+
// polyfill for browsers without anchor() support (older Firefox).
|
|
245
|
+
const rect = this.anchorEl.getBoundingClientRect();
|
|
246
|
+
const vw = document.documentElement.clientWidth;
|
|
247
|
+
const vh = document.documentElement.clientHeight;
|
|
248
|
+
const gap = 2;
|
|
249
|
+
this.el.style.removeProperty("--popup-translate-y");
|
|
250
|
+
this.el.style.removeProperty("--popup-left");
|
|
251
|
+
// VERTICAL
|
|
252
|
+
if (((_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) === "above") {
|
|
253
|
+
this.el.style.setProperty("--popup-translate-y", rect.top - this.popupMaxHeight - gap + "px");
|
|
254
|
+
}
|
|
255
|
+
else if (((_b = this.fit) === null || _b === void 0 ? void 0 : _b.vertical) === "over") {
|
|
256
|
+
this.el.style.setProperty("--popup-translate-y", (vh - this.popupMaxHeight) / 2 + "px");
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
this.el.style.setProperty("--popup-translate-y", rect.bottom + gap + "px");
|
|
260
|
+
}
|
|
261
|
+
// HORIZONTAL
|
|
262
|
+
if (((_c = this.fit) === null || _c === void 0 ? void 0 : _c.vertical) === "over") {
|
|
263
|
+
this.el.style.setProperty("--popup-left", (vw - this.calWidth) / 2 + "px");
|
|
264
|
+
}
|
|
265
|
+
else if (((_d = this.fit) === null || _d === void 0 ? void 0 : _d.horizontal) === "right") {
|
|
266
|
+
this.el.style.setProperty("--popup-left", rect.right - this.calWidth + "px");
|
|
267
|
+
}
|
|
268
|
+
else if (((_e = this.fit) === null || _e === void 0 ? void 0 : _e.horizontal) === "clip-left") {
|
|
269
|
+
this.el.style.setProperty("--popup-left", "0px");
|
|
270
|
+
}
|
|
271
|
+
else if (((_f = this.fit) === null || _f === void 0 ? void 0 : _f.horizontal) === "clip-right") {
|
|
272
|
+
this.el.style.setProperty("--popup-left", vw - this.calWidth + "px");
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
this.el.style.setProperty("--popup-left", rect.left + "px");
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
handleToggle(ev) {
|
|
279
|
+
if (ev.newState === "open") {
|
|
280
|
+
// Position before reveal to avoid a flash of misplaced content.
|
|
281
|
+
this.fit = this.measureFit();
|
|
282
|
+
if (!this.fit) {
|
|
283
|
+
// Resize check should have hidden the toggle, but if anchor moved since then, bail out.
|
|
284
|
+
this.canOpen = false;
|
|
285
|
+
this.popupEl.hidePopover();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (!this.hasAnchor) {
|
|
289
|
+
this.pf_positionDropdown();
|
|
290
|
+
}
|
|
291
|
+
requestAnimationFrame(() => {
|
|
292
|
+
var _a, _b;
|
|
293
|
+
this.isExpanded = true;
|
|
294
|
+
this.calEl.focusDate = this.calendarDate;
|
|
295
|
+
this.calEl.startDate = this.calendarDate;
|
|
296
|
+
this.calEl.focusCell();
|
|
297
|
+
if (((_a = this.fit) === null || _a === void 0 ? void 0 : _a.vertical) === "below-scroll") {
|
|
298
|
+
const scrollAmount = this.anchorEl.getBoundingClientRect().bottom + this.popupMaxHeight + 2 - document.documentElement.clientHeight;
|
|
299
|
+
if (scrollAmount > 0)
|
|
300
|
+
(_b = this.findScrollable(scrollAmount)) === null || _b === void 0 ? void 0 : _b.scrollBy({ top: scrollAmount, behavior: "smooth" });
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
if (this.pf_repositionRAF !== null) {
|
|
306
|
+
cancelAnimationFrame(this.pf_repositionRAF);
|
|
307
|
+
this.pf_repositionRAF = null;
|
|
308
|
+
}
|
|
309
|
+
this.fit = null;
|
|
310
|
+
this.isExpanded = false;
|
|
311
|
+
this.calEl.view = "month";
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
closePopup(returnFocus = false) {
|
|
315
|
+
this.popupEl.hidePopover();
|
|
316
|
+
if (returnFocus) {
|
|
317
|
+
this.toggleEl.focus();
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
handleInput(ev) {
|
|
321
|
+
// keep component's value in sync with input's value
|
|
322
|
+
this.value = ev.target.value;
|
|
323
|
+
}
|
|
324
|
+
handleInputBlur() {
|
|
325
|
+
this.dpWrapperEl.classList.remove("focus");
|
|
326
|
+
this.wmDatepickerInputBlurred.emit();
|
|
327
|
+
}
|
|
328
|
+
handleInputFocus() {
|
|
329
|
+
this.dpWrapperEl.classList.add("focus");
|
|
330
|
+
}
|
|
331
|
+
handleInputChange() {
|
|
332
|
+
// forward change externally
|
|
333
|
+
const event = new CustomEvent("change");
|
|
334
|
+
this.el.dispatchEvent(event);
|
|
335
|
+
}
|
|
336
|
+
handleLabelMouseEnter(ev) {
|
|
337
|
+
const labelEl = ev.target;
|
|
338
|
+
if (labelEl.scrollWidth > labelEl.clientWidth) {
|
|
339
|
+
showTooltip("right", ev.target, this.label);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
handleKeydown(ev) {
|
|
343
|
+
if (ev.key === "Escape" && this.isExpanded) {
|
|
344
|
+
ev.preventDefault();
|
|
345
|
+
ev.stopPropagation(); // prevents closing of parent modal
|
|
346
|
+
this.closePopup(true);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
handleCellTriggered(ev) {
|
|
350
|
+
let dateElement = ev.detail.cell;
|
|
351
|
+
let isoDate = dateElement.getAttribute("data-year") +
|
|
352
|
+
"-" +
|
|
353
|
+
dateElement.getAttribute("data-month") +
|
|
354
|
+
"-" +
|
|
355
|
+
dateElement.textContent.padStart(2, "0");
|
|
356
|
+
this.wmDatepickerDateSelected.emit({ date: isoDate });
|
|
357
|
+
// Create events to trigger onInput and onChange on host element, to get the updated value
|
|
358
|
+
// Because there are more ways to input than just typing, we are firing this event upon cellTriggered
|
|
359
|
+
const inputEvent = new CustomEvent("input");
|
|
360
|
+
this.el.dispatchEvent(inputEvent);
|
|
361
|
+
const changeEvent = new CustomEvent("change");
|
|
362
|
+
this.el.dispatchEvent(changeEvent);
|
|
363
|
+
this.closePopup(true);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @description Converts a date string between the supported format tokens: `"US"` (mm/dd/yyyy),
|
|
367
|
+
* `"INT"` (dd/mm/yyyy), and `"ISO"` (YYYY-MM-DD). Direct US ↔ INT conversion is not supported —
|
|
368
|
+
* route through ISO as an intermediate step.
|
|
369
|
+
* @param inputFormat - Format of the input date string.
|
|
370
|
+
* @param outputFormat - Desired output format.
|
|
371
|
+
* @param date - The date string to reformat.
|
|
372
|
+
* @returns The reformatted date string, an empty string if `date` is omitted or falsy, or the
|
|
373
|
+
* original string unchanged if it cannot be parsed.
|
|
374
|
+
* @example reformatDate("US", "ISO", "06/20/1969") // → "1969-06-20"
|
|
375
|
+
* @example reformatDate("ISO", "US", "1969-06-20") // → "06/20/1969"
|
|
376
|
+
*/
|
|
377
|
+
async reformatDate(inputFormat, outputFormat, date) {
|
|
378
|
+
return this.reformatDateInternal(inputFormat, outputFormat, date);
|
|
379
|
+
}
|
|
380
|
+
reformatDateInternal(inputFormat, outputFormat, date) {
|
|
381
|
+
// this function reformats date strings to/from the storage format ONLY. US -> INT and vice versa is not supported.
|
|
382
|
+
// 1, 2, or 4 digits, separator, 1 or 2 digits, separator, then 1 or 2 or 4 digits
|
|
383
|
+
const parsableEntry = /^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;
|
|
384
|
+
if (!date) {
|
|
385
|
+
return "";
|
|
386
|
+
}
|
|
387
|
+
else if (!parsableEntry.test(date)) {
|
|
388
|
+
return date;
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
const dateArr = date.replace(/[\-\.]/gi, "/").split("/");
|
|
392
|
+
switch (outputFormat) {
|
|
393
|
+
case "US":
|
|
394
|
+
return dateArr[1].padStart(2, "0") + "/" + dateArr[2].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
|
|
395
|
+
case "INT":
|
|
396
|
+
return dateArr[2].padStart(2, "0") + "/" + dateArr[1].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
|
|
397
|
+
case "ISO":
|
|
398
|
+
if (inputFormat === "US") {
|
|
399
|
+
return dateArr[2].padStart(4, "20") + "-" + dateArr[0].padStart(2, "0") + "-" + dateArr[1].padStart(2, "0");
|
|
400
|
+
}
|
|
401
|
+
else if (inputFormat === "INT") {
|
|
402
|
+
return dateArr[2].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[0].padStart(2, "0");
|
|
403
|
+
}
|
|
404
|
+
else if (inputFormat === "ISO") {
|
|
405
|
+
return dateArr[0].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[2].padStart(2, "0");
|
|
406
|
+
}
|
|
407
|
+
default:
|
|
408
|
+
return dateArr.join("/");
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @description Validates whether a string is a well-formed, calendar-correct ISO date
|
|
414
|
+
* (YYYY-MM-DD). Accounts for invalid day-of-month values and leap years.
|
|
415
|
+
* @param input - The string to validate.
|
|
416
|
+
* @returns `true` if the string is a valid ISO date, `false` otherwise.
|
|
417
|
+
* @example isValidIso("1969-06-20") // → true
|
|
418
|
+
* @example isValidIso("1969-06-33") // → false (day 33 does not exist)
|
|
419
|
+
* @example isValidIso("2023-02-29") // → false (2023 is not a leap year)
|
|
420
|
+
*/
|
|
421
|
+
async isValidIso(input) {
|
|
422
|
+
return this.isValidIsoInternal(input);
|
|
423
|
+
}
|
|
424
|
+
isValidIsoInternal(input) {
|
|
425
|
+
const isoFormat = /^\d\d\d\d[-]\d\d[-]\d\d$/;
|
|
426
|
+
if (!input || !isoFormat.test(input)) {
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
else {
|
|
430
|
+
// Parse the ISO date parts to integers
|
|
431
|
+
const parts = input.split("-");
|
|
432
|
+
const day = parseInt(parts[2], 10);
|
|
433
|
+
const month = parseInt(parts[1], 10);
|
|
434
|
+
const year = parseInt(parts[0], 10);
|
|
435
|
+
// Check the ranges of month and year
|
|
436
|
+
if (year < 1000 || year > 3000 || month == 0 || month > 12)
|
|
437
|
+
return false;
|
|
438
|
+
let monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
439
|
+
// Adjust for leap years
|
|
440
|
+
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
|
|
441
|
+
monthLength[1] = 29;
|
|
442
|
+
// Check the range of the day
|
|
443
|
+
return day > 0 && day <= monthLength[month - 1];
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
componentWillLoad() {
|
|
447
|
+
if (this.label === "") {
|
|
448
|
+
console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none.");
|
|
449
|
+
}
|
|
450
|
+
handleDisabledAttribute(this.el, this.isDisabled);
|
|
451
|
+
}
|
|
452
|
+
componentDidLoad() {
|
|
453
|
+
this.checkCanOpen();
|
|
454
|
+
}
|
|
455
|
+
disconnectedCallback() {
|
|
456
|
+
if (this.pf_repositionRAF !== null) {
|
|
457
|
+
cancelAnimationFrame(this.pf_repositionRAF);
|
|
458
|
+
this.pf_repositionRAF = null;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
announce(message) {
|
|
462
|
+
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
463
|
+
if (this.liveRegionEl.textContent === message) {
|
|
464
|
+
message += "\u00A0";
|
|
465
|
+
}
|
|
466
|
+
this.liveRegionEl.textContent = message;
|
|
467
|
+
}
|
|
468
|
+
render() {
|
|
469
|
+
var _a, _b, _c, _d;
|
|
470
|
+
return (h(Host, { key: '38b06ecdb3ec7b0849a2e45f7c0744ebf71ba8d9', "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '9518173e98ca8af23b4382712cc290a42bb7bb5f', ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '1c2342a9bb47db3b3175c2ea617be0aff0daa1ff', class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { key: '6942428aa8015f2d4f7820a06ca74ce90749caf6', id: "datepickerLabel", htmlFor: "date-input", class: "label", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label)), this.labelPosition !== "none" && this.requiredField && (h("div", { key: '9b281c4eda707206f2838fd769f7159fbb01f9f6', "aria-hidden": "true", class: "required" }, "*"))), h("div", { key: '2ac24d631ade150ee4798fa9604e05c9497de05e' }, h("div", { key: '0fff1d47bcfc1ac3048460e9b3918884988ff6ba', class: "single-wrapper input", ref: (el) => (this.anchorEl = el) }, h("input", { key: '8f62004faa02210e8bf1ec0bd45f7ffa5e138b9b', disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "date-format-hint error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { key: '8970475d7d30e1b9befd27b538fbce6d0134baea', class: "container", id: "wm-container" }, this.canOpen && (h("button", { key: '2d42ef81bf6a163cbc3450e60a1e4672952b8380', disabled: this.disabled, "aria-label": intl.formatMessage({
|
|
471
|
+
id: "date.selectDate",
|
|
472
|
+
defaultMessage: "Select date",
|
|
473
|
+
description: "Button text for screen readers.",
|
|
474
|
+
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle", popoverTarget: "popup-wrapper", popoverTargetAction: "toggle" }, h("span", { key: 'ed47fc3ab8d096d98b01c4f77474794d9716a8c9', class: "svg-icon svg-date" }), h("span", { key: '093d9e365c4d37d10b51af4c3b52e0b80290f2ac', class: "calendar", title: intl.formatMessage({
|
|
475
|
+
id: "date.calendarView",
|
|
476
|
+
defaultMessage: "Calendar View",
|
|
477
|
+
description: "Calendar button",
|
|
478
|
+
}) }))), h("div", { key: '3ad25e1d81f4198d8d98b64cfc3f0883f26273ef', class: `popup-wrapper ${this.calEl && this.calEl.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",
|
|
479
|
+
// @ts-ignore -- onToggle is a valid ToggleEvent listener for popover elements
|
|
480
|
+
onToggle: (ev) => this.handleToggle(ev) }, h("div", { key: 'ff10adfe53ad5a49a358ccfe902940a33a85b51d', tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { key: '81f304b90377c2172a9d30e48884e7137f3c6aff', ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { key: 'd9d8aa58c6795479ffbc59d0e126d1e8c3e1d50a', tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { key: 'd40f77a9a4d37281acff5adcb75ec8def29d8c2d', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { key: '9c3832b6cfc294ea7d350a337adf83e55c9d72f1', id: "month-title", class: "sr-only" }, intl.formatMessage({
|
|
481
|
+
id: "date.selectMonth",
|
|
482
|
+
defaultMessage: "Activate to select a month.",
|
|
483
|
+
description: "Calendar button",
|
|
484
|
+
})), h("div", { key: 'db29ac2b15f60fd5bb8a9128e6b31ff73f029249', id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
485
|
+
id: "date.selectYear",
|
|
486
|
+
defaultMessage: "Activate to select a year.",
|
|
487
|
+
description: "Calendar button",
|
|
488
|
+
})))), h("div", { key: '9a940d5beb080c906552dd089bf16b80e355166a', id: "error", class: "error" }, this.errorMessage), h("span", { key: '8feb1db5ca3ea0261856cdbbb75ecc385067f1d6', id: "date-format-hint", class: "sr-only" }, this.dateFormat), h("div", { key: '6566004fa7fb7ce7cbecbc99f86096574cc39a55', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
489
|
+
}
|
|
490
|
+
static get is() { return "wm-datepicker"; }
|
|
491
|
+
static get encapsulation() { return "shadow"; }
|
|
492
|
+
static get delegatesFocus() { return true; }
|
|
493
|
+
static get originalStyleUrls() {
|
|
494
|
+
return {
|
|
495
|
+
"$": ["datepicker.scss"]
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
static get styleUrls() {
|
|
499
|
+
return {
|
|
500
|
+
"$": ["datepicker.css"]
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
static get properties() {
|
|
504
|
+
return {
|
|
505
|
+
"value": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"mutable": true,
|
|
508
|
+
"complexType": {
|
|
509
|
+
"original": "string",
|
|
510
|
+
"resolved": "string | undefined",
|
|
511
|
+
"references": {}
|
|
512
|
+
},
|
|
513
|
+
"required": false,
|
|
514
|
+
"optional": true,
|
|
515
|
+
"docs": {
|
|
516
|
+
"tags": [{
|
|
517
|
+
"name": "description",
|
|
518
|
+
"text": "The date displayed in the input field, in the format specified by `date-format`. Updated as the user types. Can also be set programmatically by the application."
|
|
519
|
+
}],
|
|
520
|
+
"text": ""
|
|
521
|
+
},
|
|
522
|
+
"attribute": "value",
|
|
523
|
+
"reflect": false,
|
|
524
|
+
"defaultValue": "\"\""
|
|
525
|
+
},
|
|
526
|
+
"disabled": {
|
|
527
|
+
"type": "boolean",
|
|
528
|
+
"mutable": false,
|
|
529
|
+
"complexType": {
|
|
530
|
+
"original": "boolean",
|
|
531
|
+
"resolved": "boolean",
|
|
532
|
+
"references": {}
|
|
533
|
+
},
|
|
534
|
+
"required": false,
|
|
535
|
+
"optional": false,
|
|
536
|
+
"docs": {
|
|
537
|
+
"tags": [{
|
|
538
|
+
"name": "description",
|
|
539
|
+
"text": "Disables the datepicker, preventing all interaction."
|
|
540
|
+
}, {
|
|
541
|
+
"name": "default",
|
|
542
|
+
"text": "false"
|
|
543
|
+
}],
|
|
544
|
+
"text": ""
|
|
545
|
+
},
|
|
546
|
+
"attribute": "disabled",
|
|
547
|
+
"reflect": false,
|
|
548
|
+
"defaultValue": "false"
|
|
549
|
+
},
|
|
550
|
+
"dateFormat": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"mutable": false,
|
|
553
|
+
"complexType": {
|
|
554
|
+
"original": "string",
|
|
555
|
+
"resolved": "string",
|
|
556
|
+
"references": {}
|
|
557
|
+
},
|
|
558
|
+
"required": false,
|
|
559
|
+
"optional": false,
|
|
560
|
+
"docs": {
|
|
561
|
+
"tags": [{
|
|
562
|
+
"name": "description",
|
|
563
|
+
"text": "The expected date format. Shown in the input placeholder and announced to screen reader users."
|
|
564
|
+
}, {
|
|
565
|
+
"name": "default",
|
|
566
|
+
"text": "\"mm/dd/yyyy\""
|
|
567
|
+
}],
|
|
568
|
+
"text": ""
|
|
569
|
+
},
|
|
570
|
+
"attribute": "date-format",
|
|
571
|
+
"reflect": false,
|
|
572
|
+
"defaultValue": "\"mm/dd/yyyy\""
|
|
573
|
+
},
|
|
574
|
+
"errorMessage": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"mutable": false,
|
|
577
|
+
"complexType": {
|
|
578
|
+
"original": "string",
|
|
579
|
+
"resolved": "string | undefined",
|
|
580
|
+
"references": {}
|
|
581
|
+
},
|
|
582
|
+
"required": false,
|
|
583
|
+
"optional": true,
|
|
584
|
+
"docs": {
|
|
585
|
+
"tags": [{
|
|
586
|
+
"name": "description",
|
|
587
|
+
"text": "Puts the component in an error state and displays this message below the input."
|
|
588
|
+
}],
|
|
589
|
+
"text": ""
|
|
590
|
+
},
|
|
591
|
+
"attribute": "error-message",
|
|
592
|
+
"reflect": true
|
|
593
|
+
},
|
|
594
|
+
"labelPosition": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"mutable": false,
|
|
597
|
+
"complexType": {
|
|
598
|
+
"original": "\"top\" | \"left\" | \"none\"",
|
|
599
|
+
"resolved": "\"left\" | \"none\" | \"top\"",
|
|
600
|
+
"references": {}
|
|
601
|
+
},
|
|
602
|
+
"required": false,
|
|
603
|
+
"optional": false,
|
|
604
|
+
"docs": {
|
|
605
|
+
"tags": [{
|
|
606
|
+
"name": "description",
|
|
607
|
+
"text": "Position of the label relative to the input. `'none'` hides the label visually but keeps it accessible via `aria-label`."
|
|
608
|
+
}, {
|
|
609
|
+
"name": "default",
|
|
610
|
+
"text": "\"top\""
|
|
611
|
+
}],
|
|
612
|
+
"text": ""
|
|
613
|
+
},
|
|
614
|
+
"attribute": "label-position",
|
|
615
|
+
"reflect": false,
|
|
616
|
+
"defaultValue": "\"top\""
|
|
617
|
+
},
|
|
618
|
+
"label": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"mutable": false,
|
|
621
|
+
"complexType": {
|
|
622
|
+
"original": "string",
|
|
623
|
+
"resolved": "string",
|
|
624
|
+
"references": {}
|
|
625
|
+
},
|
|
626
|
+
"required": false,
|
|
627
|
+
"optional": false,
|
|
628
|
+
"docs": {
|
|
629
|
+
"tags": [{
|
|
630
|
+
"name": "description",
|
|
631
|
+
"text": "Visible label for the input. Required even when `label-position` is `'none'` \u2014 used as the ARIA accessible name."
|
|
632
|
+
}, {
|
|
633
|
+
"name": "required",
|
|
634
|
+
"text": undefined
|
|
635
|
+
}],
|
|
636
|
+
"text": ""
|
|
637
|
+
},
|
|
638
|
+
"attribute": "label",
|
|
639
|
+
"reflect": false,
|
|
640
|
+
"defaultValue": "\"\""
|
|
641
|
+
},
|
|
642
|
+
"requiredField": {
|
|
643
|
+
"type": "boolean",
|
|
644
|
+
"mutable": false,
|
|
645
|
+
"complexType": {
|
|
646
|
+
"original": "boolean",
|
|
647
|
+
"resolved": "boolean",
|
|
648
|
+
"references": {}
|
|
649
|
+
},
|
|
650
|
+
"required": false,
|
|
651
|
+
"optional": false,
|
|
652
|
+
"docs": {
|
|
653
|
+
"tags": [{
|
|
654
|
+
"name": "description",
|
|
655
|
+
"text": "Displays a required-field asterisk (*) next to the label."
|
|
656
|
+
}, {
|
|
657
|
+
"name": "default",
|
|
658
|
+
"text": "false"
|
|
659
|
+
}],
|
|
660
|
+
"text": ""
|
|
661
|
+
},
|
|
662
|
+
"attribute": "required-field",
|
|
663
|
+
"reflect": false,
|
|
664
|
+
"defaultValue": "false"
|
|
665
|
+
},
|
|
666
|
+
"preselected": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"mutable": false,
|
|
669
|
+
"complexType": {
|
|
670
|
+
"original": "string",
|
|
671
|
+
"resolved": "string | undefined",
|
|
672
|
+
"references": {}
|
|
673
|
+
},
|
|
674
|
+
"required": false,
|
|
675
|
+
"optional": true,
|
|
676
|
+
"docs": {
|
|
677
|
+
"tags": [{
|
|
678
|
+
"name": "description",
|
|
679
|
+
"text": "The date the calendar popup focuses when first opened, in ISO format (YYYY-MM-DD). Falls back to the parsed `value`, then the current date if neither can be parsed."
|
|
680
|
+
}],
|
|
681
|
+
"text": ""
|
|
682
|
+
},
|
|
683
|
+
"attribute": "preselected",
|
|
684
|
+
"reflect": false
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
static get states() {
|
|
689
|
+
return {
|
|
690
|
+
"isExpanded": {},
|
|
691
|
+
"canOpen": {}
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
static get events() {
|
|
695
|
+
return [{
|
|
696
|
+
"method": "wmDatepickerDateSelected",
|
|
697
|
+
"name": "wmDatepickerDateSelected",
|
|
698
|
+
"bubbles": true,
|
|
699
|
+
"cancelable": true,
|
|
700
|
+
"composed": true,
|
|
701
|
+
"docs": {
|
|
702
|
+
"tags": [{
|
|
703
|
+
"name": "description",
|
|
704
|
+
"text": "Fires when the user selects a date from the calendar popup."
|
|
705
|
+
}, {
|
|
706
|
+
"name": "eventDetails",
|
|
707
|
+
"text": "{{ date: string }} date \u2014 the selected date in ISO format (YYYY-MM-DD)."
|
|
708
|
+
}],
|
|
709
|
+
"text": ""
|
|
710
|
+
},
|
|
711
|
+
"complexType": {
|
|
712
|
+
"original": "any",
|
|
713
|
+
"resolved": "any",
|
|
714
|
+
"references": {}
|
|
715
|
+
}
|
|
716
|
+
}, {
|
|
717
|
+
"method": "wmDatepickerInputBlurred",
|
|
718
|
+
"name": "wmDatepickerInputBlurred",
|
|
719
|
+
"bubbles": true,
|
|
720
|
+
"cancelable": true,
|
|
721
|
+
"composed": true,
|
|
722
|
+
"docs": {
|
|
723
|
+
"tags": [{
|
|
724
|
+
"name": "description",
|
|
725
|
+
"text": "Fires when the text input loses focus."
|
|
726
|
+
}],
|
|
727
|
+
"text": ""
|
|
728
|
+
},
|
|
729
|
+
"complexType": {
|
|
730
|
+
"original": "any",
|
|
731
|
+
"resolved": "any",
|
|
732
|
+
"references": {}
|
|
733
|
+
}
|
|
734
|
+
}];
|
|
735
|
+
}
|
|
736
|
+
static get methods() {
|
|
737
|
+
return {
|
|
738
|
+
"reformatDate": {
|
|
739
|
+
"complexType": {
|
|
740
|
+
"signature": "(inputFormat: \"US\" | \"INT\" | \"ISO\", outputFormat: \"US\" | \"INT\" | \"ISO\", date?: string) => Promise<string>",
|
|
741
|
+
"parameters": [{
|
|
742
|
+
"name": "inputFormat",
|
|
743
|
+
"type": "\"US\" | \"INT\" | \"ISO\"",
|
|
744
|
+
"docs": "- Format of the input date string."
|
|
745
|
+
}, {
|
|
746
|
+
"name": "outputFormat",
|
|
747
|
+
"type": "\"US\" | \"INT\" | \"ISO\"",
|
|
748
|
+
"docs": "- Desired output format."
|
|
749
|
+
}, {
|
|
750
|
+
"name": "date",
|
|
751
|
+
"type": "string | undefined",
|
|
752
|
+
"docs": "- The date string to reformat."
|
|
753
|
+
}],
|
|
754
|
+
"references": {
|
|
755
|
+
"Promise": {
|
|
756
|
+
"location": "global",
|
|
757
|
+
"id": "global::Promise"
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
"return": "Promise<string>"
|
|
761
|
+
},
|
|
762
|
+
"docs": {
|
|
763
|
+
"text": "",
|
|
764
|
+
"tags": [{
|
|
765
|
+
"name": "description",
|
|
766
|
+
"text": "Converts a date string between the supported format tokens: `\"US\"` (mm/dd/yyyy),\n`\"INT\"` (dd/mm/yyyy), and `\"ISO\"` (YYYY-MM-DD). Direct US \u2194 INT conversion is not supported \u2014\nroute through ISO as an intermediate step."
|
|
767
|
+
}, {
|
|
768
|
+
"name": "param",
|
|
769
|
+
"text": "inputFormat - Format of the input date string."
|
|
770
|
+
}, {
|
|
771
|
+
"name": "param",
|
|
772
|
+
"text": "outputFormat - Desired output format."
|
|
773
|
+
}, {
|
|
774
|
+
"name": "param",
|
|
775
|
+
"text": "date - The date string to reformat."
|
|
776
|
+
}, {
|
|
777
|
+
"name": "returns",
|
|
778
|
+
"text": "The reformatted date string, an empty string if `date` is omitted or falsy, or the\noriginal string unchanged if it cannot be parsed."
|
|
779
|
+
}, {
|
|
780
|
+
"name": "example",
|
|
781
|
+
"text": "reformatDate(\"US\", \"ISO\", \"06/20/1969\") // \u2192 \"1969-06-20\""
|
|
782
|
+
}, {
|
|
783
|
+
"name": "example",
|
|
784
|
+
"text": "reformatDate(\"ISO\", \"US\", \"1969-06-20\") // \u2192 \"06/20/1969\""
|
|
785
|
+
}]
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"isValidIso": {
|
|
789
|
+
"complexType": {
|
|
790
|
+
"signature": "(input?: string) => Promise<boolean>",
|
|
791
|
+
"parameters": [{
|
|
792
|
+
"name": "input",
|
|
793
|
+
"type": "string | undefined",
|
|
794
|
+
"docs": "- The string to validate."
|
|
795
|
+
}],
|
|
796
|
+
"references": {
|
|
797
|
+
"Promise": {
|
|
798
|
+
"location": "global",
|
|
799
|
+
"id": "global::Promise"
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
"return": "Promise<boolean>"
|
|
803
|
+
},
|
|
804
|
+
"docs": {
|
|
805
|
+
"text": "",
|
|
806
|
+
"tags": [{
|
|
807
|
+
"name": "description",
|
|
808
|
+
"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."
|
|
809
|
+
}, {
|
|
810
|
+
"name": "param",
|
|
811
|
+
"text": "input - The string to validate."
|
|
812
|
+
}, {
|
|
813
|
+
"name": "returns",
|
|
814
|
+
"text": "`true` if the string is a valid ISO date, `false` otherwise."
|
|
815
|
+
}, {
|
|
816
|
+
"name": "example",
|
|
817
|
+
"text": "isValidIso(\"1969-06-20\") // \u2192 true"
|
|
818
|
+
}, {
|
|
819
|
+
"name": "example",
|
|
820
|
+
"text": "isValidIso(\"1969-06-33\") // \u2192 false (day 33 does not exist)"
|
|
821
|
+
}, {
|
|
822
|
+
"name": "example",
|
|
823
|
+
"text": "isValidIso(\"2023-02-29\") // \u2192 false (2023 is not a leap year)"
|
|
824
|
+
}]
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
static get elementRef() { return "el"; }
|
|
830
|
+
static get watchers() {
|
|
831
|
+
return [{
|
|
832
|
+
"propName": "disabled",
|
|
833
|
+
"methodName": "handleDisabledChange"
|
|
834
|
+
}, {
|
|
835
|
+
"propName": "value",
|
|
836
|
+
"methodName": "updateValue"
|
|
837
|
+
}, {
|
|
838
|
+
"propName": "errorMessage",
|
|
839
|
+
"methodName": "announceError"
|
|
840
|
+
}];
|
|
841
|
+
}
|
|
842
|
+
static get listeners() {
|
|
843
|
+
return [{
|
|
844
|
+
"name": "scroll",
|
|
845
|
+
"method": "pf_reposition",
|
|
846
|
+
"target": "window",
|
|
847
|
+
"capture": true,
|
|
848
|
+
"passive": true
|
|
849
|
+
}, {
|
|
850
|
+
"name": "resize",
|
|
851
|
+
"method": "pf_reposition",
|
|
852
|
+
"target": "window",
|
|
853
|
+
"capture": false,
|
|
854
|
+
"passive": true
|
|
855
|
+
}, {
|
|
856
|
+
"name": "resize",
|
|
857
|
+
"method": "checkCanOpen",
|
|
858
|
+
"target": "window",
|
|
859
|
+
"capture": false,
|
|
860
|
+
"passive": true
|
|
861
|
+
}, {
|
|
862
|
+
"name": "keydown",
|
|
863
|
+
"method": "handleKeydown",
|
|
864
|
+
"target": undefined,
|
|
865
|
+
"capture": false,
|
|
866
|
+
"passive": false
|
|
867
|
+
}, {
|
|
868
|
+
"name": "cellTriggered",
|
|
869
|
+
"method": "handleCellTriggered",
|
|
870
|
+
"target": undefined,
|
|
871
|
+
"capture": false,
|
|
872
|
+
"passive": false
|
|
873
|
+
}];
|
|
874
|
+
}
|
|
875
|
+
}
|