@watermarkinsights/ripple 5.2.0 → 5.3.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/global-cb4fb91c.js → cjs/app-globals-7025eb63.js} +10 -1
- package/dist/cjs/{chartFunctions-2195a9d2.js → chartFunctions-9075d687.js} +3 -3
- package/dist/cjs/{functions-48a748f0.js → functions-b73604c3.js} +297 -7
- package/dist/cjs/index-3c3d6c9f.js +1810 -0
- package/dist/cjs/{interfaces-ad9e80a6.js → interfaces-85d78ae9.js} +3 -4
- package/dist/cjs/{intl-29d2cc42.js → intl-b20d5420.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +554 -0
- package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
- package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
- package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
- package/dist/cjs/ripple.cjs.js +13 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +9 -7
- package/dist/cjs/wm-button.cjs.entry.js +6 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +7 -6
- package/dist/cjs/wm-date-range.cjs.entry.js +446 -0
- package/dist/cjs/wm-datepicker.cjs.entry.js +90 -20
- package/dist/cjs/wm-file-list.cjs.entry.js +5 -4
- package/dist/cjs/wm-file.cjs.entry.js +5 -4
- package/dist/cjs/wm-input.cjs.entry.js +6 -5
- package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
- package/dist/cjs/wm-modal-footer.cjs.entry.js +4 -3
- package/dist/cjs/wm-modal-header.cjs.entry.js +6 -5
- package/dist/cjs/wm-modal.cjs.entry.js +6 -5
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
- package/dist/cjs/wm-navigator.cjs.entry.js +5 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
- package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
- package/dist/cjs/wm-search.cjs.entry.js +7 -6
- package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
- package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
- package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
- package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
- package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/charts/chartFunctions.js +1 -1
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/{wm-datepicker/wm-datepicker.css → datepickers/datepicker.css} +40 -28
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +479 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +816 -0
- package/dist/collection/components/datepickers/wm-date-range.js +804 -0
- package/dist/collection/components/{wm-datepicker → datepickers}/wm-datepicker.js +114 -29
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +5 -5
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.js +5 -4
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/dev/action-menu.js +0 -0
- package/dist/collection/dev/button.js +0 -0
- package/dist/collection/dev/chart-small.js +56 -0
- package/dist/collection/dev/chart.js +37 -0
- package/dist/collection/dev/date-range.js +6 -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/input.js +6 -0
- package/dist/collection/dev/line-chart.js +0 -0
- package/dist/collection/dev/modal.js +75 -0
- package/dist/collection/dev/navigation.js +13 -0
- package/dist/collection/dev/navigator.js +34 -0
- package/dist/collection/dev/pagination.js +7 -0
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/scripts.js +31 -748
- package/dist/collection/dev/search.js +72 -0
- package/dist/collection/dev/select.js +57 -0
- package/dist/collection/dev/snackbar.js +38 -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 +0 -0
- package/dist/collection/dev/uploader.js +139 -0
- package/dist/collection/global/functions.js +187 -0
- package/dist/collection/global/interfaces.js +3 -4
- package/dist/{cjs/global-d5e26274.js → esm/app-globals-0c592c57.js} +7 -2
- package/dist/esm/{chartFunctions-d2d8f1b2.js → chartFunctions-730742b7.js} +3 -3
- package/dist/esm/{functions-58918a32.js → functions-eda88c5f.js} +292 -8
- package/dist/esm/index-0ed3ed7d.js +1780 -0
- package/dist/esm/{interfaces-9b75fb61.js → interfaces-cc5b177f.js} +3 -4
- package/dist/esm/{intl-f9d79dff.js → intl-de8432e2.js} +1 -1
- package/dist/esm/loader.js +6 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +550 -0
- package/dist/esm/priv-chart-popover.entry.js +6 -5
- package/dist/esm/priv-navigator-button.entry.js +4 -3
- package/dist/esm/priv-navigator-item.entry.js +4 -3
- package/dist/esm/ripple.js +14 -13
- package/dist/esm/wm-action-menu_2.entry.js +9 -7
- package/dist/esm/wm-button.entry.js +6 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +7 -6
- package/dist/esm/wm-date-range.entry.js +442 -0
- package/dist/esm/wm-datepicker.entry.js +90 -20
- package/dist/esm/wm-file-list.entry.js +5 -4
- package/dist/esm/wm-file.entry.js +5 -4
- package/dist/esm/wm-input.entry.js +6 -5
- package/dist/esm/wm-line-chart.entry.js +15 -14
- package/dist/esm/wm-modal-footer.entry.js +4 -3
- package/dist/esm/wm-modal-header.entry.js +6 -5
- package/dist/esm/wm-modal.entry.js +6 -5
- package/dist/esm/wm-navigation_3.entry.js +13 -10
- package/dist/esm/wm-navigator.entry.js +5 -4
- package/dist/esm/wm-option_2.entry.js +10 -8
- package/dist/esm/wm-pagination.entry.js +5 -4
- package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
- package/dist/esm/wm-search.entry.js +7 -6
- package/dist/esm/wm-snackbar.entry.js +7 -6
- package/dist/esm/wm-tab-item_3.entry.js +11 -8
- package/dist/esm/wm-tag-input.entry.js +8 -7
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +6 -5
- package/dist/esm/wm-timepicker.entry.js +6 -5
- package/dist/esm/wm-toggletip.entry.js +6 -5
- package/dist/esm/wm-uploader.entry.js +7 -6
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-0c592c57.js +1 -0
- package/dist/esm-es5/{chartFunctions-d2d8f1b2.js → chartFunctions-730742b7.js} +1 -1
- package/dist/esm-es5/functions-eda88c5f.js +1 -0
- package/dist/esm-es5/index-0ed3ed7d.js +1 -0
- package/dist/esm-es5/{intl-f9d79dff.js → intl-de8432e2.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -0
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -0
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +1 -2
- package/dist/loader/index.cjs.js +1 -2
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/ripple/p-0096e233.system.entry.js +1 -0
- package/dist/ripple/p-0ad27de3.system.entry.js +1 -0
- package/dist/ripple/p-0ccf9f96.entry.js +1 -0
- package/dist/ripple/{p-65420b71.entry.js → p-0e1523db.entry.js} +1 -1
- package/dist/ripple/{p-406f1e79.system.entry.js → p-0f117524.system.entry.js} +1 -1
- package/dist/ripple/p-0f7a85f4.entry.js +1 -0
- package/dist/ripple/p-13760c2c.entry.js +1 -0
- package/dist/ripple/p-14bab3fa.system.entry.js +1 -0
- package/dist/ripple/{p-add75652.system.entry.js → p-181068af.system.entry.js} +1 -1
- package/dist/ripple/p-1e536698.js +1 -0
- package/dist/ripple/{p-f9689d7a.entry.js → p-245f0080.entry.js} +1 -1
- package/dist/ripple/p-2c18b6d1.system.entry.js +1 -0
- package/dist/ripple/{p-fa3d10db.js → p-3036a712.js} +1 -1
- package/dist/ripple/p-340b18ea.entry.js +1 -0
- package/dist/ripple/p-37c39a40.system.entry.js +1 -0
- package/dist/ripple/{p-011a4acc.system.entry.js → p-39f4fca0.system.entry.js} +1 -1
- package/dist/ripple/p-3f5e94e3.system.js +1 -0
- package/dist/ripple/{p-a99b05de.system.entry.js → p-47d993b9.system.entry.js} +1 -1
- package/dist/ripple/p-48beea19.system.js +1 -0
- package/dist/ripple/{p-3a070f35.entry.js → p-4aae5688.entry.js} +1 -1
- package/dist/ripple/p-4ea963f3.system.entry.js +1 -0
- package/dist/ripple/p-501d3115.entry.js +1 -0
- package/dist/ripple/p-527581c5.entry.js +1 -0
- package/dist/ripple/p-563b5820.entry.js +1 -0
- package/dist/ripple/p-57695dba.js +2 -0
- package/dist/ripple/{p-6a9f7651.entry.js → p-5ab8174c.entry.js} +1 -1
- package/dist/ripple/p-5c6c325e.system.entry.js +1 -0
- package/dist/ripple/p-5f4c8d63.system.entry.js +1 -0
- package/dist/ripple/p-68e3e7c0.entry.js +1 -0
- package/dist/ripple/p-68fec757.system.entry.js +1 -0
- package/dist/ripple/p-6982bc34.entry.js +1 -0
- package/dist/ripple/p-6a793c40.system.entry.js +1 -0
- package/dist/ripple/p-6c31f0ad.system.entry.js +1 -0
- package/dist/ripple/p-6daf1bd3.system.entry.js +1 -0
- package/dist/ripple/p-6e406e8b.entry.js +1 -0
- package/dist/ripple/p-77210f26.entry.js +1 -0
- package/dist/ripple/p-7a844f5d.system.js +2 -0
- package/dist/ripple/{p-a03df46c.entry.js → p-7b5ac088.entry.js} +1 -1
- package/dist/ripple/p-7d5aaa73.system.entry.js +1 -0
- package/dist/ripple/p-80c92919.system.entry.js +1 -0
- package/dist/ripple/p-81fd2ed5.system.entry.js +1 -0
- package/dist/ripple/p-84d294d1.system.js +1 -0
- package/dist/ripple/p-85178a0d.entry.js +1 -0
- package/dist/ripple/p-8768ba4d.system.entry.js +1 -0
- package/dist/ripple/p-8af21b69.entry.js +1 -0
- package/dist/ripple/{p-eda4d59c.js → p-96cc3c63.js} +1 -1
- package/dist/ripple/{p-abe3242c.entry.js → p-98e77431.entry.js} +1 -1
- package/dist/ripple/p-a30eef53.entry.js +1 -0
- package/dist/ripple/{p-0ba8d3b6.system.entry.js → p-a36f5e7d.system.entry.js} +1 -1
- package/dist/ripple/p-ad6c979f.entry.js +1 -0
- package/dist/ripple/p-af8c1cfa.entry.js +1 -0
- package/dist/ripple/p-b19be746.entry.js +1 -0
- package/dist/ripple/p-b483ec14.entry.js +1 -0
- package/dist/ripple/p-b4a34241.entry.js +1 -0
- package/dist/ripple/{p-c9943d2e.system.entry.js → p-b6dcc6d8.system.entry.js} +1 -1
- package/dist/ripple/p-be28a95e.system.entry.js +1 -0
- package/dist/ripple/p-c6d970a4.entry.js +1 -0
- package/dist/ripple/{p-0d15e3f0.system.js → p-ce028b38.system.js} +1 -1
- package/dist/ripple/p-dba63006.system.entry.js +1 -0
- package/dist/ripple/p-dbb37269.system.entry.js +1 -0
- package/dist/ripple/{p-aecd5a1a.system.js → p-e0929c38.system.js} +1 -1
- package/dist/ripple/p-e19f8c43.js +1 -0
- package/dist/ripple/{p-02b625f6.system.entry.js → p-e3a15de3.system.entry.js} +1 -1
- package/dist/ripple/p-e3d66797.entry.js +1 -0
- package/dist/ripple/p-e64276f2.entry.js +1 -0
- package/dist/ripple/p-e9978b2f.entry.js +1 -0
- package/dist/ripple/p-ecbd3ea9.system.entry.js +1 -0
- package/dist/ripple/p-ecd26b33.system.entry.js +1 -0
- package/dist/ripple/p-ee49cb03.entry.js +1 -0
- package/dist/ripple/p-f0fbb86b.system.entry.js +1 -0
- package/dist/ripple/{p-7e56da2e.system.entry.js → p-f170963b.system.entry.js} +1 -1
- package/dist/ripple/{p-29509665.system.entry.js → p-f4f3bf9f.system.entry.js} +1 -1
- package/dist/ripple/{p-3e9fcb47.entry.js → p-f95bc54b.entry.js} +1 -1
- package/dist/ripple/{p-4fc6019b.system.entry.js → p-fd34619f.system.entry.js} +1 -1
- package/dist/ripple/{p-25446670.entry.js → p-ff095cec.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +72 -0
- package/dist/types/components/datepickers/wm-date-range.d.ts +68 -0
- package/dist/types/components/{wm-datepicker → datepickers}/wm-datepicker.d.ts +16 -2
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +1 -1
- package/dist/types/components.d.ts +111 -57
- package/dist/types/global/functions.d.ts +25 -0
- package/dist/types/global/interfaces.d.ts +14 -0
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/package.json +1 -1
- package/dist/cjs/index-f8ef86de.js +0 -2578
- package/dist/cjs/priv-datepicker.cjs.entry.js +0 -654
- package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
- package/dist/collection/components/charts/screenshots.e2e.js +0 -96
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
- package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
- package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +0 -323
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +0 -942
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +0 -76
- package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +0 -382
- package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +0 -21
- package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
- package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
- package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
- package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
- package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
- package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
- package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
- package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
- package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
- package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
- package/dist/collection/global/functions.spec.js +0 -126
- package/dist/collection/lang/lang.spec.js +0 -20
- package/dist/esm/index-f164fbca.js +0 -2548
- package/dist/esm/priv-datepicker.entry.js +0 -650
- package/dist/esm-es5/functions-58918a32.js +0 -1
- package/dist/esm-es5/global-cb4fb91c.js +0 -1
- package/dist/esm-es5/index-f164fbca.js +0 -1
- package/dist/esm-es5/priv-datepicker.entry.js +0 -1
- package/dist/ripple/p-0fe97e85.system.js +0 -2
- package/dist/ripple/p-105f479a.system.entry.js +0 -1
- package/dist/ripple/p-1453ea51.system.entry.js +0 -1
- package/dist/ripple/p-194bdaa4.system.entry.js +0 -1
- package/dist/ripple/p-30a9ba6e.entry.js +0 -1
- package/dist/ripple/p-31f97455.system.entry.js +0 -1
- package/dist/ripple/p-39dc88f3.system.entry.js +0 -1
- package/dist/ripple/p-3dfc4242.entry.js +0 -1
- package/dist/ripple/p-4428c4f0.entry.js +0 -1
- package/dist/ripple/p-45126063.system.entry.js +0 -1
- package/dist/ripple/p-4bc27adf.entry.js +0 -1
- package/dist/ripple/p-4de51706.js +0 -2
- package/dist/ripple/p-4fb3748d.js +0 -1
- package/dist/ripple/p-5a4f76e1.entry.js +0 -1
- package/dist/ripple/p-5ca67373.entry.js +0 -1
- package/dist/ripple/p-5ceb9894.entry.js +0 -1
- package/dist/ripple/p-5f89831f.system.entry.js +0 -1
- package/dist/ripple/p-63d5db34.entry.js +0 -1
- package/dist/ripple/p-63fabfed.entry.js +0 -1
- package/dist/ripple/p-75592b7a.entry.js +0 -1
- package/dist/ripple/p-7e8daaac.entry.js +0 -1
- package/dist/ripple/p-7ea95937.entry.js +0 -1
- package/dist/ripple/p-7f1efb21.entry.js +0 -1
- package/dist/ripple/p-82d5ea8d.system.entry.js +0 -1
- package/dist/ripple/p-82f7eca7.entry.js +0 -1
- package/dist/ripple/p-88406560.system.entry.js +0 -1
- package/dist/ripple/p-895bfa1f.system.js +0 -1
- package/dist/ripple/p-8d840770.system.js +0 -1
- package/dist/ripple/p-8e1fd831.entry.js +0 -1
- package/dist/ripple/p-95e3ee3d.js +0 -1
- package/dist/ripple/p-994dc497.system.entry.js +0 -1
- package/dist/ripple/p-9dff37db.system.entry.js +0 -1
- package/dist/ripple/p-a71bc14f.entry.js +0 -1
- package/dist/ripple/p-b0579a2a.system.entry.js +0 -1
- package/dist/ripple/p-b1a4f626.system.entry.js +0 -1
- package/dist/ripple/p-b3dfb34a.entry.js +0 -1
- package/dist/ripple/p-b4cb2b12.entry.js +0 -1
- package/dist/ripple/p-c717d895.entry.js +0 -1
- package/dist/ripple/p-cd5fdcb1.entry.js +0 -1
- package/dist/ripple/p-cd659e3e.system.entry.js +0 -1
- package/dist/ripple/p-d02bc2f2.system.entry.js +0 -1
- package/dist/ripple/p-d87de822.system.entry.js +0 -1
- package/dist/ripple/p-da9937f5.system.js +0 -1
- package/dist/ripple/p-dd479c47.entry.js +0 -1
- package/dist/ripple/p-df78942e.entry.js +0 -1
- package/dist/ripple/p-e1b60b9e.system.entry.js +0 -1
- package/dist/ripple/p-e5de7cae.system.entry.js +0 -1
- package/dist/ripple/p-eb9cb021.system.entry.js +0 -1
- package/dist/ripple/p-ef3e35fa.entry.js +0 -1
- package/dist/ripple/p-f2556f03.system.entry.js +0 -1
- package/dist/ripple/p-f7ac9698.system.entry.js +0 -1
- /package/dist/esm-es5/{interfaces-9b75fb61.js → interfaces-cc5b177f.js} +0 -0
- /package/dist/ripple/{p-196eb2f3.js → p-2732bddd.js} +0 -0
- /package/dist/ripple/{p-1402cfa2.system.js → p-42fa7a77.system.js} +0 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-3c3d6c9f.js');
|
|
6
|
+
const functions = require('./functions-b73604c3.js');
|
|
7
|
+
|
|
8
|
+
const datepickerCss = ":host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 \"Material Design Icons\";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:\"\\f026\";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-top-right-radius:0;border-bottom-right-radius:0;border-start-end-radius:0;border-end-end-radius:0}:host .wrapper .range-wrapper{width:303px}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}";
|
|
9
|
+
const WmDateRangeStyle0 = datepickerCss;
|
|
10
|
+
|
|
11
|
+
const DateRange = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.wmRangeSelection = index.createEvent(this, "wmRangeSelection", 7);
|
|
15
|
+
this.wmStartInputBlur = index.createEvent(this, "wmStartInputBlur", 7);
|
|
16
|
+
this.wmEndInputBlur = index.createEvent(this, "wmEndInputBlur", 7);
|
|
17
|
+
this.openUp = false;
|
|
18
|
+
this.popupClicked = false;
|
|
19
|
+
this.toggleButtonClicked = false;
|
|
20
|
+
this.formats = { "mm/dd/yyyy": "US", "dd/mm/yyyy": "INT", "yyyy/mm/dd": "ISO" };
|
|
21
|
+
this.dateFormat = "mm/dd/yyyy";
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.errorMessage = undefined;
|
|
24
|
+
this.invalidStart = false;
|
|
25
|
+
this.invalidEnd = false;
|
|
26
|
+
this.label = "";
|
|
27
|
+
this.labelPosition = "top";
|
|
28
|
+
this.preselected = undefined;
|
|
29
|
+
this.requiredField = false;
|
|
30
|
+
this.valueStart = "";
|
|
31
|
+
this.valueEnd = "";
|
|
32
|
+
this.isExpanded = false;
|
|
33
|
+
}
|
|
34
|
+
get _disabled() {
|
|
35
|
+
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
36
|
+
return functions.toBool(this.disabled);
|
|
37
|
+
}
|
|
38
|
+
get focusDates() {
|
|
39
|
+
// the date the first calendar will open to. either:
|
|
40
|
+
// - value-start
|
|
41
|
+
// - a date provided by the dev via prop preselected
|
|
42
|
+
// - today's date
|
|
43
|
+
const isoStart = this.toISO(this.valueStart);
|
|
44
|
+
// fallback:
|
|
45
|
+
let startFocusDate = functions.dateToISO(new Date());
|
|
46
|
+
if (this._isValidISO(isoStart)) {
|
|
47
|
+
startFocusDate = isoStart;
|
|
48
|
+
}
|
|
49
|
+
else if (this.preselected && this._isValidISO(this.preselected)) {
|
|
50
|
+
startFocusDate = this.preselected;
|
|
51
|
+
}
|
|
52
|
+
// the date the second calendar will open to. either:
|
|
53
|
+
// - value-end, if exists and not same month as value-start
|
|
54
|
+
// - the month after the first calendar
|
|
55
|
+
let firstOfNextMonth = this.toJSDate(startFocusDate);
|
|
56
|
+
if (firstOfNextMonth.getUTCMonth() == 11) {
|
|
57
|
+
firstOfNextMonth.setYear(firstOfNextMonth.getUTCFullYear() + 1);
|
|
58
|
+
}
|
|
59
|
+
firstOfNextMonth.setMonth((firstOfNextMonth.getUTCMonth() + 1) % 12, 1);
|
|
60
|
+
let endFocusDate = functions.dateToISO(firstOfNextMonth); // fallback
|
|
61
|
+
const isoEnd = this.toISO(this.valueEnd);
|
|
62
|
+
if (this._isValidISO(isoEnd)) {
|
|
63
|
+
const sameMonth = this.isSameMonth(startFocusDate, isoEnd);
|
|
64
|
+
if (!sameMonth) {
|
|
65
|
+
endFocusDate = isoEnd;
|
|
66
|
+
// if there is a valueEnd and no valueStart, set valueStart to the month before valueEnd;
|
|
67
|
+
if (!isoStart) {
|
|
68
|
+
let firstOfPrevMonth = this.toJSDate(endFocusDate);
|
|
69
|
+
let month = firstOfPrevMonth.getUTCMonth() - 1;
|
|
70
|
+
if (month == -1) {
|
|
71
|
+
month = 11;
|
|
72
|
+
firstOfPrevMonth.setYear(firstOfPrevMonth.getUTCFullYear() - 1);
|
|
73
|
+
}
|
|
74
|
+
firstOfPrevMonth.setMonth(month, 1);
|
|
75
|
+
startFocusDate = functions.dateToISO(firstOfPrevMonth);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return [startFocusDate, endFocusDate];
|
|
80
|
+
}
|
|
81
|
+
isSameMonth(date1, date2) {
|
|
82
|
+
if (date1 && date2) {
|
|
83
|
+
let month1 = parseInt(date1.split("-")[1]);
|
|
84
|
+
let month2 = parseInt(date2.split("-")[1]);
|
|
85
|
+
return month1 == month2;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
toJSDate(date) {
|
|
92
|
+
if (date && this._isValidISO(date)) {
|
|
93
|
+
let newDate = new Date();
|
|
94
|
+
newDate.setUTCFullYear(parseInt(date.split("-")[0]), parseInt(date.split("-")[1]) - 1, parseInt(date.split("-")[2]));
|
|
95
|
+
return newDate;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
toISO(date) {
|
|
102
|
+
// returns the input when it can't reformat
|
|
103
|
+
return this._reformatDate(this.formats[this.dateFormat], "ISO", date);
|
|
104
|
+
}
|
|
105
|
+
handleDisabled() {
|
|
106
|
+
functions.handleDisabledAttribute(this.el, this._disabled);
|
|
107
|
+
}
|
|
108
|
+
updateValueStart() {
|
|
109
|
+
this.startInputEl.value = this.valueStart ? this.valueStart : "";
|
|
110
|
+
}
|
|
111
|
+
updateValueEnd() {
|
|
112
|
+
this.endInputEl.value = this.valueEnd ? this.valueEnd : "";
|
|
113
|
+
}
|
|
114
|
+
handleErrorMessage() {
|
|
115
|
+
if (this.errorMessage) {
|
|
116
|
+
setTimeout(() => this.announce(this.errorMessage), 100);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
togglePopup() {
|
|
120
|
+
this.isExpanded ? this.closePopup() : this.openPopup();
|
|
121
|
+
this.toggleButtonClicked = true;
|
|
122
|
+
}
|
|
123
|
+
closePopup(returnFocus = false) {
|
|
124
|
+
// reset
|
|
125
|
+
// clearing these in case the user closes without finishing the process
|
|
126
|
+
this.date1 = undefined;
|
|
127
|
+
this.date2 = undefined;
|
|
128
|
+
this.startCalEl.startDate = undefined;
|
|
129
|
+
this.startCalEl.endDate = undefined;
|
|
130
|
+
this.startCalEl.hoverDate = undefined;
|
|
131
|
+
this.endCalEl.startDate = undefined;
|
|
132
|
+
this.endCalEl.endDate = undefined;
|
|
133
|
+
this.endCalEl.hoverDate = undefined;
|
|
134
|
+
this.isExpanded = false;
|
|
135
|
+
this.startCalEl.view = "day";
|
|
136
|
+
this.endCalEl.view = "day";
|
|
137
|
+
this.popupEl.classList.remove("open");
|
|
138
|
+
window.setTimeout(() => {
|
|
139
|
+
//not using display none in order to get measurements of the popup while hidden
|
|
140
|
+
this.popupEl.style.visibility = "hidden";
|
|
141
|
+
}, 250);
|
|
142
|
+
//Reset values so that menu reopens to day view with selected date in focus
|
|
143
|
+
if (returnFocus) {
|
|
144
|
+
this.toggleEl.focus();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
openPopup() {
|
|
148
|
+
// display stuff
|
|
149
|
+
this.openUp = functions.shouldOpenUp(this.el, this.popupEl.clientHeight, this.labelWrapperEl.clientHeight);
|
|
150
|
+
if (functions.hasRoomRight(this.el, 336)) {
|
|
151
|
+
this.popupEl.style.left = "0";
|
|
152
|
+
this.popupEl.style.right = "auto";
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.popupEl.style.right = "0";
|
|
156
|
+
this.popupEl.style.left = "auto";
|
|
157
|
+
}
|
|
158
|
+
this.popupEl.style.visibility = "visible";
|
|
159
|
+
window.requestAnimationFrame(() => {
|
|
160
|
+
this.popupEl.classList.add("open");
|
|
161
|
+
});
|
|
162
|
+
this.isExpanded = true;
|
|
163
|
+
// state stuff
|
|
164
|
+
this.startCalEl.focusDate = this.focusDates[0];
|
|
165
|
+
this.endCalEl.focusDate = this.focusDates[1];
|
|
166
|
+
this.startCalEl.focusCell();
|
|
167
|
+
if (this.valueStart) {
|
|
168
|
+
const startISO = this.toISO(this.valueStart);
|
|
169
|
+
if (this._isValidISO(startISO)) {
|
|
170
|
+
this.startCalEl.startDate = startISO;
|
|
171
|
+
}
|
|
172
|
+
if (this.valueEnd) {
|
|
173
|
+
const endISO = this.toISO(this.valueEnd);
|
|
174
|
+
if (this._isValidISO(endISO)) {
|
|
175
|
+
if (this.isSameMonth(startISO, endISO)) {
|
|
176
|
+
this.startCalEl.endDate = endISO;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.endCalEl.endDate = endISO;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
handleFocus() {
|
|
186
|
+
this.wrapperEl.classList.add("focus");
|
|
187
|
+
}
|
|
188
|
+
handleBlur() {
|
|
189
|
+
this.wrapperEl.classList.remove("focus");
|
|
190
|
+
}
|
|
191
|
+
handleStartInputBlur() {
|
|
192
|
+
this.wmStartInputBlur.emit();
|
|
193
|
+
}
|
|
194
|
+
handleEndInputBlur() {
|
|
195
|
+
this.wmEndInputBlur.emit();
|
|
196
|
+
}
|
|
197
|
+
handleStartInput(ev) {
|
|
198
|
+
// keep component's value in sync with input's value
|
|
199
|
+
this.valueStart = ev.target.value;
|
|
200
|
+
}
|
|
201
|
+
handleEndInput(ev) {
|
|
202
|
+
// keep component's value in sync with input's value
|
|
203
|
+
this.valueEnd = ev.target.value;
|
|
204
|
+
}
|
|
205
|
+
handleKey(ev) {
|
|
206
|
+
switch (ev.key) {
|
|
207
|
+
case "Escape":
|
|
208
|
+
ev.preventDefault();
|
|
209
|
+
ev.stopPropagation(); // prevents closing of parent modal
|
|
210
|
+
this.closePopup(true);
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
blurHandler() {
|
|
215
|
+
if (!this.popupClicked && !this.toggleButtonClicked && this.isExpanded) {
|
|
216
|
+
this.closePopup();
|
|
217
|
+
}
|
|
218
|
+
this.popupClicked = false;
|
|
219
|
+
this.toggleButtonClicked = false;
|
|
220
|
+
}
|
|
221
|
+
// for cases where the user clicks or uses a shortcut to leave the document
|
|
222
|
+
handleBlurOnWindow() {
|
|
223
|
+
if (this.isExpanded) {
|
|
224
|
+
this.closePopup();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
handleDateFocus(ev) {
|
|
228
|
+
const cal = ev.target;
|
|
229
|
+
const newFocusVal = cal.focusDate;
|
|
230
|
+
// keeping calendars in sync
|
|
231
|
+
// (left one should always be before right one)
|
|
232
|
+
const startYearMonth = this.startCalEl.focusDate.slice(0, -3);
|
|
233
|
+
const endYearMonth = this.endCalEl.focusDate.slice(0, -3);
|
|
234
|
+
if (cal == this.startCalEl) {
|
|
235
|
+
if (startYearMonth >= endYearMonth) {
|
|
236
|
+
this.endCalEl.focusDate = functions.dateFind.month.increase(this.startCalEl.focusDate, 1);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else if (cal == this.endCalEl) {
|
|
240
|
+
if (endYearMonth <= startYearMonth) {
|
|
241
|
+
this.startCalEl.focusDate = functions.dateFind.month.decrease(this.endCalEl.focusDate, 1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// SR announcements
|
|
245
|
+
if (this.oldFocusVal) {
|
|
246
|
+
const newYear = functions.dateFind.year.asInt(newFocusVal);
|
|
247
|
+
const oldYear = functions.dateFind.year.asInt(this.oldFocusVal);
|
|
248
|
+
const newMonth = functions.dateFind.month.asInt(newFocusVal);
|
|
249
|
+
const oldMonth = functions.dateFind.month.asInt(this.oldFocusVal);
|
|
250
|
+
if (cal.view === "day") {
|
|
251
|
+
if (newYear != oldYear || newMonth != oldMonth) {
|
|
252
|
+
this.liveRegionEl.innerHTML = `Viewing ${functions.calendar_months[newMonth - 1]}, ${newYear}`;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
if (newYear != oldYear) {
|
|
257
|
+
this.liveRegionEl.innerHTML = `${newYear} selected.`;
|
|
258
|
+
}
|
|
259
|
+
else if (newMonth != oldMonth) {
|
|
260
|
+
this.liveRegionEl.innerHTML = `${functions.calendar_months[newMonth - 1]}, ${newYear}`;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
this.oldFocusVal = cal.focusDate;
|
|
265
|
+
}
|
|
266
|
+
handlePopupBlurred(ev) {
|
|
267
|
+
// emit blur event when leaving component from priv-calendar
|
|
268
|
+
if (ev.detail.relatedTarget !== this.el) {
|
|
269
|
+
const event = new CustomEvent("blur");
|
|
270
|
+
// @ts-ignore
|
|
271
|
+
event.relatedTarget = ev.detail.relatedTarget;
|
|
272
|
+
this.el.dispatchEvent(event);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
handleCellTriggered(ev) {
|
|
276
|
+
const cal = ev.detail.cal;
|
|
277
|
+
const dateElement = ev.detail.cell;
|
|
278
|
+
const newDate = dateElement.getAttribute("data-year") +
|
|
279
|
+
"-" +
|
|
280
|
+
dateElement.getAttribute("data-month") +
|
|
281
|
+
"-" +
|
|
282
|
+
dateElement.textContent.padStart(2, "0");
|
|
283
|
+
if (this.startCalEl.endDate || this.endCalEl.endDate) {
|
|
284
|
+
// there were already 2 dates, user is setting a new range.
|
|
285
|
+
// set calendar state
|
|
286
|
+
this.startCalEl.startDate = undefined;
|
|
287
|
+
this.startCalEl.endDate = undefined;
|
|
288
|
+
this.endCalEl.startDate = undefined;
|
|
289
|
+
this.endCalEl.endDate = undefined;
|
|
290
|
+
cal.startDate = newDate;
|
|
291
|
+
// set component state
|
|
292
|
+
this.date1 = newDate;
|
|
293
|
+
this.date2 = undefined;
|
|
294
|
+
}
|
|
295
|
+
else if (this.date1 && newDate !== this.date1) {
|
|
296
|
+
// user is setting the end of the range
|
|
297
|
+
// ignore if same date as first is selected
|
|
298
|
+
// (acts as if it was re-selected as the first date)
|
|
299
|
+
// reorder if necessary
|
|
300
|
+
if (this.date1 > newDate) {
|
|
301
|
+
this.date2 = this.date1;
|
|
302
|
+
this.date1 = newDate;
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
this.date2 = newDate;
|
|
306
|
+
}
|
|
307
|
+
const detail = {
|
|
308
|
+
startDate: {
|
|
309
|
+
iso: this.date1,
|
|
310
|
+
us: this._reformatDate("ISO", "US", this.date1),
|
|
311
|
+
int: this._reformatDate("ISO", "INT", this.date1),
|
|
312
|
+
},
|
|
313
|
+
endDate: {
|
|
314
|
+
iso: this.date2,
|
|
315
|
+
us: this._reformatDate("ISO", "US", this.date2),
|
|
316
|
+
int: this._reformatDate("ISO", "INT", this.date2),
|
|
317
|
+
},
|
|
318
|
+
};
|
|
319
|
+
this.wmRangeSelection.emit(detail);
|
|
320
|
+
this.closePopup(true);
|
|
321
|
+
this.date1 = undefined;
|
|
322
|
+
this.date2 = undefined;
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
// calendars were clear, user sets first date
|
|
326
|
+
cal.startDate = newDate;
|
|
327
|
+
// component state
|
|
328
|
+
this.date1 = newDate;
|
|
329
|
+
}
|
|
330
|
+
// Create events to trigger onInput and onChange on host element, to get the updated value
|
|
331
|
+
// Because there are more ways to input than just typing, we are firing this event upon cellTriggered
|
|
332
|
+
const inputEvent = new CustomEvent("input");
|
|
333
|
+
this.el.dispatchEvent(inputEvent);
|
|
334
|
+
const changeEvent = new CustomEvent("change");
|
|
335
|
+
this.el.dispatchEvent(changeEvent);
|
|
336
|
+
}
|
|
337
|
+
handleOutOfCal() {
|
|
338
|
+
this.startCalEl.hoverDate = undefined;
|
|
339
|
+
this.endCalEl.hoverDate = undefined;
|
|
340
|
+
}
|
|
341
|
+
handleCellHovered(ev) {
|
|
342
|
+
this.startCalEl.hoverDate = this.startCalEl.startDate === ev.detail ? undefined : ev.detail;
|
|
343
|
+
this.endCalEl.hoverDate = this.endCalEl.startDate === ev.detail ? undefined : ev.detail;
|
|
344
|
+
}
|
|
345
|
+
async reformatDate(inputFormat, outputFormat, date) {
|
|
346
|
+
return this._reformatDate(inputFormat, outputFormat, date);
|
|
347
|
+
}
|
|
348
|
+
_reformatDate(inputFormat, outputFormat, date) {
|
|
349
|
+
// this function reformats date strings to/from the storage format ONLY. US -> INT and vice versa is not supported.
|
|
350
|
+
if (inputFormat !== "ISO" && outputFormat !== "ISO")
|
|
351
|
+
return "";
|
|
352
|
+
// return if missing args
|
|
353
|
+
if (!inputFormat || !outputFormat || !date)
|
|
354
|
+
return "";
|
|
355
|
+
// 1, 2, or 4 digits, separator, 1 or 2 digits, separator, then 1 or 2 or 4 digits
|
|
356
|
+
const parsableEntry = /^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/;
|
|
357
|
+
if (!parsableEntry.test(date)) {
|
|
358
|
+
return date;
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
const dateArr = date.replace(/[\-\.]/gi, "/").split("/");
|
|
362
|
+
switch (outputFormat) {
|
|
363
|
+
case "US":
|
|
364
|
+
return dateArr[1].padStart(2, "0") + "/" + dateArr[2].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
|
|
365
|
+
case "INT":
|
|
366
|
+
return dateArr[2].padStart(2, "0") + "/" + dateArr[1].padStart(2, "0") + "/" + dateArr[0].padStart(4, "20");
|
|
367
|
+
case "ISO":
|
|
368
|
+
if (inputFormat === "US") {
|
|
369
|
+
return dateArr[2].padStart(4, "20") + "-" + dateArr[0].padStart(2, "0") + "-" + dateArr[1].padStart(2, "0");
|
|
370
|
+
}
|
|
371
|
+
else if (inputFormat === "INT") {
|
|
372
|
+
return dateArr[2].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[0].padStart(2, "0");
|
|
373
|
+
}
|
|
374
|
+
else if (inputFormat === "ISO") {
|
|
375
|
+
return dateArr[0].padStart(4, "20") + "-" + dateArr[1].padStart(2, "0") + "-" + dateArr[2].padStart(2, "0");
|
|
376
|
+
}
|
|
377
|
+
default:
|
|
378
|
+
return dateArr.join("/");
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
async isValidISO(input) {
|
|
383
|
+
return this._isValidISO(input);
|
|
384
|
+
}
|
|
385
|
+
_isValidISO(input) {
|
|
386
|
+
const ISOFormat = /^\d\d\d\d[-]\d\d[-]\d\d$/;
|
|
387
|
+
if (!input || !ISOFormat.test(input)) {
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
else {
|
|
391
|
+
// Parse the ISO date parts to integers
|
|
392
|
+
const parts = input.split("-");
|
|
393
|
+
const day = parseInt(parts[2], 10);
|
|
394
|
+
const month = parseInt(parts[1], 10);
|
|
395
|
+
const year = parseInt(parts[0], 10);
|
|
396
|
+
// Check the ranges of month and year
|
|
397
|
+
if (year < 1000 || year > 3000 || month == 0 || month > 12)
|
|
398
|
+
return false;
|
|
399
|
+
let monthLength = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
400
|
+
// Adjust for leap years
|
|
401
|
+
if (year % 400 == 0 || (year % 100 != 0 && year % 4 == 0))
|
|
402
|
+
monthLength[1] = 29;
|
|
403
|
+
// Check the range of the day
|
|
404
|
+
return day > 0 && day <= monthLength[month - 1];
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
componentWillLoad() {
|
|
408
|
+
if (this.label === "") {
|
|
409
|
+
console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none.");
|
|
410
|
+
}
|
|
411
|
+
functions.handleDisabledAttribute(this.el, this._disabled);
|
|
412
|
+
}
|
|
413
|
+
announce(message) {
|
|
414
|
+
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
415
|
+
if (this.liveRegionEl.textContent === message) {
|
|
416
|
+
message += "\u00A0";
|
|
417
|
+
}
|
|
418
|
+
this.liveRegionEl.textContent = message;
|
|
419
|
+
}
|
|
420
|
+
render() {
|
|
421
|
+
return (index.h(index.Host, { key: 'e4b973ea71bd8ebdb2a27613734d23b82a47b94f', "aria-busy": "false" }, index.h("div", { key: '31430bc3aad1dc7dc657f265b7d1ddcdda2c80a8', ref: (d) => (this.wrapperEl = d), class: `wrapper label-${this.labelPosition}` }, index.h("div", { key: '94a9f48ae0e4cfe662a55c57305fe66b80fa0c97', class: "label-wrapper", ref: (e) => (this.labelWrapperEl = e) }, this.labelPosition !== "none" && (index.h("label", { key: '785315289563fcdaded7b6a3558c0c57bd44e68d', id: "dateRangeLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})` }, this.label, this.requiredField && (index.h("span", { key: 'd920a980a492bdf663d8d4a6676d250e6ab08f12', "aria-hidden": "true", class: "required" }, "*"))))), index.h("div", { key: '341bd2b004e623f9222e5911d2c3eb86aaa0595a' }, index.h("div", { key: 'fde4a88c62e793f8d74d1ec2c6b95c0ed8ccd6bb', class: "range-wrapper" }, index.h("input", { key: '7397419c42ef7e9a72fa5d05cd5b5b9eead4fd5a', disabled: this._disabled, type: "text", id: "start-date-input", class: `date-input input ${this.invalidStart ? "invalid" : ""}`, name: "start-date", placeholder: this.dateFormat, value: this.valueStart, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleStartInput(ev), onBlur: () => this.handleStartInputBlur(), ref: (input) => (this.startInputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), "\u00A0-\u00A0", index.h("input", { key: '0f4cd5c1c9ab24fd7159869921b81abf0cb484ab', disabled: this._disabled, type: "text", id: "end-date-input", class: `date-input input ${this.invalidEnd ? "invalid" : ""}`, name: "end-date", placeholder: this.dateFormat, value: this.valueEnd, onFocus: () => this.handleFocus(), onInput: (ev) => this.handleEndInput(ev), onBlur: () => this.handleEndInputBlur(), ref: (input) => (this.endInputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), index.h("div", { key: 'ca243dd352e1a03188f25c9b339e3a9bd8c49237', class: "container", id: "wm-container" }, index.h("button", { key: '690818b3f86aadedf0f5f5500eee51950dc9cb3f', disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, index.h("span", { key: '9316263f1c0d861b4b818c793604ce0a34f66aff', class: "calendar", title: functions.intl.formatMessage({
|
|
422
|
+
id: "date.calendarView",
|
|
423
|
+
defaultMessage: "Calendar View",
|
|
424
|
+
description: "Calendar button",
|
|
425
|
+
}) })), index.h("div", { key: '443f8cae814de4b7256de39b05790f629c336b48', class: `popup-wrapper ${this.startCalEl && this.startCalEl.view}-view ${this.openUp ? "expand-upwards" : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), onClick: () => (this.popupClicked = true), style: { display: "flex" } }, index.h("div", { key: '3bc56e6abc8150bd648cde6deeb66327bcf19aac', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.endCalEl.focusLastFocusable() }), index.h("priv-calendar", { key: '5e4bdcf5ceee6d116d833a5fae09c271eb145263', ref: (el) => (this.startCalEl = el), onClick: () => (this.popupClicked = true), onDateFocus: (ev) => this.handleDateFocus(ev) }), index.h("priv-calendar", { key: '83414ce9ae70b3f9c7fa453183d356214993da1b', ref: (el) => (this.endCalEl = el), onClick: () => (this.popupClicked = true), onDateFocus: (ev) => this.handleDateFocus(ev) }), index.h("div", { key: 'fc707a6d41d0b5d82d2b0428772883844fd08f9b', class: "trapfocus", tabIndex: this.isExpanded ? 0 : undefined, onFocus: () => this.startCalEl.focusFirstFocusable() })), index.h("div", { key: '681f679b6e360fe6ecb53ea63e6541937622e6e9', id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), index.h("div", { key: '442f00d796ef3be3aa0a20173ccca0d7c8529878', id: "month-title", class: "sr-only" }, functions.intl.formatMessage({
|
|
426
|
+
id: "date.selectMonth",
|
|
427
|
+
defaultMessage: "Activate to select a month.",
|
|
428
|
+
description: "Calendar button",
|
|
429
|
+
})), index.h("div", { key: '25706e52be250bfb44c95417e874d5411f9d5cc5', id: "year-title", class: "sr-only" }, functions.intl.formatMessage({
|
|
430
|
+
id: "date.selectYear",
|
|
431
|
+
defaultMessage: "Activate to select a year.",
|
|
432
|
+
description: "Calendar button",
|
|
433
|
+
})))), index.h("div", { key: '5d29a04c792e3330620bc14e17c312a85e635553', id: "error", class: "error" }, this.errorMessage), index.h("div", { key: '1d4bd320bb3a2e088aa7b55997d51a497f567d1d', ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
434
|
+
}
|
|
435
|
+
static get delegatesFocus() { return true; }
|
|
436
|
+
get el() { return index.getElement(this); }
|
|
437
|
+
static get watchers() { return {
|
|
438
|
+
"disabled": ["handleDisabled"],
|
|
439
|
+
"valueStart": ["updateValueStart"],
|
|
440
|
+
"valueEnd": ["updateValueEnd"],
|
|
441
|
+
"errorMessage": ["handleErrorMessage"]
|
|
442
|
+
}; }
|
|
443
|
+
};
|
|
444
|
+
DateRange.style = WmDateRangeStyle0;
|
|
445
|
+
|
|
446
|
+
exports.wm_date_range = DateRange;
|