@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,72 @@
|
|
|
1
|
+
const search = document.getElementById("search-example");
|
|
2
|
+
if (search) search.oninput = (e) => sInputCallback(e);
|
|
3
|
+
let results = [];
|
|
4
|
+
|
|
5
|
+
const searchAndFind = document.getElementById("search-find-example");
|
|
6
|
+
if (searchAndFind) searchAndFind.oninput = (e) => sfInputCallback(e, ".foodlist");
|
|
7
|
+
|
|
8
|
+
const searchAndFindDatabase = document.getElementById("search-find-database-example");
|
|
9
|
+
if (searchAndFindDatabase)
|
|
10
|
+
searchAndFindDatabase.oninput = (e) => {
|
|
11
|
+
window.setTimeout(() => sfInputCallback(e, ".namelist"), 1000);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function sfInputCallback(e, list) {
|
|
15
|
+
results = searchList(list, e.target.value);
|
|
16
|
+
e.target.numResults = results.length;
|
|
17
|
+
if (results.length) {
|
|
18
|
+
e.target.highlightedId = results[0].toLowerCase();
|
|
19
|
+
e.target.highlightedName = results[0];
|
|
20
|
+
} else {
|
|
21
|
+
e.target.highlightedId = "";
|
|
22
|
+
e.target.highlightedName = "";
|
|
23
|
+
}
|
|
24
|
+
highlight(e.target.highlightedId);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
searchAndFind &&
|
|
28
|
+
searchAndFind.addEventListener("wmSearchBrowseResults", (ev) => {
|
|
29
|
+
const results = searchList(".foodlist", ev.target.value);
|
|
30
|
+
const index = ev.detail.position - 1;
|
|
31
|
+
searchAndFind.highlightedId = results[index].toLowerCase();
|
|
32
|
+
searchAndFind.highlightedName = results[index];
|
|
33
|
+
highlight(searchAndFind.highlightedId);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
searchAndFindDatabase &&
|
|
37
|
+
searchAndFindDatabase.addEventListener("wmSearchBrowseResults", (ev) => {
|
|
38
|
+
const results = searchList(".namelist", ev.target.value);
|
|
39
|
+
const index = ev.detail.position - 1;
|
|
40
|
+
ev.target.highlightedId = results[index].toLowerCase();
|
|
41
|
+
ev.target.highlightedName = results[index];
|
|
42
|
+
highlight(ev.target.highlightedId);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
function sInputCallback(e) {
|
|
46
|
+
results = searchList(".foodlist", e.target.value);
|
|
47
|
+
search.numResults = results.length;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function searchList(querySelector, searchString) {
|
|
51
|
+
const results = [];
|
|
52
|
+
let foods = [];
|
|
53
|
+
if (searchString) {
|
|
54
|
+
Array.from(document.querySelector(querySelector).children).map((item) => foods.push(item.textContent));
|
|
55
|
+
for (let i = 0; i < foods.length; i++) {
|
|
56
|
+
const food = foods[i].toLowerCase();
|
|
57
|
+
if (food.indexOf(searchString.toLowerCase()) === 0) {
|
|
58
|
+
results.push(foods[i]);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return results;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function highlight(id) {
|
|
66
|
+
document.querySelectorAll("li").forEach((i) => i.classList.remove("highlighted"));
|
|
67
|
+
if (id) {
|
|
68
|
+
document.querySelector("#" + id).classList.add("highlighted");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
document.addEventListener("wmSelectBlurred", renderErrors);
|
|
2
|
+
|
|
3
|
+
function renderErrors() {
|
|
4
|
+
const errorDiv = document.getElementById("errors");
|
|
5
|
+
const select = document.getElementById("select1");
|
|
6
|
+
const selectedOption = Array.from(select.querySelectorAll("wm-option")).filter((o) => o.selected)[0];
|
|
7
|
+
|
|
8
|
+
if (selectedOption.value === "C") {
|
|
9
|
+
select.invalid = true;
|
|
10
|
+
select.errorMessage = "C is my least favorite letter.";
|
|
11
|
+
} else {
|
|
12
|
+
select.invalid = false;
|
|
13
|
+
select.errorMessage = null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function testSelectedOption(selectComp) {
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
// making sure the selected and aria-selected attributes are always in sync
|
|
20
|
+
const options = selectComp.querySelectorAll("wm-option");
|
|
21
|
+
let selectedOption = Array.from(options).filter((option) => !!option.selected)[0];
|
|
22
|
+
const ariaSelectedOption = Array.from(options).filter((option) => !!option.getAttribute("aria-selected"))[0];
|
|
23
|
+
if (selectedOption != ariaSelectedOption) {
|
|
24
|
+
console.log(selectComp.id, selectedOption, ariaSelectedOption);
|
|
25
|
+
}
|
|
26
|
+
}, 150);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const selects = document.querySelectorAll("wm-select");
|
|
30
|
+
selects.forEach((select) => {
|
|
31
|
+
select.addEventListener("wmOptionSelected", (ev) => handleOptionSelected(ev));
|
|
32
|
+
select.addEventListener("wmOptionDeselected", (ev) => handleOptionDeselected(ev));
|
|
33
|
+
select.addEventListener("wmSelectAllSelected", (ev) => handleAllSelected(ev));
|
|
34
|
+
select.addEventListener("wmSelectAllDeselected", (ev) => handleAllDeselected(ev));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
function handleOptionSelected(ev) {
|
|
38
|
+
const parentSelect = ev.target.parentElement;
|
|
39
|
+
|
|
40
|
+
if (!parentSelect.multiple) {
|
|
41
|
+
// in single select, deselect all other options
|
|
42
|
+
parentSelect.querySelectorAll("wm-option").forEach((option) => (option.selected = false));
|
|
43
|
+
}
|
|
44
|
+
ev.target.selected = true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function handleOptionDeselected(ev) {
|
|
48
|
+
ev.target.selected = false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function handleAllSelected(ev) {
|
|
52
|
+
ev.target.querySelectorAll("wm-option").forEach((option) => (option.selected = true));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function handleAllDeselected(ev) {
|
|
56
|
+
ev.target.querySelectorAll("wm-option").forEach((option) => (option.selected = false));
|
|
57
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
function generateSnackbar(isDefault = false) {
|
|
2
|
+
const id = Math.floor(Math.random() * 100) + 1;
|
|
3
|
+
const message = isDefault ? `Here's a snackbar ${id}` : document.getElementById("custom-notif").value;
|
|
4
|
+
const link = isDefault ? "View this person in the table" : document.getElementById("custom-link").value;
|
|
5
|
+
const newWindow = isDefault ? true : link && document.getElementById("new-window").checked;
|
|
6
|
+
|
|
7
|
+
let newNotification = {
|
|
8
|
+
id: id,
|
|
9
|
+
message: message,
|
|
10
|
+
link: link,
|
|
11
|
+
newWindow: newWindow,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const snackbar = document.getElementById("snackbar");
|
|
15
|
+
const notifications = JSON.parse(snackbar.notifications);
|
|
16
|
+
let updatedNotifications = [newNotification, ...notifications];
|
|
17
|
+
snackbar.notifications = JSON.stringify(updatedNotifications);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
document.addEventListener("wmSnackbarSnackFinished", function (ev) {
|
|
21
|
+
console.log("in listener for finished snack");
|
|
22
|
+
const snackbar = document.getElementById("snackbar");
|
|
23
|
+
let newSnacks = JSON.parse(snackbar.notifications).filter(function (snack) {
|
|
24
|
+
return snack.id !== +ev.detail.id;
|
|
25
|
+
});
|
|
26
|
+
snackbar.notifications = JSON.stringify(newSnacks);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
document.addEventListener("wmSnackbarActionTriggered", function (ev) {
|
|
30
|
+
const snackbar = document.getElementById("snackbar");
|
|
31
|
+
let newSnacks = JSON.parse(snackbar.notifications).filter(function (snack) {
|
|
32
|
+
return snack.id !== +ev.detail.id;
|
|
33
|
+
});
|
|
34
|
+
snackbar.notifications = JSON.stringify(newSnacks);
|
|
35
|
+
console.log("You clicked the action.");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const tab1 = document.getElementById("tab-1");
|
|
2
|
+
if (tab1) {
|
|
3
|
+
tab1.addEventListener("wmTabSelected", function (ev) {
|
|
4
|
+
let activeTab = ev.detail.tabId;
|
|
5
|
+
let tabContainer = document.getElementById("tab-1-wrapper");
|
|
6
|
+
let panel = tabContainer.querySelector("#tab-panel");
|
|
7
|
+
let tabList = document.getElementById("tab-1");
|
|
8
|
+
|
|
9
|
+
tabList.selectedTab = activeTab;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const cloudTabs = document.getElementById("cloud-tabs");
|
|
13
|
+
cloudTabs &&
|
|
14
|
+
cloudTabs.addEventListener("wmTabSelected", (ev) => {
|
|
15
|
+
const tabId = ev.detail.tabId;
|
|
16
|
+
const cloudTabs = document.getElementById("cloud-tabs");
|
|
17
|
+
cloudTabs.selectedTab = tabId;
|
|
18
|
+
let panel = document.querySelector(`wm-tab-panel[tab-id=${tabId}]`);
|
|
19
|
+
console.log(panel);
|
|
20
|
+
|
|
21
|
+
if (panel) {
|
|
22
|
+
let text;
|
|
23
|
+
|
|
24
|
+
switch (tabId) {
|
|
25
|
+
case "cumulonimbus":
|
|
26
|
+
text =
|
|
27
|
+
'Cumulonimbus (from Latin cumulus, "heaped" and nimbus, "rainstorm") is a dense, towering vertical cloud.';
|
|
28
|
+
break;
|
|
29
|
+
case "cirrostratus":
|
|
30
|
+
text =
|
|
31
|
+
"Cirrostratus /ˌsɪroʊˈstrɑːtəs/ is a high-level, very thin, generally uniform stratiform genus-type of cloud.";
|
|
32
|
+
break;
|
|
33
|
+
case "altostratus":
|
|
34
|
+
text =
|
|
35
|
+
"Altostratus is a middle altitude cloud genus belonging to the stratiform physical category characterized by a generally uniform gray to bluish-green sheet or layer.";
|
|
36
|
+
break;
|
|
37
|
+
default:
|
|
38
|
+
text = "";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
panel.innerHTML = text;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const allTagInputs = document.querySelectorAll("wm-tag-input");
|
|
2
|
+
|
|
3
|
+
allTagInputs.forEach((ti) => {
|
|
4
|
+
const initialTags = Array.from(ti.querySelectorAll("wm-tag-option")).map((o) => o.textContent);
|
|
5
|
+
|
|
6
|
+
ti.addEventListener("wmTagInputTagAdded", (ev) => {
|
|
7
|
+
const ciTagName = ev.detail.toLowerCase().trim();
|
|
8
|
+
const ciExistingTagNames = Array.from(ti.querySelectorAll("wm-tag-option")).map((o) =>
|
|
9
|
+
o.textContent.toLowerCase().trim()
|
|
10
|
+
);
|
|
11
|
+
if (ti.tagInputType === "dropdown" && !ciExistingTagNames.includes(ciTagName)) {
|
|
12
|
+
const to = document.createElement("wm-tag-option");
|
|
13
|
+
to.textContent = ev.detail;
|
|
14
|
+
to.id = "tag" + Math.random().toString(36).substr(2, 6);
|
|
15
|
+
to.selected = true;
|
|
16
|
+
ti.appendChild(to);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
ti.addEventListener("wmTagOptionSelected", (ev) => {
|
|
21
|
+
ev.target.selected = true;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
ti.addEventListener("wmTagOptionDeselected", (ev) => {
|
|
25
|
+
const isUserTag = !initialTags.includes(ev.target.textContent);
|
|
26
|
+
if (isUserTag) {
|
|
27
|
+
ev.target.remove();
|
|
28
|
+
} else {
|
|
29
|
+
ev.target.selected = false;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const textAreaEls = document.querySelectorAll("wm-textarea");
|
|
2
|
+
|
|
3
|
+
textAreaEls.forEach((textAreaEl) => {
|
|
4
|
+
textAreaEl.addEventListener("wmTextareaValueChanged", (ev) => {
|
|
5
|
+
console.log("wmTextareaValueChanged heard: ", ev.target.value);
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
textAreaEl.addEventListener("blur", (ev) => {
|
|
9
|
+
textAreaEl.characterLimit && handleCharacterLimit(textAreaEl);
|
|
10
|
+
textAreaEl.requiredField && handleRequiredTextArea(textAreaEl);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function handleCharacterLimit(textAreaEl) {
|
|
14
|
+
if (textAreaEl.value.length > textAreaEl.characterLimit) {
|
|
15
|
+
textAreaEl.errorMessage = "Character limit exceeded, please reduce entered text.";
|
|
16
|
+
} else if (textAreaEl.errorMessage == "Character limit exceeded, please reduce entered text.") {
|
|
17
|
+
textAreaEl.errorMessage = "";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function handleRequiredTextArea(textAreaEl) {
|
|
22
|
+
if (textAreaEl.value.length == 0) {
|
|
23
|
+
textAreaEl.errorMessage = "This field is required.";
|
|
24
|
+
} else if (textAreaEl.errorMessage == "This field is required.") {
|
|
25
|
+
textAreaEl.errorMessage = "";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const timepickers = document.querySelectorAll("wm-timepicker");
|
|
2
|
+
|
|
3
|
+
timepickers.forEach((timepicker) => {
|
|
4
|
+
timepicker.addEventListener("wmTimepickerInputBlurred", async (ev) => {
|
|
5
|
+
// reformat time and validate for invalid date
|
|
6
|
+
if (timepicker.value) {
|
|
7
|
+
if (await timepicker.isValidTime(ev.target.value)) {
|
|
8
|
+
const displayTime = await timepicker.reformatTime("12", timepicker.value);
|
|
9
|
+
|
|
10
|
+
timepicker.errorMessage = "";
|
|
11
|
+
timepicker.value = displayTime;
|
|
12
|
+
} else {
|
|
13
|
+
timepicker.errorMessage = "Please enter a valid time";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
timepicker.addEventListener("blur", (ev) => {
|
|
19
|
+
// validate for required time
|
|
20
|
+
if (timepicker.requiredField && timepicker.value === "") {
|
|
21
|
+
timepicker.errorMessage = "A time is required";
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
timepicker.addEventListener("wmTimepickerTimeSelected", async (ev) => {
|
|
26
|
+
// handle user time selection
|
|
27
|
+
const selectedTime = ev.detail.time;
|
|
28
|
+
|
|
29
|
+
timepicker.errorMessage = "";
|
|
30
|
+
timepicker.value = await timepicker.reformatTime("12", selectedTime);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
function addServerError() {
|
|
2
|
+
document.getElementById("uploader11").errorMessage = "An error has occurred!";
|
|
3
|
+
}
|
|
4
|
+
const uploaders = document.querySelectorAll("wm-uploader");
|
|
5
|
+
|
|
6
|
+
uploaders.forEach((upl) => {
|
|
7
|
+
upl.addEventListener("wmUploaderFilesSelected", (ev) => handleFilesSelected(ev));
|
|
8
|
+
upl.addEventListener("wmFileErrorCleared", (ev) => handleErrorCleared(ev));
|
|
9
|
+
upl.addEventListener("wmFileDownload", (ev) => alert("downloading " + ev.target.id));
|
|
10
|
+
upl.addEventListener("wmFilePreview", (ev) => alert("previewing " + ev.target.id));
|
|
11
|
+
upl.addEventListener("wmFileDelete", (ev) => removeFile(ev));
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
function validateFile(upl, file) {
|
|
15
|
+
const fileList = Array.from(upl.querySelectorAll("wm-file:not([error-message])"));
|
|
16
|
+
const sizeLimit = 100; // in MB
|
|
17
|
+
|
|
18
|
+
if (fileList.some((currentFile) => `${currentFile.name}.${currentFile.type}` === `${file.name}.${file.type}`)) {
|
|
19
|
+
// check for duplicate file name
|
|
20
|
+
return `A file named "${file.name}.${file.type}" has already been uploaded.`;
|
|
21
|
+
} else if (upl.maxSize && file.size / (1024 * 1024) > sizeLimit) {
|
|
22
|
+
// check against maxSize
|
|
23
|
+
return `The file is larger than maximum size ${upl.maxSize}.`;
|
|
24
|
+
} else if (!upl.fileTypes.split(" ").includes(file.type)) {
|
|
25
|
+
// check against accepted file types
|
|
26
|
+
return `.${file.type} is not an accepted file type.`;
|
|
27
|
+
} else {
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function addFile(upl, newFile) {
|
|
33
|
+
const newFileEl = document.createElement("wm-file");
|
|
34
|
+
const convertedSize = convertBytes(newFile.size);
|
|
35
|
+
newFileEl.id = newFile.id;
|
|
36
|
+
newFileEl.name = newFile.name;
|
|
37
|
+
newFileEl.type = newFile.type;
|
|
38
|
+
newFileEl.lastUpdated = newFile.lastUpdated;
|
|
39
|
+
newFileEl.size = `${convertedSize.size} ${convertedSize.unit}`;
|
|
40
|
+
newFileEl.progress = newFile.progress;
|
|
41
|
+
|
|
42
|
+
upl.append(newFileEl);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function addError(upl, newFile, errorMessage) {
|
|
46
|
+
const newFileEl = document.createElement("wm-file");
|
|
47
|
+
newFileEl.id = newFile.id;
|
|
48
|
+
newFileEl.name = newFile.name;
|
|
49
|
+
newFileEl.type = newFile.type;
|
|
50
|
+
newFileEl.errorMessage = errorMessage;
|
|
51
|
+
upl.prepend(newFileEl);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function removeFile(ev) {
|
|
55
|
+
const upl = ev.target.parentElement;
|
|
56
|
+
const fileId = ev.target.id;
|
|
57
|
+
upl.querySelector(`#${fileId}`).remove();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function handleFilesSelected(ev) {
|
|
61
|
+
const upl = ev.target;
|
|
62
|
+
const selectedFiles = ev.detail;
|
|
63
|
+
let currentFiles = upl.querySelectorAll("wm-file:not([error-message])");
|
|
64
|
+
|
|
65
|
+
if (upl.maxFiles && currentFiles.length + selectedFiles.length > upl.maxFiles) {
|
|
66
|
+
// validate for number of files exceeding file limit
|
|
67
|
+
upl.errorMessage = "Upload unsuccessful because file selection would exceed the maximum number of files";
|
|
68
|
+
} else {
|
|
69
|
+
upl.errorMessage = "";
|
|
70
|
+
|
|
71
|
+
selectedFiles.map((file, idx) => {
|
|
72
|
+
const filenameParts = file.name.split(".");
|
|
73
|
+
const fileType = filenameParts.pop();
|
|
74
|
+
const name = filenameParts.join(".");
|
|
75
|
+
const currentDate = `${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`;
|
|
76
|
+
const fileId = `file${Math.floor(Math.random() * 9999)}`; // mock random file id
|
|
77
|
+
const uploadStagger = idx * 2000; // stagger for more realistic mocked upload "speed"
|
|
78
|
+
const newFile = {
|
|
79
|
+
id: fileId,
|
|
80
|
+
name: name,
|
|
81
|
+
type: fileType,
|
|
82
|
+
lastUpdated: currentDate,
|
|
83
|
+
size: file.size,
|
|
84
|
+
progress: 0,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const fileError = validateFile(upl, newFile);
|
|
88
|
+
if (!fileError) {
|
|
89
|
+
addFile(upl, newFile);
|
|
90
|
+
|
|
91
|
+
// mock series of upload progress updates
|
|
92
|
+
setTimeout(() => updateUploadProgress(upl, fileId, 25), 1000);
|
|
93
|
+
setTimeout(() => updateUploadProgress(upl, fileId, 50), 3000 + uploadStagger);
|
|
94
|
+
setTimeout(() => updateUploadProgress(upl, fileId, 75), 3250 + uploadStagger);
|
|
95
|
+
setTimeout(() => updateUploadProgress(upl, fileId, 100), 3500 + uploadStagger);
|
|
96
|
+
} else {
|
|
97
|
+
addError(upl, newFile, fileError);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function updateUploadProgress(upl, fileId, mockProgress) {
|
|
104
|
+
const fileEl = upl.querySelector(`#${fileId}`);
|
|
105
|
+
fileEl.progress = mockProgress;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function handleErrorCleared(ev) {
|
|
109
|
+
const upl = ev.target.parentElement;
|
|
110
|
+
const errorId = ev.target.id;
|
|
111
|
+
upl.querySelector(`#${errorId}`).remove();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function handleSubmit() {
|
|
115
|
+
const requiredUploader = document.getElementById("uploader2");
|
|
116
|
+
const fileList = requiredUploader.querySelectorAll("wm-file:not([error-message])");
|
|
117
|
+
requiredUploader.errorMessage = fileList.length === 0 ? "Please upload at least one file" : "";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function convertBytes(bytes, unit) {
|
|
121
|
+
const unitOrder = ["bytes", "KB", "MB", "GB", "TB"];
|
|
122
|
+
let unitIndex = 0;
|
|
123
|
+
let result = typeof bytes === "number" ? bytes : parseInt(bytes);
|
|
124
|
+
|
|
125
|
+
if (unit) {
|
|
126
|
+
// convert until result matches desired unit
|
|
127
|
+
while (unitOrder.indexOf(unit) > unitIndex) {
|
|
128
|
+
result /= 1024;
|
|
129
|
+
unitIndex++;
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
// convert until result is appropriate unit (value is under 1000)
|
|
133
|
+
while (result > 1000) {
|
|
134
|
+
result /= 1024;
|
|
135
|
+
unitIndex++;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return { size: result, unit: unitOrder[unitIndex] };
|
|
139
|
+
}
|
|
@@ -541,6 +541,7 @@ export function transposeMatrix(originalMatrix) {
|
|
|
541
541
|
}
|
|
542
542
|
return newMatrix;
|
|
543
543
|
}
|
|
544
|
+
// wrap around includes 0, so it won't work for something like dates (wrapping around months)
|
|
544
545
|
export function wrapAround(currentIdx, step, endIdx) {
|
|
545
546
|
currentIdx += step;
|
|
546
547
|
if (currentIdx > endIdx) {
|
|
@@ -631,3 +632,189 @@ function countDecimals(num) {
|
|
|
631
632
|
return asString.split(".")[1].length;
|
|
632
633
|
}
|
|
633
634
|
}
|
|
635
|
+
export function getMonthLength(month, year) {
|
|
636
|
+
const months30 = [4, 6, 9, 11];
|
|
637
|
+
const leapYear = year % 4 === 0;
|
|
638
|
+
return month === 2 ? (leapYear ? 29 : 28) : months30.includes(month) ? 30 : 31;
|
|
639
|
+
}
|
|
640
|
+
export function dateToISO(date) {
|
|
641
|
+
return `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, "0")}-${date
|
|
642
|
+
.getDate()
|
|
643
|
+
.toString()
|
|
644
|
+
.padStart(2, "0")}`;
|
|
645
|
+
}
|
|
646
|
+
function splitISO(isoDate) {
|
|
647
|
+
const [year, month, day] = isoDate.split("-");
|
|
648
|
+
return {
|
|
649
|
+
year: { asInt: parseInt(year), asString: year },
|
|
650
|
+
month: { asInt: parseInt(month), asString: month },
|
|
651
|
+
day: { asInt: parseInt(day), asString: day },
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
export function makeISO(y, m, d) {
|
|
655
|
+
return `${y}-${m.toString().padStart(2, "0")}-${d.toString().padStart(2, "0")}`;
|
|
656
|
+
}
|
|
657
|
+
export const dateFind = {
|
|
658
|
+
year: {
|
|
659
|
+
asString: (date) => splitISO(date).year.asString,
|
|
660
|
+
asInt: (date) => splitISO(date).year.asInt,
|
|
661
|
+
increase: (date, n) => {
|
|
662
|
+
const _date = splitISO(date);
|
|
663
|
+
const y = _date.year.asInt;
|
|
664
|
+
const m = _date.month.asInt;
|
|
665
|
+
const d = _date.day.asInt;
|
|
666
|
+
return makeISO(y + n, m, d);
|
|
667
|
+
},
|
|
668
|
+
decrease: (date, n) => {
|
|
669
|
+
const _date = splitISO(date);
|
|
670
|
+
const y = _date.year.asInt;
|
|
671
|
+
const m = _date.month.asInt;
|
|
672
|
+
const d = _date.day.asInt;
|
|
673
|
+
return makeISO(y - n, m, d);
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
month: {
|
|
677
|
+
asString: (date) => splitISO(date).month.asString,
|
|
678
|
+
asInt: (date) => splitISO(date).month.asInt,
|
|
679
|
+
increase: (date, n) => {
|
|
680
|
+
const _date = splitISO(date);
|
|
681
|
+
const yearsToAdd = Math.floor(n / 12);
|
|
682
|
+
const monthsToAdd = n % 12;
|
|
683
|
+
let y = _date.year.asInt;
|
|
684
|
+
let m = _date.month.asInt;
|
|
685
|
+
const d = _date.day.asInt;
|
|
686
|
+
y = m + monthsToAdd > 12 ? y + 1 : y;
|
|
687
|
+
y = y + yearsToAdd;
|
|
688
|
+
m = m + monthsToAdd;
|
|
689
|
+
// modulo requires zero-indexing
|
|
690
|
+
m = ((m - 1) % 12) + 1;
|
|
691
|
+
return makeISO(y, m, d);
|
|
692
|
+
},
|
|
693
|
+
decrease: (date, n) => {
|
|
694
|
+
const _date = splitISO(date);
|
|
695
|
+
const yearsToRemove = Math.floor(n / 12);
|
|
696
|
+
const monthsToRemove = n % 12;
|
|
697
|
+
let y = _date.year.asInt;
|
|
698
|
+
let m = _date.month.asInt;
|
|
699
|
+
const d = _date.day.asInt;
|
|
700
|
+
y = m - monthsToRemove < 1 ? y - 1 : y;
|
|
701
|
+
y = y - yearsToRemove;
|
|
702
|
+
// ensure no negative value by shifting up
|
|
703
|
+
m = m + 12;
|
|
704
|
+
m = m - monthsToRemove;
|
|
705
|
+
// modulo needs zero-indexing
|
|
706
|
+
m = ((m - 1) % 12) + 1;
|
|
707
|
+
return makeISO(y, m, d);
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
day: {
|
|
711
|
+
asString: (date) => splitISO(date).day.asString,
|
|
712
|
+
asInt: (date) => splitISO(date).day.asInt,
|
|
713
|
+
increase: (date, n) => {
|
|
714
|
+
if (n > 7)
|
|
715
|
+
throw new Error("this.dateFind.day.increase(): max 7 days");
|
|
716
|
+
const _date = splitISO(date);
|
|
717
|
+
let y = _date.year.asInt;
|
|
718
|
+
let m = _date.month.asInt;
|
|
719
|
+
let d = _date.day.asInt;
|
|
720
|
+
const maxDays = getMonthLength(m, y);
|
|
721
|
+
const goesToNextMonth = d + n > maxDays;
|
|
722
|
+
const goesToNextYear = goesToNextMonth && m === 12;
|
|
723
|
+
m = goesToNextMonth ? (goesToNextYear ? 1 : m + 1) : m;
|
|
724
|
+
y = goesToNextYear ? y + 1 : y;
|
|
725
|
+
d = ((d - 1 + n) % maxDays) + 1;
|
|
726
|
+
return makeISO(y, m, d);
|
|
727
|
+
},
|
|
728
|
+
decrease: (date, n) => {
|
|
729
|
+
if (n > 7)
|
|
730
|
+
throw new Error("this.dateFind.day.decrease(): max 7 days");
|
|
731
|
+
const _date = splitISO(date);
|
|
732
|
+
let y = _date.year.asInt;
|
|
733
|
+
let m = _date.month.asInt;
|
|
734
|
+
let d = _date.day.asInt;
|
|
735
|
+
const prevMonth = m === 1 ? 12 : m - 1;
|
|
736
|
+
const maxDays = getMonthLength(prevMonth, y);
|
|
737
|
+
const goesToPreviousMonth = d - n < 1;
|
|
738
|
+
const goesToPreviousYear = goesToPreviousMonth && m === 1;
|
|
739
|
+
// ensure no negative value by shifting up
|
|
740
|
+
d = d + maxDays;
|
|
741
|
+
d = d - n;
|
|
742
|
+
// modulo needs zero-indexing
|
|
743
|
+
d = ((d - 1) % maxDays) + 1;
|
|
744
|
+
m = goesToPreviousMonth ? (goesToPreviousYear ? 12 : m - 1) : m;
|
|
745
|
+
y = goesToPreviousYear ? y - 1 : y;
|
|
746
|
+
return makeISO(y, m, d);
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
};
|
|
750
|
+
export const calendar_months = [
|
|
751
|
+
intl.formatMessage({
|
|
752
|
+
id: "date.january",
|
|
753
|
+
defaultMessage: "January",
|
|
754
|
+
description: "Month of the year",
|
|
755
|
+
}),
|
|
756
|
+
intl.formatMessage({
|
|
757
|
+
id: "date.february",
|
|
758
|
+
defaultMessage: "February",
|
|
759
|
+
description: "Month of the year",
|
|
760
|
+
}),
|
|
761
|
+
intl.formatMessage({
|
|
762
|
+
id: "date.march",
|
|
763
|
+
defaultMessage: "March",
|
|
764
|
+
description: "Month of the year",
|
|
765
|
+
}),
|
|
766
|
+
intl.formatMessage({
|
|
767
|
+
id: "date.april",
|
|
768
|
+
defaultMessage: "April",
|
|
769
|
+
description: "Month of the year",
|
|
770
|
+
}),
|
|
771
|
+
intl.formatMessage({
|
|
772
|
+
id: "date.may",
|
|
773
|
+
defaultMessage: "May",
|
|
774
|
+
description: "Month of the year",
|
|
775
|
+
}),
|
|
776
|
+
intl.formatMessage({
|
|
777
|
+
id: "date.june",
|
|
778
|
+
defaultMessage: "June",
|
|
779
|
+
description: "Month of the year",
|
|
780
|
+
}),
|
|
781
|
+
intl.formatMessage({
|
|
782
|
+
id: "date.july",
|
|
783
|
+
defaultMessage: "July",
|
|
784
|
+
description: "Month of the year",
|
|
785
|
+
}),
|
|
786
|
+
intl.formatMessage({
|
|
787
|
+
id: "date.august",
|
|
788
|
+
defaultMessage: "August",
|
|
789
|
+
description: "Month of the year",
|
|
790
|
+
}),
|
|
791
|
+
intl.formatMessage({
|
|
792
|
+
id: "date.september",
|
|
793
|
+
defaultMessage: "September",
|
|
794
|
+
description: "Month of the year",
|
|
795
|
+
}),
|
|
796
|
+
intl.formatMessage({
|
|
797
|
+
id: "date.october",
|
|
798
|
+
defaultMessage: "October",
|
|
799
|
+
description: "Month of the year",
|
|
800
|
+
}),
|
|
801
|
+
intl.formatMessage({
|
|
802
|
+
id: "date.november",
|
|
803
|
+
defaultMessage: "November",
|
|
804
|
+
description: "Month of the year",
|
|
805
|
+
}),
|
|
806
|
+
intl.formatMessage({
|
|
807
|
+
id: "date.december",
|
|
808
|
+
defaultMessage: "December",
|
|
809
|
+
description: "Month of the year",
|
|
810
|
+
}),
|
|
811
|
+
];
|
|
812
|
+
export const weekdays = [
|
|
813
|
+
intl.formatMessage({ id: "date.sunday", defaultMessage: "Sunday" }),
|
|
814
|
+
intl.formatMessage({ id: "date.monday", defaultMessage: "Monday" }),
|
|
815
|
+
intl.formatMessage({ id: "date.tuesday", defaultMessage: "Tuesday" }),
|
|
816
|
+
intl.formatMessage({ id: "date.wednesday", defaultMessage: "Wednesday" }),
|
|
817
|
+
intl.formatMessage({ id: "date.thursday", defaultMessage: "Thursday" }),
|
|
818
|
+
intl.formatMessage({ id: "date.friday", defaultMessage: "Friday" }),
|
|
819
|
+
intl.formatMessage({ id: "date.saturday", defaultMessage: "Saturday" }),
|
|
820
|
+
];
|
|
@@ -45,8 +45,7 @@ const iconCodes = {
|
|
|
45
45
|
};
|
|
46
46
|
export const defaultMode = "planning";
|
|
47
47
|
export const getWmMode = (ref) => {
|
|
48
|
-
return ref.getAttribute("mode") ||
|
|
48
|
+
return (ref.getAttribute("mode") ||
|
|
49
|
+
document.documentElement.getAttribute("mode") ||
|
|
50
|
+
defaultMode);
|
|
49
51
|
};
|
|
50
|
-
// Used to be below, but that broke the ripple-react version. Replaced with string until a fix can be found
|
|
51
|
-
// export type TimeFormat24 = `${number | ""}${number}:${number}${number}`;
|
|
52
|
-
// export type TimeFormat12 = `${number | ""}${number}:${number}${number} ${"AM" | "PM" | "am" | "pm"}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import './index-0ed3ed7d.js';
|
|
2
2
|
|
|
3
|
-
const version = "5.
|
|
3
|
+
const version = "5.3.0-0";
|
|
4
4
|
|
|
5
5
|
// PRINT RIPPLE VERSION IN CONSOLE
|
|
6
6
|
// test envs return 0 for plugin.length
|
|
@@ -83,3 +83,8 @@ tooltipStyles.textContent = `
|
|
|
83
83
|
document.head.appendChild(tooltipStyles);
|
|
84
84
|
tooltipContainer.appendChild(tooltipEl);
|
|
85
85
|
document.querySelector("body").appendChild(tooltipContainer);
|
|
86
|
+
const globalFn = () => { };
|
|
87
|
+
|
|
88
|
+
const globalScripts = globalFn;
|
|
89
|
+
|
|
90
|
+
export { globalScripts as g };
|