@watermarkinsights/ripple 0.0.1 → 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3db2fdd3.js +103 -0
- package/dist/cjs/chartFunctions-0d47b1f4.js +906 -0
- package/dist/cjs/functions-761cb9f2.js +10694 -0
- package/dist/cjs/index-bb947bd5.js +1843 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/interfaces-33cd6161.js +82 -0
- package/dist/cjs/intl-9e9388a7.js +291 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/priv-calendar.cjs.entry.js +580 -0
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +146 -0
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +204 -0
- package/dist/cjs/priv-navigator-button.cjs.entry.js +29 -0
- package/dist/cjs/priv-navigator-item.cjs.entry.js +35 -0
- package/dist/cjs/priv-option-list.cjs.entry.js +391 -0
- package/dist/cjs/ripple.cjs.js +25 -0
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +525 -0
- package/dist/cjs/wm-button.cjs.entry.js +280 -0
- package/dist/cjs/wm-chart-bar.cjs.entry.js +444 -0
- package/dist/cjs/wm-chart-column.cjs.entry.js +629 -0
- package/dist/cjs/wm-chart-slice.cjs.entry.js +27 -0
- package/dist/cjs/wm-chart-stack.cjs.entry.js +447 -0
- package/dist/cjs/wm-chart.cjs.entry.js +163 -0
- package/dist/cjs/wm-date-range.cjs.entry.js +591 -0
- package/dist/cjs/wm-datepicker.cjs.entry.js +399 -0
- package/dist/{ripple/wm-tab-panel.entry.js → cjs/wm-file-list.cjs.entry.js} +15 -24
- package/dist/cjs/wm-file.cjs.entry.js +210 -0
- package/dist/cjs/wm-flyout.cjs.entry.js +178 -0
- package/dist/{ripple/wm-modal.entry.js → cjs/wm-input.cjs.entry.js} +108 -110
- package/dist/cjs/wm-line-chart.cjs.entry.js +541 -0
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +220 -0
- package/dist/cjs/wm-modal_3.cjs.entry.js +238 -0
- package/dist/cjs/wm-navigation_3.cjs.entry.js +188 -0
- package/dist/cjs/wm-navigator.cjs.entry.js +334 -0
- package/dist/cjs/wm-nested-select.cjs.entry.js +322 -0
- package/dist/{ripple/wm-textarea.entry.js → cjs/wm-optgroup.cjs.entry.js} +62 -57
- package/dist/cjs/wm-option_2.cjs.entry.js +536 -0
- package/dist/{ripple/wm-navigation.entry.js → cjs/wm-pagination.cjs.entry.js} +204 -91
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +204 -0
- package/dist/{ripple/wm-flyout.entry.js → cjs/wm-search.cjs.entry.js} +168 -139
- package/dist/{ripple/wm-datepicker.entry.js → cjs/wm-snackbar.cjs.entry.js} +152 -223
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +357 -0
- package/dist/cjs/wm-tag-input.cjs.entry.js +985 -0
- package/dist/cjs/wm-tag-option.cjs.entry.js +51 -0
- package/dist/{ripple/wm-modal-pss.entry.js → cjs/wm-textarea.cjs.entry.js} +70 -111
- package/dist/{ripple/wm-progress-indicator.entry.js → cjs/wm-timepicker.cjs.entry.js} +296 -78
- package/dist/cjs/wm-toggletip.cjs.entry.js +252 -0
- package/dist/cjs/wm-uploader.cjs.entry.js +341 -0
- package/dist/cjs/wm-wrapper.cjs.entry.js +21 -0
- package/dist/collection/collection-manifest.json +207 -0
- package/dist/collection/components/charts/chartFunctions.js +831 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +995 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +345 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +990 -0
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +268 -0
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +177 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.css +1326 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +549 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1236 -0
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +725 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +1335 -0
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +914 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +1006 -0
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +310 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.css +1466 -0
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +709 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1208 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +999 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +1326 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +320 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +967 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +232 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +167 -0
- package/dist/collection/components/datepickers/datepicker.css +1147 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +1415 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +857 -0
- package/dist/collection/components/datepickers/wm-date-range.js +1158 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +875 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +999 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +784 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +1259 -0
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +805 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +909 -0
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +363 -0
- package/dist/collection/components/selects/wm-option/wm-option.css +1033 -0
- package/dist/collection/components/selects/wm-option/wm-option.js +665 -0
- package/dist/collection/components/selects/wm-select/wm-select.css +1174 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +878 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +1690 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +932 -0
- package/dist/collection/components/wm-button/wm-button.css +1630 -0
- package/dist/collection/components/wm-button/wm-button.js +794 -0
- package/dist/collection/components/wm-file/wm-file.css +1086 -0
- package/dist/collection/components/wm-file/wm-file.js +536 -0
- package/dist/collection/components/wm-file-list/wm-file-list.css +899 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +118 -0
- package/dist/collection/components/wm-flyout/wm-flyout.css +1091 -0
- package/dist/collection/components/wm-flyout/wm-flyout.js +651 -0
- package/dist/collection/components/wm-input/wm-input.css +1095 -0
- package/dist/collection/components/wm-input/wm-input.js +653 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +982 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +515 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.css +927 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +199 -0
- package/dist/collection/components/wm-modal/wm-modal-header.css +926 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +110 -0
- package/dist/collection/components/wm-modal/wm-modal.css +983 -0
- package/dist/collection/components/wm-modal/wm-modal.js +534 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +931 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +142 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +925 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +86 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +1007 -0
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +369 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +926 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +153 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +935 -0
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +140 -0
- package/dist/collection/components/wm-navigation/wm-navigation.css +977 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +246 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +929 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +90 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +918 -0
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +128 -0
- package/dist/collection/components/wm-navigator/wm-navigator.css +990 -0
- package/dist/collection/components/wm-navigator/wm-navigator.js +597 -0
- package/dist/collection/components/wm-pagination/wm-pagination.css +1044 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +487 -0
- package/dist/collection/components/wm-search/wm-search.css +983 -0
- package/dist/collection/components/wm-search/wm-search.js +604 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +1150 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +363 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +958 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +233 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +966 -0
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +461 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +906 -0
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +132 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +1423 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1511 -0
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +328 -0
- package/dist/collection/components/wm-textarea/wm-textarea.css +1065 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +423 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +1174 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +728 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +1296 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +455 -0
- package/dist/collection/components/wm-uploader/wm-uploader.css +1987 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +760 -0
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +31 -0
- package/dist/collection/dev/action-menu.js +18 -0
- package/dist/collection/dev/button.js +12 -0
- package/dist/collection/dev/chart-bar.js +430 -0
- package/dist/collection/dev/chart-column.js +459 -0
- package/dist/collection/dev/chart-small.js +56 -0
- package/dist/collection/dev/chart-stack.js +205 -0
- package/dist/collection/dev/chart.js +18 -0
- package/dist/collection/dev/date-range.js +14 -0
- package/dist/collection/dev/datepicker.js +46 -0
- package/dist/collection/dev/file-list.js +16 -0
- package/dist/collection/dev/file.js +0 -0
- package/dist/collection/dev/flyout.js +194 -0
- package/dist/collection/dev/input.js +6 -0
- package/dist/collection/dev/line-chart.js +45 -0
- package/dist/collection/dev/modal.js +48 -0
- package/dist/collection/dev/navigation.js +13 -0
- package/dist/collection/dev/navigator.js +34 -0
- package/dist/collection/dev/nested-select.js +36 -0
- package/dist/collection/dev/pagination.js +7 -0
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/pss-modal.js +8 -0
- package/dist/collection/dev/scripts.js +49 -0
- package/dist/collection/dev/search.js +72 -0
- package/dist/collection/dev/select.js +57 -0
- package/dist/collection/dev/snackbar.js +68 -0
- package/dist/collection/dev/tabs.js +44 -0
- package/dist/collection/dev/tag-input.js +32 -0
- package/dist/collection/dev/textarea.js +28 -0
- package/dist/collection/dev/timepicker.js +32 -0
- package/dist/collection/dev/toggletip.js +9 -0
- package/dist/collection/dev/uploader.js +139 -0
- package/dist/collection/global/__mocks__/functions.js +6 -0
- package/dist/collection/global/functions.js +907 -0
- package/dist/{ripple/app-globals-B7cOtGhY.js → collection/global/global.js} +16 -87
- package/dist/collection/global/interfaces.js +94 -0
- package/dist/collection/global/intl.js +281 -0
- package/dist/collection/global/services/__mocks__/http-service.js +130 -0
- package/dist/collection/global/services/http-service.js +50 -0
- package/dist/collection/lang/lang.js +5 -0
- package/dist/collection/lang/missing.js +43 -0
- package/dist/collection/lang/piglatin.js +101 -0
- package/dist/docs/docs.d.ts +435 -0
- package/dist/docs/docs.json +14178 -0
- package/dist/docs/props-reference.json +2079 -0
- package/dist/docs/skill/index.md +33 -0
- package/dist/docs/skill/wm-action-menu.md +116 -0
- package/dist/docs/skill/wm-button.md +121 -0
- package/dist/docs/skill/wm-chart-bar.md +156 -0
- package/dist/docs/skill/wm-chart-column.md +122 -0
- package/dist/docs/skill/wm-chart-legend.md +91 -0
- package/dist/docs/skill/wm-chart-slice.md +101 -0
- package/dist/docs/skill/wm-chart-stack.md +147 -0
- package/dist/docs/skill/wm-chart.md +139 -0
- package/dist/docs/skill/wm-date-range.md +176 -0
- package/dist/docs/skill/wm-datepicker.md +153 -0
- package/dist/docs/skill/wm-file-list.md +105 -0
- package/dist/docs/skill/wm-file.md +91 -0
- package/dist/docs/skill/wm-flyout.md +209 -0
- package/dist/docs/skill/wm-input.md +134 -0
- package/dist/docs/skill/wm-line-chart.md +135 -0
- package/dist/docs/skill/wm-menuitem.md +64 -0
- package/dist/docs/skill/wm-modal-footer.md +81 -0
- package/dist/docs/skill/wm-modal-header.md +71 -0
- package/dist/docs/skill/wm-modal.md +172 -0
- package/dist/docs/skill/wm-navigation-hamburger.md +61 -0
- package/dist/docs/skill/wm-navigation-item.md +78 -0
- package/dist/docs/skill/wm-navigation.md +82 -0
- package/dist/docs/skill/wm-navigator.md +106 -0
- package/dist/docs/skill/wm-nested-select.md +160 -0
- package/dist/docs/skill/wm-optgroup.md +72 -0
- package/dist/docs/skill/wm-option.md +67 -0
- package/dist/docs/skill/wm-pagination.md +114 -0
- package/dist/docs/skill/wm-progress-indicator.md +75 -0
- package/dist/docs/skill/wm-progress-monitor.md +120 -0
- package/dist/docs/skill/wm-progress-slice.md +67 -0
- package/dist/docs/skill/wm-search.md +180 -0
- package/dist/docs/skill/wm-select.md +169 -0
- package/dist/docs/skill/wm-snackbar.md +130 -0
- package/dist/docs/skill/wm-tab-item.md +45 -0
- package/dist/docs/skill/wm-tab-list.md +139 -0
- package/dist/docs/skill/wm-tab-panel.md +39 -0
- package/dist/docs/skill/wm-tag-input.md +187 -0
- package/dist/docs/skill/wm-tag-option.md +60 -0
- package/dist/docs/skill/wm-textarea.md +102 -0
- package/dist/docs/skill/wm-timepicker.md +156 -0
- package/dist/docs/skill/wm-toggletip.md +98 -0
- package/dist/docs/skill/wm-uploader.md +154 -0
- package/dist/docs/skill/wm-wrapper.md +5 -0
- package/dist/esm/app-globals-a1092590.js +101 -0
- package/dist/{ripple/chartFunctions-CmeM8Tyx.js → esm/chartFunctions-58637dc9.js} +159 -3
- package/dist/{ripple/functions-DVLl0rH_.js → esm/functions-65f1594c.js} +374 -7830
- package/dist/esm/index-3425d80d.js +1813 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/interfaces-8778346d.js +77 -0
- package/dist/{ripple/intl-7p27BJSM.js → esm/intl-d518f362.js} +11 -4
- package/dist/esm/loader.js +11 -0
- package/dist/{ripple → esm}/priv-calendar.entry.js +143 -133
- package/dist/esm/priv-chart-popover-old.entry.js +142 -0
- package/dist/esm/priv-chart-popover_2.entry.js +199 -0
- package/dist/{ripple → esm}/priv-navigator-button.entry.js +5 -4
- package/dist/{ripple → esm}/priv-navigator-item.entry.js +5 -4
- package/dist/{ripple → esm}/priv-option-list.entry.js +18 -16
- package/dist/esm/ripple.js +20 -0
- package/dist/esm/wm-action-menu_2.entry.js +520 -0
- package/dist/{ripple/wm-modal-header.entry.js → esm/wm-button.entry.js} +264 -24
- package/dist/esm/wm-chart-bar.entry.js +440 -0
- package/dist/esm/wm-chart-column.entry.js +625 -0
- package/dist/{ripple → esm}/wm-chart-slice.entry.js +6 -1
- package/dist/esm/wm-chart-stack.entry.js +443 -0
- package/dist/esm/wm-chart.entry.js +159 -0
- package/dist/{ripple → esm}/wm-date-range.entry.js +224 -114
- package/dist/esm/wm-datepicker.entry.js +395 -0
- package/dist/{ripple → esm}/wm-file-list.entry.js +5 -4
- package/dist/{ripple → esm}/wm-file.entry.js +48 -24
- package/dist/esm/wm-flyout.entry.js +174 -0
- package/dist/{ripple → esm}/wm-input.entry.js +23 -7
- package/dist/{ripple → esm}/wm-line-chart.entry.js +182 -94
- package/dist/esm/wm-modal-pss_3.entry.js +214 -0
- package/dist/esm/wm-modal_3.entry.js +232 -0
- package/dist/esm/wm-navigation_3.entry.js +182 -0
- package/dist/{ripple → esm}/wm-navigator.entry.js +26 -64
- package/dist/{ripple → esm}/wm-nested-select.entry.js +35 -25
- package/dist/{ripple → esm}/wm-optgroup.entry.js +17 -5
- package/dist/esm/wm-option_2.entry.js +531 -0
- package/dist/{ripple → esm}/wm-pagination.entry.js +16 -14
- package/dist/esm/wm-progress-indicator_3.entry.js +198 -0
- package/dist/{ripple → esm}/wm-search.entry.js +15 -31
- package/dist/{ripple → esm}/wm-snackbar.entry.js +32 -45
- package/dist/esm/wm-tab-item_3.entry.js +351 -0
- package/dist/{ripple → esm}/wm-tag-input.entry.js +169 -65
- package/dist/{ripple → esm}/wm-tag-option.entry.js +14 -2
- package/dist/{ripple/wm-menuitem.entry.js → esm/wm-textarea.entry.js} +65 -100
- package/dist/{ripple → esm}/wm-timepicker.entry.js +33 -12
- package/dist/{ripple → esm}/wm-toggletip.entry.js +105 -33
- package/dist/esm/wm-uploader.entry.js +337 -0
- package/dist/{ripple → esm}/wm-wrapper.entry.js +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/ripple/index.esm.js +0 -1
- package/dist/ripple/p-0d364411.entry.js +1 -0
- package/dist/ripple/p-156c4d1d.entry.js +1 -0
- package/dist/ripple/{wm-modal-footer.entry.js → p-26d8c356.entry.js} +1 -44
- package/dist/ripple/p-2b23ce49.entry.js +1 -0
- package/dist/ripple/p-2b7cc2c1.entry.js +1 -0
- package/dist/ripple/p-34bde06a.entry.js +1 -0
- package/dist/ripple/p-35db9386.entry.js +1 -0
- package/dist/ripple/p-38a987ac.entry.js +1 -0
- package/dist/ripple/p-38b05894.entry.js +1 -0
- package/dist/ripple/p-38dee4ab.entry.js +1 -0
- package/dist/ripple/p-3a19d019.entry.js +1 -0
- package/dist/ripple/p-451d4de2.js +1 -0
- package/dist/ripple/p-507f2cf4.entry.js +1 -0
- package/dist/ripple/p-59f74ead.entry.js +1 -0
- package/dist/ripple/p-5c2fc42a.entry.js +1 -0
- package/dist/ripple/p-680d7606.entry.js +1 -0
- package/dist/ripple/p-683264db.js +1 -0
- package/dist/ripple/p-6db681c8.entry.js +1 -0
- package/dist/ripple/p-6e3c2bbc.js +1 -0
- package/dist/ripple/p-6f1cabab.entry.js +1 -0
- package/dist/ripple/p-72d135ee.entry.js +1 -0
- package/dist/ripple/p-7799953c.entry.js +1 -0
- package/dist/ripple/p-83c3db60.js +2 -0
- package/dist/ripple/{wm-progress-monitor.entry.js → p-83cdad78.entry.js} +1 -71
- package/dist/ripple/p-87ef0cfa.entry.js +1 -0
- package/dist/ripple/p-88e44511.entry.js +1 -0
- package/dist/ripple/p-8f8e4eb8.entry.js +1 -0
- package/dist/ripple/p-936adffb.entry.js +1 -0
- package/dist/ripple/p-9755192c.entry.js +1 -0
- package/dist/ripple/p-9c5c591b.js +1 -0
- package/dist/ripple/p-9ea38d96.entry.js +1 -0
- package/dist/ripple/p-be3e4e7c.entry.js +1 -0
- package/dist/ripple/p-c9c7df12.entry.js +1 -0
- package/dist/ripple/p-d7a1be0b.entry.js +1 -0
- package/dist/ripple/p-dab86523.entry.js +1 -0
- package/dist/ripple/{wm-tab-list.entry.js → p-e4aa6e27.entry.js} +1 -175
- package/dist/ripple/p-ebe9f38c.js +1 -0
- package/dist/ripple/p-ed053612.entry.js +1 -0
- package/dist/ripple/p-f43f621b.entry.js +1 -0
- package/dist/ripple/p-f48d30d6.entry.js +1 -0
- package/dist/ripple/{wm-action-menu.entry.js → p-f6aad57c.entry.js} +1 -201
- package/dist/ripple/p-f6e1beb5.entry.js +1 -0
- package/dist/ripple/p-fc843bb8.entry.js +1 -0
- package/dist/ripple/{priv-chart-popover.entry.js → p-fd997764.entry.js} +1 -134
- package/dist/ripple/p-fffb46ad.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -48
- package/dist/types/components/charts/chartFunctions.d.ts +15 -2
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +25 -11
- package/dist/types/components/charts/priv-chart-popover-old/priv-chart-popover-old.d.ts +31 -0
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +52 -0
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +113 -1
- package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +195 -0
- package/dist/types/components/charts/wm-chart-column/wm-chart-column.d.ts +184 -0
- package/dist/types/components/charts/wm-chart-legend/wm-chart-legend.d.ts +110 -0
- package/dist/types/components/charts/wm-chart-stack/wm-chart-stack.d.ts +194 -0
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +156 -11
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +53 -1
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +85 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +44 -0
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +19 -3
- package/dist/types/components/datepickers/wm-date-range.d.ts +205 -14
- package/dist/types/components/datepickers/wm-datepicker.d.ts +189 -11
- package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +6 -0
- package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +165 -1
- package/dist/types/components/selects/wm-optgroup/wm-optgroup.d.ts +87 -0
- package/dist/types/components/selects/wm-option/wm-option.d.ts +117 -0
- package/dist/types/components/selects/wm-select/wm-select.d.ts +193 -12
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +207 -2
- package/dist/types/components/wm-button/wm-button.d.ts +191 -0
- package/dist/types/components/wm-file/wm-file.d.ts +110 -1
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +72 -0
- package/dist/types/components/wm-flyout/wm-flyout.d.ts +205 -0
- package/dist/types/components/wm-input/wm-input.d.ts +161 -1
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +79 -0
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +54 -0
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +30 -0
- package/dist/types/components/wm-modal/wm-modal.d.ts +160 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-footer.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss-header.d.ts +4 -0
- package/dist/types/components/wm-modal-pss/wm-modal-pss.d.ts +6 -0
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +34 -0
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +41 -0
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +57 -0
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +4 -0
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +4 -0
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +93 -4
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +100 -1
- package/dist/types/components/wm-search/wm-search.d.ts +158 -6
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +103 -1
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +55 -3
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +119 -20
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +35 -2
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +199 -5
- package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +68 -0
- package/dist/types/components/wm-textarea/wm-textarea.d.ts +99 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +147 -0
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +88 -2
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +145 -3
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +3 -0
- package/dist/types/components.d.ts +11523 -95
- package/dist/types/global/functions.d.ts +7 -2
- package/dist/types/global/interfaces.d.ts +92 -2
- package/dist/types/global/intl.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -28
- package/package.json +4 -33
- package/dist/components/index.d.ts +0 -33
- package/dist/components/priv-calendar.d.ts +0 -11
- package/dist/components/priv-chart-popover.d.ts +0 -11
- package/dist/components/priv-navigator-button.d.ts +0 -11
- package/dist/components/priv-navigator-item.d.ts +0 -11
- package/dist/components/priv-option-list.d.ts +0 -11
- package/dist/components/wm-action-menu.d.ts +0 -11
- package/dist/components/wm-button.d.ts +0 -11
- package/dist/components/wm-chart-slice.d.ts +0 -11
- package/dist/components/wm-chart.d.ts +0 -11
- package/dist/components/wm-date-range.d.ts +0 -11
- package/dist/components/wm-datepicker.d.ts +0 -11
- package/dist/components/wm-file-list.d.ts +0 -11
- package/dist/components/wm-file.d.ts +0 -11
- package/dist/components/wm-flyout.d.ts +0 -11
- package/dist/components/wm-input.d.ts +0 -11
- package/dist/components/wm-line-chart.d.ts +0 -11
- package/dist/components/wm-menuitem.d.ts +0 -11
- package/dist/components/wm-modal-footer.d.ts +0 -11
- package/dist/components/wm-modal-header.d.ts +0 -11
- package/dist/components/wm-modal-pss-footer.d.ts +0 -11
- package/dist/components/wm-modal-pss-header.d.ts +0 -11
- package/dist/components/wm-modal-pss.d.ts +0 -11
- package/dist/components/wm-modal.d.ts +0 -11
- package/dist/components/wm-navigation-hamburger.d.ts +0 -11
- package/dist/components/wm-navigation-item.d.ts +0 -11
- package/dist/components/wm-navigation.d.ts +0 -11
- package/dist/components/wm-navigator.d.ts +0 -11
- package/dist/components/wm-nested-select.d.ts +0 -11
- package/dist/components/wm-optgroup.d.ts +0 -11
- package/dist/components/wm-option.d.ts +0 -11
- package/dist/components/wm-pagination.d.ts +0 -11
- package/dist/components/wm-progress-indicator.d.ts +0 -11
- package/dist/components/wm-progress-monitor.d.ts +0 -11
- package/dist/components/wm-progress-slice.d.ts +0 -11
- package/dist/components/wm-search.d.ts +0 -11
- package/dist/components/wm-select.d.ts +0 -11
- package/dist/components/wm-snackbar.d.ts +0 -11
- package/dist/components/wm-tab-item.d.ts +0 -11
- package/dist/components/wm-tab-list.d.ts +0 -11
- package/dist/components/wm-tab-panel.d.ts +0 -11
- package/dist/components/wm-tag-input.d.ts +0 -11
- package/dist/components/wm-tag-option.d.ts +0 -11
- package/dist/components/wm-textarea.d.ts +0 -11
- package/dist/components/wm-timepicker.d.ts +0 -11
- package/dist/components/wm-toggletip.d.ts +0 -11
- package/dist/components/wm-uploader.d.ts +0 -11
- package/dist/components/wm-wrapper.d.ts +0 -11
- package/dist/ripple/index-CU5QNCKv.js +0 -4167
- package/dist/ripple/interfaces-CrANcZM9.js +0 -53
- package/dist/ripple/wm-button.entry.js +0 -197
- package/dist/ripple/wm-chart.entry.js +0 -157
- package/dist/ripple/wm-modal-pss-footer.entry.js +0 -40
- package/dist/ripple/wm-modal-pss-header.entry.js +0 -39
- package/dist/ripple/wm-navigation-hamburger.entry.js +0 -48
- package/dist/ripple/wm-navigation-item.entry.js +0 -18
- package/dist/ripple/wm-option.entry.js +0 -171
- package/dist/ripple/wm-progress-slice.entry.js +0 -13
- package/dist/ripple/wm-select.entry.js +0 -249
- package/dist/ripple/wm-tab-item.entry.js +0 -63
- package/dist/ripple/wm-uploader.entry.js +0 -313
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { chartPalettes, patternKey, } from "../../../global/interfaces";
|
|
3
|
+
import { formatDisplayValue, renderInstructionsText } from "../chartFunctions";
|
|
4
|
+
import { chartMessages, stackChartMessages } from "../../../global/intl";
|
|
5
|
+
import { isElOrChild } from "../../../global/functions";
|
|
6
|
+
/**
|
|
7
|
+
* Renders a horizontal stacked bar chart: each stack's segments are sized as a percentage of
|
|
8
|
+
* that stack's total. Supports any number of stacks and segments, each occupying their own row.
|
|
9
|
+
* Data and configuration are set via JavaScript properties (`chart.config` and `chart.data`) — not
|
|
10
|
+
* HTML attributes.
|
|
11
|
+
*
|
|
12
|
+
* @displayName Stack Chart
|
|
13
|
+
* @category Data Visualization
|
|
14
|
+
*
|
|
15
|
+
* @keyboardInteraction
|
|
16
|
+
* - **Tab**: Enters the chart wrapper.
|
|
17
|
+
* - **Arrow Down / Right**: Focuses the first segment.
|
|
18
|
+
* - **Arrow Left / Right**: Moves to the previous / next segment within the stack, wrapping at the ends.
|
|
19
|
+
* - **Arrow Up / Down**: Moves to the previous / next stack (focusing its first segment), wrapping at the ends.
|
|
20
|
+
* - **Enter**: Activates the popover button when the popover is open.
|
|
21
|
+
* - **Escape**: Closes the open popover.
|
|
22
|
+
* - **Tab** (from within): Exits the chart and clears focus.
|
|
23
|
+
*
|
|
24
|
+
* @accessibility
|
|
25
|
+
* - `config.label` is required — used as the chart's `aria-label`.
|
|
26
|
+
* - The chart renders with `role="application"` and `aria-roledescription="Interactive chart"`.
|
|
27
|
+
* - When a percentage label is hidden for lack of space, a "click a segment to see values" hint is
|
|
28
|
+
* shown; it is removed when printing, where clicking isn't available and the data table lists
|
|
29
|
+
* every value.
|
|
30
|
+
*
|
|
31
|
+
* @usageNotes
|
|
32
|
+
* - Segments are grouped into stacks by each segment's `stackName`; one distinct `stackName` renders
|
|
33
|
+
* the single-stack layout (no stack label), multiple render the grouped variant.
|
|
34
|
+
* - Color follows the order each `legend` first appears in `data`, so a legend keeps a consistent
|
|
35
|
+
* color across stacks. A per-segment `color` overrides the palette; legends beyond the palette
|
|
36
|
+
* fall back to the default color.
|
|
37
|
+
* - Set `id` on the element to pair it with an external `wm-chart-legend` via `chart-ids`.
|
|
38
|
+
* - Print mode (`printMode` prop, `config.printMode`, or an active browser print) shortens the bars,
|
|
39
|
+
* enlarges the percentage labels, hides the interactive legend, and renders a data table per stack.
|
|
40
|
+
*
|
|
41
|
+
* @example {html} Single stack
|
|
42
|
+
* <wm-chart-stack id="submission-status"></wm-chart-stack>
|
|
43
|
+
* <script>
|
|
44
|
+
* const chart = document.querySelector('#submission-status');
|
|
45
|
+
* chart.config = { label: 'Submission status', colors: 'semantic', showLegend: 'top' };
|
|
46
|
+
* chart.data = [
|
|
47
|
+
* { stackName: 'Status', legend: 'Not Submitted', amount: 2 },
|
|
48
|
+
* { stackName: 'Status', legend: 'Awaiting Review', amount: 4 },
|
|
49
|
+
* { stackName: 'Status', legend: 'Met', amount: 10 },
|
|
50
|
+
* { stackName: 'Status', legend: 'Not Met', amount: 4 },
|
|
51
|
+
* ];
|
|
52
|
+
* </script>
|
|
53
|
+
*
|
|
54
|
+
* @example {react} Single stack
|
|
55
|
+
* <WmChartStack ref={chartRef} />
|
|
56
|
+
* // In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
57
|
+
*
|
|
58
|
+
* @example {html} Grouped (multiple stacks)
|
|
59
|
+
* <wm-chart-stack id="status-by-requirement"></wm-chart-stack>
|
|
60
|
+
* <script>
|
|
61
|
+
* const chart = document.querySelector('#status-by-requirement');
|
|
62
|
+
* chart.config = { label: 'Status by requirement', colors: 'semantic', showLegend: 'top' };
|
|
63
|
+
* chart.data = [
|
|
64
|
+
* { stackName: 'Requirement 01', legend: 'Met', amount: 12 },
|
|
65
|
+
* { stackName: 'Requirement 01', legend: 'Not Met', amount: 12 },
|
|
66
|
+
* { stackName: 'Requirement 02', legend: 'Met', amount: 33 },
|
|
67
|
+
* { stackName: 'Requirement 02', legend: 'Not Met', amount: 67 },
|
|
68
|
+
* ];
|
|
69
|
+
* </script>
|
|
70
|
+
*
|
|
71
|
+
* @example {react} Grouped (multiple stacks)
|
|
72
|
+
* <WmChartStack ref={chartRef} />
|
|
73
|
+
* // In useEffect: chartRef.current.config = {...}; chartRef.current.data = [...];
|
|
74
|
+
*/
|
|
75
|
+
export class ChartStack {
|
|
76
|
+
constructor() {
|
|
77
|
+
this.legendData = [];
|
|
78
|
+
this.stackTotals = new Map();
|
|
79
|
+
this.measurePending = false;
|
|
80
|
+
this.config = undefined;
|
|
81
|
+
this.data = undefined;
|
|
82
|
+
this.printMode = undefined;
|
|
83
|
+
this.patternMode = undefined;
|
|
84
|
+
this.subinfo = undefined;
|
|
85
|
+
this.processedStacks = new Map();
|
|
86
|
+
this.isKeying = false;
|
|
87
|
+
this.hasHiddenValues = false;
|
|
88
|
+
this.userIsPrinting = false;
|
|
89
|
+
}
|
|
90
|
+
////////////////////////////////////////////////////////////
|
|
91
|
+
// #region Getters
|
|
92
|
+
////////////////////////////////////////////////////////////
|
|
93
|
+
get colorPalette() {
|
|
94
|
+
var _a;
|
|
95
|
+
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.colors) === "semantic" ? chartPalettes.stackSemantic : chartPalettes.discrete;
|
|
96
|
+
}
|
|
97
|
+
get showLegend() {
|
|
98
|
+
var _a;
|
|
99
|
+
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.showLegend) || "none";
|
|
100
|
+
}
|
|
101
|
+
get showGrid() {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
return (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.showGrid) !== null && _b !== void 0 ? _b : false;
|
|
104
|
+
}
|
|
105
|
+
get valueFormat() {
|
|
106
|
+
var _a;
|
|
107
|
+
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.valueFormat) || "percentage";
|
|
108
|
+
}
|
|
109
|
+
get isPrintMode() {
|
|
110
|
+
var _a, _b, _c;
|
|
111
|
+
return ((_c = (_a = this.printMode) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.printMode) !== null && _c !== void 0 ? _c : false) || this.userIsPrinting;
|
|
112
|
+
}
|
|
113
|
+
get isPatternMode() {
|
|
114
|
+
var _a, _b, _c;
|
|
115
|
+
return (_c = (_a = this.patternMode) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.patternMode) !== null && _c !== void 0 ? _c : false;
|
|
116
|
+
}
|
|
117
|
+
get subinfoText() {
|
|
118
|
+
var _a;
|
|
119
|
+
return this.subinfo || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.subinfo) || "";
|
|
120
|
+
}
|
|
121
|
+
get isSingleStack() {
|
|
122
|
+
return this.processedStacks.size === 1;
|
|
123
|
+
}
|
|
124
|
+
get flattenedData() {
|
|
125
|
+
return [...this.processedStacks.values()].flat();
|
|
126
|
+
}
|
|
127
|
+
get segmentWrappers() {
|
|
128
|
+
return this.el.shadowRoot.querySelectorAll(".segment-wrapper");
|
|
129
|
+
}
|
|
130
|
+
getPatternClass(item) {
|
|
131
|
+
var _a;
|
|
132
|
+
return this.isPatternMode ? ((_a = patternKey[item.color]) !== null && _a !== void 0 ? _a : "") : "";
|
|
133
|
+
}
|
|
134
|
+
// #endregion getters
|
|
135
|
+
////////////////////////////////////////////////////////////
|
|
136
|
+
// #region Component lifecycle
|
|
137
|
+
////////////////////////////////////////////////////////////
|
|
138
|
+
componentDidLoad() {
|
|
139
|
+
const resizeObserver = new ResizeObserver(() => this.updateHiddenValues());
|
|
140
|
+
resizeObserver.observe(this.stacksEl);
|
|
141
|
+
if (this.config && this.data) {
|
|
142
|
+
this.handleConfigDataChange();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
componentDidRender() {
|
|
146
|
+
// The observer above does NOT fire for in-place data changes that leave stacksEl's box
|
|
147
|
+
// identical — e.g. same stacks/legends, only amounts change — so re-measure here when a
|
|
148
|
+
// data/config change flagged it. Gated to avoid a forced reflow on every unrelated render.
|
|
149
|
+
if (this.measurePending) {
|
|
150
|
+
this.measurePending = false;
|
|
151
|
+
this.updateHiddenValues();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// #endregion component lifecycle
|
|
155
|
+
////////////////////////////////////////////////////////////
|
|
156
|
+
// #region Data processing
|
|
157
|
+
////////////////////////////////////////////////////////////
|
|
158
|
+
handleConfigDataChange() {
|
|
159
|
+
if (this.config && this.data) {
|
|
160
|
+
this.processedStacks = this.buildProcessedStacks();
|
|
161
|
+
this.stackTotals = this.countStackTotals(this.processedStacks);
|
|
162
|
+
this.legendData = this.buildLegendData();
|
|
163
|
+
this.propagateExternalLegendData();
|
|
164
|
+
this.measurePending = true; // re-measure label fit after this change renders
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
// config or data was unset — clear derived state so the chart renders empty
|
|
168
|
+
this.processedStacks = new Map();
|
|
169
|
+
this.stackTotals = new Map();
|
|
170
|
+
this.legendData = [];
|
|
171
|
+
this.propagateExternalLegendData();
|
|
172
|
+
this.hasHiddenValues = false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
buildProcessedStacks() {
|
|
176
|
+
if (!this.data) {
|
|
177
|
+
return new Map();
|
|
178
|
+
}
|
|
179
|
+
const processedStacks = new Map();
|
|
180
|
+
const palette = this.colorPalette;
|
|
181
|
+
const defaultColor = "wmcolor-dataviz-discrete-01";
|
|
182
|
+
// Color order is determined by segment first appearance in data.
|
|
183
|
+
const colorMap = new Map();
|
|
184
|
+
this.data.forEach((segment) => {
|
|
185
|
+
if (!colorMap.has(segment.legend)) {
|
|
186
|
+
colorMap.set(segment.legend, palette[colorMap.size] || defaultColor);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
// Preserve the order segments are passed; group by stackName.
|
|
190
|
+
const groupedSegments = new Map();
|
|
191
|
+
this.data.forEach((segment) => {
|
|
192
|
+
if (!groupedSegments.has(segment.stackName)) {
|
|
193
|
+
groupedSegments.set(segment.stackName, []);
|
|
194
|
+
}
|
|
195
|
+
groupedSegments.get(segment.stackName).push(segment);
|
|
196
|
+
});
|
|
197
|
+
groupedSegments.forEach((segments, stackName) => {
|
|
198
|
+
const stackTotal = segments.reduce((acc, s) => acc + s.amount, 0);
|
|
199
|
+
const processedSegments = segments.map((segment) => {
|
|
200
|
+
// explicit per-segment color wins; otherwise the palette color for this legend's index
|
|
201
|
+
const color = segment.color || colorMap.get(segment.legend);
|
|
202
|
+
const displayValue = formatDisplayValue(segment.amount, stackTotal, "percentage", 0);
|
|
203
|
+
return {
|
|
204
|
+
barLegend: segment.legend,
|
|
205
|
+
amount: segment.amount,
|
|
206
|
+
// exact percentage drives segment width; displayValue is the rounded percentage label
|
|
207
|
+
gridPercent: stackTotal > 0 ? (segment.amount / stackTotal) * 100 : 0,
|
|
208
|
+
displayValue: displayValue,
|
|
209
|
+
printValue: displayValue,
|
|
210
|
+
color,
|
|
211
|
+
popoverTitle: segment.popoverTitle,
|
|
212
|
+
popoverText: segment.popoverText,
|
|
213
|
+
popoverButtonText: segment.popoverButtonText,
|
|
214
|
+
groupName: stackName,
|
|
215
|
+
};
|
|
216
|
+
});
|
|
217
|
+
processedStacks.set(stackName, processedSegments);
|
|
218
|
+
});
|
|
219
|
+
return processedStacks;
|
|
220
|
+
}
|
|
221
|
+
buildLegendData() {
|
|
222
|
+
const seen = new Set();
|
|
223
|
+
const result = [];
|
|
224
|
+
this.processedStacks.forEach((segments) => {
|
|
225
|
+
segments.forEach((item) => {
|
|
226
|
+
if (!seen.has(item.barLegend)) {
|
|
227
|
+
seen.add(item.barLegend);
|
|
228
|
+
result.push(Object.assign(Object.assign({}, item), { printValue: "" }));
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
return result;
|
|
233
|
+
}
|
|
234
|
+
countStackTotals(processedStacks) {
|
|
235
|
+
const stackTotals = new Map();
|
|
236
|
+
processedStacks.forEach((segments, stackName) => {
|
|
237
|
+
const stackTotal = segments.reduce((acc, s) => acc + s.amount, 0);
|
|
238
|
+
stackTotals.set(stackName, stackTotal);
|
|
239
|
+
});
|
|
240
|
+
return stackTotals;
|
|
241
|
+
}
|
|
242
|
+
propagateExternalLegendData() {
|
|
243
|
+
document.querySelectorAll("wm-chart-legend").forEach((legend) => {
|
|
244
|
+
if (legend.chartIds.split(" ").includes(this.el.id)) {
|
|
245
|
+
legend.processedData = this.legendData;
|
|
246
|
+
legend.patternMode = this.isPatternMode ? "horizontal" : undefined;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
// #endregion data processing
|
|
251
|
+
////////////////////////////////////////////////////////////
|
|
252
|
+
// #region Keyboard interaction and event handling
|
|
253
|
+
////////////////////////////////////////////////////////////
|
|
254
|
+
handleChartKeyDown(ev) {
|
|
255
|
+
switch (ev.key) {
|
|
256
|
+
case "ArrowDown":
|
|
257
|
+
case "ArrowRight":
|
|
258
|
+
ev.preventDefault();
|
|
259
|
+
if (this.el.shadowRoot.activeElement === this.componentWrapperEl) {
|
|
260
|
+
this.focusSegment(0, 0);
|
|
261
|
+
}
|
|
262
|
+
break;
|
|
263
|
+
case "Tab":
|
|
264
|
+
this.clearFocus();
|
|
265
|
+
break;
|
|
266
|
+
case "Escape":
|
|
267
|
+
ev.preventDefault();
|
|
268
|
+
ev.stopPropagation();
|
|
269
|
+
if (this.popoverEl.open) {
|
|
270
|
+
this.popoverEl.open = false;
|
|
271
|
+
}
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
handleSegmentKeyDown(ev, stackIdx, segmentIdx) {
|
|
276
|
+
const segmentCount = this.segmentCount(stackIdx);
|
|
277
|
+
const stackCount = this.processedStacks.size;
|
|
278
|
+
switch (ev.key) {
|
|
279
|
+
case "ArrowLeft":
|
|
280
|
+
ev.preventDefault();
|
|
281
|
+
this.focusSegment(stackIdx, (segmentIdx - 1 + segmentCount) % segmentCount);
|
|
282
|
+
break;
|
|
283
|
+
case "ArrowRight":
|
|
284
|
+
ev.preventDefault();
|
|
285
|
+
this.focusSegment(stackIdx, (segmentIdx + 1) % segmentCount);
|
|
286
|
+
break;
|
|
287
|
+
case "ArrowUp":
|
|
288
|
+
ev.preventDefault();
|
|
289
|
+
this.focusSegment((stackIdx - 1 + stackCount) % stackCount, 0);
|
|
290
|
+
break;
|
|
291
|
+
case "ArrowDown":
|
|
292
|
+
ev.preventDefault();
|
|
293
|
+
this.focusSegment((stackIdx + 1) % stackCount, 0);
|
|
294
|
+
break;
|
|
295
|
+
case "Enter":
|
|
296
|
+
if (this.popoverEl.open) {
|
|
297
|
+
const popoverBtn = this.popoverEl.querySelector("button");
|
|
298
|
+
popoverBtn && popoverBtn.click();
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
handleSegmentClick(ev, segmentData) {
|
|
304
|
+
this.highlightSegment(segmentData);
|
|
305
|
+
this.openPopover(segmentData, { x: ev.clientX, y: ev.clientY });
|
|
306
|
+
}
|
|
307
|
+
handleLegendItemClick(ev) {
|
|
308
|
+
var _a;
|
|
309
|
+
if (ev.target.nodeName === "WM-CHART-LEGEND") {
|
|
310
|
+
const legendEl = ev.target;
|
|
311
|
+
if (legendEl.chartIds.includes(this.el.id)) {
|
|
312
|
+
if (ev.detail.idx === -1) {
|
|
313
|
+
this.clearHighlights();
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
const legend = (_a = this.legendData[ev.detail.idx]) === null || _a === void 0 ? void 0 : _a.barLegend;
|
|
317
|
+
if (legend) {
|
|
318
|
+
this.highlightSegmentsByLegend(legend);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
handleDocumentClick(_ev) {
|
|
325
|
+
if (!this.popoverEl.open) {
|
|
326
|
+
this.clearHighlights();
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
handleUserIsKeying() {
|
|
330
|
+
this.isKeying = true;
|
|
331
|
+
}
|
|
332
|
+
handleUserIsNotKeying() {
|
|
333
|
+
this.isKeying = false;
|
|
334
|
+
}
|
|
335
|
+
handleBeforePrint() {
|
|
336
|
+
this.userIsPrinting = true;
|
|
337
|
+
this.measurePending = true; // print mode changes the layout, so re-measure label fit
|
|
338
|
+
}
|
|
339
|
+
handleAfterPrint() {
|
|
340
|
+
this.userIsPrinting = false;
|
|
341
|
+
this.measurePending = true;
|
|
342
|
+
}
|
|
343
|
+
handleComponentBlur(ev) {
|
|
344
|
+
if (!isElOrChild(this.el, ev.relatedTarget)) {
|
|
345
|
+
this.clearFocus();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
// #endregion keyboard interaction and event handling
|
|
349
|
+
////////////////////////////////////////////////////////////
|
|
350
|
+
// #region Focus and highlighting
|
|
351
|
+
////////////////////////////////////////////////////////////
|
|
352
|
+
segmentCount(stackIdx) {
|
|
353
|
+
var _a, _b;
|
|
354
|
+
return (_b = (_a = [...this.processedStacks.values()][stackIdx]) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
355
|
+
}
|
|
356
|
+
segmentAt(stackIdx, segmentIdx) {
|
|
357
|
+
var _a;
|
|
358
|
+
return (_a = [...this.processedStacks.values()][stackIdx]) === null || _a === void 0 ? void 0 : _a[segmentIdx];
|
|
359
|
+
}
|
|
360
|
+
focusSegment(stackIdx, segmentIdx) {
|
|
361
|
+
const segmentEl = this.el.shadowRoot.querySelector(`.segment[data-stack-index="${stackIdx}"][data-segment-index="${segmentIdx}"]`);
|
|
362
|
+
const item = this.segmentAt(stackIdx, segmentIdx);
|
|
363
|
+
if (!segmentEl || !item) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
segmentEl.focus();
|
|
367
|
+
this.highlightSegment(item);
|
|
368
|
+
const cornerOffset = 12;
|
|
369
|
+
const rect = segmentEl.getBoundingClientRect();
|
|
370
|
+
this.openPopover(item, { x: rect.left + cornerOffset, y: rect.top + cornerOffset });
|
|
371
|
+
}
|
|
372
|
+
openPopover(item, coords) {
|
|
373
|
+
var _a, _b;
|
|
374
|
+
if (!this.data || !this.config) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
const matchingSegmentData = this.data.find((s) => s.legend === item.barLegend && s.stackName === item.groupName);
|
|
378
|
+
if (!matchingSegmentData) {
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
const total = (_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0;
|
|
382
|
+
const popoverButtonText = matchingSegmentData.popoverButtonText || this.config.popoverButtonText || "";
|
|
383
|
+
this.componentWrapperEl.classList.toggle("hide-focus-ring", !!popoverButtonText);
|
|
384
|
+
this.popoverEl.chartData = Object.assign(Object.assign({}, matchingSegmentData), { barLegend: matchingSegmentData.legend });
|
|
385
|
+
this.popoverEl.header =
|
|
386
|
+
matchingSegmentData.popoverTitle || this.config.popoverTitle || `${matchingSegmentData.amount}/${total}`;
|
|
387
|
+
this.popoverEl.text = matchingSegmentData.popoverText || this.config.popoverText || matchingSegmentData.legend;
|
|
388
|
+
this.popoverEl.buttonText = popoverButtonText;
|
|
389
|
+
this.popoverEl.coords = coords;
|
|
390
|
+
window.setTimeout(() => {
|
|
391
|
+
this.popoverEl.open = true;
|
|
392
|
+
this.popoverEl.announceContents();
|
|
393
|
+
}, 30);
|
|
394
|
+
}
|
|
395
|
+
handlePopoverToggled(_ev) {
|
|
396
|
+
setTimeout(() => {
|
|
397
|
+
if (this.popoverEl.open) {
|
|
398
|
+
const chartData = this.popoverEl.chartData;
|
|
399
|
+
const item = this.flattenedData.find((i) => i.barLegend === (chartData === null || chartData === void 0 ? void 0 : chartData.barLegend) && i.groupName === (chartData === null || chartData === void 0 ? void 0 : chartData.groupName));
|
|
400
|
+
item && this.highlightSegment(item);
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
this.clearHighlights();
|
|
404
|
+
}
|
|
405
|
+
}, 30);
|
|
406
|
+
}
|
|
407
|
+
highlightSegment(item) {
|
|
408
|
+
var _a;
|
|
409
|
+
const idx = this.flattenedData.indexOf(item);
|
|
410
|
+
const segmentWrappers = this.segmentWrappers;
|
|
411
|
+
segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.add("faded"));
|
|
412
|
+
(_a = segmentWrappers[idx]) === null || _a === void 0 ? void 0 : _a.classList.remove("faded");
|
|
413
|
+
const legendIdx = this.legendData.findIndex((legendItem) => legendItem.barLegend === item.barLegend);
|
|
414
|
+
this.wmChartStackHighlighted.emit({ idx: legendIdx });
|
|
415
|
+
}
|
|
416
|
+
highlightSegmentsByLegend(legend) {
|
|
417
|
+
this.segmentWrappers.forEach((segmentWrapper, idx) => {
|
|
418
|
+
var _a;
|
|
419
|
+
segmentWrapper.classList.toggle("faded", ((_a = this.flattenedData[idx]) === null || _a === void 0 ? void 0 : _a.barLegend) !== legend);
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
clearHighlights() {
|
|
423
|
+
this.segmentWrappers.forEach((segmentWrapper) => segmentWrapper.classList.remove("faded"));
|
|
424
|
+
this.wmChartStackHighlighted.emit({ idx: -1 });
|
|
425
|
+
}
|
|
426
|
+
clearFocus() {
|
|
427
|
+
if (this.popoverEl.open) {
|
|
428
|
+
this.popoverEl.open = false;
|
|
429
|
+
}
|
|
430
|
+
this.clearHighlights();
|
|
431
|
+
}
|
|
432
|
+
// #endregion focus and highlighting
|
|
433
|
+
////////////////////////////////////////////////////////////
|
|
434
|
+
// #region Responsiveness
|
|
435
|
+
////////////////////////////////////////////////////////////
|
|
436
|
+
updateHiddenValues() {
|
|
437
|
+
let anyHidden = false;
|
|
438
|
+
this.segmentWrappers.forEach((segmentWrapper) => {
|
|
439
|
+
const value = segmentWrapper.querySelector(".value");
|
|
440
|
+
if (!value) {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
const fits = value.scrollWidth <= segmentWrapper.clientWidth;
|
|
444
|
+
value.classList.toggle("hidden", !fits);
|
|
445
|
+
if (!fits) {
|
|
446
|
+
anyHidden = true;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
if (this.hasHiddenValues !== anyHidden) {
|
|
450
|
+
this.hasHiddenValues = anyHidden;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
// #endregion responsiveness
|
|
454
|
+
////////////////////////////////////////////////////////////
|
|
455
|
+
// #region Rendering
|
|
456
|
+
////////////////////////////////////////////////////////////
|
|
457
|
+
renderValue(item) {
|
|
458
|
+
return (h("div", { class: "value" }, h("span", { class: "percent" }, item.displayValue)));
|
|
459
|
+
}
|
|
460
|
+
renderSegment(item, stackIdx, segmentIdx) {
|
|
461
|
+
var _a, _b;
|
|
462
|
+
return (h("div", { class: "segment-wrapper", style: { "--segment-width": `${item.gridPercent}%` }, key: `${stackIdx}-${segmentIdx}` }, (this.isPrintMode || this.valueFormat === "percentage") && this.renderValue(item), h("div", { class: `segment horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` }, tabindex: "-1", role: "img", "aria-label": `${item.groupName}, ${item.displayValue}. ${item.amount}/${(_b = this.stackTotals.get((_a = item.groupName) !== null && _a !== void 0 ? _a : "")) !== null && _b !== void 0 ? _b : 0} ${item.barLegend}`, "data-stack-index": stackIdx, "data-segment-index": segmentIdx, onClick: (ev) => this.handleSegmentClick(ev, item), onKeyDown: (ev) => this.handleSegmentKeyDown(ev, stackIdx, segmentIdx) })));
|
|
463
|
+
}
|
|
464
|
+
renderStacks() {
|
|
465
|
+
const stackNames = [...this.processedStacks.keys()];
|
|
466
|
+
const rowsPerStack = this.isPrintMode ? 2 : 1;
|
|
467
|
+
return stackNames.map((stackName, stackIdx) => {
|
|
468
|
+
const segments = this.processedStacks.get(stackName) || [];
|
|
469
|
+
const barRow = `${stackIdx * rowsPerStack + 1}`;
|
|
470
|
+
const items = [
|
|
471
|
+
!this.isSingleStack && (h("div", { class: "stack-label", key: `label-${stackName}`, style: { "--stack-grid-row": barRow } }, h("span", { class: "stack-name" }, stackName))),
|
|
472
|
+
h("div", { class: "stack-bar", key: `bar-${stackName}`, style: { "--stack-grid-row": barRow } }, segments.map((item, segmentIdx) => this.renderSegment(item, stackIdx, segmentIdx))),
|
|
473
|
+
this.isPrintMode && (h("div", { class: "print-table-cell", key: `table-${stackName}`, style: { "--stack-grid-row": `${stackIdx * rowsPerStack + 2}` } }, this.renderPrintTable(stackName, segments))),
|
|
474
|
+
];
|
|
475
|
+
return items;
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
renderPrintTable(stackName, segments) {
|
|
479
|
+
var _a;
|
|
480
|
+
const total = (_a = this.stackTotals.get(stackName)) !== null && _a !== void 0 ? _a : 0;
|
|
481
|
+
return (h("div", { class: "print-table", "aria-hidden": "true" }, segments.map((item) => {
|
|
482
|
+
var _a, _b, _c;
|
|
483
|
+
return (h("div", { class: "print-row", key: `row-${stackName}-${item.barLegend}` }, h("div", { class: "print-legend" }, h("div", { class: `swatch horizontal ${this.getPatternClass(item)}`, style: { "--segment-color": `var(--${item.color})` } }), h("span", { class: "print-legend-name" }, item.barLegend)), h("span", { class: "print-percent" }, item.displayValue), h("span", { class: "print-fraction" }, item.amount, "/", total), h("span", { class: "print-text" }, (_c = (_a = item.popoverText) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.popoverText) !== null && _c !== void 0 ? _c : "")));
|
|
484
|
+
})));
|
|
485
|
+
}
|
|
486
|
+
renderLegend(orientation) {
|
|
487
|
+
if (this.isPrintMode)
|
|
488
|
+
return null;
|
|
489
|
+
return (h("div", { class: `legend --${orientation} --${this.showLegend}` }, h("wm-chart-legend", { orientation: orientation, chartIds: this.el.id, processedData: this.legendData, printMode: this.isPrintMode, patternMode: this.isPatternMode ? "horizontal" : undefined, onWmLegendItemClick: (ev) => this.handleLegendItemClick(ev), onWmLegendItemHover: (ev) => this.handleLegendItemClick(ev) })));
|
|
490
|
+
}
|
|
491
|
+
// #endregion rendering
|
|
492
|
+
render() {
|
|
493
|
+
var _a, _b, _c, _d;
|
|
494
|
+
const gridLineRow = this.processedStacks.size * (this.isPrintMode ? 2 : 1) + 1;
|
|
495
|
+
return (h(Host, { key: 'a02be9b6a7e8a570d12fc471ab0899c1d6bff609' }, h("div", { key: '27a456aca42c248c767a3d44d4fca43e27342113', class: "popover-wrapper" }, h("priv-chart-popover", { key: '710e6b9ed574358949d86736991a94ff23033e1b', ref: (el) => (this.popoverEl = el), onIntChartPopoverToggled: (ev) => this.handlePopoverToggled(ev) })), h("div", { key: 'c696620647c3a4bf69b8cbfdfd88fe0d56c0e9e4', ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.isPrintMode ? "print-mode" : ""} ${this.isPatternMode ? "pattern-mode" : ""}`, tabindex: "0", role: "application", onKeyDown: (ev) => this.handleChartKeyDown(ev), onBlur: (ev) => this.handleComponentBlur(ev), "aria-roledescription": chartMessages.interactiveChart, "aria-describedby": "chart-instructions", "aria-label": (_a = this.config) === null || _a === void 0 ? void 0 : _a.label }, ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showLabel) !== null && _c !== void 0 ? _c : true) && (h("label", { key: '7bcc1cdcf20e17af7078d5ddec312accafb0ee2a', id: "label", class: "label" }, h("span", { key: '4b1e5090ccbaf485a5efd543575056f77ecc3af8', class: "label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.label), this.subinfoText && h("span", { key: '4eba44204c943e58e16a0edd2787315d44ae2f23', class: "subinfo" }, this.subinfoText))), this.showLegend === "top" && this.renderLegend("horizontal"), h("div", { key: 'c11932585eb98bc5b12ead052e6965d954d28b0f', class: "chart-body" }, this.showLegend === "left" && this.renderLegend("vertical"), h("div", { key: '772c6c62d2ff5ef996ca6e72bd18f174a5357dc3', class: `stacks ${this.isKeying ? "user-is-keying" : ""} ${this.showGrid ? "show-grid" : ""} ${this.isSingleStack ? "single-stack" : ""}`, ref: (el) => (this.stacksEl = el), style: { "--grid-line-row": `${gridLineRow}` } }, this.showGrid && h("div", { key: '85170b43d60832f82fca6588c39e0ccbcc00cede', class: "vertical-grid-line" }), this.renderStacks(), this.showGrid && (h("div", { key: 'ac782af53cf46f6797bb1a564fdbbc221fd8ea43', class: "x-axis" }, h("div", { key: 'f6175cb9012164eda83c920edc9746c25753bc1e', class: "x-axis-line" }), h("div", { key: 'd218b9ce3d734dd6e218f16d944e93199ac52580', class: "x-axis-ticks" }, h("span", { key: 'eff3d60abf1a6ca2cbaf0247996d891d3cbfadad', class: "tick zero" }, "0%"), h("span", { key: '8767b56809d269272bdc1ef9ccd4d194e6c79070', class: "tick end" }, "100%"))))), this.showLegend === "right" && this.renderLegend("vertical")), this.showLegend === "bottom" && this.renderLegend("horizontal"), !this.isPrintMode && (h("div", { key: '1d9a5524f1669987d19daa5d5fff5dcde93fe4ba', class: `hidden-values-warning ${this.hasHiddenValues ? "" : "hidden"}` }, stackChartMessages.hiddenValues)), renderInstructionsText())));
|
|
496
|
+
}
|
|
497
|
+
static get is() { return "wm-chart-stack"; }
|
|
498
|
+
static get encapsulation() { return "shadow"; }
|
|
499
|
+
static get delegatesFocus() { return true; }
|
|
500
|
+
static get originalStyleUrls() {
|
|
501
|
+
return {
|
|
502
|
+
"$": ["wm-chart-stack.scss"]
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
static get styleUrls() {
|
|
506
|
+
return {
|
|
507
|
+
"$": ["wm-chart-stack.css"]
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
static get properties() {
|
|
511
|
+
return {
|
|
512
|
+
"config": {
|
|
513
|
+
"type": "unknown",
|
|
514
|
+
"mutable": false,
|
|
515
|
+
"complexType": {
|
|
516
|
+
"original": "StackChartConfig",
|
|
517
|
+
"resolved": "undefined | { label: string; subinfo?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; colors?: \"discrete\" | \"semantic\" | undefined; showLabel?: boolean | undefined; showLegend?: \"top\" | \"bottom\" | \"left\" | \"right\" | \"none\" | undefined; showGrid?: boolean | undefined; valueFormat?: \"percentage\" | \"none\" | undefined; printMode?: boolean | undefined; patternMode?: boolean | undefined; }",
|
|
518
|
+
"references": {
|
|
519
|
+
"StackChartConfig": {
|
|
520
|
+
"location": "import",
|
|
521
|
+
"path": "../../../global/interfaces",
|
|
522
|
+
"id": "src/global/interfaces.ts::StackChartConfig"
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"required": false,
|
|
527
|
+
"optional": true,
|
|
528
|
+
"docs": {
|
|
529
|
+
"tags": [{
|
|
530
|
+
"name": "description",
|
|
531
|
+
"text": "Chart configuration object. Set via JavaScript property \u2014 not an HTML attribute.\nFields:\n- `label` (string, required): the chart's title, also used as its `aria-label`.\n- `subinfo` (string): secondary text shown beneath the label.\n- `colors` (`\"discrete\"` | `\"semantic\"`, default `\"discrete\"`): palette for the segments.\n`\"semantic\"` maps to the meaning-based palette (gray/purples/teals/coral).\n- `showLabel` (boolean, default `true`): whether the chart label and subinfo are rendered.\n- `showLegend` (`\"left\"` | `\"right\"` | `\"top\"` | `\"bottom\"` | `\"none\"`, default `\"none\"`):\nplacement of the interactive legend (hidden in print, where the data table replaces it).\n- `showGrid` (boolean, default `false`): renders a `0%`\u2013`100%` axis and a vertical baseline.\n- `valueFormat` (`\"percentage\"` | `\"none\"`, default `\"percentage\"`): whether each segment shows\nits percentage label above the bar.\n- `printMode` / `patternMode` (boolean, default `false`): same as the props of the same name;\nthe props take precedence when both are set.\n- `popoverTitle` / `popoverText` / `popoverButtonText` (string): default popover content applied\nto every segment, each overridable per-segment in `data`. When unset, the popover title\ndefaults to `amount/total`, the text to the segment's legend, and no button is shown."
|
|
532
|
+
}],
|
|
533
|
+
"text": ""
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
"data": {
|
|
537
|
+
"type": "unknown",
|
|
538
|
+
"mutable": false,
|
|
539
|
+
"complexType": {
|
|
540
|
+
"original": "StackSegmentData[]",
|
|
541
|
+
"resolved": "StackSegmentData[] | undefined",
|
|
542
|
+
"references": {
|
|
543
|
+
"StackSegmentData": {
|
|
544
|
+
"location": "import",
|
|
545
|
+
"path": "../../../global/interfaces",
|
|
546
|
+
"id": "src/global/interfaces.ts::StackSegmentData"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"required": false,
|
|
551
|
+
"optional": true,
|
|
552
|
+
"docs": {
|
|
553
|
+
"tags": [{
|
|
554
|
+
"name": "description",
|
|
555
|
+
"text": "Array of segments to render. Set via JavaScript property \u2014 not an HTML attribute.\nEach segment's fields:\n- `stackName` (string, required): groups segments into the same stack (row); the set of distinct\nstackNames determines whether the single or grouped layout is used.\n- `legend` (string, required): the segment's category, shown in the legend and used to assign a\nconsistent color across stacks.\n- `amount` (number, required): the raw value; the segment's width is `amount / stackTotal`.\n- `color` (string): a `wmcolor` token overriding the palette color for this segment.\n- `popoverTitle` / `popoverText` / `popoverButtonText` (string): popover content for this segment,\noverriding the corresponding `config` defaults."
|
|
556
|
+
}],
|
|
557
|
+
"text": ""
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
"printMode": {
|
|
561
|
+
"type": "boolean",
|
|
562
|
+
"mutable": false,
|
|
563
|
+
"complexType": {
|
|
564
|
+
"original": "boolean",
|
|
565
|
+
"resolved": "boolean | undefined",
|
|
566
|
+
"references": {}
|
|
567
|
+
},
|
|
568
|
+
"required": false,
|
|
569
|
+
"optional": true,
|
|
570
|
+
"docs": {
|
|
571
|
+
"tags": [{
|
|
572
|
+
"name": "description",
|
|
573
|
+
"text": "When true, renders the print layout: shorter bars, larger bold percentage labels,\nand a data table beneath each stack (legend, percentage, amount/total, popover text) in place of\nthe interactive legend. Also activated automatically while the browser is printing. Takes\nprecedence over `config.printMode`."
|
|
574
|
+
}, {
|
|
575
|
+
"name": "default",
|
|
576
|
+
"text": "false"
|
|
577
|
+
}],
|
|
578
|
+
"text": ""
|
|
579
|
+
},
|
|
580
|
+
"attribute": "print-mode",
|
|
581
|
+
"reflect": false
|
|
582
|
+
},
|
|
583
|
+
"patternMode": {
|
|
584
|
+
"type": "boolean",
|
|
585
|
+
"mutable": false,
|
|
586
|
+
"complexType": {
|
|
587
|
+
"original": "boolean",
|
|
588
|
+
"resolved": "boolean | undefined",
|
|
589
|
+
"references": {}
|
|
590
|
+
},
|
|
591
|
+
"required": false,
|
|
592
|
+
"optional": true,
|
|
593
|
+
"docs": {
|
|
594
|
+
"tags": [{
|
|
595
|
+
"name": "description",
|
|
596
|
+
"text": "When true, applies a hatching pattern fill to segments and enlarges the legend\ntiles, in addition to color \u2014 improving distinguishability for users with color vision\ndeficiencies. Takes precedence over `config.patternMode`."
|
|
597
|
+
}, {
|
|
598
|
+
"name": "default",
|
|
599
|
+
"text": "false"
|
|
600
|
+
}],
|
|
601
|
+
"text": ""
|
|
602
|
+
},
|
|
603
|
+
"attribute": "pattern-mode",
|
|
604
|
+
"reflect": false
|
|
605
|
+
},
|
|
606
|
+
"subinfo": {
|
|
607
|
+
"type": "string",
|
|
608
|
+
"mutable": false,
|
|
609
|
+
"complexType": {
|
|
610
|
+
"original": "string",
|
|
611
|
+
"resolved": "string | undefined",
|
|
612
|
+
"references": {}
|
|
613
|
+
},
|
|
614
|
+
"required": false,
|
|
615
|
+
"optional": true,
|
|
616
|
+
"docs": {
|
|
617
|
+
"tags": [{
|
|
618
|
+
"name": "description",
|
|
619
|
+
"text": "Optional secondary text displayed beneath the chart label. Takes precedence over\n`config.subinfo`."
|
|
620
|
+
}],
|
|
621
|
+
"text": ""
|
|
622
|
+
},
|
|
623
|
+
"attribute": "subinfo",
|
|
624
|
+
"reflect": false
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
static get states() {
|
|
629
|
+
return {
|
|
630
|
+
"processedStacks": {},
|
|
631
|
+
"isKeying": {},
|
|
632
|
+
"hasHiddenValues": {},
|
|
633
|
+
"userIsPrinting": {}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
static get events() {
|
|
637
|
+
return [{
|
|
638
|
+
"method": "wmChartStackHighlighted",
|
|
639
|
+
"name": "wmChartStackHighlighted",
|
|
640
|
+
"bubbles": true,
|
|
641
|
+
"cancelable": true,
|
|
642
|
+
"composed": true,
|
|
643
|
+
"docs": {
|
|
644
|
+
"tags": [{
|
|
645
|
+
"name": "internal",
|
|
646
|
+
"text": undefined
|
|
647
|
+
}, {
|
|
648
|
+
"name": "description",
|
|
649
|
+
"text": "Internal signal used to synchronize segment highlight state with an external\nwm-chart-legend \u2014 not for application use."
|
|
650
|
+
}],
|
|
651
|
+
"text": ""
|
|
652
|
+
},
|
|
653
|
+
"complexType": {
|
|
654
|
+
"original": "{ idx: number }",
|
|
655
|
+
"resolved": "{ idx: number; }",
|
|
656
|
+
"references": {}
|
|
657
|
+
}
|
|
658
|
+
}];
|
|
659
|
+
}
|
|
660
|
+
static get elementRef() { return "el"; }
|
|
661
|
+
static get watchers() {
|
|
662
|
+
return [{
|
|
663
|
+
"propName": "config",
|
|
664
|
+
"methodName": "handleConfigDataChange"
|
|
665
|
+
}, {
|
|
666
|
+
"propName": "data",
|
|
667
|
+
"methodName": "handleConfigDataChange"
|
|
668
|
+
}];
|
|
669
|
+
}
|
|
670
|
+
static get listeners() {
|
|
671
|
+
return [{
|
|
672
|
+
"name": "wmLegendItemClick",
|
|
673
|
+
"method": "handleLegendItemClick",
|
|
674
|
+
"target": "document",
|
|
675
|
+
"capture": false,
|
|
676
|
+
"passive": false
|
|
677
|
+
}, {
|
|
678
|
+
"name": "click",
|
|
679
|
+
"method": "handleDocumentClick",
|
|
680
|
+
"target": "document",
|
|
681
|
+
"capture": true,
|
|
682
|
+
"passive": false
|
|
683
|
+
}, {
|
|
684
|
+
"name": "wmUserIsKeying",
|
|
685
|
+
"method": "handleUserIsKeying",
|
|
686
|
+
"target": "window",
|
|
687
|
+
"capture": false,
|
|
688
|
+
"passive": false
|
|
689
|
+
}, {
|
|
690
|
+
"name": "wmUserIsNotTabbing",
|
|
691
|
+
"method": "handleUserIsNotKeying",
|
|
692
|
+
"target": "window",
|
|
693
|
+
"capture": false,
|
|
694
|
+
"passive": false
|
|
695
|
+
}, {
|
|
696
|
+
"name": "beforeprint",
|
|
697
|
+
"method": "handleBeforePrint",
|
|
698
|
+
"target": "window",
|
|
699
|
+
"capture": false,
|
|
700
|
+
"passive": false
|
|
701
|
+
}, {
|
|
702
|
+
"name": "afterprint",
|
|
703
|
+
"method": "handleAfterPrint",
|
|
704
|
+
"target": "window",
|
|
705
|
+
"capture": false,
|
|
706
|
+
"passive": false
|
|
707
|
+
}];
|
|
708
|
+
}
|
|
709
|
+
}
|