@watermarkinsights/ripple 5.33.0-alpha.1 → 5.33.0-alpha.2
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-ac7fad92.js +106 -0
- package/dist/cjs/{chartFunctions-fWIttqIZ.js → chartFunctions-3be4f639.js} +70 -22
- package/dist/cjs/functions-4cad2b20.js +10694 -0
- package/dist/cjs/{index-BKdkswfl.js → index-bb947bd5.js} +567 -1208
- package/dist/cjs/{intl-BeSU8JeX.js → intl-89c1fe84.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/priv-calendar.cjs.entry.js +15 -11
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +11 -11
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +21 -39
- package/dist/cjs/priv-navigator-button.cjs.entry.js +6 -3
- package/dist/cjs/priv-navigator-item.cjs.entry.js +6 -3
- package/dist/cjs/priv-option-list.cjs.entry.js +17 -11
- package/dist/cjs/ripple.cjs.js +7 -7
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +29 -43
- package/dist/cjs/wm-button.cjs.entry.js +22 -41
- package/dist/cjs/wm-chart-bar.cjs.entry.js +18 -13
- package/dist/cjs/wm-chart-column.cjs.entry.js +22 -18
- package/dist/cjs/wm-chart-slice.cjs.entry.js +8 -1
- package/dist/cjs/wm-chart-stack.cjs.entry.js +17 -13
- package/dist/cjs/wm-chart.cjs.entry.js +19 -60
- package/dist/cjs/wm-date-range.cjs.entry.js +24 -65
- package/dist/cjs/wm-datepicker.cjs.entry.js +20 -44
- package/dist/cjs/wm-file-list.cjs.entry.js +6 -8
- package/dist/cjs/wm-file.cjs.entry.js +16 -16
- package/dist/cjs/wm-flyout.cjs.entry.js +19 -28
- package/dist/cjs/wm-input.cjs.entry.js +20 -46
- package/dist/cjs/wm-line-chart.cjs.entry.js +32 -55
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +18 -14
- package/dist/cjs/wm-modal_3.cjs.entry.js +17 -58
- package/dist/cjs/wm-navigation_3.cjs.entry.js +22 -20
- package/dist/cjs/wm-navigator.cjs.entry.js +17 -28
- package/dist/cjs/wm-nested-select.cjs.entry.js +16 -62
- package/dist/cjs/wm-optgroup.cjs.entry.js +9 -22
- package/dist/cjs/wm-option_2.cjs.entry.js +27 -89
- package/dist/cjs/wm-pagination.cjs.entry.js +17 -47
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +30 -29
- package/dist/cjs/wm-search.cjs.entry.js +12 -61
- package/dist/cjs/wm-snackbar.cjs.entry.js +12 -19
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +22 -39
- package/dist/cjs/wm-tag-input.cjs.entry.js +28 -41
- package/dist/cjs/wm-tag-option.cjs.entry.js +9 -15
- package/dist/cjs/wm-textarea.cjs.entry.js +15 -46
- package/dist/cjs/wm-timepicker.cjs.entry.js +18 -41
- package/dist/cjs/wm-toggletip.cjs.entry.js +13 -23
- package/dist/cjs/wm-uploader.cjs.entry.js +19 -31
- package/dist/cjs/wm-wrapper.cjs.entry.js +3 -1
- package/dist/collection/collection-manifest.json +2 -3
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +135 -134
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +13 -26
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.css +147 -146
- package/dist/collection/components/charts/priv-chart-popover-old/priv-chart-popover-old.js +5 -9
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +17 -20
- package/dist/collection/components/charts/wm-chart/wm-chart.css +162 -164
- package/dist/collection/components/charts/wm-chart/wm-chart.js +25 -94
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +142 -142
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +16 -22
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.css +146 -146
- package/dist/collection/components/charts/wm-chart-column/wm-chart-column.js +21 -28
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.css +139 -141
- package/dist/collection/components/charts/wm-chart-legend/wm-chart-legend.js +8 -38
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.css +139 -139
- package/dist/collection/components/charts/wm-chart-stack/wm-chart-stack.js +15 -22
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +173 -173
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +48 -106
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +162 -164
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +19 -40
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +138 -138
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +9 -12
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +17 -20
- package/dist/collection/components/datepickers/datepicker.css +163 -166
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +173 -169
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +16 -25
- package/dist/collection/components/datepickers/wm-date-range.js +26 -84
- package/dist/collection/components/datepickers/wm-datepicker.js +20 -57
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +141 -142
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +19 -30
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +173 -174
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +23 -98
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +134 -134
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +6 -28
- package/dist/collection/components/selects/wm-option/wm-option.css +138 -138
- package/dist/collection/components/selects/wm-option/wm-option.js +7 -32
- package/dist/collection/components/selects/wm-select/wm-select.css +169 -170
- package/dist/collection/components/selects/wm-select/wm-select.js +27 -94
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +164 -163
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +36 -63
- package/dist/collection/components/wm-button/wm-button.css +161 -160
- package/dist/collection/components/wm-button/wm-button.js +37 -85
- package/dist/collection/components/wm-file/wm-file.css +139 -139
- package/dist/collection/components/wm-file/wm-file.js +25 -46
- package/dist/collection/components/wm-file-list/wm-file-list.css +133 -133
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -8
- package/dist/collection/components/wm-flyout/wm-flyout.css +139 -139
- package/dist/collection/components/wm-flyout/wm-flyout.js +26 -54
- package/dist/collection/components/wm-input/wm-input.css +156 -158
- package/dist/collection/components/wm-input/wm-input.js +37 -98
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +134 -134
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +5 -24
- package/dist/collection/components/wm-modal/wm-modal-footer.css +136 -138
- package/dist/collection/components/wm-modal/wm-modal-footer.js +5 -36
- package/dist/collection/components/wm-modal/wm-modal-header.css +133 -133
- package/dist/collection/components/wm-modal/wm-modal-header.js +2 -14
- package/dist/collection/components/wm-modal/wm-modal.css +151 -150
- package/dist/collection/components/wm-modal/wm-modal.js +7 -30
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +140 -142
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +5 -15
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +133 -133
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +2 -6
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +164 -163
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +8 -15
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +138 -138
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +5 -6
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +137 -137
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +11 -12
- package/dist/collection/components/wm-navigation/wm-navigation.css +145 -149
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -9
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +140 -140
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +2 -6
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +135 -135
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +3 -9
- package/dist/collection/components/wm-navigator/wm-navigator.css +145 -145
- package/dist/collection/components/wm-navigator/wm-navigator.js +20 -46
- package/dist/collection/components/wm-pagination/wm-pagination.css +144 -144
- package/dist/collection/components/wm-pagination/wm-pagination.js +13 -54
- package/dist/collection/components/wm-search/wm-search.css +144 -143
- package/dist/collection/components/wm-search/wm-search.js +10 -74
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +149 -149
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +4 -14
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +137 -137
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +4 -19
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +138 -140
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +10 -12
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +133 -133
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +2 -17
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +201 -189
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +41 -81
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +14 -32
- package/dist/collection/components/wm-textarea/wm-textarea.css +153 -155
- package/dist/collection/components/wm-textarea/wm-textarea.js +20 -72
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +169 -179
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +19 -55
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +162 -162
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +14 -38
- package/dist/collection/components/wm-uploader/wm-uploader.css +174 -173
- package/dist/collection/components/wm-uploader/wm-uploader.js +28 -63
- package/dist/docs/docs.d.ts +0 -45
- package/dist/docs/docs.json +300 -1063
- package/dist/docs/skill/wm-nested-select.md +0 -3
- package/dist/docs/skill/wm-optgroup.md +0 -3
- package/dist/docs/skill/wm-progress-monitor.md +0 -3
- package/dist/docs/skill/wm-select.md +0 -3
- package/dist/esm/app-globals-2e722eb0.js +104 -0
- package/dist/esm/{chartFunctions-C2cx-qVA.js → chartFunctions-562b4774.js} +71 -23
- package/dist/esm/functions-8a188b59.js +10652 -0
- package/dist/esm/{index-BGfrNNVL.js → index-3425d80d.js} +562 -1204
- package/dist/esm/{intl-1Kev15g9.js → intl-c69e599e.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/priv-calendar.entry.js +13 -11
- package/dist/esm/priv-chart-popover-old.entry.js +9 -11
- package/dist/esm/priv-chart-popover_2.entry.js +19 -39
- package/dist/esm/priv-navigator-button.entry.js +4 -3
- package/dist/esm/priv-navigator-item.entry.js +4 -3
- package/dist/esm/priv-option-list.entry.js +15 -11
- package/dist/esm/ripple.js +5 -6
- package/dist/esm/wm-action-menu_2.entry.js +27 -43
- package/dist/esm/wm-button.entry.js +20 -41
- package/dist/esm/wm-chart-bar.entry.js +16 -13
- package/dist/esm/wm-chart-column.entry.js +20 -18
- package/dist/esm/wm-chart-slice.entry.js +6 -1
- package/dist/esm/wm-chart-stack.entry.js +15 -13
- package/dist/esm/wm-chart.entry.js +17 -60
- package/dist/esm/wm-date-range.entry.js +22 -65
- package/dist/esm/wm-datepicker.entry.js +18 -44
- package/dist/esm/wm-file-list.entry.js +4 -8
- package/dist/esm/wm-file.entry.js +14 -16
- package/dist/esm/wm-flyout.entry.js +17 -28
- package/dist/esm/wm-input.entry.js +18 -46
- package/dist/esm/wm-line-chart.entry.js +30 -55
- package/dist/esm/wm-modal-pss_3.entry.js +16 -14
- package/dist/esm/wm-modal_3.entry.js +15 -58
- package/dist/esm/wm-navigation_3.entry.js +20 -20
- package/dist/esm/wm-navigator.entry.js +15 -28
- package/dist/esm/wm-nested-select.entry.js +14 -62
- package/dist/esm/wm-optgroup.entry.js +7 -22
- package/dist/esm/wm-option_2.entry.js +25 -89
- package/dist/esm/wm-pagination.entry.js +15 -47
- package/dist/esm/wm-progress-indicator_3.entry.js +28 -29
- package/dist/esm/wm-search.entry.js +10 -61
- package/dist/esm/wm-snackbar.entry.js +10 -19
- package/dist/esm/wm-tab-item_3.entry.js +20 -39
- package/dist/esm/wm-tag-input.entry.js +26 -41
- package/dist/esm/wm-tag-option.entry.js +7 -15
- package/dist/esm/wm-textarea.entry.js +13 -46
- package/dist/esm/wm-timepicker.entry.js +16 -41
- package/dist/esm/wm-toggletip.entry.js +11 -23
- package/dist/esm/wm-uploader.entry.js +17 -31
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/loader/package.json +11 -0
- package/dist/ripple/p-00b2c41a.entry.js +1 -0
- package/dist/ripple/p-071d14f8.js +1 -0
- package/dist/ripple/p-0979e401.entry.js +1 -0
- package/dist/ripple/p-0a9920b1.entry.js +1 -0
- package/dist/ripple/p-0b2dd9d9.entry.js +1 -0
- package/dist/ripple/p-0e6090b0.entry.js +1 -0
- package/dist/ripple/p-118a4f1d.entry.js +1 -0
- package/dist/ripple/p-2cdb394d.entry.js +1 -0
- package/dist/ripple/p-2e1b5411.entry.js +1 -0
- package/dist/ripple/p-2e256f26.entry.js +1 -0
- package/dist/ripple/{p-8488893b.entry.js → p-34bde06a.entry.js} +1 -1
- package/dist/ripple/p-364d9b1e.entry.js +1 -0
- package/dist/ripple/p-36c43651.entry.js +1 -0
- package/dist/ripple/p-40f7a520.entry.js +1 -0
- package/dist/ripple/p-444913a6.entry.js +1 -0
- package/dist/ripple/p-528cfadb.js +1 -0
- package/dist/ripple/p-55671dd6.entry.js +1 -0
- package/dist/ripple/p-55c5436b.entry.js +1 -0
- package/dist/ripple/p-72506259.entry.js +1 -0
- package/dist/ripple/p-74ddcc93.entry.js +1 -0
- package/dist/ripple/p-775cbd79.entry.js +1 -0
- package/dist/ripple/p-7f00d6dd.entry.js +1 -0
- package/dist/ripple/p-80dbcb68.entry.js +1 -0
- package/dist/ripple/p-826cb3b5.entry.js +1 -0
- package/dist/ripple/p-83c3db60.js +2 -0
- package/dist/ripple/p-8c170e23.entry.js +1 -0
- package/dist/ripple/p-91dbf24b.entry.js +1 -0
- package/dist/ripple/p-93a23f23.entry.js +1 -0
- package/dist/ripple/p-9500cad2.entry.js +1 -0
- package/dist/ripple/p-97229775.entry.js +1 -0
- package/dist/ripple/p-9755192c.entry.js +1 -0
- package/dist/ripple/p-9f93b637.entry.js +1 -0
- package/dist/ripple/p-aa74da96.entry.js +1 -0
- package/dist/ripple/p-ae47d456.entry.js +1 -0
- package/dist/ripple/p-babcc85c.entry.js +1 -0
- package/dist/ripple/p-bbb0e2d6.entry.js +1 -0
- package/dist/ripple/{p-DHTrj5UR.js → p-d27d0214.js} +1 -1
- package/dist/ripple/p-d59b64ad.entry.js +1 -0
- package/dist/ripple/p-e022e981.entry.js +1 -0
- package/dist/ripple/p-e252f8a7.entry.js +1 -0
- package/dist/ripple/{p-k9O4HQSf.js → p-e39df966.js} +1 -1
- package/dist/ripple/p-e95952c6.entry.js +1 -0
- package/dist/ripple/p-fa91fe9d.entry.js +1 -0
- package/dist/ripple/p-fe61f848.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/types/components.d.ts +131 -788
- package/dist/types/stencil-public-runtime.d.ts +8 -207
- package/package.json +1 -1
- package/dist/cjs/app-globals-k3bip5HZ.js +0 -8
- package/dist/cjs/functions-Bag4HsFG.js +0 -9318
- package/dist/esm/app-globals-B_mHcIXc.js +0 -6
- package/dist/esm/functions-UejPfcUp.js +0 -9276
- package/dist/ripple/p-040297d7.entry.js +0 -1
- package/dist/ripple/p-042fabc0.entry.js +0 -1
- package/dist/ripple/p-08cae5a7.entry.js +0 -1
- package/dist/ripple/p-0e8b0df5.entry.js +0 -1
- package/dist/ripple/p-119e90f5.entry.js +0 -1
- package/dist/ripple/p-314c60f6.entry.js +0 -1
- package/dist/ripple/p-3202e4d3.entry.js +0 -1
- package/dist/ripple/p-3864cffe.entry.js +0 -1
- package/dist/ripple/p-38b62547.entry.js +0 -1
- package/dist/ripple/p-3a457452.entry.js +0 -1
- package/dist/ripple/p-405ad89b.entry.js +0 -1
- package/dist/ripple/p-4096c755.entry.js +0 -1
- package/dist/ripple/p-40bab7fb.entry.js +0 -1
- package/dist/ripple/p-4ea49dfc.entry.js +0 -1
- package/dist/ripple/p-52a3dde4.entry.js +0 -1
- package/dist/ripple/p-55d81cee.entry.js +0 -1
- package/dist/ripple/p-5e1d3de1.entry.js +0 -1
- package/dist/ripple/p-656c98cb.entry.js +0 -1
- package/dist/ripple/p-658145e6.entry.js +0 -1
- package/dist/ripple/p-6c2c87c3.entry.js +0 -1
- package/dist/ripple/p-7462e17c.entry.js +0 -1
- package/dist/ripple/p-7ec2ceb8.entry.js +0 -1
- package/dist/ripple/p-8f610e63.entry.js +0 -1
- package/dist/ripple/p-9fb9bd10.entry.js +0 -1
- package/dist/ripple/p-BGfrNNVL.js +0 -3
- package/dist/ripple/p-CEatyzC3.js +0 -1
- package/dist/ripple/p-UejPfcUp.js +0 -1
- package/dist/ripple/p-a470be87.entry.js +0 -1
- package/dist/ripple/p-a7d9313d.entry.js +0 -1
- package/dist/ripple/p-a7ea11c3.entry.js +0 -1
- package/dist/ripple/p-a8e2fbb9.entry.js +0 -1
- package/dist/ripple/p-aa316c78.entry.js +0 -1
- package/dist/ripple/p-bd2328b0.entry.js +0 -1
- package/dist/ripple/p-c07dd034.entry.js +0 -1
- package/dist/ripple/p-d51a2cd1.entry.js +0 -1
- package/dist/ripple/p-d735a0b3.entry.js +0 -1
- package/dist/ripple/p-db2a5d7f.entry.js +0 -1
- package/dist/ripple/p-dc2d2704.entry.js +0 -1
- package/dist/ripple/p-e17229a4.entry.js +0 -1
- package/dist/ripple/p-e90711ae.entry.js +0 -1
- package/dist/ripple/p-ef65953a.entry.js +0 -1
- /package/dist/cjs/{interfaces-Cx1dCx1x.js → interfaces-33cd6161.js} +0 -0
- /package/dist/esm/{interfaces-D9qMfha9.js → interfaces-8778346d.js} +0 -0
- /package/dist/ripple/{p-D9qMfha9.js → p-ebe9f38c.js} +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./index-bb947bd5.js');
|
|
4
|
+
|
|
5
|
+
const version = "5.33.0-alpha.2";
|
|
6
|
+
|
|
7
|
+
// PRINT RIPPLE VERSION IN CONSOLE
|
|
8
|
+
// test envs return 0 for plugin.length
|
|
9
|
+
// do not print version number there as it causes issues
|
|
10
|
+
if (window.navigator.plugins.length > 0) {
|
|
11
|
+
console.log("%cRipple component library %c%s", "color: #575195; font-weight: bold", "font-weight: bold", version);
|
|
12
|
+
}
|
|
13
|
+
// Dispatching events to track whether user is navigating with keyboard or mouse
|
|
14
|
+
// no longer necessary for keyboard focus indicators (thanks to :focus-visible)
|
|
15
|
+
// but still used in several components for other things (search for isTabbing)
|
|
16
|
+
function wmComponentKeys(ev) {
|
|
17
|
+
if (ev.key == "Tab") {
|
|
18
|
+
var event = new Event("wmUserIsTabbing");
|
|
19
|
+
window.dispatchEvent(event);
|
|
20
|
+
document.querySelector("body").classList.add("wmcl-user-is-tabbing");
|
|
21
|
+
}
|
|
22
|
+
if (ev.key == "ArrowLeft" || ev.key == "ArrowUp" || ev.key == "ArrowRight" || ev.key == "ArrowDown") {
|
|
23
|
+
var event = new Event("wmUserIsKeying");
|
|
24
|
+
window.dispatchEvent(event);
|
|
25
|
+
document.querySelector("body").classList.add("wmcl-user-is-keying");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function wmComponentMouseDownOnce() {
|
|
29
|
+
var event = new Event("wmUserIsNotTabbing");
|
|
30
|
+
window.dispatchEvent(event);
|
|
31
|
+
document.querySelector("body").classList.remove("wmcl-user-is-tabbing");
|
|
32
|
+
document.querySelector("body").classList.remove("wmcl-user-is-keying");
|
|
33
|
+
}
|
|
34
|
+
window.addEventListener("keydown", wmComponentKeys);
|
|
35
|
+
window.addEventListener("mousedown", wmComponentMouseDownOnce);
|
|
36
|
+
// MODES (FOR PRODUCT-SPECIFIC STYLING)
|
|
37
|
+
//Checks for mode attribute explicitly set on the document. If "mode" is set on component, it will override the global mode. Falls back to default (Planning styles)
|
|
38
|
+
const appGlobalScript = () => {
|
|
39
|
+
};
|
|
40
|
+
// TOOLTIP
|
|
41
|
+
// Add a tooltip element
|
|
42
|
+
// This allows tooltips to be always at the highest stacking context (always on top)
|
|
43
|
+
// Element is added withing a container to avoid performance impact
|
|
44
|
+
const tooltipContainer = document.createElement("div");
|
|
45
|
+
tooltipContainer.id = "wm-tooltip-container";
|
|
46
|
+
const tooltipEl = document.createElement("div");
|
|
47
|
+
tooltipEl.id = "wm-tooltip";
|
|
48
|
+
tooltipEl.classList.add("wm-tooltip");
|
|
49
|
+
tooltipEl.setAttribute("popover", "manual");
|
|
50
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
51
|
+
const tooltipStyles = document.createElement("style");
|
|
52
|
+
tooltipStyles.textContent = `
|
|
53
|
+
.wm-tooltip {
|
|
54
|
+
position: fixed;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
line-height: normal;
|
|
58
|
+
font-family: inherit;
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
text-transform: none;
|
|
61
|
+
font-weight: normal;
|
|
62
|
+
background: var(--wmcolor-tooltip-background);
|
|
63
|
+
color: var(--wmcolor-tooltip-text);
|
|
64
|
+
z-index: 999999;
|
|
65
|
+
max-width: var(--wmTooltipMaxWidth, 13.75rem);
|
|
66
|
+
margin-right: 1.5rem;
|
|
67
|
+
padding: 0.375rem;
|
|
68
|
+
transition-property: opacity;
|
|
69
|
+
transition-delay: 0s;
|
|
70
|
+
opacity: 0;
|
|
71
|
+
inset: unset;
|
|
72
|
+
top: 0;
|
|
73
|
+
left: 0;
|
|
74
|
+
transform: translateZ(0);
|
|
75
|
+
will-change: transform;
|
|
76
|
+
transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));
|
|
77
|
+
border: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.wm-tooltip:popover-open {
|
|
81
|
+
opacity: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.wm-tooltip.show {
|
|
85
|
+
transition-delay: 500ms;
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
const body = document.querySelector("body");
|
|
90
|
+
if (body) {
|
|
91
|
+
document.head.appendChild(tooltipStyles);
|
|
92
|
+
tooltipContainer.appendChild(tooltipEl);
|
|
93
|
+
body.appendChild(tooltipContainer);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
97
|
+
const body = document.querySelector("body");
|
|
98
|
+
document.head.appendChild(tooltipStyles);
|
|
99
|
+
tooltipContainer.appendChild(tooltipEl);
|
|
100
|
+
body.appendChild(tooltipContainer);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const globalScripts = appGlobalScript;
|
|
105
|
+
|
|
106
|
+
exports.globalScripts = globalScripts;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const index = require('./index-bb947bd5.js');
|
|
4
|
+
const functions = require('./functions-4cad2b20.js');
|
|
5
5
|
|
|
6
6
|
const colors = {
|
|
7
7
|
salmon: "#ff5f4e",
|
|
8
8
|
cyan: "#19a1a9",
|
|
9
9
|
forest: "#088000",
|
|
10
|
+
sleet: "#7f97ad",
|
|
10
11
|
midnight: "#2e1b46",
|
|
11
12
|
lavender: "#8b86ca",
|
|
12
13
|
periwinkle: "#575195",
|
|
@@ -434,7 +435,15 @@ function renderInstructionsText() {
|
|
|
434
435
|
return index.h("div", { id: "chart-instructions" }, chartInstructions);
|
|
435
436
|
}
|
|
436
437
|
function renderFilter() {
|
|
437
|
-
return (index.h("defs", null,
|
|
438
|
+
return (index.h("defs", null,
|
|
439
|
+
index.h("filter", { id: "wmHoverDropShadow" },
|
|
440
|
+
index.h("feGaussianBlur", { stdDeviation: "3" }),
|
|
441
|
+
index.h("feOffset", { result: "offsetblur" }),
|
|
442
|
+
index.h("feFlood", { "flood-color": "#333" }),
|
|
443
|
+
index.h("feComposite", { operator: "in", in2: "offsetblur" }),
|
|
444
|
+
index.h("feMerge", null,
|
|
445
|
+
index.h("feMergeNode", null),
|
|
446
|
+
index.h("feMergeNode", { in: "SourceGraphic" })))));
|
|
438
447
|
}
|
|
439
448
|
function applyMinimumAngle(minimumAngle, slicesDetails, total) {
|
|
440
449
|
const allAngles = slicesDetails.map((s) => amountToDegree(s.amount, total));
|
|
@@ -485,7 +494,12 @@ function renderDoughnut(chartType) {
|
|
|
485
494
|
else {
|
|
486
495
|
perc = perc + "%";
|
|
487
496
|
}
|
|
488
|
-
return (index.h("div", { class: "chart-wrapper doughnut-wrapper" },
|
|
497
|
+
return (index.h("div", { class: "chart-wrapper doughnut-wrapper" },
|
|
498
|
+
index.h("svg", { width: outerSize + "px", height: outerSize + "px", id: `graphic-${this.uid}`, class: "doughnut-svg" },
|
|
499
|
+
renderFilter(),
|
|
500
|
+
slicesDetails.map((s) => renderPath.call(this, s, chartType)),
|
|
501
|
+
renderFocusOutline.call(this),
|
|
502
|
+
isProgressIndicator ? (index.h("text", { class: "value", x: "50%", y: "50%", "font-size": "1.5rem", "font-weight": "500", "text-anchor": "middle", "dominant-baseline": "middle" }, perc)) : (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})`, "text-anchor": "middle", "dominant-baseline": "middle" }, slicesDetails.map((s) => s.amount > 0 && !s.inSmallCluster ? renderDoughnutText.call(this, s) : ""))))));
|
|
489
503
|
}
|
|
490
504
|
function highlightSegmentInfo(infoEls, s) {
|
|
491
505
|
infoEls.forEach((el) => {
|
|
@@ -504,10 +518,14 @@ function removeSegmentInfoHighlight(infoEls) {
|
|
|
504
518
|
}
|
|
505
519
|
function renderPath(s, chartType) {
|
|
506
520
|
const percentageValue = amountToPercent(s.amount, this.total, true) + "%";
|
|
507
|
-
return (!isNaN(s.amount) && (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
|
|
521
|
+
return (!isNaN(s.amount) && (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
|
|
522
|
+
index.h("path", { id: s.id, class: "segment doughnut-segment", fill: s.visualAmount ? s.color : "transparent", d: getPathData.call(this, s.visualAmount, s.offset, chartType), onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), role: "img", "aria-label": `${s.legend}, ${percentageValue}`, "data-segmentindex": s.index }))));
|
|
508
523
|
}
|
|
509
524
|
function renderFocusOutline() {
|
|
510
|
-
return this.isTabbing ? (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
|
|
525
|
+
return this.isTabbing ? (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
|
|
526
|
+
index.h("use", { tabindex: -1, id: "kfbg1", xlinkHref: `#${this.focusedSliceId}` }),
|
|
527
|
+
index.h("use", { tabindex: -1, id: "kfstroke", xlinkHref: `#${this.focusedSliceId}` }),
|
|
528
|
+
index.h("use", { tabindex: -1, id: "kfbg2", xlinkHref: `#${this.focusedSliceId}` }))) : ("");
|
|
511
529
|
}
|
|
512
530
|
function renderDoughnutText(s) {
|
|
513
531
|
const arcMiddle = amountToDegree(s.offset + s.visualAmount / 2, this.total);
|
|
@@ -563,7 +581,16 @@ function renderStackedBar(chartType) {
|
|
|
563
581
|
(this.isBar || this.isDoughnut) && this.showHiddenValuesMessage(showMsg);
|
|
564
582
|
});
|
|
565
583
|
}
|
|
566
|
-
return (index.h("div", { class: "chart-wrapper bar-wrapper" },
|
|
584
|
+
return (index.h("div", { class: "chart-wrapper bar-wrapper" },
|
|
585
|
+
isHybridBar ? (index.h("div", { class: "single-perc" }, amountToPercent(this.slicesDetails[0].amount, this.total, true) + "%")) : (""),
|
|
586
|
+
this.chartType === "bar3" && this.drawAxis(),
|
|
587
|
+
index.h("div", { class: `inner-stacked-bar-wrapper ${showValue(this.valueFormat)}` },
|
|
588
|
+
!isHybridBar ? (index.h("div", { class: `values ${this.valueFormat}` }, this.slicesDetails.map((s) => this.renderBarText(s, 5)))) : (""),
|
|
589
|
+
index.h("div", { class: "stacked-bar-segments-wrapper" }, this.slicesDetails.map((s) => renderStackedBarSegment.call(this, s, 5))),
|
|
590
|
+
isHybridBar ? renderCompletionMessage.call(this) : ""),
|
|
591
|
+
this.chartType === "bar3" ? (index.h("div", { class: "bar3-axis-label", "aria-hidden": "true" },
|
|
592
|
+
index.h("span", null, "0%"),
|
|
593
|
+
index.h("span", null, "100%"))) : ("")));
|
|
567
594
|
}
|
|
568
595
|
function renderStackedBarSegment(s, minimumWidth) {
|
|
569
596
|
const segmentPercentage = amountToPercent(s.amount, this.total, false);
|
|
@@ -581,7 +608,8 @@ function renderStackedBarSegment(s, minimumWidth) {
|
|
|
581
608
|
return (index.h("div", { class: `segment stacked-bar-segment ${amountToPercent(s.amount, this.total, false) === 0 ? "zero" : ""} ${meetsSizeMinimum ? "" : "fixed-width"}`, style: {
|
|
582
609
|
backgroundColor: s.color,
|
|
583
610
|
width: renderedWidth,
|
|
584
|
-
}, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), "data-segmentindex": s.index },
|
|
611
|
+
}, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), "data-segmentindex": s.index },
|
|
612
|
+
index.h("span", { class: "sr-only" }, `${s.legend} ${segmentValue}`)));
|
|
585
613
|
}
|
|
586
614
|
function renderSimpleBar(chartType) {
|
|
587
615
|
// find largest number and get interval, numTicks, chartMaxVal for all.
|
|
@@ -616,10 +644,18 @@ function renderSimpleBar(chartType) {
|
|
|
616
644
|
const ticks = [];
|
|
617
645
|
for (let i = 1; i <= numTicks; i++) {
|
|
618
646
|
const tickVal = abbrNumber(functions.safeMultiplyFloat(i, interval));
|
|
619
|
-
ticks.push(index.h("div", { class: "tick" },
|
|
647
|
+
ticks.push(index.h("div", { class: "tick" },
|
|
648
|
+
index.h("span", null, tickVal)));
|
|
620
649
|
}
|
|
621
650
|
const showGrid = chartType === "bar6" && this.showGrid && this.el.getBoundingClientRect().width > 300;
|
|
622
|
-
return (index.h("div", { class: "chart-wrapper simple-bar-wrapper" },
|
|
651
|
+
return (index.h("div", { class: "chart-wrapper simple-bar-wrapper" },
|
|
652
|
+
index.h("div", { class: `chart ${showValue(this.valueFormat)}` },
|
|
653
|
+
showGrid && index.h("div", { class: "gridlines" }),
|
|
654
|
+
index.h("div", { class: "rows" }, rows)),
|
|
655
|
+
showGrid && (index.h("div", { class: "x-axis", "aria-hidden": "true" },
|
|
656
|
+
index.h("div", { class: "zero" },
|
|
657
|
+
index.h("span", null, "0")),
|
|
658
|
+
ticks))));
|
|
623
659
|
}
|
|
624
660
|
function renderSimpleBarLegend(legend, show, chartType) {
|
|
625
661
|
// not sure how to collapse the left column to 0 width with CSS grid. text should still be available to SR.
|
|
@@ -641,22 +677,25 @@ function renderSimpleBarItem(s, interval, ticks, largest) {
|
|
|
641
677
|
return (index.h("div", { class: "bar segment", style: {
|
|
642
678
|
backgroundColor: s.color,
|
|
643
679
|
width: cssWidth,
|
|
644
|
-
}, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), "data-segmentindex": s.index },
|
|
680
|
+
}, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), "data-segmentindex": s.index },
|
|
681
|
+
index.h("div", { class: "value" }, displayValue)));
|
|
645
682
|
}
|
|
646
683
|
function renderLegend(chartType) {
|
|
647
684
|
// legend is hidden for bar1 and bar6 types regardless of showLegend value
|
|
648
685
|
if (this.showLegend) {
|
|
649
686
|
const showMsg = this.slicesDetails.reduce((hasCluster, cur) => (hasCluster = cur.inSmallCluster ? true : hasCluster), false);
|
|
650
687
|
this.isDoughnut && this.showHiddenValuesMessage(showMsg);
|
|
651
|
-
return (index.h("div", { class: "legend-wrapper" },
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
688
|
+
return (index.h("div", { class: "legend-wrapper" },
|
|
689
|
+
index.h("div", { class: `legend ${chartType} ${this.mode === "bar" ? "--top" : "--bottom"}`, "aria-hidden": "true" }, this.slicesDetails.map((s) => {
|
|
690
|
+
const printValue = this.printModeFormat == "amount"
|
|
691
|
+
? `${s.amount}/${this.total}`
|
|
692
|
+
: `${amountToPercent(s.amount, this.total, true)}%`;
|
|
693
|
+
// when both legend and amount are omitted, the legend is not shown for that particular option (it's been deactivated by the user)
|
|
694
|
+
if (!!s.amount || !!s.legend) {
|
|
695
|
+
return renderLegendItem.call(this, { key: s.legend, color: s.color }, printValue, s);
|
|
696
|
+
}
|
|
697
|
+
})),
|
|
698
|
+
this.isDoughnut && !this.printMode && renderHiddenValuesMessage()));
|
|
660
699
|
}
|
|
661
700
|
}
|
|
662
701
|
function renderLegendItem(legendItem, printValue = "", s = null) {
|
|
@@ -667,7 +706,13 @@ function renderLegendItem(legendItem, printValue = "", s = null) {
|
|
|
667
706
|
highlightSegmentInfo(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")), s);
|
|
668
707
|
}
|
|
669
708
|
};
|
|
670
|
-
return (index.h("div", { class: "legend-item", onClick: (ev) => handleLegendItemClick(ev), "data-segmentindex": s ? s.index : null },
|
|
709
|
+
return (index.h("div", { class: "legend-item", onClick: (ev) => handleLegendItemClick(ev), "data-segmentindex": s ? s.index : null },
|
|
710
|
+
index.h("div", { class: "legend-color", style: { backgroundColor: legendItem.color } }),
|
|
711
|
+
index.h("div", { class: "legend-text" },
|
|
712
|
+
legendItem.key,
|
|
713
|
+
printValue && index.h("span", { class: `print-value ${this.printMode ? "force-visible" : ""}` },
|
|
714
|
+
": ",
|
|
715
|
+
printValue))));
|
|
671
716
|
}
|
|
672
717
|
function renderCompletionMessage() {
|
|
673
718
|
if (this.completionMessage) {
|
|
@@ -675,7 +720,10 @@ function renderCompletionMessage() {
|
|
|
675
720
|
}
|
|
676
721
|
}
|
|
677
722
|
function renderHiddenValuesMessage() {
|
|
678
|
-
return (index.h("div", { class: "hidden-values-warning hidden" },
|
|
723
|
+
return (index.h("div", { class: "hidden-values-warning hidden" },
|
|
724
|
+
textHiddenMessage,
|
|
725
|
+
index.h("br", null),
|
|
726
|
+
seeDetailsMessage));
|
|
679
727
|
}
|
|
680
728
|
function formatDisplayValue(amount, amountTotal, valueFormat, decimalPlaces = 0) {
|
|
681
729
|
switch (valueFormat) {
|