@watermarkinsights/ripple 0.0.1 → 0.1.0-alpha.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/cjs/app-globals-f836e216.js +103 -0
- package/dist/cjs/chartFunctions-608adb05.js +908 -0
- package/dist/{ripple/functions-DVLl0rH_.js → cjs/functions-b188d5b3.js} +403 -7835
- package/dist/cjs/index-786066a1.js +1880 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/interfaces-8419be91.js +59 -0
- package/dist/cjs/intl-01531391.js +283 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/priv-calendar.cjs.entry.js +608 -0
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +146 -0
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +194 -0
- package/dist/{ripple/wm-modal-footer.entry.js → cjs/priv-navigator-button.cjs.entry.js} +20 -35
- package/dist/{ripple/wm-navigator.entry.js → cjs/priv-navigator-item.cjs.entry.js} +24 -357
- package/dist/{ripple/wm-search.entry.js → cjs/priv-option-list.cjs.entry.js} +363 -180
- package/dist/cjs/ripple.cjs.js +25 -0
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +487 -0
- package/dist/cjs/wm-button.cjs.entry.js +273 -0
- package/dist/cjs/wm-chart-bar.cjs.entry.js +441 -0
- package/dist/cjs/wm-chart-column.cjs.entry.js +544 -0
- package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
- package/dist/cjs/wm-chart.cjs.entry.js +163 -0
- package/dist/cjs/wm-date-range.cjs.entry.js +526 -0
- package/dist/cjs/wm-datepicker.cjs.entry.js +323 -0
- package/dist/cjs/wm-file-list.cjs.entry.js +23 -0
- package/dist/cjs/wm-file.cjs.entry.js +210 -0
- package/dist/cjs/wm-flyout.cjs.entry.js +181 -0
- package/dist/cjs/wm-input.cjs.entry.js +131 -0
- package/dist/cjs/wm-line-chart.cjs.entry.js +541 -0
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +220 -0
- package/dist/cjs/wm-modal_3.cjs.entry.js +223 -0
- package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +334 -0
- package/dist/cjs/wm-nested-select.cjs.entry.js +320 -0
- package/dist/cjs/wm-optgroup.cjs.entry.js +74 -0
- package/dist/cjs/wm-option_2.cjs.entry.js +535 -0
- package/dist/cjs/wm-pagination.cjs.entry.js +229 -0
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
- package/dist/cjs/wm-search.cjs.entry.js +196 -0
- package/dist/cjs/wm-snackbar.cjs.entry.js +176 -0
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +357 -0
- package/dist/cjs/wm-tag-input.cjs.entry.js +953 -0
- package/dist/cjs/wm-tag-option.cjs.entry.js +43 -0
- package/dist/cjs/wm-textarea.cjs.entry.js +94 -0
- package/dist/cjs/wm-timepicker.cjs.entry.js +313 -0
- package/dist/cjs/wm-toggletip.cjs.entry.js +252 -0
- package/dist/cjs/wm-uploader.cjs.entry.js +341 -0
- package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
- package/dist/collection/collection-manifest.json +201 -0
- package/dist/collection/components/charts/chartFunctions.js +833 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +995 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +340 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +990 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +263 -0
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +125 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.css +1326 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +422 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1116 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +579 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +1169 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +688 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +932 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +194 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1208 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +862 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1326 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +264 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +967 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +151 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +121 -0
- package/dist/collection/components/datepickers/datepicker.css +1137 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1403 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +881 -0
- package/dist/collection/components/datepickers/wm-date-range.js +870 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +579 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +999 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +778 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1259 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +626 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +909 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +258 -0
- package/dist/collection/components/selects/wm-option/wm-option.css +1033 -0
- package/dist/collection/components/selects/wm-option/wm-option.js +530 -0
- package/dist/collection/components/selects/wm-select/wm-select.css +1187 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +705 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +1686 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +610 -0
- package/dist/collection/components/wm-button/wm-button.css +1627 -0
- package/dist/collection/components/wm-button/wm-button.js +555 -0
- package/dist/collection/components/wm-file/wm-file.css +1086 -0
- package/dist/collection/components/wm-file/wm-file.js +428 -0
- package/dist/collection/components/wm-file-list/wm-file-list.css +899 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +45 -0
- package/dist/collection/components/wm-flyout/wm-flyout.css +1117 -0
- package/dist/collection/components/wm-flyout/wm-flyout.js +449 -0
- package/dist/collection/components/wm-input/wm-input.css +1089 -0
- package/dist/collection/components/wm-input/wm-input.js +477 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +982 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +416 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.css +927 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +142 -0
- package/dist/collection/components/wm-modal/wm-modal-header.css +926 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +79 -0
- package/dist/collection/components/wm-modal/wm-modal.css +983 -0
- package/dist/collection/components/wm-modal/wm-modal.js +356 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +931 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +138 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +925 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +82 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1007 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +365 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +926 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +119 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +935 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +98 -0
- package/dist/collection/components/wm-navigation/wm-navigation.css +977 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +190 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +929 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +86 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +918 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -0
- package/dist/collection/components/wm-navigator/wm-navigator.css +990 -0
- package/dist/collection/components/wm-navigator/wm-navigator.js +503 -0
- package/dist/collection/components/wm-pagination/wm-pagination.css +1044 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +382 -0
- package/dist/collection/components/wm-search/wm-search.css +977 -0
- package/dist/collection/components/wm-search/wm-search.js +429 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +1150 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +263 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +958 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +166 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +966 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +357 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +906 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +87 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +1420 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1288 -0
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +243 -0
- package/dist/collection/components/wm-textarea/wm-textarea.css +1065 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +319 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +1164 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +553 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +1296 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +376 -0
- package/dist/collection/components/wm-uploader/wm-uploader.css +1984 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +619 -0
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +28 -0
- package/dist/collection/dev/action-menu.js +18 -0
- package/dist/collection/dev/button.js +0 -0
- package/dist/collection/dev/chart-bar.js +423 -0
- package/dist/collection/dev/chart-column.js +437 -0
- package/dist/collection/dev/chart-small.js +56 -0
- package/dist/collection/dev/chart.js +18 -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/flyout.js +194 -0
- package/dist/collection/dev/input.js +6 -0
- package/dist/collection/dev/line-chart.js +45 -0
- package/dist/collection/dev/modal.js +48 -0
- package/dist/collection/dev/navigation.js +13 -0
- package/dist/collection/dev/navigator.js +34 -0
- package/dist/collection/dev/nested-select.js +36 -0
- package/dist/collection/dev/pagination.js +7 -0
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/pss-modal.js +8 -0
- package/dist/collection/dev/scripts.js +49 -0
- package/dist/collection/dev/search.js +72 -0
- package/dist/collection/dev/select.js +57 -0
- package/dist/collection/dev/snackbar.js +68 -0
- package/dist/collection/dev/tabs.js +44 -0
- package/dist/collection/dev/tag-input.js +32 -0
- package/dist/collection/dev/textarea.js +28 -0
- package/dist/collection/dev/timepicker.js +32 -0
- package/dist/collection/dev/toggletip.js +9 -0
- package/dist/collection/dev/uploader.js +139 -0
- package/dist/collection/global/__mocks__/functions.js +6 -0
- package/dist/collection/global/functions.js +902 -0
- package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +16 -87
- package/dist/{ripple/interfaces-CrANcZM9.js → collection/global/interfaces.js} +25 -6
- package/dist/collection/global/intl.js +274 -0
- package/dist/collection/global/services/__mocks__/http-service.js +130 -0
- package/dist/collection/global/services/http-service.js +50 -0
- package/dist/collection/lang/lang.js +5 -0
- package/dist/collection/lang/missing.js +43 -0
- package/dist/collection/lang/piglatin.js +101 -0
- package/dist/esm/app-globals-d0ca31a6.js +101 -0
- package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-4bc77b76.js} +161 -3
- package/dist/esm/functions-de887809.js +10635 -0
- package/dist/esm/index-ef50bc01.js +1849 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/interfaces-7e50d034.js +55 -0
- package/dist/{ripple/intl-7p27BJSM.js → esm/intl-56b47a7b.js} +3 -3
- package/dist/esm/loader.js +11 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/priv-calendar.entry.js +604 -0
- package/dist/esm/priv-chart-popover-old.entry.js +142 -0
- package/dist/esm/priv-chart-popover_2.entry.js +189 -0
- package/dist/{ripple/wm-modal-header.entry.js → esm/priv-navigator-button.entry.js} +14 -25
- package/dist/{ripple/wm-toggletip.entry.js → esm/priv-navigator-item.entry.js} +19 -164
- package/dist/{ripple/wm-option.entry.js → esm/priv-option-list.entry.js} +345 -129
- package/dist/esm/ripple.js +20 -0
- package/dist/esm/wm-action-menu_2.entry.js +482 -0
- package/dist/esm/wm-button.entry.js +269 -0
- package/dist/esm/wm-chart-bar.entry.js +437 -0
- package/dist/esm/wm-chart-column.entry.js +540 -0
- package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
- package/dist/esm/wm-chart.entry.js +159 -0
- package/dist/esm/wm-date-range.entry.js +522 -0
- package/dist/esm/wm-datepicker.entry.js +319 -0
- package/dist/esm/wm-file-list.entry.js +19 -0
- package/dist/esm/wm-file.entry.js +206 -0
- package/dist/esm/wm-flyout.entry.js +177 -0
- package/dist/esm/wm-input.entry.js +127 -0
- package/dist/esm/wm-line-chart.entry.js +537 -0
- package/dist/esm/wm-modal-pss_3.entry.js +214 -0
- package/dist/esm/wm-modal_3.entry.js +217 -0
- package/dist/esm/wm-navigation_3.entry.js +182 -0
- package/dist/esm/wm-navigator.entry.js +330 -0
- package/dist/{ripple/wm-flyout.entry.js → esm/wm-nested-select.entry.js} +281 -132
- package/dist/esm/wm-optgroup.entry.js +70 -0
- package/dist/esm/wm-option_2.entry.js +530 -0
- package/dist/esm/wm-pagination.entry.js +225 -0
- package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
- package/dist/esm/wm-search.entry.js +192 -0
- package/dist/esm/wm-snackbar.entry.js +172 -0
- package/dist/esm/wm-tab-item_3.entry.js +351 -0
- package/dist/esm/wm-tag-input.entry.js +949 -0
- package/dist/{ripple → esm}/wm-tag-option.entry.js +6 -2
- package/dist/esm/wm-textarea.entry.js +90 -0
- package/dist/esm/wm-timepicker.entry.js +309 -0
- package/dist/esm/wm-toggletip.entry.js +248 -0
- package/dist/esm/wm-uploader.entry.js +337 -0
- package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-d0ca31a6.js +1 -0
- package/dist/esm-es5/chartFunctions-4bc77b76.js +1 -0
- package/dist/esm-es5/functions-de887809.js +1 -0
- package/dist/esm-es5/index-ef50bc01.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/interfaces-7e50d034.js +1 -0
- package/dist/esm-es5/intl-56b47a7b.js +1 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/priv-calendar.entry.js +1 -0
- package/dist/esm-es5/priv-chart-popover-old.entry.js +1 -0
- package/dist/esm-es5/priv-chart-popover_2.entry.js +1 -0
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -0
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -0
- package/dist/esm-es5/priv-option-list.entry.js +1 -0
- package/dist/esm-es5/ripple.js +1 -0
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -0
- package/dist/esm-es5/wm-button.entry.js +1 -0
- package/dist/esm-es5/wm-chart-bar.entry.js +1 -0
- package/dist/esm-es5/wm-chart-column.entry.js +1 -0
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -0
- package/dist/esm-es5/wm-chart.entry.js +1 -0
- package/dist/esm-es5/wm-date-range.entry.js +1 -0
- package/dist/esm-es5/wm-datepicker.entry.js +1 -0
- package/dist/{ripple/wm-tab-item.entry.js → esm-es5/wm-file-list.entry.js} +1 -63
- package/dist/esm-es5/wm-file.entry.js +1 -0
- package/dist/esm-es5/wm-flyout.entry.js +1 -0
- package/dist/esm-es5/wm-input.entry.js +1 -0
- package/dist/esm-es5/wm-line-chart.entry.js +1 -0
- package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -0
- package/dist/esm-es5/wm-modal_3.entry.js +1 -0
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -0
- package/dist/esm-es5/wm-navigator.entry.js +1 -0
- package/dist/esm-es5/wm-nested-select.entry.js +1 -0
- package/dist/{ripple/wm-chart.entry.js → esm-es5/wm-optgroup.entry.js} +1 -157
- package/dist/esm-es5/wm-option_2.entry.js +1 -0
- package/dist/esm-es5/wm-pagination.entry.js +1 -0
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -0
- package/dist/esm-es5/wm-search.entry.js +1 -0
- package/dist/esm-es5/wm-snackbar.entry.js +1 -0
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -0
- package/dist/esm-es5/wm-tag-input.entry.js +1 -0
- package/dist/esm-es5/wm-tag-option.entry.js +1 -0
- package/dist/esm-es5/wm-textarea.entry.js +1 -0
- package/dist/esm-es5/wm-timepicker.entry.js +1 -0
- package/dist/esm-es5/wm-toggletip.entry.js +1 -0
- package/dist/esm-es5/wm-uploader.entry.js +1 -0
- package/dist/esm-es5/wm-wrapper.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +2 -0
- package/dist/loader/index.cjs.js +2 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +2 -0
- package/dist/loader/index.js +3 -0
- package/dist/loader/package.json +11 -0
- package/dist/ripple/index.esm.js +0 -1
- package/dist/ripple/p-03a6850a.entry.js +1 -0
- package/dist/ripple/{wm-select.entry.js → p-0c3162d5.system.entry.js} +1 -249
- package/dist/ripple/{wm-file.entry.js → p-0ec71f08.system.entry.js} +1 -182
- package/dist/ripple/p-1032c0db.system.entry.js +1 -0
- package/dist/ripple/p-117c3d78.system.js +2 -0
- package/dist/ripple/p-12024d3b.system.entry.js +1 -0
- package/dist/ripple/p-13152ac1.system.entry.js +1 -0
- package/dist/ripple/p-1318ae67.entry.js +1 -0
- package/dist/ripple/p-137bf0c0.system.entry.js +1 -0
- package/dist/ripple/{priv-navigator-item.entry.js → p-13bb6faf.entry.js} +1 -30
- package/dist/ripple/p-16ff8110.entry.js +1 -0
- package/dist/ripple/{wm-navigation-item.entry.js → p-1825d519.system.entry.js} +1 -18
- package/dist/ripple/p-18417851.entry.js +1 -0
- package/dist/ripple/p-1c655f6b.entry.js +1 -0
- package/dist/ripple/p-1ce77857.system.entry.js +1 -0
- package/dist/ripple/p-1d76061a.entry.js +1 -0
- package/dist/ripple/p-22b57f73.system.entry.js +1 -0
- package/dist/ripple/p-24dfbf1d.system.entry.js +1 -0
- package/dist/ripple/p-28996d67.system.entry.js +1 -0
- package/dist/ripple/p-30118d12.system.entry.js +1 -0
- package/dist/ripple/p-32f3581a.entry.js +1 -0
- package/dist/ripple/p-334d8711.system.js +1 -0
- package/dist/ripple/p-3c8c5933.js +1 -0
- package/dist/ripple/{wm-uploader.entry.js → p-436bf381.system.entry.js} +1 -313
- package/dist/ripple/p-43843597.system.entry.js +1 -0
- package/dist/ripple/p-45999149.system.js +1 -0
- package/dist/ripple/p-48b596ae.entry.js +1 -0
- package/dist/ripple/p-4bab5360.system.js +1 -0
- package/dist/ripple/{wm-progress-monitor.entry.js → p-4ff0db4d.entry.js} +1 -71
- package/dist/ripple/p-50ea2036.system.js +1 -0
- package/dist/ripple/p-57f1bafd.system.entry.js +1 -0
- package/dist/ripple/p-5b0e9165.entry.js +1 -0
- package/dist/ripple/p-6266fcbf.system.entry.js +1 -0
- package/dist/ripple/p-646e22d3.system.entry.js +1 -0
- package/dist/ripple/p-6950e8ed.system.js +1 -0
- package/dist/ripple/p-6c6da5db.entry.js +1 -0
- package/dist/ripple/p-6d2af8d9.system.entry.js +1 -0
- package/dist/ripple/p-6d46f775.system.entry.js +1 -0
- package/dist/ripple/p-6de0efee.entry.js +1 -0
- package/dist/ripple/p-7833db63.entry.js +1 -0
- package/dist/ripple/p-7b7c32af.entry.js +1 -0
- package/dist/ripple/p-817aa29c.entry.js +1 -0
- package/dist/ripple/p-82c9bd47.entry.js +1 -0
- package/dist/ripple/p-8480138d.entry.js +1 -0
- package/dist/ripple/p-85ef702d.entry.js +1 -0
- package/dist/ripple/{priv-calendar.entry.js → p-86bcd942.system.entry.js} +1 -566
- package/dist/ripple/p-8799bce9.entry.js +1 -0
- package/dist/ripple/p-8ac14bb1.system.js +1 -0
- package/dist/ripple/p-8dcc8c0c.entry.js +1 -0
- package/dist/ripple/p-8fa572a8.entry.js +1 -0
- package/dist/ripple/p-904545cc.js +1 -0
- package/dist/ripple/p-90cb5d27.system.entry.js +1 -0
- package/dist/ripple/{wm-datepicker.entry.js → p-9202ef69.system.entry.js} +1 -247
- package/dist/ripple/p-9f971522.system.entry.js +1 -0
- package/dist/ripple/p-a5dc49c1.system.entry.js +1 -0
- package/dist/ripple/p-a73fb160.system.entry.js +1 -0
- package/dist/ripple/p-a9580e7a.system.entry.js +1 -0
- package/dist/ripple/p-b04a6351.entry.js +1 -0
- package/dist/ripple/p-b09998e1.entry.js +1 -0
- package/dist/ripple/{priv-option-list.entry.js → p-b3a86ec4.system.entry.js} +1 -385
- package/dist/ripple/p-b501f06c.entry.js +1 -0
- package/dist/ripple/p-b957033b.entry.js +1 -0
- package/dist/ripple/p-c2258438.entry.js +1 -0
- package/dist/ripple/p-ca3abcc0.system.entry.js +1 -0
- package/dist/ripple/p-cc455a6c.system.entry.js +1 -0
- package/dist/ripple/p-cda66d45.js +1 -0
- package/dist/ripple/p-cde2ca4d.system.entry.js +1 -0
- package/dist/ripple/p-cdf9c0e9.entry.js +1 -0
- package/dist/ripple/p-d0858afa.js +2 -0
- package/dist/ripple/p-d37f8f66.js +1 -0
- package/dist/ripple/p-d4ae193e.js +1 -0
- package/dist/ripple/p-d4d769a7.system.js +1 -0
- package/dist/ripple/p-d6a9000f.system.entry.js +1 -0
- package/dist/ripple/{wm-navigation-hamburger.entry.js → p-d6cd9f79.entry.js} +1 -48
- package/dist/ripple/p-d9e4335e.entry.js +1 -0
- package/dist/ripple/p-dadf3ed3.entry.js +1 -0
- package/dist/ripple/p-dc3684b5.entry.js +1 -0
- package/dist/ripple/p-dca94e24.entry.js +1 -0
- package/dist/ripple/p-dcd6acc5.system.entry.js +1 -0
- package/dist/ripple/p-dd81e308.entry.js +1 -0
- package/dist/ripple/p-e11d9b06.system.entry.js +1 -0
- package/dist/ripple/{wm-nested-select.entry.js → p-e36e71dc.system.entry.js} +1 -308
- package/dist/ripple/p-e6a81600.entry.js +1 -0
- package/dist/ripple/p-ef7d84da.system.entry.js +1 -0
- package/dist/ripple/p-f1de3153.entry.js +1 -0
- package/dist/ripple/p-f3e84476.system.entry.js +1 -0
- package/dist/ripple/{wm-snackbar.entry.js → p-f4d27fea.system.entry.js} +1 -185
- package/dist/ripple/p-fcf4bd61.system.entry.js +1 -0
- package/dist/ripple/p-fd02c124.entry.js +1 -0
- package/dist/ripple/p-ffa20853.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -48
- package/dist/ripple/ripple.js +127 -0
- package/dist/types/components/charts/chartFunctions.d.ts +15 -2
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +20 -11
- package/dist/types/components/charts/priv-chart-popover-old/priv-chart-popover-old.d.ts +26 -0
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +1 -1
- package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +62 -0
- package/dist/types/components/charts/wm-chart-column/wm-chart-column.d.ts +73 -0
- package/dist/types/components/charts/wm-chart-legend/wm-chart-legend.d.ts +26 -0
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +21 -11
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +1 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +13 -1
- package/dist/types/components/datepickers/wm-date-range.d.ts +13 -13
- package/dist/types/components/datepickers/wm-datepicker.d.ts +14 -9
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +2 -1
- package/dist/types/components/selects/wm-select/wm-select.d.ts +23 -12
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +16 -2
- package/dist/types/components/wm-button/wm-button.d.ts +5 -0
- package/dist/types/components/wm-file/wm-file.d.ts +4 -1
- package/dist/types/components/wm-flyout/wm-flyout.d.ts +1 -0
- package/dist/types/components/wm-input/wm-input.d.ts +2 -1
- package/dist/types/components/wm-modal/wm-modal.d.ts +1 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +2 -0
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +1 -0
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +1 -1
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +2 -1
- package/dist/types/components/wm-search/wm-search.d.ts +1 -1
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +0 -1
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +3 -1
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +15 -22
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +5 -1
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +1 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +1 -0
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +14 -2
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +4 -3
- package/dist/types/components.d.ts +181 -33
- package/dist/types/global/functions.d.ts +6 -2
- package/dist/types/global/interfaces.d.ts +59 -2
- package/dist/types/stencil-public-runtime.d.ts +0 -28
- package/package.json +6 -31
- package/dist/components/index.d.ts +0 -33
- package/dist/components/priv-calendar.d.ts +0 -11
- package/dist/components/priv-chart-popover.d.ts +0 -11
- package/dist/components/priv-navigator-button.d.ts +0 -11
- package/dist/components/priv-navigator-item.d.ts +0 -11
- package/dist/components/priv-option-list.d.ts +0 -11
- package/dist/components/wm-action-menu.d.ts +0 -11
- package/dist/components/wm-button.d.ts +0 -11
- package/dist/components/wm-chart-slice.d.ts +0 -11
- package/dist/components/wm-chart.d.ts +0 -11
- package/dist/components/wm-date-range.d.ts +0 -11
- package/dist/components/wm-datepicker.d.ts +0 -11
- package/dist/components/wm-file-list.d.ts +0 -11
- package/dist/components/wm-file.d.ts +0 -11
- package/dist/components/wm-flyout.d.ts +0 -11
- package/dist/components/wm-input.d.ts +0 -11
- package/dist/components/wm-line-chart.d.ts +0 -11
- package/dist/components/wm-menuitem.d.ts +0 -11
- package/dist/components/wm-modal-footer.d.ts +0 -11
- package/dist/components/wm-modal-header.d.ts +0 -11
- package/dist/components/wm-modal-pss-footer.d.ts +0 -11
- package/dist/components/wm-modal-pss-header.d.ts +0 -11
- package/dist/components/wm-modal-pss.d.ts +0 -11
- package/dist/components/wm-modal.d.ts +0 -11
- package/dist/components/wm-navigation-hamburger.d.ts +0 -11
- package/dist/components/wm-navigation-item.d.ts +0 -11
- package/dist/components/wm-navigation.d.ts +0 -11
- package/dist/components/wm-navigator.d.ts +0 -11
- package/dist/components/wm-nested-select.d.ts +0 -11
- package/dist/components/wm-optgroup.d.ts +0 -11
- package/dist/components/wm-option.d.ts +0 -11
- package/dist/components/wm-pagination.d.ts +0 -11
- package/dist/components/wm-progress-indicator.d.ts +0 -11
- package/dist/components/wm-progress-monitor.d.ts +0 -11
- package/dist/components/wm-progress-slice.d.ts +0 -11
- package/dist/components/wm-search.d.ts +0 -11
- package/dist/components/wm-select.d.ts +0 -11
- package/dist/components/wm-snackbar.d.ts +0 -11
- package/dist/components/wm-tab-item.d.ts +0 -11
- package/dist/components/wm-tab-list.d.ts +0 -11
- package/dist/components/wm-tab-panel.d.ts +0 -11
- package/dist/components/wm-tag-input.d.ts +0 -11
- package/dist/components/wm-tag-option.d.ts +0 -11
- package/dist/components/wm-textarea.d.ts +0 -11
- package/dist/components/wm-timepicker.d.ts +0 -11
- package/dist/components/wm-toggletip.d.ts +0 -11
- package/dist/components/wm-uploader.d.ts +0 -11
- package/dist/components/wm-wrapper.d.ts +0 -11
- package/dist/ripple/index-CU5QNCKv.js +0 -4167
- package/dist/ripple/priv-chart-popover.entry.js +0 -134
- package/dist/ripple/priv-navigator-button.entry.js +0 -24
- package/dist/ripple/wm-action-menu.entry.js +0 -201
- package/dist/ripple/wm-button.entry.js +0 -197
- package/dist/ripple/wm-date-range.entry.js +0 -477
- package/dist/ripple/wm-file-list.entry.js +0 -18
- package/dist/ripple/wm-input.entry.js +0 -111
- package/dist/ripple/wm-line-chart.entry.js +0 -449
- package/dist/ripple/wm-menuitem.entry.js +0 -125
- package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
- package/dist/ripple/wm-modal-pss-header.entry.js +0 -39
- package/dist/ripple/wm-modal-pss.entry.js +0 -135
- package/dist/ripple/wm-modal.entry.js +0 -133
- package/dist/ripple/wm-navigation.entry.js +0 -116
- package/dist/ripple/wm-optgroup.entry.js +0 -68
- package/dist/ripple/wm-pagination.entry.js +0 -223
- package/dist/ripple/wm-progress-indicator.entry.js +0 -107
- package/dist/ripple/wm-progress-slice.entry.js +0 -13
- package/dist/ripple/wm-tab-list.entry.js +0 -175
- package/dist/ripple/wm-tab-panel.entry.js +0 -32
- package/dist/ripple/wm-tag-input.entry.js +0 -877
- package/dist/ripple/wm-textarea.entry.js +0 -79
- package/dist/ripple/wm-timepicker.entry.js +0 -300
|
@@ -0,0 +1,862 @@
|
|
|
1
|
+
import { h, Host, forceUpdate } from "@stencil/core";
|
|
2
|
+
import { csvToArray, debounce, transposeMatrix, getSmallestSkipInterval, wrapAround, calcPercentageInRange, } from "../../../global/functions";
|
|
3
|
+
import { getInterval, inferDecimalPlacesForUnitValue, suffixNumber } from "../chartFunctions";
|
|
4
|
+
import { chartMessages, globalMessages, lineChartMessages } from "../../../global/intl";
|
|
5
|
+
export class LineChart {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.minTickWidth = 120;
|
|
8
|
+
this.lineStyles = [
|
|
9
|
+
{ color: "#8b86ca", icon: "triangle" }, // lavender
|
|
10
|
+
{ color: "#2e1b46", icon: "circle" }, // midnight
|
|
11
|
+
{ color: "#0089e4", icon: "square" }, // blue
|
|
12
|
+
{ color: "#088000", icon: "star" }, // forest
|
|
13
|
+
{ color: "#ea8500", icon: "rhombus" }, // orange
|
|
14
|
+
{ color: "#d54f41", icon: "triangle-inverted" }, // red
|
|
15
|
+
{ color: "#146ca9", icon: "pentagon" }, // blue
|
|
16
|
+
];
|
|
17
|
+
this.debouncedResize = debounce(async () => {
|
|
18
|
+
forceUpdate(this.el);
|
|
19
|
+
}, 100);
|
|
20
|
+
this.label = undefined;
|
|
21
|
+
this.description = "";
|
|
22
|
+
this.xAxisLabel = undefined;
|
|
23
|
+
this.yAxisLabel = undefined;
|
|
24
|
+
this.showGrid = true;
|
|
25
|
+
this.lineData = undefined;
|
|
26
|
+
this.units = "null,null";
|
|
27
|
+
this.labelWidth = "120px";
|
|
28
|
+
this.highlightQualifier = lineChartMessages.highlightQualifier;
|
|
29
|
+
this.highlightStart = undefined;
|
|
30
|
+
this.highlightEnd = undefined;
|
|
31
|
+
this.visibilityToggles = false;
|
|
32
|
+
this.showDeltas = false;
|
|
33
|
+
this.yRange = undefined;
|
|
34
|
+
this.spotlightData = undefined;
|
|
35
|
+
this.decimalPlaces = undefined;
|
|
36
|
+
this.parsedLineData = {};
|
|
37
|
+
this.popoverIndex = -1;
|
|
38
|
+
this.focusedLine = -1;
|
|
39
|
+
this.hiddenLines = [];
|
|
40
|
+
this.isTabbing = false;
|
|
41
|
+
this.announcement = "";
|
|
42
|
+
}
|
|
43
|
+
get xIntervals() {
|
|
44
|
+
const firstLine = Object.values(this.parsedLineData)[0];
|
|
45
|
+
return firstLine ? Object.keys(firstLine) : [];
|
|
46
|
+
}
|
|
47
|
+
get yIntervals() {
|
|
48
|
+
if (Object.keys(this.parsedLineData).length === 0)
|
|
49
|
+
return [];
|
|
50
|
+
let yIntervals = [];
|
|
51
|
+
if (this.yRange) {
|
|
52
|
+
yIntervals = csvToArray(this.yRange).map((val) => parseFloat(val));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
// gather all yValues
|
|
56
|
+
let allYValues = [];
|
|
57
|
+
const lines = Object.values(this.parsedLineData).flat();
|
|
58
|
+
lines.forEach((line) => allYValues.push(...Object.values(line)));
|
|
59
|
+
const filteredYValues = allYValues.filter((val) => val !== null);
|
|
60
|
+
// Clamp to integers for clean intervals
|
|
61
|
+
let minYValue = Math.floor(Math.min(...filteredYValues));
|
|
62
|
+
let maxYValue = Math.ceil(Math.max(...filteredYValues));
|
|
63
|
+
if (minYValue === maxYValue) {
|
|
64
|
+
// If the axis bounds are identical (flat line), add some grid height
|
|
65
|
+
minYValue -= 1;
|
|
66
|
+
maxYValue += 1;
|
|
67
|
+
}
|
|
68
|
+
// calculate neat yInterval
|
|
69
|
+
let interval = getInterval(maxYValue - minYValue, 4);
|
|
70
|
+
// find new min below smallest yValue that divides cleanly by interval
|
|
71
|
+
let counter = interval;
|
|
72
|
+
while (minYValue % interval !== 0 && counter > 0) {
|
|
73
|
+
minYValue--;
|
|
74
|
+
counter--;
|
|
75
|
+
}
|
|
76
|
+
// calculate new interval using new min
|
|
77
|
+
interval = getInterval(maxYValue - minYValue, 4);
|
|
78
|
+
let current = minYValue;
|
|
79
|
+
// determine top interval, no more than one tick above max yValue
|
|
80
|
+
while (current <= maxYValue + interval) {
|
|
81
|
+
yIntervals.push(current);
|
|
82
|
+
current += interval;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return yIntervals.reverse();
|
|
86
|
+
}
|
|
87
|
+
get intervalInfo() {
|
|
88
|
+
const maxTicks = this.plotAreaEl && this.plotAreaEl.clientWidth > 0
|
|
89
|
+
? Math.round(this.plotAreaEl.clientWidth / this.minTickWidth)
|
|
90
|
+
: this.xIntervals.length;
|
|
91
|
+
return getSmallestSkipInterval(this.xIntervals, maxTicks);
|
|
92
|
+
}
|
|
93
|
+
get displayedXIntervals() {
|
|
94
|
+
return this.intervalInfo.skippedList;
|
|
95
|
+
}
|
|
96
|
+
get dataPointMatrix() {
|
|
97
|
+
if (Object.keys(this.parsedLineData).length === 0)
|
|
98
|
+
return [];
|
|
99
|
+
return Object.entries(this.parsedLineData).map((entry) => this.buildLineDataPointDetails(entry[0], entry[1]));
|
|
100
|
+
}
|
|
101
|
+
get popoverData() {
|
|
102
|
+
return transposeMatrix(this.dataPointMatrix);
|
|
103
|
+
}
|
|
104
|
+
get spotlightXValue() {
|
|
105
|
+
if (this.spotlightData) {
|
|
106
|
+
const keys = Object.keys(this.spotlightData).filter((key) => key !== "label");
|
|
107
|
+
return keys[0];
|
|
108
|
+
}
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
get spotlightYValue() {
|
|
112
|
+
if (this.spotlightData && this.spotlightXValue) {
|
|
113
|
+
const raw = this.spotlightData[this.spotlightXValue];
|
|
114
|
+
if (typeof raw !== "number") {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
return raw;
|
|
118
|
+
}
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
parseData() {
|
|
122
|
+
if (typeof this.lineData === "string") {
|
|
123
|
+
this.parsedLineData = JSON.parse(this.lineData);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.parsedLineData = this.lineData;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
get hasPartialInterval() {
|
|
130
|
+
// if chart width is too small, an odd # of intervals like 1,2,3,4,5,6,7 can be shortened to 1,3,5,7 or 1,4,7
|
|
131
|
+
// but an even # like 1,2,3,4,5,6,7,8 will be shortened to 1,3,5,7 (can't show first and last interval)
|
|
132
|
+
// in these cases, show a partial interval must be shown in order to still provide space to plot the 8th data point
|
|
133
|
+
// e.g intervals will be 1-3, 3-5, 5-7, 7-8
|
|
134
|
+
return this.intervalInfo.skipInterval > 0 && this.xIntervals.length % 2 === 0;
|
|
135
|
+
}
|
|
136
|
+
get parsedUnits() {
|
|
137
|
+
return csvToArray(this.units).map((unit) => (unit === "null" ? null : unit));
|
|
138
|
+
}
|
|
139
|
+
get visibilityToggleEls() {
|
|
140
|
+
return this.legendEl.querySelectorAll("wm-button");
|
|
141
|
+
}
|
|
142
|
+
get lineEls() {
|
|
143
|
+
return this.plotAreaEl.querySelectorAll(".line");
|
|
144
|
+
}
|
|
145
|
+
get firstVisibleLineIdx() {
|
|
146
|
+
let firstVisibleLineIdx = 0;
|
|
147
|
+
while (this.hiddenLines.includes(firstVisibleLineIdx)) {
|
|
148
|
+
firstVisibleLineIdx++;
|
|
149
|
+
}
|
|
150
|
+
return firstVisibleLineIdx < this.dataPointMatrix.length ? firstVisibleLineIdx : -1;
|
|
151
|
+
}
|
|
152
|
+
get pointEls() {
|
|
153
|
+
return this.plotAreaEl.querySelectorAll(".point");
|
|
154
|
+
}
|
|
155
|
+
toggleTabbingOn() {
|
|
156
|
+
this.isTabbing = true;
|
|
157
|
+
}
|
|
158
|
+
toggleTabbingOff() {
|
|
159
|
+
this.isTabbing = false;
|
|
160
|
+
}
|
|
161
|
+
componentWillLoad() {
|
|
162
|
+
this.parseData();
|
|
163
|
+
}
|
|
164
|
+
componentDidLoad() {
|
|
165
|
+
const resizeObserver = new ResizeObserver(() => this.debouncedResize());
|
|
166
|
+
resizeObserver.observe(this.el);
|
|
167
|
+
}
|
|
168
|
+
handleVisibilityToggleKeydown(ev, toggleIdx) {
|
|
169
|
+
switch (ev.key) {
|
|
170
|
+
case "Tab":
|
|
171
|
+
if (!ev.shiftKey && this.firstVisibleLineIdx !== -1) {
|
|
172
|
+
ev.preventDefault();
|
|
173
|
+
this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));
|
|
174
|
+
const point = this.lineEls[this.firstVisibleLineIdx].querySelector(".point");
|
|
175
|
+
point && this.focusDataPointByEl(point);
|
|
176
|
+
}
|
|
177
|
+
break;
|
|
178
|
+
case "ArrowUp":
|
|
179
|
+
case "ArrowLeft":
|
|
180
|
+
ev.preventDefault();
|
|
181
|
+
const prevToggleIdx = wrapAround(toggleIdx, -1, this.dataPointMatrix.length - 1);
|
|
182
|
+
this.visibilityToggleEls[prevToggleIdx].focus();
|
|
183
|
+
break;
|
|
184
|
+
case "ArrowDown":
|
|
185
|
+
case "ArrowRight":
|
|
186
|
+
ev.preventDefault();
|
|
187
|
+
const nextToggleIdx = wrapAround(toggleIdx, 1, this.dataPointMatrix.length - 1);
|
|
188
|
+
this.visibilityToggleEls[nextToggleIdx].focus();
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
handleDataPointKeydown(ev) {
|
|
193
|
+
const curPointEl = ev.target;
|
|
194
|
+
switch (ev.key) {
|
|
195
|
+
case "Tab":
|
|
196
|
+
if (ev.shiftKey && this.visibilityToggles) {
|
|
197
|
+
ev.preventDefault();
|
|
198
|
+
this.visibilityToggleEls[0].focus();
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
case "ArrowUp":
|
|
202
|
+
ev.preventDefault();
|
|
203
|
+
this.navigatePointsVertically(curPointEl, -1);
|
|
204
|
+
break;
|
|
205
|
+
case "ArrowDown":
|
|
206
|
+
ev.preventDefault();
|
|
207
|
+
this.navigatePointsVertically(curPointEl, 1);
|
|
208
|
+
break;
|
|
209
|
+
case "ArrowLeft":
|
|
210
|
+
ev.preventDefault();
|
|
211
|
+
this.navigatePointsHorizontally(curPointEl, -1);
|
|
212
|
+
break;
|
|
213
|
+
case "ArrowRight":
|
|
214
|
+
ev.preventDefault();
|
|
215
|
+
this.navigatePointsHorizontally(curPointEl, 1);
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
navigatePointsVertically(originPoint, stepAmount) {
|
|
220
|
+
const pointElsInColumn = Array.from(this.pointEls).filter((p) => p.dataset.pointidx == originPoint.dataset.pointidx);
|
|
221
|
+
if (pointElsInColumn.length > 1) {
|
|
222
|
+
const nextPointIdx = wrapAround(pointElsInColumn.indexOf(originPoint), stepAmount, pointElsInColumn.length - 1);
|
|
223
|
+
const nextVerticalPoint = pointElsInColumn[nextPointIdx];
|
|
224
|
+
const idx = nextVerticalPoint.dataset.lineidx;
|
|
225
|
+
const msg = idx && this.lineFocusMessage(parseInt(idx));
|
|
226
|
+
msg && this.announce(msg);
|
|
227
|
+
this.focusDataPointByEl(nextVerticalPoint);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
navigatePointsHorizontally(originPoint, stepAmount) {
|
|
231
|
+
const linePoints = Array.from(originPoint.parentElement.querySelectorAll(".point"));
|
|
232
|
+
if (linePoints.length > 1) {
|
|
233
|
+
const nextPointIdxInDirection = wrapAround(linePoints.indexOf(originPoint), stepAmount, linePoints.length - 1);
|
|
234
|
+
const nextHorizontalPoint = linePoints[nextPointIdxInDirection];
|
|
235
|
+
this.focusDataPointByEl(nextHorizontalPoint);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
announce(message) {
|
|
239
|
+
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
240
|
+
if (this.liveRegionEl.textContent === message) {
|
|
241
|
+
message += "\u00A0";
|
|
242
|
+
}
|
|
243
|
+
this.announcement = message;
|
|
244
|
+
}
|
|
245
|
+
lineFocusMessage(lineIdx) {
|
|
246
|
+
const label = this.dataPointMatrix[lineIdx][0].lineLabel;
|
|
247
|
+
const numDataPoints = this.dataPointMatrix[lineIdx].filter((datapoint) => datapoint.yValue !== null).length;
|
|
248
|
+
const focusMessage = lineChartMessages.getLineFocusAnnouncement(label, lineIdx + 1, this.dataPointMatrix.length, numDataPoints);
|
|
249
|
+
return focusMessage;
|
|
250
|
+
}
|
|
251
|
+
focusDataPointByEl(pointEl) {
|
|
252
|
+
this.pointEls.forEach((point) => (point.tabIndex = -1));
|
|
253
|
+
pointEl.tabIndex = 0;
|
|
254
|
+
pointEl.focus();
|
|
255
|
+
}
|
|
256
|
+
formatDisplayYValue(yValue) {
|
|
257
|
+
if (this.decimalPlaces === undefined) {
|
|
258
|
+
return new Intl.NumberFormat().format(yValue);
|
|
259
|
+
}
|
|
260
|
+
return yValue.toFixed(this.decimalPlaces);
|
|
261
|
+
}
|
|
262
|
+
formatYAxisIntervalLabel(intervalValue) {
|
|
263
|
+
var _a;
|
|
264
|
+
const decimalPlaces = (_a = this.decimalPlaces) !== null && _a !== void 0 ? _a : inferDecimalPlacesForUnitValue(intervalValue);
|
|
265
|
+
let absFormattedValue = suffixNumber(Math.abs(intervalValue), decimalPlaces);
|
|
266
|
+
if (intervalValue < 0) {
|
|
267
|
+
absFormattedValue = "-" + absFormattedValue;
|
|
268
|
+
}
|
|
269
|
+
return absFormattedValue;
|
|
270
|
+
}
|
|
271
|
+
buildLineDataPointDetails(lineLabel, line) {
|
|
272
|
+
let dataPointDetailsList = [];
|
|
273
|
+
const lineDataPoints = Object.entries(line);
|
|
274
|
+
let isHighlighted;
|
|
275
|
+
lineDataPoints.forEach((entry, pointIdx) => {
|
|
276
|
+
const [xValue, yValue] = entry;
|
|
277
|
+
let xPositionPercent = (100 / (lineDataPoints.length - 1)) * pointIdx;
|
|
278
|
+
const yPositionPercent = yValue === null
|
|
279
|
+
? null
|
|
280
|
+
: 100 - calcPercentageInRange(yValue, this.yIntervals[this.yIntervals.length - 1], this.yIntervals[0]);
|
|
281
|
+
// add space between first points and y-axis
|
|
282
|
+
if (pointIdx === 0) {
|
|
283
|
+
xPositionPercent +=
|
|
284
|
+
this.plotAreaEl && this.plotAreaEl.clientWidth > 0 ? (8 / this.plotAreaEl.clientWidth) * 100 : 1;
|
|
285
|
+
}
|
|
286
|
+
if (xValue === this.highlightStart && !isHighlighted) {
|
|
287
|
+
isHighlighted = true;
|
|
288
|
+
}
|
|
289
|
+
dataPointDetailsList.push({
|
|
290
|
+
lineLabel: lineLabel,
|
|
291
|
+
xValue: xValue,
|
|
292
|
+
yValue: yValue,
|
|
293
|
+
xPositionPercent: xPositionPercent,
|
|
294
|
+
yPositionPercent: yPositionPercent,
|
|
295
|
+
highlighted: isHighlighted,
|
|
296
|
+
});
|
|
297
|
+
// because highlight range is inclusive, disable after pushing details
|
|
298
|
+
if (xValue === this.highlightEnd && isHighlighted) {
|
|
299
|
+
isHighlighted = false;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
return dataPointDetailsList;
|
|
303
|
+
}
|
|
304
|
+
toggleLineVisibility(lineIdx) {
|
|
305
|
+
if (this.hiddenLines.includes(lineIdx)) {
|
|
306
|
+
this.hiddenLines = this.hiddenLines.filter((num) => num !== lineIdx);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
this.hiddenLines.push(lineIdx);
|
|
310
|
+
}
|
|
311
|
+
forceUpdate(this.el);
|
|
312
|
+
}
|
|
313
|
+
resetDataPointFocus() {
|
|
314
|
+
this.popoverIndex = -1;
|
|
315
|
+
this.pointEls.forEach((point) => (point.tabIndex = -1));
|
|
316
|
+
if (this.firstVisibleLineIdx !== -1) {
|
|
317
|
+
const lineEl = this.lineEls[this.firstVisibleLineIdx];
|
|
318
|
+
const linePointEl = lineEl.querySelectorAll(".point")[0];
|
|
319
|
+
linePointEl.tabIndex = 0;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
calcDelta(dataPoint, prevDataPoint) {
|
|
323
|
+
let delta;
|
|
324
|
+
if (dataPoint.yValue === null || prevDataPoint.yValue === null) {
|
|
325
|
+
// display "No data" when either of the datapoints is missing
|
|
326
|
+
delta = lineChartMessages.noData;
|
|
327
|
+
}
|
|
328
|
+
else if (dataPoint.yValue == prevDataPoint.yValue) {
|
|
329
|
+
// display "0%" if datapoints are equal
|
|
330
|
+
delta = "0%";
|
|
331
|
+
}
|
|
332
|
+
else if (prevDataPoint.yValue == 0) {
|
|
333
|
+
// display "-" for % increase if prev data point is 0, as the technical number would be infinity
|
|
334
|
+
delta = "-";
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
const changePercent = ((dataPoint.yValue - prevDataPoint.yValue) / prevDataPoint.yValue) * 100;
|
|
338
|
+
const roundedPercent = Math.round(changePercent * 100) / 100;
|
|
339
|
+
delta = `${roundedPercent > 0 ? "+" : ""}${roundedPercent}%`;
|
|
340
|
+
}
|
|
341
|
+
return delta;
|
|
342
|
+
}
|
|
343
|
+
renderLegend() {
|
|
344
|
+
var _a;
|
|
345
|
+
const lineLabels = Object.keys(this.parsedLineData);
|
|
346
|
+
return (h("div", { ref: (el) => (this.legendEl = el), class: "legend" }, ((_a = this.spotlightData) === null || _a === void 0 ? void 0 : _a.label) && (h("div", { class: "legend-label" }, h("div", { class: "svg-icon svg-spotlight" }), this.spotlightData.label)), lineLabels.map((lineLabel, lineIdx) => {
|
|
347
|
+
const isHidden = this.hiddenLines.includes(lineIdx);
|
|
348
|
+
const isFaded = this.focusedLine !== -1 && this.focusedLine !== lineIdx;
|
|
349
|
+
return (h("div", { id: `legend-label-${lineIdx}`, class: `legend-label ${isFaded ? "faded" : ""}`, onMouseEnter: () => (this.focusedLine = isHidden ? -1 : lineIdx), onMouseLeave: () => (this.focusedLine = -1) }, this.renderIcon(lineIdx), lineLabel, this.visibilityToggles && this.renderVisibilityToggle(lineLabel, lineIdx, isHidden)));
|
|
350
|
+
})));
|
|
351
|
+
}
|
|
352
|
+
renderVisibilityToggle(lineLabel, lineIdx, isHidden) {
|
|
353
|
+
return (h("wm-button", { id: `visibility-button-${lineIdx}`, class: "visibility-toggle", "label-for-identical-buttons": `${lineIdx === 0 ? lineChartMessages.getToggleButtonLabel(this.dataPointMatrix.length) : ""} ${isHidden ? globalMessages.show : globalMessages.hide} ${lineLabel} ${lineChartMessages.getToggleButtonState(isHidden)}`, "button-type": "navigational", tooltip: isHidden ? globalMessages.show : globalMessages.hide, tooltipPosition: "bottom", icon: isHidden ? "#hide" : "#show", onClick: () => this.toggleLineVisibility(lineIdx), onKeyDown: (ev) => this.handleVisibilityToggleKeydown(ev, lineIdx), onFocus: () => (this.popoverIndex = -1) }));
|
|
354
|
+
}
|
|
355
|
+
renderIcon(lineIdx) {
|
|
356
|
+
const { color, icon } = this.lineStyles[lineIdx];
|
|
357
|
+
return h("div", { style: { color: color }, class: `svg-icon svg-shape-${icon}` });
|
|
358
|
+
}
|
|
359
|
+
renderXIntervals() {
|
|
360
|
+
const gridStyle = {
|
|
361
|
+
"--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr`,
|
|
362
|
+
};
|
|
363
|
+
return (h("div", { class: "x-intervals", style: gridStyle }, this.xIntervals.map((interval) => (h("span", { class: `x-interval ${this.displayedXIntervals.includes(interval) ? "" : "hidden"}` }, interval)))));
|
|
364
|
+
}
|
|
365
|
+
renderYIntervals() {
|
|
366
|
+
return (h("div", { ref: (el) => (this.yIntervalsEl = el), class: "y-intervals" }, this.yIntervals.map((yInterval, idx) => {
|
|
367
|
+
const percentFromTop = (100 / (this.yIntervals.length - 1)) * idx;
|
|
368
|
+
return (h("span", { class: "y-interval", style: { top: `${percentFromTop}%` } }, this.formatYAxisIntervalLabel(yInterval)));
|
|
369
|
+
})));
|
|
370
|
+
}
|
|
371
|
+
renderData() {
|
|
372
|
+
return this.dataPointMatrix.map((_, lineIdx) => {
|
|
373
|
+
let focusState = this.focusedLine === lineIdx ? "focused" : "faded";
|
|
374
|
+
const isHidden = this.hiddenLines.includes(lineIdx);
|
|
375
|
+
return (h("div", { class: `line ${this.focusedLine !== -1 ? focusState : ""} ${isHidden ? "hidden" : ""}` }, this.renderLines(lineIdx), this.renderPoints(lineIdx)));
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
renderPoints(lineIdx) {
|
|
379
|
+
const lineDataPoints = this.dataPointMatrix[lineIdx];
|
|
380
|
+
return (h("div", { class: "line-icons" }, lineDataPoints.map((dataPoint, pointIdx) => {
|
|
381
|
+
var _a;
|
|
382
|
+
const { lineLabel, xValue, yValue, xPositionPercent, yPositionPercent, highlighted } = dataPoint;
|
|
383
|
+
if (yValue !== null) {
|
|
384
|
+
const { color, icon } = this.lineStyles[lineIdx];
|
|
385
|
+
const firstPointTabIndex = lineIdx === 0 && pointIdx === 0 ? 0 : undefined;
|
|
386
|
+
const iconStyle = {
|
|
387
|
+
color: color,
|
|
388
|
+
"--xPosition": xPositionPercent + "%",
|
|
389
|
+
"--yPosition": yPositionPercent + "%",
|
|
390
|
+
};
|
|
391
|
+
let ariaLabel = `${lineLabel} ${highlighted ? this.highlightQualifier : ""} ${this.xAxisLabel} ${xValue + (this.parsedUnits[0] ? this.parsedUnits[0] : "")}, ${this.yAxisLabel}: ${this.formatDisplayYValue(yValue)}${this.parsedUnits[1] ? this.parsedUnits[1] : ""}`;
|
|
392
|
+
if (this.showDeltas && pointIdx > 0) {
|
|
393
|
+
const prevDataPoint = lineDataPoints[pointIdx - 1];
|
|
394
|
+
const changeSinceMessage = lineChartMessages.getChangeSince(prevDataPoint.xValue);
|
|
395
|
+
ariaLabel += `, ${changeSinceMessage} ${this.calcDelta(dataPoint, prevDataPoint)}`;
|
|
396
|
+
}
|
|
397
|
+
if (((_a = this.spotlightData) === null || _a === void 0 ? void 0 : _a.label) && this.spotlightYValue !== undefined) {
|
|
398
|
+
ariaLabel += `, ${this.spotlightData.label} ${this.xAxisLabel} ${this.spotlightXValue + (this.parsedUnits[0] ? this.parsedUnits[0] : "")}, ${this.yAxisLabel}: ${this.formatDisplayYValue(this.spotlightYValue)}${this.parsedUnits[1] ? this.parsedUnits[1] : ""}`;
|
|
399
|
+
}
|
|
400
|
+
return (h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: `point svg-icon svg-shape-${icon}`, style: iconStyle, "data-lineidx": lineIdx, "data-pointidx": pointIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }, h("span", { class: `point-bg svg-icon svg-shape-${icon}` })));
|
|
401
|
+
}
|
|
402
|
+
})));
|
|
403
|
+
}
|
|
404
|
+
renderLines(lineIdx) {
|
|
405
|
+
const lineDataPoints = this.dataPointMatrix[lineIdx];
|
|
406
|
+
return (h("svg", { class: "line-svg" }, lineDataPoints.map((dataPoint, pointIdx) => {
|
|
407
|
+
const shouldDraw = dataPoint.yValue !== null &&
|
|
408
|
+
pointIdx !== lineDataPoints.length - 1 &&
|
|
409
|
+
lineDataPoints[pointIdx + 1].yValue !== null;
|
|
410
|
+
if (shouldDraw) {
|
|
411
|
+
const { color } = this.lineStyles[lineIdx];
|
|
412
|
+
const { xPositionPercent: xStart, yPositionPercent: yStart } = dataPoint;
|
|
413
|
+
const { xPositionPercent: xEnd, yPositionPercent: yEnd } = lineDataPoints[pointIdx + 1];
|
|
414
|
+
return (h("line", { x1: xStart + "%", y1: yStart + "%", x2: xEnd + "%", y2: yEnd + "%", stroke: color, "stroke-width": "2px" }));
|
|
415
|
+
}
|
|
416
|
+
})));
|
|
417
|
+
}
|
|
418
|
+
renderSpotlight() {
|
|
419
|
+
if (!this.spotlightData || !this.spotlightXValue || this.spotlightYValue === undefined)
|
|
420
|
+
return "";
|
|
421
|
+
const yPositionPercent = 100 -
|
|
422
|
+
calcPercentageInRange(this.spotlightYValue, this.yIntervals[this.yIntervals.length - 1], this.yIntervals[0]);
|
|
423
|
+
const xIndex = this.xIntervals.indexOf(this.spotlightXValue);
|
|
424
|
+
const iconXPositionPercent = xIndex >= 0 ? (100 / (this.xIntervals.length - 1)) * xIndex : null;
|
|
425
|
+
return (h("div", { class: "spotlight", style: { "--yPosition": yPositionPercent + "%" } }, this.spotlightXValue && (h("div", { class: "spotlight-icon", style: { "--xPosition": iconXPositionPercent + "%" } }))));
|
|
426
|
+
}
|
|
427
|
+
renderHoverAreas() {
|
|
428
|
+
const hoverAreaStyle = { "--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr` };
|
|
429
|
+
return (h("div", { class: "hover-area-wrapper", style: hoverAreaStyle, onMouseLeave: () => (this.popoverIndex = -1) }, this.xIntervals.map((_, idx) => (h("div", { onMouseEnter: () => (this.popoverIndex = idx) })))));
|
|
430
|
+
}
|
|
431
|
+
renderPopover() {
|
|
432
|
+
const hasPopoverData = this.popoverData &&
|
|
433
|
+
this.popoverData[this.popoverIndex] &&
|
|
434
|
+
this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
|
|
435
|
+
if (!hasPopoverData) {
|
|
436
|
+
return "";
|
|
437
|
+
}
|
|
438
|
+
const displayedPopoverData = this.popoverData[this.popoverIndex];
|
|
439
|
+
const xPosition = displayedPopoverData[0].xPositionPercent;
|
|
440
|
+
const yPositions = displayedPopoverData
|
|
441
|
+
.map((point) => point.yPositionPercent)
|
|
442
|
+
.filter((yPosition) => yPosition !== null);
|
|
443
|
+
const averageYPosition = yPositions.reduce((acc, cur) => acc + cur, 0) / yPositions.length;
|
|
444
|
+
const referencePointEl = this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
|
|
445
|
+
const componentBoundingClientRect = this.el.getBoundingClientRect();
|
|
446
|
+
const referencePointBoundingClientRect = referencePointEl.getBoundingClientRect();
|
|
447
|
+
const rightSpaceAvailable = componentBoundingClientRect.right - referencePointBoundingClientRect.right;
|
|
448
|
+
const leftSpaceAvailable = referencePointBoundingClientRect.left - componentBoundingClientRect.left;
|
|
449
|
+
const hasRoomRight = rightSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
|
|
450
|
+
const hasRoomLeft = leftSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
|
|
451
|
+
const percentMargin = (8 / this.plotAreaEl.clientWidth) * 100;
|
|
452
|
+
let popoverStyle = {
|
|
453
|
+
"--leftPosition": hasRoomRight ? xPosition + percentMargin + "%" : "unset",
|
|
454
|
+
"--rightPosition": hasRoomLeft ? 100 - xPosition + percentMargin + "%" : "unset",
|
|
455
|
+
"--topPosition": averageYPosition + "%",
|
|
456
|
+
transform: "translateY(-50%)", // vertically center for averageYPosition
|
|
457
|
+
};
|
|
458
|
+
if (!hasRoomLeft && !hasRoomRight) {
|
|
459
|
+
// if there's not enough room to the left and right, position "detached" from the data points towards the top of the chart
|
|
460
|
+
const displaceLeft = `0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth + "px"} + ${this.el.scrollLeft + "px"} + 2px`;
|
|
461
|
+
popoverStyle = {
|
|
462
|
+
"--leftPosition": `0%`,
|
|
463
|
+
"--topPosition": "0%",
|
|
464
|
+
maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px", // take up no more max-width than is visually available
|
|
465
|
+
transform: `translateX(calc(${displaceLeft}))`, // align with left edge of component
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
return (h("div", { ref: (el) => (this.popoverEl = el), class: "popover", style: popoverStyle }, h("div", { class: "title" }, displayedPopoverData[0].xValue, this.parsedUnits[0] && h("span", { class: "unit --x" }, "(", this.parsedUnits[0], ")")), this.showDeltas && this.popoverIndex > 0 && (h("div", { class: "comparison-title" }, lineChartMessages.getChangeSince(this.popoverData[this.popoverIndex - 1][0].xValue))), this.renderPopoverTable()));
|
|
469
|
+
}
|
|
470
|
+
renderPopoverTable() {
|
|
471
|
+
var _a;
|
|
472
|
+
const displayedPopoverData = this.popoverData[this.popoverIndex];
|
|
473
|
+
const displayedSpotlightYValue = this.spotlightYValue !== undefined ? this.formatDisplayYValue(this.spotlightYValue) : "";
|
|
474
|
+
return (h("table", { class: "popover-table" }, this.spotlightXValue === displayedPopoverData[0].xValue && (h("tr", { class: "popover-row" }, h("td", null, h("div", { class: "svg-icon svg-spotlight" })), h("td", { class: "row-label" }, (_a = this.spotlightData) === null || _a === void 0 ? void 0 : _a.label), h("td", { class: "row-value" }, displayedSpotlightYValue, displayedSpotlightYValue !== "" && this.parsedUnits[1] && (h("span", { class: "unit --y" }, this.parsedUnits[1]))))), displayedPopoverData.map((dataPoint, lineIdx) => {
|
|
475
|
+
if (!this.hiddenLines.includes(lineIdx)) {
|
|
476
|
+
const { lineLabel, yValue } = dataPoint;
|
|
477
|
+
const prevDataPoint = this.popoverIndex > 0 ? this.popoverData[this.popoverIndex - 1][lineIdx] : null;
|
|
478
|
+
const displayYValue = yValue !== null ? this.formatDisplayYValue(yValue) : null;
|
|
479
|
+
return (h("tr", { class: "popover-row" }, h("td", null, this.renderIcon(lineIdx)), h("td", { class: "row-label" }, lineLabel), h("td", { class: "row-value" }, displayYValue !== null && displayYValue !== void 0 ? displayYValue : lineChartMessages.noData, yValue !== null && this.parsedUnits[1] && h("span", { class: "unit --y" }, this.parsedUnits[1])), this.showDeltas && prevDataPoint && this.renderDeltas(dataPoint, prevDataPoint)));
|
|
480
|
+
}
|
|
481
|
+
})));
|
|
482
|
+
}
|
|
483
|
+
renderDeltas(dataPoint, prevDataPoint) {
|
|
484
|
+
const delta = this.calcDelta(dataPoint, prevDataPoint);
|
|
485
|
+
const deltaColor = delta.toString()[0] == "+" || delta == "-" ? "positive" : delta.toString()[0] == "-" ? "negative" : "";
|
|
486
|
+
return prevDataPoint && h("td", { class: `delta --${deltaColor}` }, delta);
|
|
487
|
+
}
|
|
488
|
+
renderHoverIndicator() {
|
|
489
|
+
const hasIndicatorData = this.dataPointMatrix.length > 0 && this.dataPointMatrix[0][this.popoverIndex];
|
|
490
|
+
if (!hasIndicatorData) {
|
|
491
|
+
return "";
|
|
492
|
+
}
|
|
493
|
+
const xPosition = this.dataPointMatrix[0][this.popoverIndex].xPositionPercent;
|
|
494
|
+
const indicatorStyle = { "--xPosition": xPosition + "%" };
|
|
495
|
+
return h("div", { class: "hover-indicator", style: indicatorStyle });
|
|
496
|
+
}
|
|
497
|
+
renderVerticalGridlines() {
|
|
498
|
+
var _a;
|
|
499
|
+
const gridlineSpacing = this.dataPointMatrix[0] && this.displayedXIntervals[1]
|
|
500
|
+
? (_a = this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])]) === null || _a === void 0 ? void 0 : _a.xPositionPercent
|
|
501
|
+
: 0;
|
|
502
|
+
return (h("div", { class: `vertical-gridlines ${this.hasPartialInterval ? "" : "right-border"} ${!this.showGrid && "axis-only"}`, style: { "--gridlineSpacing": gridlineSpacing + "%" } }));
|
|
503
|
+
}
|
|
504
|
+
renderHorizontalGridlines() {
|
|
505
|
+
const gridlineSpacing = 100 / (this.yIntervals.length - 1);
|
|
506
|
+
return (h("div", { class: `horizontal-gridlines ${!this.showGrid && "axis-only"}`, style: { "--gridlineSpacing": gridlineSpacing + "%" } }));
|
|
507
|
+
}
|
|
508
|
+
renderHighlight() {
|
|
509
|
+
var _a, _b;
|
|
510
|
+
if (this.highlightStart) {
|
|
511
|
+
const startIdx = this.xIntervals.indexOf(this.highlightStart);
|
|
512
|
+
if (startIdx === -1 || !((_a = this.dataPointMatrix[0]) === null || _a === void 0 ? void 0 : _a[startIdx])) {
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
const startPercentage = this.dataPointMatrix[0][startIdx].xPositionPercent;
|
|
516
|
+
const endIdx = this.highlightEnd ? this.xIntervals.indexOf(this.highlightEnd) : -1;
|
|
517
|
+
const endPercentage = endIdx !== -1 && ((_b = this.dataPointMatrix[0]) === null || _b === void 0 ? void 0 : _b[endIdx]) ? 100 - this.dataPointMatrix[0][endIdx].xPositionPercent : 0;
|
|
518
|
+
const highlightStyle = { "--startPercentage": startPercentage + "%", "--endPercentage": endPercentage + "%" };
|
|
519
|
+
return h("div", { class: "highlight", style: highlightStyle });
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
render() {
|
|
523
|
+
return (h(Host, { key: 'bd45cc4a8e504d1cf78695efc383efa9748be2b3', onBlur: () => this.resetDataPointFocus(), onMouseLeave: () => (this.popoverIndex = -1) }, h("div", { key: '6892697f23725192a825d36a723f94b1c4822b29', class: "component-wrapper", role: "application", "aria-roledescription": chartMessages.interactiveChart, "aria-label": this.label, "aria-describedby": "chart-description" }, this.renderLegend(), h("div", { key: '2c770afd1e4215b2096eb52eb563b0b4dbecd3c1', class: "chart-wrapper" }, h("div", { key: '42e893d736e04afbf58db3ff7b8f4388b1c17078', class: "chart-label --y-axis", style: { "--labelWidth": this.labelWidth } }, this.yAxisLabel, this.parsedUnits[1] && ` (${this.parsedUnits[1]})`), this.renderYIntervals(), h("div", { key: 'fd09da97e4b5a3648bbf5405922cc0e528c9a4bc', ref: (el) => (this.plotAreaEl = el), class: "plot-area" }, this.renderVerticalGridlines(), this.renderHorizontalGridlines(), this.renderHighlight(), this.renderData(), this.renderHoverAreas(), this.renderSpotlight()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", { key: '774407a72ca3f664bf34b47b9f7de96944491414', class: "chart-label --x-axis" }, this.xAxisLabel, this.parsedUnits[0] && ` (${this.parsedUnits[0]})`)), h("div", { key: '1a8366917ebe7da6597d2343183ecfef1e7f6ac1', id: "chart-description", class: "sr-only" }, `${lineChartMessages.instructions} ${this.description}`), h("div", { key: 'b8137240f0ad5c6a7ac83e9a65f0ccf22a5f9588', ref: (el) => (this.liveRegionEl = el), "aria-live": "polite", class: "sr-only" }, this.announcement))));
|
|
524
|
+
}
|
|
525
|
+
static get is() { return "wm-line-chart"; }
|
|
526
|
+
static get encapsulation() { return "shadow"; }
|
|
527
|
+
static get originalStyleUrls() {
|
|
528
|
+
return {
|
|
529
|
+
"$": ["wm-line-chart.scss"]
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
static get styleUrls() {
|
|
533
|
+
return {
|
|
534
|
+
"$": ["wm-line-chart.css"]
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
static get properties() {
|
|
538
|
+
return {
|
|
539
|
+
"label": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"mutable": false,
|
|
542
|
+
"complexType": {
|
|
543
|
+
"original": "string",
|
|
544
|
+
"resolved": "string",
|
|
545
|
+
"references": {}
|
|
546
|
+
},
|
|
547
|
+
"required": true,
|
|
548
|
+
"optional": false,
|
|
549
|
+
"docs": {
|
|
550
|
+
"tags": [],
|
|
551
|
+
"text": ""
|
|
552
|
+
},
|
|
553
|
+
"attribute": "label",
|
|
554
|
+
"reflect": false
|
|
555
|
+
},
|
|
556
|
+
"description": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"mutable": false,
|
|
559
|
+
"complexType": {
|
|
560
|
+
"original": "string",
|
|
561
|
+
"resolved": "string",
|
|
562
|
+
"references": {}
|
|
563
|
+
},
|
|
564
|
+
"required": false,
|
|
565
|
+
"optional": false,
|
|
566
|
+
"docs": {
|
|
567
|
+
"tags": [],
|
|
568
|
+
"text": ""
|
|
569
|
+
},
|
|
570
|
+
"attribute": "description",
|
|
571
|
+
"reflect": false,
|
|
572
|
+
"defaultValue": "\"\""
|
|
573
|
+
},
|
|
574
|
+
"xAxisLabel": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"mutable": false,
|
|
577
|
+
"complexType": {
|
|
578
|
+
"original": "string",
|
|
579
|
+
"resolved": "string",
|
|
580
|
+
"references": {}
|
|
581
|
+
},
|
|
582
|
+
"required": true,
|
|
583
|
+
"optional": false,
|
|
584
|
+
"docs": {
|
|
585
|
+
"tags": [],
|
|
586
|
+
"text": ""
|
|
587
|
+
},
|
|
588
|
+
"attribute": "x-axis-label",
|
|
589
|
+
"reflect": false
|
|
590
|
+
},
|
|
591
|
+
"yAxisLabel": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"mutable": false,
|
|
594
|
+
"complexType": {
|
|
595
|
+
"original": "string",
|
|
596
|
+
"resolved": "string",
|
|
597
|
+
"references": {}
|
|
598
|
+
},
|
|
599
|
+
"required": true,
|
|
600
|
+
"optional": false,
|
|
601
|
+
"docs": {
|
|
602
|
+
"tags": [],
|
|
603
|
+
"text": ""
|
|
604
|
+
},
|
|
605
|
+
"attribute": "y-axis-label",
|
|
606
|
+
"reflect": false
|
|
607
|
+
},
|
|
608
|
+
"showGrid": {
|
|
609
|
+
"type": "boolean",
|
|
610
|
+
"mutable": false,
|
|
611
|
+
"complexType": {
|
|
612
|
+
"original": "boolean",
|
|
613
|
+
"resolved": "boolean",
|
|
614
|
+
"references": {}
|
|
615
|
+
},
|
|
616
|
+
"required": false,
|
|
617
|
+
"optional": false,
|
|
618
|
+
"docs": {
|
|
619
|
+
"tags": [],
|
|
620
|
+
"text": ""
|
|
621
|
+
},
|
|
622
|
+
"attribute": "show-grid",
|
|
623
|
+
"reflect": false,
|
|
624
|
+
"defaultValue": "true"
|
|
625
|
+
},
|
|
626
|
+
"lineData": {
|
|
627
|
+
"type": "string",
|
|
628
|
+
"mutable": true,
|
|
629
|
+
"complexType": {
|
|
630
|
+
"original": "string | LineChartData",
|
|
631
|
+
"resolved": "string | { [lineLabel: string]: Line; }",
|
|
632
|
+
"references": {
|
|
633
|
+
"LineChartData": {
|
|
634
|
+
"location": "import",
|
|
635
|
+
"path": "../../../global/interfaces",
|
|
636
|
+
"id": "src/global/interfaces.ts::LineChartData"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"required": true,
|
|
641
|
+
"optional": false,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": ""
|
|
645
|
+
},
|
|
646
|
+
"attribute": "line-data",
|
|
647
|
+
"reflect": false
|
|
648
|
+
},
|
|
649
|
+
"units": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"mutable": false,
|
|
652
|
+
"complexType": {
|
|
653
|
+
"original": "string",
|
|
654
|
+
"resolved": "string",
|
|
655
|
+
"references": {}
|
|
656
|
+
},
|
|
657
|
+
"required": false,
|
|
658
|
+
"optional": false,
|
|
659
|
+
"docs": {
|
|
660
|
+
"tags": [],
|
|
661
|
+
"text": ""
|
|
662
|
+
},
|
|
663
|
+
"attribute": "units",
|
|
664
|
+
"reflect": false,
|
|
665
|
+
"defaultValue": "\"null,null\""
|
|
666
|
+
},
|
|
667
|
+
"labelWidth": {
|
|
668
|
+
"type": "string",
|
|
669
|
+
"mutable": false,
|
|
670
|
+
"complexType": {
|
|
671
|
+
"original": "string",
|
|
672
|
+
"resolved": "string",
|
|
673
|
+
"references": {}
|
|
674
|
+
},
|
|
675
|
+
"required": false,
|
|
676
|
+
"optional": false,
|
|
677
|
+
"docs": {
|
|
678
|
+
"tags": [],
|
|
679
|
+
"text": ""
|
|
680
|
+
},
|
|
681
|
+
"attribute": "label-width",
|
|
682
|
+
"reflect": false,
|
|
683
|
+
"defaultValue": "\"120px\""
|
|
684
|
+
},
|
|
685
|
+
"highlightQualifier": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"mutable": false,
|
|
688
|
+
"complexType": {
|
|
689
|
+
"original": "string",
|
|
690
|
+
"resolved": "string",
|
|
691
|
+
"references": {}
|
|
692
|
+
},
|
|
693
|
+
"required": false,
|
|
694
|
+
"optional": false,
|
|
695
|
+
"docs": {
|
|
696
|
+
"tags": [],
|
|
697
|
+
"text": ""
|
|
698
|
+
},
|
|
699
|
+
"attribute": "highlight-qualifier",
|
|
700
|
+
"reflect": false,
|
|
701
|
+
"defaultValue": "lineChartMessages.highlightQualifier"
|
|
702
|
+
},
|
|
703
|
+
"highlightStart": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"mutable": false,
|
|
706
|
+
"complexType": {
|
|
707
|
+
"original": "string",
|
|
708
|
+
"resolved": "string | undefined",
|
|
709
|
+
"references": {}
|
|
710
|
+
},
|
|
711
|
+
"required": false,
|
|
712
|
+
"optional": true,
|
|
713
|
+
"docs": {
|
|
714
|
+
"tags": [],
|
|
715
|
+
"text": ""
|
|
716
|
+
},
|
|
717
|
+
"attribute": "highlight-start",
|
|
718
|
+
"reflect": false
|
|
719
|
+
},
|
|
720
|
+
"highlightEnd": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"mutable": false,
|
|
723
|
+
"complexType": {
|
|
724
|
+
"original": "string",
|
|
725
|
+
"resolved": "string | undefined",
|
|
726
|
+
"references": {}
|
|
727
|
+
},
|
|
728
|
+
"required": false,
|
|
729
|
+
"optional": true,
|
|
730
|
+
"docs": {
|
|
731
|
+
"tags": [],
|
|
732
|
+
"text": ""
|
|
733
|
+
},
|
|
734
|
+
"attribute": "highlight-end",
|
|
735
|
+
"reflect": false
|
|
736
|
+
},
|
|
737
|
+
"visibilityToggles": {
|
|
738
|
+
"type": "boolean",
|
|
739
|
+
"mutable": false,
|
|
740
|
+
"complexType": {
|
|
741
|
+
"original": "boolean",
|
|
742
|
+
"resolved": "boolean",
|
|
743
|
+
"references": {}
|
|
744
|
+
},
|
|
745
|
+
"required": false,
|
|
746
|
+
"optional": false,
|
|
747
|
+
"docs": {
|
|
748
|
+
"tags": [],
|
|
749
|
+
"text": ""
|
|
750
|
+
},
|
|
751
|
+
"attribute": "visibility-toggles",
|
|
752
|
+
"reflect": false,
|
|
753
|
+
"defaultValue": "false"
|
|
754
|
+
},
|
|
755
|
+
"showDeltas": {
|
|
756
|
+
"type": "boolean",
|
|
757
|
+
"mutable": false,
|
|
758
|
+
"complexType": {
|
|
759
|
+
"original": "boolean",
|
|
760
|
+
"resolved": "boolean",
|
|
761
|
+
"references": {}
|
|
762
|
+
},
|
|
763
|
+
"required": false,
|
|
764
|
+
"optional": false,
|
|
765
|
+
"docs": {
|
|
766
|
+
"tags": [],
|
|
767
|
+
"text": ""
|
|
768
|
+
},
|
|
769
|
+
"attribute": "show-deltas",
|
|
770
|
+
"reflect": false,
|
|
771
|
+
"defaultValue": "false"
|
|
772
|
+
},
|
|
773
|
+
"yRange": {
|
|
774
|
+
"type": "string",
|
|
775
|
+
"mutable": false,
|
|
776
|
+
"complexType": {
|
|
777
|
+
"original": "string",
|
|
778
|
+
"resolved": "string | undefined",
|
|
779
|
+
"references": {}
|
|
780
|
+
},
|
|
781
|
+
"required": false,
|
|
782
|
+
"optional": true,
|
|
783
|
+
"docs": {
|
|
784
|
+
"tags": [],
|
|
785
|
+
"text": ""
|
|
786
|
+
},
|
|
787
|
+
"attribute": "y-range",
|
|
788
|
+
"reflect": false
|
|
789
|
+
},
|
|
790
|
+
"spotlightData": {
|
|
791
|
+
"type": "unknown",
|
|
792
|
+
"mutable": false,
|
|
793
|
+
"complexType": {
|
|
794
|
+
"original": "SpotlightData",
|
|
795
|
+
"resolved": "SpotlightData | undefined",
|
|
796
|
+
"references": {
|
|
797
|
+
"SpotlightData": {
|
|
798
|
+
"location": "import",
|
|
799
|
+
"path": "../../../global/interfaces",
|
|
800
|
+
"id": "src/global/interfaces.ts::SpotlightData"
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"required": false,
|
|
805
|
+
"optional": true,
|
|
806
|
+
"docs": {
|
|
807
|
+
"tags": [],
|
|
808
|
+
"text": ""
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"decimalPlaces": {
|
|
812
|
+
"type": "number",
|
|
813
|
+
"mutable": false,
|
|
814
|
+
"complexType": {
|
|
815
|
+
"original": "number",
|
|
816
|
+
"resolved": "number | undefined",
|
|
817
|
+
"references": {}
|
|
818
|
+
},
|
|
819
|
+
"required": false,
|
|
820
|
+
"optional": true,
|
|
821
|
+
"docs": {
|
|
822
|
+
"tags": [],
|
|
823
|
+
"text": ""
|
|
824
|
+
},
|
|
825
|
+
"attribute": "decimal-places",
|
|
826
|
+
"reflect": false
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
}
|
|
830
|
+
static get states() {
|
|
831
|
+
return {
|
|
832
|
+
"parsedLineData": {},
|
|
833
|
+
"popoverIndex": {},
|
|
834
|
+
"focusedLine": {},
|
|
835
|
+
"hiddenLines": {},
|
|
836
|
+
"isTabbing": {},
|
|
837
|
+
"announcement": {}
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
static get elementRef() { return "el"; }
|
|
841
|
+
static get watchers() {
|
|
842
|
+
return [{
|
|
843
|
+
"propName": "lineData",
|
|
844
|
+
"methodName": "parseData"
|
|
845
|
+
}];
|
|
846
|
+
}
|
|
847
|
+
static get listeners() {
|
|
848
|
+
return [{
|
|
849
|
+
"name": "wmUserIsTabbing",
|
|
850
|
+
"method": "toggleTabbingOn",
|
|
851
|
+
"target": "window",
|
|
852
|
+
"capture": false,
|
|
853
|
+
"passive": false
|
|
854
|
+
}, {
|
|
855
|
+
"name": "wmUserIsNotTabbing",
|
|
856
|
+
"method": "toggleTabbingOff",
|
|
857
|
+
"target": "window",
|
|
858
|
+
"capture": false,
|
|
859
|
+
"passive": false
|
|
860
|
+
}];
|
|
861
|
+
}
|
|
862
|
+
}
|