@watermarkinsights/ripple 5.2.0 → 5.2.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/global-cb4fb91c.js → cjs/app-globals-595657ce.js} +10 -1
- package/dist/cjs/{chartFunctions-2195a9d2.js → chartFunctions-e86ed63c.js} +3 -3
- package/dist/cjs/{functions-48a748f0.js → functions-698530be.js} +103 -6
- package/dist/cjs/index-4853a7b4.js +1800 -0
- package/dist/cjs/{intl-29d2cc42.js → intl-6751b1c3.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
- package/dist/cjs/priv-datepicker.cjs.entry.js +9 -8
- 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 +8 -6
- package/dist/cjs/wm-button.cjs.entry.js +5 -4
- 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-datepicker.cjs.entry.js +5 -4
- 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 -4
- package/dist/cjs/wm-modal-header.cjs.entry.js +6 -6
- package/dist/cjs/wm-modal.cjs.entry.js +9 -11
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
- package/dist/cjs/wm-navigator.cjs.entry.js +4 -3
- 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 +2 -2
- 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-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +5 -5
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +13 -9
- 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 -2
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -2
- package/dist/collection/components/wm-modal/wm-modal.js +8 -28
- 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/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/{cjs/global-d5e26274.js → esm/app-globals-275ee9d8.js} +7 -2
- package/dist/esm/{chartFunctions-d2d8f1b2.js → chartFunctions-8098e455.js} +3 -3
- package/dist/esm/{functions-58918a32.js → functions-f317d2d6.js} +103 -6
- package/dist/esm/index-7923308f.js +1770 -0
- package/dist/esm/{intl-f9d79dff.js → intl-00a637cf.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-chart-popover.entry.js +6 -5
- package/dist/esm/priv-datepicker.entry.js +9 -8
- 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 +8 -6
- package/dist/esm/wm-button.entry.js +5 -4
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +7 -6
- package/dist/esm/wm-datepicker.entry.js +5 -4
- 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 -4
- package/dist/esm/wm-modal-header.entry.js +6 -6
- package/dist/esm/wm-modal.entry.js +9 -11
- package/dist/esm/wm-navigation_3.entry.js +13 -10
- package/dist/esm/wm-navigator.entry.js +4 -3
- 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-275ee9d8.js +1 -0
- package/dist/esm-es5/{chartFunctions-d2d8f1b2.js → chartFunctions-8098e455.js} +1 -1
- package/dist/esm-es5/functions-f317d2d6.js +1 -0
- package/dist/esm-es5/index-7923308f.js +1 -0
- package/dist/esm-es5/{intl-f9d79dff.js → intl-00a637cf.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.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-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-4fc6019b.system.entry.js → p-00f8637e.system.entry.js} +1 -1
- package/dist/ripple/{p-0ba8d3b6.system.entry.js → p-06c018cf.system.entry.js} +1 -1
- package/dist/ripple/p-0707b4c2.entry.js +1 -0
- package/dist/ripple/p-09bfc1b8.system.entry.js +1 -0
- package/dist/ripple/{p-3e9fcb47.entry.js → p-0bb464b1.entry.js} +1 -1
- package/dist/ripple/{p-add75652.system.entry.js → p-0d0e0a1e.system.entry.js} +1 -1
- package/dist/ripple/p-0ec1e075.entry.js +1 -0
- package/dist/ripple/{p-65420b71.entry.js → p-18c1593b.entry.js} +1 -1
- package/dist/ripple/p-19f29a48.entry.js +1 -0
- package/dist/ripple/p-1bf85dc1.entry.js +1 -0
- package/dist/ripple/p-1ee68e06.system.entry.js +1 -0
- package/dist/ripple/p-1fcc8007.system.entry.js +1 -0
- package/dist/ripple/p-28119849.system.entry.js +1 -0
- package/dist/ripple/p-2849847d.system.entry.js +1 -0
- package/dist/ripple/p-2ec13501.entry.js +1 -0
- package/dist/ripple/{p-25446670.entry.js → p-2f39732e.entry.js} +1 -1
- package/dist/ripple/p-3132d4d3.entry.js +1 -0
- package/dist/ripple/p-340f96b5.entry.js +1 -0
- package/dist/ripple/{p-406f1e79.system.entry.js → p-3639dbbc.system.entry.js} +1 -1
- package/dist/ripple/p-3e605541.entry.js +1 -0
- package/dist/ripple/p-439d839b.system.entry.js +1 -0
- package/dist/ripple/p-445d6915.entry.js +1 -0
- package/dist/ripple/p-48ed56a0.entry.js +1 -0
- package/dist/ripple/p-4978ff1b.system.entry.js +1 -0
- package/dist/ripple/{p-abe3242c.entry.js → p-49f94f8a.entry.js} +1 -1
- package/dist/ripple/p-4c3f4047.system.js +1 -0
- package/dist/ripple/p-4d511ecc.system.entry.js +1 -0
- package/dist/ripple/p-510fab1c.system.entry.js +1 -0
- package/dist/ripple/p-53801a61.system.js +1 -0
- package/dist/ripple/p-539b7be9.system.js +2 -0
- package/dist/ripple/p-56475435.entry.js +1 -0
- package/dist/ripple/{p-a03df46c.entry.js → p-636ca7f2.entry.js} +1 -1
- package/dist/ripple/{p-fa3d10db.js → p-644092fd.js} +1 -1
- package/dist/ripple/{p-29509665.system.entry.js → p-66a57d81.system.entry.js} +1 -1
- package/dist/ripple/{p-eda4d59c.js → p-681c1853.js} +1 -1
- package/dist/ripple/p-6b71806b.entry.js +1 -0
- package/dist/ripple/p-7afa2fdc.system.entry.js +1 -0
- package/dist/ripple/{p-6a9f7651.entry.js → p-7cb98aa5.entry.js} +1 -1
- package/dist/ripple/p-7dbc4abc.system.entry.js +1 -0
- package/dist/ripple/{p-02b625f6.system.entry.js → p-8151c39b.system.entry.js} +1 -1
- package/dist/ripple/{p-aecd5a1a.system.js → p-94a54d68.system.js} +1 -1
- package/dist/ripple/p-950edf62.entry.js +1 -0
- package/dist/ripple/p-9bda128e.system.entry.js +1 -0
- package/dist/ripple/p-9ca027b7.entry.js +1 -0
- package/dist/ripple/{p-3a070f35.entry.js → p-9d4ea9f8.entry.js} +1 -1
- package/dist/ripple/{p-7e56da2e.system.entry.js → p-9d8817a7.system.entry.js} +1 -1
- package/dist/ripple/p-a431d6e5.js +2 -0
- package/dist/ripple/p-a6119885.system.entry.js +1 -0
- package/dist/ripple/p-a77f2168.entry.js +1 -0
- package/dist/ripple/p-adfaeeea.entry.js +1 -0
- package/dist/ripple/{p-c9943d2e.system.entry.js → p-b02c0c41.system.entry.js} +1 -1
- package/dist/ripple/p-b2596afc.entry.js +1 -0
- package/dist/ripple/p-bb100d77.system.js +1 -0
- package/dist/ripple/p-bbb8c02f.system.entry.js +1 -0
- package/dist/ripple/p-bd7e892d.entry.js +1 -0
- package/dist/ripple/p-c9552e88.system.entry.js +1 -0
- package/dist/ripple/p-d344e490.entry.js +1 -0
- package/dist/ripple/p-d87e105b.system.entry.js +1 -0
- package/dist/ripple/p-dd40858d.system.entry.js +1 -0
- package/dist/ripple/{p-011a4acc.system.entry.js → p-e0ff556b.system.entry.js} +1 -1
- package/dist/ripple/p-e19e1ece.system.entry.js +1 -0
- package/dist/ripple/p-e28cadd0.system.entry.js +1 -0
- package/dist/ripple/{p-f9689d7a.entry.js → p-e3d8f2f6.entry.js} +1 -1
- package/dist/ripple/p-e8eef357.entry.js +1 -0
- package/dist/ripple/p-eb596891.entry.js +1 -0
- package/dist/ripple/p-ec384895.system.entry.js +1 -0
- package/dist/ripple/p-eccb5aaf.entry.js +1 -0
- package/dist/ripple/{p-0d15e3f0.system.js → p-ed372e19.system.js} +1 -1
- package/dist/ripple/{p-a99b05de.system.entry.js → p-edcb8f48.system.entry.js} +1 -1
- package/dist/ripple/p-ef8f7363.js +1 -0
- package/dist/ripple/p-f4bc9c19.entry.js +1 -0
- package/dist/ripple/p-fc710a30.js +1 -0
- package/dist/ripple/p-ff7dac66.system.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -0
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +1 -1
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +0 -1
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +0 -1
- package/dist/types/components/wm-modal/wm-modal.d.ts +0 -1
- package/dist/types/components.d.ts +2 -4
- 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/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.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-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/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
|
@@ -1,362 +1,9 @@
|
|
|
1
|
-
/* GLOBAL */
|
|
2
|
-
function openModal(id) {
|
|
3
|
-
const modal = document.getElementById(id);
|
|
4
|
-
modal.open = true;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function closeModal(ev) {
|
|
8
|
-
const modal = ev.target;
|
|
9
|
-
modal.open = false;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const modals = document.querySelectorAll("wm-modal");
|
|
13
|
-
modals.forEach((modal) => {
|
|
14
|
-
modal.addEventListener("wmModalCloseTriggered", (ev) => closeModal(ev));
|
|
15
|
-
modal.addEventListener("wmModalPrimaryTriggered", (ev) => closeModal(ev));
|
|
16
|
-
modal.addEventListener("wmModalSecondaryTriggered", (ev) => closeModal(ev));
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
/* CHART (SMALL VALUES) */
|
|
20
|
-
function chartAction() {
|
|
21
|
-
function getRandomColor() {
|
|
22
|
-
return `hsl(${Math.round(Math.random() * 360)}, ${Math.round(Math.random() * 50) + 50}%, ${
|
|
23
|
-
Math.round(Math.random() * 30) + 50
|
|
24
|
-
}%)`;
|
|
25
|
-
}
|
|
26
|
-
document.querySelector("body").style.backgroundColor = getRandomColor();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let counter = 1;
|
|
30
|
-
function makeChart(amounts) {
|
|
31
|
-
const target = document.querySelector("#autochart");
|
|
32
|
-
if (target) {
|
|
33
|
-
const chart = document.createElement("wm-chart");
|
|
34
|
-
chart.id = `generated-4${counter}`;
|
|
35
|
-
counter++;
|
|
36
|
-
chart.setAttribute("chart-type", "doughnut3");
|
|
37
|
-
chart.setAttribute("label", "auto chart");
|
|
38
|
-
const bigindex = Math.floor(Math.random() * 7);
|
|
39
|
-
const total = amounts.reduce((total, newval) => (total += newval), 0);
|
|
40
|
-
for (var i = 0; i < 7; i++) {
|
|
41
|
-
const chartSlice = document.createElement("wm-chart-slice");
|
|
42
|
-
chartSlice.setAttribute("amount", amounts[i]);
|
|
43
|
-
chartSlice.setAttribute("legend", `slice ${i + 1}`);
|
|
44
|
-
chartSlice.setAttribute("popover-title", `${amounts[i]} / ${total}`);
|
|
45
|
-
chartSlice.setAttribute("popover-text", (i % 2 ? "" : "Not ") + ["Boiled", "Washed", "Rinsed", "Roasted"][i % 4]);
|
|
46
|
-
chart.appendChild(chartSlice);
|
|
47
|
-
}
|
|
48
|
-
target.appendChild(chart);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function spawnCharts() {
|
|
53
|
-
makeChart([1, 1, 1, 1, 1, 1, 94]);
|
|
54
|
-
makeChart([1, 2, 1, 2, 1, 2, 91]);
|
|
55
|
-
makeChart([2, 3, 2, 3, 2, 3, 85]);
|
|
56
|
-
makeChart([3, 4, 3, 79, 4, 3, 4]);
|
|
57
|
-
makeChart([3, 4, 5, 76, 3, 4, 5]);
|
|
58
|
-
makeChart([4, 4, 4, 4, 76, 4, 4]);
|
|
59
|
-
makeChart([70, 4, 5, 6, 4, 5, 6]);
|
|
60
|
-
for (var i = 0; i < 5; i++) {
|
|
61
|
-
const amounts = [];
|
|
62
|
-
for (var j = 0; j < 7; j++) {
|
|
63
|
-
if (Math.random() > 0.9) {
|
|
64
|
-
// 10% chance of a big number
|
|
65
|
-
amounts.push(Math.floor(Math.random() * 5000));
|
|
66
|
-
} else {
|
|
67
|
-
amounts.push(Math.floor(Math.random() * 100));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
makeChart(amounts);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
window.addEventListener("load", spawnCharts);
|
|
74
|
-
|
|
75
|
-
/* DATEPICKER */
|
|
76
|
-
function customizedError() {
|
|
77
|
-
let dp = document.getElementById("firstDP");
|
|
78
|
-
if (dp) {
|
|
79
|
-
if (dp.value.includes("2013")) {
|
|
80
|
-
dp.errorMessage = "Year cannot be 2013!";
|
|
81
|
-
} else {
|
|
82
|
-
dp.errorMessage = "";
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
window.addEventListener("load", () => {
|
|
87
|
-
customizedError();
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
document.querySelectorAll("wm-datepicker").forEach((datepicker) => {
|
|
91
|
-
// this is flexible to test for many types of date formats, but this is typically uniform across datepicker instances
|
|
92
|
-
const dateFormat = datepicker.getAttribute("date-format");
|
|
93
|
-
const dateFormatUnit =
|
|
94
|
-
dateFormat === "mm/dd/yyyy" || dateFormat === null ? "US" : dateFormat === "dd/mm/yyyy" ? "INT" : "ISO";
|
|
95
|
-
|
|
96
|
-
datepicker.addEventListener("wmDatepickerInputBlurred", async (ev) => {
|
|
97
|
-
if (datepicker.value) {
|
|
98
|
-
const isoDate = await datepicker.reformatDate(dateFormatUnit, "ISO", datepicker.value);
|
|
99
|
-
|
|
100
|
-
if (await datepicker.isValidIso(isoDate)) {
|
|
101
|
-
// if valid date, clean up formatting and set properties
|
|
102
|
-
const displayDate = await datepicker.reformatDate("ISO", dateFormatUnit, isoDate);
|
|
103
|
-
|
|
104
|
-
datepicker.value = displayDate;
|
|
105
|
-
datepicker.errorMessage = "";
|
|
106
|
-
} else {
|
|
107
|
-
// if invalid date, leave value and display error
|
|
108
|
-
datepicker.errorMessage = `Please enter a valid date in the format ${dateFormat ? dateFormat : "mm/dd/yyyy"}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
datepicker.addEventListener("wmDatepickerDateSelected", async (ev) => {
|
|
114
|
-
datepicker.errorMessage = "";
|
|
115
|
-
datepicker.value = await datepicker.reformatDate("ISO", dateFormatUnit, ev.detail.date);
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
datepicker.addEventListener("blur", (ev) => {
|
|
119
|
-
if (datepicker.requiredField && datepicker.value === "") {
|
|
120
|
-
datepicker.errorMessage = "A date is required";
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
/* FILE LIST */
|
|
126
|
-
const fileLists = document.querySelectorAll("wm-file-list");
|
|
127
|
-
fileLists &&
|
|
128
|
-
fileLists.forEach((fileList) => {
|
|
129
|
-
fileList.addEventListener("wmFileDownload", (ev) => {
|
|
130
|
-
alert("downloading", ev.target.id);
|
|
131
|
-
});
|
|
132
|
-
fileList.addEventListener("wmFilePreview", (ev) => {
|
|
133
|
-
alert("previewing", ev.target.id);
|
|
134
|
-
});
|
|
135
|
-
fileList.addEventListener("wmFileDelete", (ev) => {
|
|
136
|
-
alert("deleting", ev.target.id);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
/* INPUT */
|
|
141
|
-
function changeValue() {
|
|
142
|
-
const values = ["Gomez", "Morticia", "Wednesday", "Pugsley", "Uncle Fester", "Lurch", "Aristotle", "Thing"];
|
|
143
|
-
const randomValue = () => values[~~(Math.random() * values.length)];
|
|
144
|
-
document.querySelector("wm-input").setAttribute("value", randomValue());
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/* MODAL */
|
|
148
|
-
function showModal(id) {
|
|
149
|
-
const modal = document.getElementById(id);
|
|
150
|
-
modal.open = true;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function showDialog(id) {
|
|
154
|
-
const event = new Event("wmShowModal");
|
|
155
|
-
event.detail = "dialog";
|
|
156
|
-
window.dispatchEvent(event);
|
|
157
|
-
const dialog = document.getElementById(id);
|
|
158
|
-
dialog.open = true;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
const modal = document.getElementById("modal");
|
|
162
|
-
const innerModal = document.getElementById("inner-modal");
|
|
163
|
-
const innerDialog = document.getElementById("inner-dialog");
|
|
164
|
-
const nestedModal = document.getElementById("nested-modal");
|
|
165
|
-
|
|
166
|
-
const modalInput = document.getElementById("modal-input");
|
|
167
|
-
const count = document.getElementById("count");
|
|
168
|
-
const modalFooter = document.getElementById("modal-footer");
|
|
169
|
-
|
|
170
|
-
modalInput &&
|
|
171
|
-
modalInput.addEventListener("change", function () {
|
|
172
|
-
if (modalInput.value !== "") {
|
|
173
|
-
modalFooter.primaryActionDisabled = false;
|
|
174
|
-
} else {
|
|
175
|
-
modalFooter.primaryActionDisabled = true;
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
count &&
|
|
180
|
-
count.addEventListener("change", (ev) => {
|
|
181
|
-
modalFooter.setAttribute("info-text", ev.target.value + " things ready to launch");
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
const nestingModals = [modal, innerModal, innerDialog, nestedModal];
|
|
185
|
-
|
|
186
|
-
nestingModals.forEach((modal) => {
|
|
187
|
-
modal && modal.addEventListener("wmModalPrimaryTriggered", actionTriggered);
|
|
188
|
-
modal && modal.addEventListener("wmModalSecondaryTriggered", modalDismissed);
|
|
189
|
-
modal && modal.addEventListener("wmModalCloseTriggered", modalDismissed);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
function actionTriggered(element) {
|
|
193
|
-
modalInput.value = "";
|
|
194
|
-
console.log("Changes saved");
|
|
195
|
-
modalFooter.actionDisabled = true;
|
|
196
|
-
this.open = false;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function modalDismissed(element) {
|
|
200
|
-
this.open = false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
const dialog = document.getElementById("dialog");
|
|
204
|
-
|
|
205
|
-
dialog &&
|
|
206
|
-
dialog.addEventListener("wmModalCloseTriggered", function () {
|
|
207
|
-
dialog.open = false;
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
dialog &&
|
|
211
|
-
dialog.addEventListener("wmModalSecondaryTriggered", function () {
|
|
212
|
-
dialog.open = false;
|
|
213
|
-
alert("Secondary clicked!");
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
dialog &&
|
|
217
|
-
dialog.addEventListener("wmModalPrimaryTriggered", function () {
|
|
218
|
-
console.log("Deleted");
|
|
219
|
-
dialog.open = false;
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
/* NAVIGATION */
|
|
223
|
-
// page is reloaded on click, so we can't setup onclick funcs like we would in real situation.
|
|
224
|
-
// for testing purposes we just set a url param and read that on load
|
|
225
|
-
function setActiveOnLoad() {
|
|
226
|
-
Array.from(document.querySelectorAll("wm-navigation-item")).map((el, index) => {
|
|
227
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
228
|
-
const indexParam = urlParams.get("item");
|
|
229
|
-
if (indexParam) {
|
|
230
|
-
el.active = index == indexParam;
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
window.addEventListener("load", () => {
|
|
236
|
-
setActiveOnLoad();
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
/* NAVIGATOR */
|
|
240
|
-
window.addEventListener("load", () => {
|
|
241
|
-
function setProds() {
|
|
242
|
-
const navigator = document.getElementById("nav");
|
|
243
|
-
const userModules = [
|
|
244
|
-
{
|
|
245
|
-
id: "aqua",
|
|
246
|
-
linkUrl: "/aqua",
|
|
247
|
-
samlLinkUrl: "/saml/aqua",
|
|
248
|
-
iconUrl: "https://cdn.watermarkinsights.com/images/login/aqua.svg",
|
|
249
|
-
name: "Aqua",
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
id: "dm",
|
|
253
|
-
linkUrl: "",
|
|
254
|
-
samlLinkUrl: "",
|
|
255
|
-
iconUrl: "https://cdn.watermarkinsights.com/images/login/digitalmeasures.svg",
|
|
256
|
-
name: "DM",
|
|
257
|
-
},
|
|
258
|
-
];
|
|
259
|
-
|
|
260
|
-
if (navigator) {
|
|
261
|
-
navigator.ref = (function () {
|
|
262
|
-
navigator.products = userModules;
|
|
263
|
-
})();
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
setProds();
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
document.addEventListener(
|
|
271
|
-
"wmNavigatorLogout",
|
|
272
|
-
() => console.log("user logged out") // make sure to make the log persistent if you want to see this in the browser console.
|
|
273
|
-
);
|
|
274
|
-
|
|
275
|
-
/* PAGINATION */
|
|
276
|
-
var notifications = [];
|
|
277
|
-
window.addEventListener("wmPaginationPageClicked", function (ev) {
|
|
278
|
-
const pagin = document.getElementById(ev.target.id);
|
|
279
|
-
pagin.currentPage = ev.target.value;
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
/* SEARCH */
|
|
283
|
-
const search = document.getElementById("search-example");
|
|
284
|
-
if (search) search.oninput = (e) => sInputCallback(e);
|
|
285
|
-
let results = [];
|
|
286
|
-
|
|
287
|
-
const searchAndFind = document.getElementById("search-find-example");
|
|
288
|
-
if (searchAndFind) searchAndFind.oninput = (e) => sfInputCallback(e, ".foodlist");
|
|
289
|
-
|
|
290
|
-
const searchAndFindDatabase = document.getElementById("search-find-database-example");
|
|
291
|
-
if (searchAndFindDatabase)
|
|
292
|
-
searchAndFindDatabase.oninput = (e) => {
|
|
293
|
-
window.setTimeout(() => sfInputCallback(e, ".namelist"), 1000);
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
function sfInputCallback(e, list) {
|
|
297
|
-
results = searchList(list, e.target.value);
|
|
298
|
-
e.target.numResults = results.length;
|
|
299
|
-
if (results.length) {
|
|
300
|
-
e.target.highlightedId = results[0].toLowerCase();
|
|
301
|
-
e.target.highlightedName = results[0];
|
|
302
|
-
} else {
|
|
303
|
-
e.target.highlightedId = "";
|
|
304
|
-
e.target.highlightedName = "";
|
|
305
|
-
}
|
|
306
|
-
highlight(e.target.highlightedId);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
searchAndFind &&
|
|
310
|
-
searchAndFind.addEventListener("wmSearchBrowseResults", (ev) => {
|
|
311
|
-
const results = searchList(".foodlist", ev.target.value);
|
|
312
|
-
const index = ev.detail.position - 1;
|
|
313
|
-
searchAndFind.highlightedId = results[index].toLowerCase();
|
|
314
|
-
searchAndFind.highlightedName = results[index];
|
|
315
|
-
highlight(searchAndFind.highlightedId);
|
|
316
|
-
});
|
|
317
|
-
|
|
318
|
-
searchAndFindDatabase &&
|
|
319
|
-
searchAndFindDatabase.addEventListener("wmSearchBrowseResults", (ev) => {
|
|
320
|
-
const results = searchList(".namelist", ev.target.value);
|
|
321
|
-
const index = ev.detail.position - 1;
|
|
322
|
-
ev.target.highlightedId = results[index].toLowerCase();
|
|
323
|
-
ev.target.highlightedName = results[index];
|
|
324
|
-
highlight(ev.target.highlightedId);
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
function sInputCallback(e) {
|
|
328
|
-
results = searchList(".foodlist", e.target.value);
|
|
329
|
-
search.numResults = results.length;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
function searchList(querySelector, searchString) {
|
|
333
|
-
const results = [];
|
|
334
|
-
let foods = [];
|
|
335
|
-
if (searchString) {
|
|
336
|
-
Array.from(document.querySelector(querySelector).children).map((item) => foods.push(item.textContent));
|
|
337
|
-
for (let i = 0; i < foods.length; i++) {
|
|
338
|
-
const food = foods[i].toLowerCase();
|
|
339
|
-
if (food.indexOf(searchString.toLowerCase()) === 0) {
|
|
340
|
-
results.push(foods[i]);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return results;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
function highlight(id) {
|
|
348
|
-
document.querySelectorAll("li").forEach((i) => i.classList.remove("highlighted"));
|
|
349
|
-
if (id) {
|
|
350
|
-
document.querySelector("#" + id).classList.add("highlighted");
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
1
|
function openModal() {
|
|
355
|
-
document.querySelector("wm-modal").
|
|
2
|
+
document.querySelector("wm-modal").open = "true";
|
|
356
3
|
}
|
|
357
4
|
|
|
358
5
|
function closeModal() {
|
|
359
|
-
document.querySelector("wm-modal").
|
|
6
|
+
document.querySelector("wm-modal").open = "false";
|
|
360
7
|
}
|
|
361
8
|
|
|
362
9
|
evNames = ["wmModalCloseTriggered", "wmModalPrimaryTriggered", "wmModalSecondaryTriggered"];
|
|
@@ -366,404 +13,40 @@ evNames.forEach((evName) =>
|
|
|
366
13
|
})
|
|
367
14
|
);
|
|
368
15
|
|
|
369
|
-
document.
|
|
370
|
-
|
|
371
|
-
});
|
|
16
|
+
const snackbar = document.getElementById("info");
|
|
17
|
+
let notifications = snackbar && JSON.parse(snackbar.notifications || "[]");
|
|
372
18
|
|
|
373
|
-
/* SELECT */
|
|
374
19
|
function actionToRun() {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
} else {
|
|
396
|
-
select.invalid = false;
|
|
397
|
-
select.errorMessage = null;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
function testSelectedOption(selectComp) {
|
|
402
|
-
setTimeout(() => {
|
|
403
|
-
// making sure the selected and aria-selected attributes are always in sync
|
|
404
|
-
const options = selectComp.querySelectorAll("wm-option");
|
|
405
|
-
let selectedOption = Array.from(options).filter((option) => !!option.selected)[0];
|
|
406
|
-
const ariaSelectedOption = Array.from(options).filter((option) => !!option.getAttribute("aria-selected"))[0];
|
|
407
|
-
if (selectedOption != ariaSelectedOption) {
|
|
408
|
-
console.log(selectComp.id, selectedOption, ariaSelectedOption);
|
|
409
|
-
}
|
|
410
|
-
}, 150);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
window.addEventListener("load", () => {
|
|
414
|
-
const selects = document.querySelectorAll("wm-select");
|
|
415
|
-
// const selectedOptions = selects.forEach(testSelectedOption);
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
const selects = document.querySelectorAll("wm-select");
|
|
419
|
-
selects.forEach((select) => {
|
|
420
|
-
select.addEventListener("wmOptionSelected", (ev) => handleOptionSelected(ev));
|
|
421
|
-
select.addEventListener("wmOptionDeselected", (ev) => handleOptionDeselected(ev));
|
|
422
|
-
select.addEventListener("wmSelectAllSelected", (ev) => handleAllSelected(ev));
|
|
423
|
-
select.addEventListener("wmSelectAllDeselected", (ev) => handleAllDeselected(ev));
|
|
424
|
-
});
|
|
425
|
-
|
|
426
|
-
function handleOptionSelected(ev) {
|
|
427
|
-
const parentSelect = ev.target.parentElement;
|
|
428
|
-
|
|
429
|
-
if (!parentSelect.multiple) {
|
|
430
|
-
// in single select, deselect all other options
|
|
431
|
-
parentSelect.querySelectorAll("wm-option").forEach((option) => (option.selected = false));
|
|
432
|
-
}
|
|
433
|
-
ev.target.selected = true;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
function handleOptionDeselected(ev) {
|
|
437
|
-
ev.target.selected = false;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
function handleAllSelected(ev) {
|
|
441
|
-
ev.target.querySelectorAll("wm-option").forEach((option) => (option.selected = true));
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
function handleAllDeselected(ev) {
|
|
445
|
-
ev.target.querySelectorAll("wm-option").forEach((option) => (option.selected = false));
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/* SNACKBAR */
|
|
449
|
-
function generateSnackbar(isDefault = false) {
|
|
450
|
-
const id = Math.floor(Math.random() * 100) + 1;
|
|
451
|
-
const message = isDefault ? `Here's a snackbar ${id}` : document.getElementById("custom-notif").value;
|
|
452
|
-
const link = isDefault ? "View this person in the table" : document.getElementById("custom-link").value;
|
|
453
|
-
const newWindow = isDefault ? true : link && document.getElementById("new-window").checked;
|
|
454
|
-
|
|
455
|
-
let newNotification = {
|
|
456
|
-
id: id,
|
|
457
|
-
message: message,
|
|
458
|
-
link: link,
|
|
459
|
-
newWindow: newWindow,
|
|
20
|
+
const randomId = `snack-${Math.floor(Math.random() * 100) + 1}`;
|
|
21
|
+
const messages = [
|
|
22
|
+
"Way to go!",
|
|
23
|
+
"You go girl!",
|
|
24
|
+
"That's awesome!",
|
|
25
|
+
"That was SO cool!",
|
|
26
|
+
"You're killing it!",
|
|
27
|
+
"No. Effing. Way.",
|
|
28
|
+
"Just: WOW.",
|
|
29
|
+
"Color me impressed.",
|
|
30
|
+
"How did you do that?",
|
|
31
|
+
"You can do this!!",
|
|
32
|
+
"I always believed in you",
|
|
33
|
+
];
|
|
34
|
+
const randomMessage = messages[Math.floor(Math.random() * messages.length)];
|
|
35
|
+
|
|
36
|
+
const newNotification = {
|
|
37
|
+
id: randomId,
|
|
38
|
+
message: randomMessage,
|
|
39
|
+
link: "",
|
|
460
40
|
};
|
|
461
41
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
let updatedNotifications = [newNotification, ...notifications];
|
|
465
|
-
snackbar.notifications = JSON.stringify(updatedNotifications);
|
|
42
|
+
notifications.push(newNotification);
|
|
43
|
+
snackbar.notifications = JSON.stringify(notifications);
|
|
466
44
|
}
|
|
467
45
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
return snack.id !== +ev.detail.id;
|
|
473
|
-
});
|
|
474
|
-
snackbar.notifications = JSON.stringify(newSnacks);
|
|
475
|
-
});
|
|
476
|
-
|
|
477
|
-
document.addEventListener("wmSnackbarActionTriggered", function (ev) {
|
|
478
|
-
const snackbar = document.getElementById("snackbar");
|
|
479
|
-
let newSnacks = JSON.parse(snackbar.notifications).filter(function (snack) {
|
|
480
|
-
return snack.id !== +ev.detail.id;
|
|
481
|
-
});
|
|
482
|
-
snackbar.notifications = JSON.stringify(newSnacks);
|
|
483
|
-
console.log("You clicked the action.");
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
/* TABS */
|
|
487
|
-
const tab1 = document.getElementById("tab-1");
|
|
488
|
-
if (tab1) {
|
|
489
|
-
tab1.addEventListener("wmTabSelected", function (ev) {
|
|
490
|
-
let activeTab = ev.detail.tabId;
|
|
491
|
-
let tabContainer = document.getElementById("tab-1-wrapper");
|
|
492
|
-
let panel = tabContainer.querySelector("#tab-panel");
|
|
493
|
-
let tabList = document.getElementById("tab-1");
|
|
494
|
-
|
|
495
|
-
tabList.selectedTab = activeTab;
|
|
496
|
-
});
|
|
497
|
-
|
|
498
|
-
const cloudTabs = document.getElementById("cloud-tabs");
|
|
499
|
-
cloudTabs &&
|
|
500
|
-
cloudTabs.addEventListener("wmTabSelected", (ev) => {
|
|
501
|
-
const tabId = ev.detail.tabId;
|
|
502
|
-
const cloudTabs = document.getElementById("cloud-tabs");
|
|
503
|
-
cloudTabs.selectedTab = tabId;
|
|
504
|
-
let panel = document.querySelector(`wm-tab-panel[tab-id=${tabId}]`);
|
|
505
|
-
console.log(panel);
|
|
506
|
-
|
|
507
|
-
if (panel) {
|
|
508
|
-
let text;
|
|
509
|
-
|
|
510
|
-
switch (tabId) {
|
|
511
|
-
case "cumulonimbus":
|
|
512
|
-
text =
|
|
513
|
-
'Cumulonimbus (from Latin cumulus, "heaped" and nimbus, "rainstorm") is a dense, towering vertical cloud.';
|
|
514
|
-
break;
|
|
515
|
-
case "cirrostratus":
|
|
516
|
-
text =
|
|
517
|
-
"Cirrostratus /ˌsɪroʊˈstrɑːtəs/ is a high-level, very thin, generally uniform stratiform genus-type of cloud.";
|
|
518
|
-
break;
|
|
519
|
-
case "altostratus":
|
|
520
|
-
text =
|
|
521
|
-
"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.";
|
|
522
|
-
break;
|
|
523
|
-
default:
|
|
524
|
-
text = "";
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
panel.innerHTML = text;
|
|
528
|
-
}
|
|
529
|
-
});
|
|
46
|
+
function dismissSnack(ev) {
|
|
47
|
+
const snackbar = document.getElementById(ev.target.id);
|
|
48
|
+
notifications = notifications.filter((snack) => snack.id !== ev.detail.id);
|
|
49
|
+
snackbar.notifications = JSON.stringify(notifications);
|
|
530
50
|
}
|
|
531
51
|
|
|
532
|
-
|
|
533
|
-
const allTagInputs = document.querySelectorAll("wm-tag-input");
|
|
534
|
-
|
|
535
|
-
allTagInputs.forEach((ti) => {
|
|
536
|
-
const initialTags = Array.from(ti.querySelectorAll("wm-tag-option")).map((o) => o.textContent);
|
|
537
|
-
|
|
538
|
-
ti.addEventListener("wmTagInputTagAdded", (ev) => {
|
|
539
|
-
const ciTagName = ev.detail.toLowerCase().trim();
|
|
540
|
-
const ciExistingTagNames = Array.from(ti.querySelectorAll("wm-tag-option")).map((o) =>
|
|
541
|
-
o.textContent.toLowerCase().trim()
|
|
542
|
-
);
|
|
543
|
-
if (ti.tagInputType === "dropdown" && !ciExistingTagNames.includes(ciTagName)) {
|
|
544
|
-
const to = document.createElement("wm-tag-option");
|
|
545
|
-
to.textContent = ev.detail;
|
|
546
|
-
to.id = "tag" + Math.random().toString(36).substr(2, 6);
|
|
547
|
-
to.selected = true;
|
|
548
|
-
ti.appendChild(to);
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
ti.addEventListener("wmTagOptionSelected", (ev) => {
|
|
553
|
-
ev.target.selected = true;
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
ti.addEventListener("wmTagOptionDeselected", (ev) => {
|
|
557
|
-
const isUserTag = !initialTags.includes(ev.target.textContent);
|
|
558
|
-
if (isUserTag) {
|
|
559
|
-
ev.target.remove();
|
|
560
|
-
} else {
|
|
561
|
-
ev.target.selected = false;
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
});
|
|
565
|
-
|
|
566
|
-
/* TEXTAREA */
|
|
567
|
-
const textAreaEls = document.querySelectorAll("wm-textarea");
|
|
568
|
-
|
|
569
|
-
textAreaEls.forEach((textAreaEl) => {
|
|
570
|
-
textAreaEl.addEventListener("wmTextareaValueChanged", (ev) => {
|
|
571
|
-
console.log("wmTextareaValueChanged heard: ", ev.target.value);
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
textAreaEl.addEventListener("blur", (ev) => {
|
|
575
|
-
textAreaEl.characterLimit && handleCharacterLimit(textAreaEl);
|
|
576
|
-
textAreaEl.requiredField && handleRequiredTextArea(textAreaEl);
|
|
577
|
-
});
|
|
578
|
-
|
|
579
|
-
function handleCharacterLimit(textAreaEl) {
|
|
580
|
-
if (textAreaEl.value.length > textAreaEl.characterLimit) {
|
|
581
|
-
textAreaEl.errorMessage = "Character limit exceeded, please reduce entered text.";
|
|
582
|
-
} else if (textAreaEl.errorMessage == "Character limit exceeded, please reduce entered text.") {
|
|
583
|
-
textAreaEl.errorMessage = "";
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
function handleRequiredTextArea(textAreaEl) {
|
|
588
|
-
if (textAreaEl.value.length == 0) {
|
|
589
|
-
textAreaEl.errorMessage = "This field is required.";
|
|
590
|
-
} else if (textAreaEl.errorMessage == "This field is required.") {
|
|
591
|
-
textAreaEl.errorMessage = "";
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
/* TIMEPICKER */
|
|
597
|
-
const timepickers = document.querySelectorAll("wm-timepicker");
|
|
598
|
-
|
|
599
|
-
timepickers.forEach((timepicker) => {
|
|
600
|
-
timepicker.addEventListener("wmTimepickerInputBlurred", async (ev) => {
|
|
601
|
-
// reformat time and validate for invalid date
|
|
602
|
-
if (timepicker.value) {
|
|
603
|
-
if (await timepicker.isValidTime(ev.target.value)) {
|
|
604
|
-
const displayTime = await timepicker.reformatTime("12", timepicker.value);
|
|
605
|
-
|
|
606
|
-
timepicker.errorMessage = "";
|
|
607
|
-
timepicker.value = displayTime;
|
|
608
|
-
} else {
|
|
609
|
-
timepicker.errorMessage = "Please enter a valid time";
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
timepicker.addEventListener("blur", (ev) => {
|
|
615
|
-
// validate for required time
|
|
616
|
-
if (timepicker.requiredField && timepicker.value === "") {
|
|
617
|
-
timepicker.errorMessage = "A time is required";
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
|
|
621
|
-
timepicker.addEventListener("wmTimepickerTimeSelected", async (ev) => {
|
|
622
|
-
// handle user time selection
|
|
623
|
-
const selectedTime = ev.detail.time;
|
|
624
|
-
|
|
625
|
-
timepicker.errorMessage = "";
|
|
626
|
-
timepicker.value = await timepicker.reformatTime("12", selectedTime);
|
|
627
|
-
});
|
|
628
|
-
});
|
|
629
|
-
|
|
630
|
-
/* UPLOADER */
|
|
631
|
-
function addServerError() {
|
|
632
|
-
document.getElementById("uploader11").errorMessage = "An error has occurred!";
|
|
633
|
-
}
|
|
634
|
-
const uploaders = document.querySelectorAll("wm-uploader");
|
|
635
|
-
|
|
636
|
-
uploaders.forEach((upl) => {
|
|
637
|
-
upl.addEventListener("wmUploaderFilesSelected", (ev) => handleFilesSelected(ev));
|
|
638
|
-
upl.addEventListener("wmFileErrorCleared", (ev) => handleErrorCleared(ev));
|
|
639
|
-
upl.addEventListener("wmFileDownload", (ev) => alert("downloading " + ev.target.id));
|
|
640
|
-
upl.addEventListener("wmFilePreview", (ev) => alert("previewing " + ev.target.id));
|
|
641
|
-
upl.addEventListener("wmFileDelete", (ev) => removeFile(ev));
|
|
642
|
-
});
|
|
643
|
-
|
|
644
|
-
function validateFile(upl, file) {
|
|
645
|
-
const fileList = Array.from(upl.querySelectorAll("wm-file:not([error-message])"));
|
|
646
|
-
const sizeLimit = 100; // in MB
|
|
647
|
-
|
|
648
|
-
if (fileList.some((currentFile) => `${currentFile.name}.${currentFile.type}` === `${file.name}.${file.type}`)) {
|
|
649
|
-
// check for duplicate file name
|
|
650
|
-
return `A file named "${file.name}.${file.type}" has already been uploaded.`;
|
|
651
|
-
} else if (upl.maxSize && file.size / (1024 * 1024) > sizeLimit) {
|
|
652
|
-
// check against maxSize
|
|
653
|
-
return `The file is larger than maximum size ${upl.maxSize}.`;
|
|
654
|
-
} else if (!upl.fileTypes.split(" ").includes(file.type)) {
|
|
655
|
-
// check against accepted file types
|
|
656
|
-
return `.${file.type} is not an accepted file type.`;
|
|
657
|
-
} else {
|
|
658
|
-
return "";
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
function addFile(upl, newFile) {
|
|
663
|
-
const newFileEl = document.createElement("wm-file");
|
|
664
|
-
const convertedSize = convertBytes(newFile.size);
|
|
665
|
-
newFileEl.id = newFile.id;
|
|
666
|
-
newFileEl.name = newFile.name;
|
|
667
|
-
newFileEl.type = newFile.type;
|
|
668
|
-
newFileEl.lastUpdated = newFile.lastUpdated;
|
|
669
|
-
newFileEl.size = `${convertedSize.size} ${convertedSize.unit}`;
|
|
670
|
-
newFileEl.progress = newFile.progress;
|
|
671
|
-
|
|
672
|
-
upl.append(newFileEl);
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
function addError(upl, newFile, errorMessage) {
|
|
676
|
-
const newFileEl = document.createElement("wm-file");
|
|
677
|
-
newFileEl.id = newFile.id;
|
|
678
|
-
newFileEl.name = newFile.name;
|
|
679
|
-
newFileEl.type = newFile.type;
|
|
680
|
-
newFileEl.errorMessage = errorMessage;
|
|
681
|
-
upl.prepend(newFileEl);
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
function removeFile(ev) {
|
|
685
|
-
const upl = ev.target.parentElement;
|
|
686
|
-
const fileId = ev.target.id;
|
|
687
|
-
upl.querySelector(`#${fileId}`).remove();
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
function handleFilesSelected(ev) {
|
|
691
|
-
const upl = ev.target;
|
|
692
|
-
const selectedFiles = ev.detail;
|
|
693
|
-
let currentFiles = upl.querySelectorAll("wm-file:not([error-message])");
|
|
694
|
-
|
|
695
|
-
if (upl.maxFiles && currentFiles.length + selectedFiles.length > upl.maxFiles) {
|
|
696
|
-
// validate for number of files exceeding file limit
|
|
697
|
-
upl.errorMessage = "Upload unsuccessful because file selection would exceed the maximum number of files";
|
|
698
|
-
} else {
|
|
699
|
-
upl.errorMessage = "";
|
|
700
|
-
|
|
701
|
-
selectedFiles.map((file, idx) => {
|
|
702
|
-
const filenameParts = file.name.split(".");
|
|
703
|
-
const fileType = filenameParts.pop();
|
|
704
|
-
const name = filenameParts.join(".");
|
|
705
|
-
const currentDate = `${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`;
|
|
706
|
-
const fileId = `file${Math.floor(Math.random() * 9999)}`; // mock random file id
|
|
707
|
-
const uploadStagger = idx * 2000; // stagger for more realistic mocked upload "speed"
|
|
708
|
-
const newFile = {
|
|
709
|
-
id: fileId,
|
|
710
|
-
name: name,
|
|
711
|
-
type: fileType,
|
|
712
|
-
lastUpdated: currentDate,
|
|
713
|
-
size: file.size,
|
|
714
|
-
progress: 0,
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
const fileError = validateFile(upl, newFile);
|
|
718
|
-
if (!fileError) {
|
|
719
|
-
addFile(upl, newFile);
|
|
720
|
-
|
|
721
|
-
// mock series of upload progress updates
|
|
722
|
-
setTimeout(() => updateUploadProgress(upl, fileId, 25), 1000);
|
|
723
|
-
setTimeout(() => updateUploadProgress(upl, fileId, 50), 3000 + uploadStagger);
|
|
724
|
-
setTimeout(() => updateUploadProgress(upl, fileId, 75), 3250 + uploadStagger);
|
|
725
|
-
setTimeout(() => updateUploadProgress(upl, fileId, 100), 3500 + uploadStagger);
|
|
726
|
-
} else {
|
|
727
|
-
addError(upl, newFile, fileError);
|
|
728
|
-
}
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
function updateUploadProgress(upl, fileId, mockProgress) {
|
|
734
|
-
const fileEl = upl.querySelector(`#${fileId}`);
|
|
735
|
-
fileEl.progress = mockProgress;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
function handleErrorCleared(ev) {
|
|
739
|
-
const upl = ev.target.parentElement;
|
|
740
|
-
const errorId = ev.target.id;
|
|
741
|
-
upl.querySelector(`#${errorId}`).remove();
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
function handleSubmit() {
|
|
745
|
-
const requiredUploader = document.getElementById("uploader2");
|
|
746
|
-
const fileList = requiredUploader.querySelectorAll("wm-file:not([error-message])");
|
|
747
|
-
requiredUploader.errorMessage = fileList.length === 0 ? "Please upload at least one file" : "";
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
function convertBytes(bytes, unit) {
|
|
751
|
-
const unitOrder = ["bytes", "KB", "MB", "GB", "TB"];
|
|
752
|
-
let unitIndex = 0;
|
|
753
|
-
let result = typeof bytes === "number" ? bytes : parseInt(bytes);
|
|
754
|
-
|
|
755
|
-
if (unit) {
|
|
756
|
-
// convert until result matches desired unit
|
|
757
|
-
while (unitOrder.indexOf(unit) > unitIndex) {
|
|
758
|
-
result /= 1024;
|
|
759
|
-
unitIndex++;
|
|
760
|
-
}
|
|
761
|
-
} else {
|
|
762
|
-
// convert until result is appropriate unit (value is under 1000)
|
|
763
|
-
while (result > 1000) {
|
|
764
|
-
result /= 1024;
|
|
765
|
-
unitIndex++;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
return { size: result, unit: unitOrder[unitIndex] };
|
|
769
|
-
}
|
|
52
|
+
snackbar.addEventListener("wmSnackbarSnackFinished", dismissSnack);
|