@watermarkinsights/ripple 3.25.0-2 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/{chartFunctions-9dce0ea3.js → chartFunctions-2f04ab6a.js} +591 -591
- package/dist/cjs/chartFunctions-2f04ab6a.js.map +1 -0
- package/dist/cjs/{functions-53aff314.js → functions-d2d99997.js} +478 -478
- package/dist/cjs/{functions-53aff314.js.map → functions-d2d99997.js.map} +1 -1
- package/dist/cjs/{global-c22b1249.js → global-d0584d18.js} +63 -63
- package/dist/cjs/global-d0584d18.js.map +1 -0
- package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +50 -50
- package/dist/cjs/http-service-9e8c4dd5.js.map +1 -0
- package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +30 -30
- package/dist/cjs/interfaces-30a74c1f.js.map +1 -0
- package/dist/cjs/intl-a1ccf587.js +140 -0
- package/dist/cjs/intl-a1ccf587.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
- package/dist/cjs/priv-chart-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
- package/dist/cjs/priv-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
- package/dist/cjs/priv-navigator-button.cjs.entry.js.map +1 -1
- package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
- package/dist/cjs/priv-navigator-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
- package/dist/cjs/wm-action-menu_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-button.cjs.entry.js +260 -260
- package/dist/cjs/wm-button.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
- package/dist/cjs/wm-chart-slice.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +179 -179
- package/dist/cjs/wm-chart.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +264 -264
- package/dist/cjs/wm-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
- package/dist/cjs/wm-file-list.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +201 -201
- package/dist/cjs/wm-file.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +124 -140
- package/dist/cjs/wm-input.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
- package/dist/cjs/wm-modal-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-modal-header.cjs.entry.js +32 -32
- package/dist/cjs/wm-modal-header.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-modal.cjs.entry.js +152 -152
- package/dist/cjs/wm-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +225 -230
- package/dist/cjs/wm-navigation_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
- package/dist/cjs/wm-navigator.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-network-uploader.cjs.entry.js +465 -467
- package/dist/cjs/wm-network-uploader.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +769 -772
- package/dist/cjs/wm-option_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
- package/dist/cjs/wm-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-search.cjs.entry.js +185 -192
- package/dist/cjs/wm-search.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-snackbar.cjs.entry.js +155 -159
- package/dist/cjs/wm-snackbar.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
- package/dist/cjs/wm-tab-item_3.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
- package/dist/cjs/wm-tag-input-row.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +912 -924
- package/dist/cjs/wm-tag-input.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-timepicker.cjs.entry.js +386 -386
- package/dist/cjs/wm-timepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +130 -130
- package/dist/cjs/wm-toggletip.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +441 -510
- package/dist/cjs/wm-uploader.cjs.entry.js.map +1 -1
- package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
- package/dist/cjs/wm-wrapper.cjs.entry.js.map +1 -1
- package/dist/collection/components/charts/chartFunctions.js +557 -557
- package/dist/collection/components/charts/chartFunctions.js.map +1 -1
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +268 -270
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js.map +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +126 -126
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js.map +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart.js +447 -447
- package/dist/collection/components/charts/wm-chart/wm-chart.js.map +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +208 -208
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js.map +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +144 -144
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js.map +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +122 -122
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js.map +1 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +473 -473
- package/dist/collection/components/wm-action-menu/wm-action-menu.js.map +1 -1
- package/dist/collection/components/wm-button/wm-button.js +576 -576
- package/dist/collection/components/wm-button/wm-button.js.map +1 -1
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +984 -984
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js.map +1 -1
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +4 -4
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +492 -492
- package/dist/collection/components/wm-datepicker/wm-datepicker.js.map +1 -1
- package/dist/collection/components/wm-file/wm-file.js +334 -334
- package/dist/collection/components/wm-file/wm-file.js.map +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +153 -153
- package/dist/collection/components/wm-file-list/wm-file-list.js.map +1 -1
- package/dist/collection/components/wm-input/wm-input.css +4 -4
- package/dist/collection/components/wm-input/wm-input.js +428 -444
- package/dist/collection/components/wm-input/wm-input.js.map +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +455 -455
- package/dist/collection/components/wm-menuitem/wm-menuitem.js.map +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +139 -139
- package/dist/collection/components/wm-modal/wm-modal-footer.js.map +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +83 -83
- package/dist/collection/components/wm-modal/wm-modal-header.js.map +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +463 -463
- package/dist/collection/components/wm-modal/wm-modal.js.map +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +177 -177
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js.map +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +131 -131
- package/dist/collection/components/wm-navigation/wm-navigation-item.js.map +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +218 -223
- package/dist/collection/components/wm-navigation/wm-navigation.js.map +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +107 -107
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js.map +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -124
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js.map +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-navigator/wm-navigator.js.map +1 -1
- package/dist/collection/components/wm-option/wm-option.js +436 -436
- package/dist/collection/components/wm-option/wm-option.js.map +1 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +371 -371
- package/dist/collection/components/wm-pagination/wm-pagination.js.map +1 -1
- package/dist/collection/components/wm-search/wm-search.css +5 -3
- package/dist/collection/components/wm-search/wm-search.js +440 -447
- package/dist/collection/components/wm-search/wm-search.js.map +1 -1
- package/dist/collection/components/wm-select/wm-select.css +4 -4
- package/dist/collection/components/wm-select/wm-select.js +1055 -1058
- package/dist/collection/components/wm-select/wm-select.js.map +1 -1
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +283 -287
- package/dist/collection/components/wm-snackbar/wm-snackbar.js.map +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +212 -212
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js.map +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +328 -328
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js.map +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +109 -109
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js.map +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +123 -123
- package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js.map +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -4
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1267 -1279
- package/dist/collection/components/wm-tag-input/wm-tag-input.js.map +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +4 -4
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +606 -606
- package/dist/collection/components/wm-timepicker/wm-timepicker.js.map +1 -1
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +254 -254
- package/dist/collection/components/wm-toggletip/wm-toggletip.js.map +1 -1
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +773 -775
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js.map +1 -1
- package/dist/collection/components/wm-uploader/wm-uploader.js +965 -1034
- package/dist/collection/components/wm-uploader/wm-uploader.js.map +1 -1
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +29 -29
- package/dist/collection/components/wm-wrapper/wm-wrapper.js.map +1 -1
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +7 -7
- package/dist/collection/global/__mocks__/functions.js.map +1 -1
- package/dist/collection/global/functions.js +521 -521
- package/dist/collection/global/functions.js.map +1 -1
- package/dist/collection/global/global.js +70 -70
- package/dist/collection/global/global.js.map +1 -1
- package/dist/collection/global/interfaces.js +50 -50
- package/dist/collection/global/interfaces.js.map +1 -1
- package/dist/collection/global/intl.js +133 -7
- package/dist/collection/global/intl.js.map +1 -1
- package/dist/collection/global/services/__mocks__/http-service.js +131 -131
- package/dist/collection/global/services/__mocks__/http-service.js.map +1 -1
- package/dist/collection/global/services/http-service.js +51 -51
- package/dist/collection/global/services/http-service.js.map +1 -1
- package/dist/collection/lang/lang.js +6 -6
- package/dist/collection/lang/lang.js.map +1 -1
- package/dist/collection/lang/missing.js +43 -43
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +591 -591
- package/dist/esm/chartFunctions-a72f5835.js.map +1 -0
- package/dist/esm/{functions-bb1309d0.js → functions-dc9964aa.js} +478 -478
- package/dist/esm/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
- package/dist/esm/{global-2c5c2727.js → global-3d0ef32b.js} +63 -63
- package/dist/esm/global-3d0ef32b.js.map +1 -0
- package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +50 -50
- package/dist/esm/http-service-5d037e16.js.map +1 -0
- package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +30 -30
- package/dist/esm/interfaces-61c6305b.js.map +1 -0
- package/dist/esm/intl-4d4826dd.js +137 -0
- package/dist/esm/intl-4d4826dd.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +91 -91
- package/dist/esm/priv-chart-popover.entry.js.map +1 -1
- package/dist/esm/priv-datepicker.entry.js +657 -657
- package/dist/esm/priv-datepicker.entry.js.map +1 -1
- package/dist/esm/priv-navigator-button.entry.js +19 -19
- package/dist/esm/priv-navigator-button.entry.js.map +1 -1
- package/dist/esm/priv-navigator-item.entry.js +23 -23
- package/dist/esm/priv-navigator-item.entry.js.map +1 -1
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +334 -334
- package/dist/esm/wm-action-menu_2.entry.js.map +1 -1
- package/dist/esm/wm-button.entry.js +260 -260
- package/dist/esm/wm-button.entry.js.map +1 -1
- package/dist/esm/wm-chart-slice.entry.js +18 -18
- package/dist/esm/wm-chart-slice.entry.js.map +1 -1
- package/dist/esm/wm-chart.entry.js +179 -179
- package/dist/esm/wm-chart.entry.js.map +1 -1
- package/dist/esm/wm-datepicker.entry.js +264 -264
- package/dist/esm/wm-datepicker.entry.js.map +1 -1
- package/dist/esm/wm-file-list.entry.js +35 -35
- package/dist/esm/wm-file-list.entry.js.map +1 -1
- package/dist/esm/wm-file.entry.js +201 -201
- package/dist/esm/wm-file.entry.js.map +1 -1
- package/dist/esm/wm-input.entry.js +124 -140
- package/dist/esm/wm-input.entry.js.map +1 -1
- package/dist/esm/wm-modal-footer.entry.js +33 -33
- package/dist/esm/wm-modal-footer.entry.js.map +1 -1
- package/dist/esm/wm-modal-header.entry.js +32 -32
- package/dist/esm/wm-modal-header.entry.js.map +1 -1
- package/dist/esm/wm-modal.entry.js +152 -152
- package/dist/esm/wm-modal.entry.js.map +1 -1
- package/dist/esm/wm-navigation_3.entry.js +225 -230
- package/dist/esm/wm-navigation_3.entry.js.map +1 -1
- package/dist/esm/wm-navigator.entry.js +264 -264
- package/dist/esm/wm-navigator.entry.js.map +1 -1
- package/dist/esm/wm-network-uploader.entry.js +465 -467
- package/dist/esm/wm-network-uploader.entry.js.map +1 -1
- package/dist/esm/wm-option_2.entry.js +769 -772
- package/dist/esm/wm-option_2.entry.js.map +1 -1
- package/dist/esm/wm-pagination.entry.js +179 -179
- package/dist/esm/wm-pagination.entry.js.map +1 -1
- package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
- package/dist/esm/wm-progress-indicator_3.entry.js.map +1 -1
- package/dist/esm/wm-search.entry.js +185 -192
- package/dist/esm/wm-search.entry.js.map +1 -1
- package/dist/esm/wm-snackbar.entry.js +155 -159
- package/dist/esm/wm-snackbar.entry.js.map +1 -1
- package/dist/esm/wm-tab-item_3.entry.js +264 -264
- package/dist/esm/wm-tab-item_3.entry.js.map +1 -1
- package/dist/esm/wm-tag-input-row.entry.js +14 -14
- package/dist/esm/wm-tag-input-row.entry.js.map +1 -1
- package/dist/esm/wm-tag-input.entry.js +912 -924
- package/dist/esm/wm-tag-input.entry.js.map +1 -1
- package/dist/esm/wm-timepicker.entry.js +386 -386
- package/dist/esm/wm-timepicker.entry.js.map +1 -1
- package/dist/esm/wm-toggletip.entry.js +130 -130
- package/dist/esm/wm-toggletip.entry.js.map +1 -1
- package/dist/esm/wm-uploader.entry.js +441 -510
- package/dist/esm/wm-uploader.entry.js.map +1 -1
- package/dist/esm/wm-wrapper.entry.js +12 -12
- package/dist/esm/wm-wrapper.entry.js.map +1 -1
- package/dist/esm-es5/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +2 -2
- package/dist/esm-es5/chartFunctions-a72f5835.js.map +1 -0
- package/dist/esm-es5/{functions-bb1309d0.js → functions-dc9964aa.js} +1 -1
- package/dist/esm-es5/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
- package/dist/esm-es5/global-3d0ef32b.js +2 -0
- package/dist/esm-es5/global-3d0ef32b.js.map +1 -0
- package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
- package/dist/esm-es5/http-service-5d037e16.js.map +1 -0
- package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +1 -1
- package/dist/esm-es5/interfaces-61c6305b.js.map +1 -0
- package/dist/esm-es5/intl-4d4826dd.js +2 -0
- package/dist/esm-es5/intl-4d4826dd.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js.map +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js.map +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js.map +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js.map +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/ripple.js.map +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js.map +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js.map +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js.map +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js.map +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js.map +1 -1
- package/dist/esm-es5/wm-file-list.entry.js.map +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js.map +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js.map +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js.map +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js.map +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js.map +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js.map +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js.map +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js.map +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js.map +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js.map +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js.map +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js.map +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js.map +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js.map +1 -1
- package/dist/esm-es5/wm-tag-input-row.entry.js.map +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js.map +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js.map +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js.map +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js.map +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js.map +1 -1
- package/dist/ripple/{p-3f6c7e6c.entry.js → p-002d067e.entry.js} +2 -2
- package/dist/ripple/p-002d067e.entry.js.map +1 -0
- package/dist/ripple/p-02a1000a.entry.js +2 -0
- package/dist/ripple/p-02a1000a.entry.js.map +1 -0
- package/dist/ripple/{p-21bb563a.system.entry.js → p-04ae66fd.system.entry.js} +2 -2
- package/dist/ripple/p-04ae66fd.system.entry.js.map +1 -0
- package/dist/ripple/{p-c38f6103.system.js → p-0826dc64.system.js} +2 -2
- package/dist/ripple/{p-c38f6103.system.js.map → p-0826dc64.system.js.map} +1 -1
- package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +1 -1
- package/dist/ripple/p-08b7ec08.system.js.map +1 -0
- package/dist/ripple/{p-d5b0809e.entry.js → p-0ad3a708.entry.js} +2 -2
- package/dist/ripple/p-0ad3a708.entry.js.map +1 -0
- package/dist/ripple/p-0cd13c7d.system.entry.js +2 -0
- package/dist/ripple/p-0cd13c7d.system.entry.js.map +1 -0
- package/dist/ripple/p-0d7bccf7.entry.js.map +1 -1
- package/dist/ripple/p-0eb7b1b7.system.entry.js +2 -0
- package/dist/ripple/p-0eb7b1b7.system.entry.js.map +1 -0
- package/dist/ripple/{p-70768add.entry.js → p-11124a23.entry.js} +2 -2
- package/dist/ripple/p-11124a23.entry.js.map +1 -0
- package/dist/ripple/p-1808b90a.entry.js +2 -0
- package/dist/ripple/p-1808b90a.entry.js.map +1 -0
- package/dist/ripple/p-1fd20e05.system.entry.js +2 -0
- package/dist/ripple/p-1fd20e05.system.entry.js.map +1 -0
- package/dist/ripple/{p-f36b1c58.system.entry.js → p-23fa1ff6.system.entry.js} +2 -2
- package/dist/ripple/p-23fa1ff6.system.entry.js.map +1 -0
- package/dist/ripple/p-24a4cb11.system.entry.js.map +1 -1
- package/dist/ripple/p-2c2a7092.system.entry.js.map +1 -1
- package/dist/ripple/{p-9d02957d.system.js → p-313b6073.system.js} +1 -1
- package/dist/ripple/p-313b6073.system.js.map +1 -0
- package/dist/ripple/p-33558ec4.system.entry.js.map +1 -1
- package/dist/ripple/{p-28c12986.system.entry.js → p-33ec18d4.system.entry.js} +2 -2
- package/dist/ripple/p-33ec18d4.system.entry.js.map +1 -0
- package/dist/ripple/{p-7d0f3abe.entry.js → p-341aa131.entry.js} +2 -2
- package/dist/ripple/p-341aa131.entry.js.map +1 -0
- package/dist/ripple/p-3759b7af.system.entry.js.map +1 -1
- package/dist/ripple/p-38449dff.system.entry.js +2 -0
- package/dist/ripple/p-38449dff.system.entry.js.map +1 -0
- package/dist/ripple/{p-ee97c3f6.entry.js → p-384c4981.entry.js} +2 -2
- package/dist/ripple/p-384c4981.entry.js.map +1 -0
- package/dist/ripple/{p-b81ce905.system.entry.js → p-3869a69e.system.entry.js} +2 -2
- package/dist/ripple/p-3869a69e.system.entry.js.map +1 -0
- package/dist/ripple/p-4391166c.entry.js.map +1 -1
- package/dist/ripple/{p-e6e7cb2d.entry.js → p-43be123d.entry.js} +2 -2
- package/dist/ripple/p-43be123d.entry.js.map +1 -0
- package/dist/ripple/p-4a014591.entry.js.map +1 -1
- package/dist/ripple/p-4a06d0a9.system.entry.js +2 -0
- package/dist/ripple/p-4a06d0a9.system.entry.js.map +1 -0
- package/dist/ripple/p-4e02e2ae.entry.js +2 -0
- package/dist/ripple/p-4e02e2ae.entry.js.map +1 -0
- package/dist/ripple/p-56cd4d5e.entry.js +2 -0
- package/dist/ripple/p-56cd4d5e.entry.js.map +1 -0
- package/dist/ripple/p-59654f8e.entry.js.map +1 -1
- package/dist/ripple/p-5cc287d2.entry.js +2 -0
- package/dist/ripple/p-5cc287d2.entry.js.map +1 -0
- package/dist/ripple/{p-8eebf787.entry.js → p-7e0e6b00.entry.js} +2 -2
- package/dist/ripple/p-7e0e6b00.entry.js.map +1 -0
- package/dist/ripple/{p-0400599e.system.entry.js → p-833c622f.system.entry.js} +2 -2
- package/dist/ripple/p-833c622f.system.entry.js.map +1 -0
- package/dist/ripple/{p-b00991d9.system.entry.js → p-8613600d.system.entry.js} +2 -2
- package/dist/ripple/p-8613600d.system.entry.js.map +1 -0
- package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +1 -1
- package/dist/ripple/p-888bec42.js.map +1 -0
- package/dist/ripple/p-889579fc.entry.js +2 -0
- package/dist/ripple/p-889579fc.entry.js.map +1 -0
- package/dist/ripple/p-8c51e9f8.system.entry.js.map +1 -1
- package/dist/ripple/{p-42158d44.entry.js → p-8db604d2.entry.js} +2 -2
- package/dist/ripple/p-8db604d2.entry.js.map +1 -0
- package/dist/ripple/{p-24ef6556.system.entry.js → p-91deb45f.system.entry.js} +2 -2
- package/dist/ripple/p-91deb45f.system.entry.js.map +1 -0
- package/dist/ripple/p-9338011f.system.entry.js +2 -0
- package/dist/ripple/p-9338011f.system.entry.js.map +1 -0
- package/dist/ripple/p-976b2789.system.entry.js.map +1 -1
- package/dist/ripple/{p-1aa16d42.js → p-994303f2.js} +2 -2
- package/dist/ripple/p-994303f2.js.map +1 -0
- package/dist/ripple/p-9b2dfb54.js +2 -0
- package/dist/ripple/p-9b2dfb54.js.map +1 -0
- package/dist/ripple/p-9b9eb944.entry.js.map +1 -1
- package/dist/ripple/{p-980afed1.system.entry.js → p-a6d64d8a.system.entry.js} +2 -2
- package/dist/ripple/p-a6d64d8a.system.entry.js.map +1 -0
- package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +1 -1
- package/dist/ripple/p-a6d6eae7.js.map +1 -0
- package/dist/ripple/{p-219fbe2b.system.entry.js → p-a73cf968.system.entry.js} +2 -2
- package/dist/ripple/p-a73cf968.system.entry.js.map +1 -0
- package/dist/ripple/{p-76aafb99.system.entry.js → p-aed625c1.system.entry.js} +2 -2
- package/dist/ripple/p-aed625c1.system.entry.js.map +1 -0
- package/dist/ripple/{p-0d36ceba.system.entry.js → p-b5b521e4.system.entry.js} +2 -2
- package/dist/ripple/p-b5b521e4.system.entry.js.map +1 -0
- package/dist/ripple/{p-47d223f1.system.entry.js → p-b7451e73.system.entry.js} +2 -2
- package/dist/ripple/p-b7451e73.system.entry.js.map +1 -0
- package/dist/ripple/p-bafdcb4e.system.entry.js +2 -0
- package/dist/ripple/p-bafdcb4e.system.entry.js.map +1 -0
- package/dist/ripple/{p-262713b9.entry.js → p-bb45e122.entry.js} +2 -2
- package/dist/ripple/p-bb45e122.entry.js.map +1 -0
- package/dist/ripple/p-bd84628c.system.entry.js +2 -0
- package/dist/ripple/p-bd84628c.system.entry.js.map +1 -0
- package/dist/ripple/p-bf569af0.entry.js.map +1 -1
- package/dist/ripple/p-c094f6a8.entry.js +2 -0
- package/dist/ripple/p-c094f6a8.entry.js.map +1 -0
- package/dist/ripple/p-c36002b6.system.js +2 -0
- package/dist/ripple/p-c36002b6.system.js.map +1 -0
- package/dist/ripple/p-c5bf7db8.entry.js +2 -0
- package/dist/ripple/p-c5bf7db8.entry.js.map +1 -0
- package/dist/ripple/p-c68b3798.system.js +2 -0
- package/dist/ripple/p-c68b3798.system.js.map +1 -0
- package/dist/ripple/{p-05e0f901.js → p-c6a0f7e5.js} +1 -1
- package/dist/ripple/{p-05e0f901.js.map → p-c6a0f7e5.js.map} +1 -1
- package/dist/ripple/{p-bcba3ce8.entry.js → p-d46f5794.entry.js} +2 -2
- package/dist/ripple/p-d46f5794.entry.js.map +1 -0
- package/dist/ripple/{p-d7ffac2f.entry.js → p-d48313e0.entry.js} +2 -2
- package/dist/ripple/p-d48313e0.entry.js.map +1 -0
- package/dist/ripple/p-d939cb54.entry.js.map +1 -1
- package/dist/ripple/p-dbfd1640.system.entry.js.map +1 -1
- package/dist/ripple/{p-d7c55ce1.entry.js → p-e22854c1.entry.js} +2 -2
- package/dist/ripple/p-e22854c1.entry.js.map +1 -0
- package/dist/ripple/p-e70bb79f.js +2 -0
- package/dist/ripple/p-e70bb79f.js.map +1 -0
- package/dist/ripple/{p-e99a7f36.entry.js → p-ed82573a.entry.js} +2 -2
- package/dist/ripple/p-ed82573a.entry.js.map +1 -0
- package/dist/ripple/{p-bc28c815.system.js → p-f0fd8695.system.js} +1 -1
- package/dist/ripple/{p-bc28c815.system.js.map → p-f0fd8695.system.js.map} +1 -1
- package/dist/ripple/{p-e5f84104.system.entry.js → p-f312d59a.system.entry.js} +2 -2
- package/dist/ripple/p-f312d59a.system.entry.js.map +1 -0
- package/dist/ripple/{p-c19ddc00.system.entry.js → p-f59a495a.system.entry.js} +2 -2
- package/dist/ripple/p-f59a495a.system.entry.js.map +1 -0
- package/dist/ripple/{p-cc8ca6bd.system.js → p-f80eb8a5.system.js} +2 -2
- package/dist/ripple/p-f80eb8a5.system.js.map +1 -0
- package/dist/ripple/{p-1be55579.system.entry.js → p-fb67c39e.system.entry.js} +2 -2
- package/dist/ripple/p-fb67c39e.system.entry.js.map +1 -0
- package/dist/ripple/{p-20d0d019.entry.js → p-fc08d5e1.entry.js} +2 -2
- package/dist/ripple/p-fc08d5e1.entry.js.map +1 -0
- package/dist/ripple/{p-d7b946ed.entry.js → p-fe7da854.entry.js} +2 -2
- package/dist/ripple/p-fe7da854.entry.js.map +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.esm.js.map +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/chartFunctions.d.ts +37 -37
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -0
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -0
- package/dist/types/components/wm-button/wm-button.d.ts +49 -0
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -0
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -0
- package/dist/types/components/wm-file/wm-file.d.ts +42 -0
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -0
- package/dist/types/components/wm-input/wm-input.d.ts +45 -0
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -0
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +10 -10
- package/dist/types/components/wm-modal/wm-modal.d.ts +40 -0
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -0
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -0
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +26 -0
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -0
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -0
- package/dist/types/components/wm-option/wm-option.d.ts +34 -0
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +77 -0
- package/dist/types/components/wm-select/wm-select.d.ts +101 -0
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +31 -32
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -0
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -0
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -0
- package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -0
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +135 -0
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -0
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +28 -0
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -0
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +99 -0
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +27 -27
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/functions.d.ts +48 -48
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +74 -74
- package/dist/types/global/intl.d.ts +29 -1
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/package.json +46 -46
- package/dist/cjs/chartFunctions-9dce0ea3.js.map +0 -1
- package/dist/cjs/global-c22b1249.js.map +0 -1
- package/dist/cjs/http-service-494d81de.js.map +0 -1
- package/dist/cjs/interfaces-a3338581.js.map +0 -1
- package/dist/cjs/intl-e14dc0a1.js +0 -13
- package/dist/cjs/intl-e14dc0a1.js.map +0 -1
- package/dist/esm/chartFunctions-1df8043a.js.map +0 -1
- package/dist/esm/global-2c5c2727.js.map +0 -1
- package/dist/esm/http-service-3dc3b3e7.js.map +0 -1
- package/dist/esm/interfaces-2b97fab2.js.map +0 -1
- package/dist/esm/intl-4153b9ef.js +0 -11
- package/dist/esm/intl-4153b9ef.js.map +0 -1
- package/dist/esm-es5/chartFunctions-1df8043a.js.map +0 -1
- package/dist/esm-es5/global-2c5c2727.js +0 -2
- package/dist/esm-es5/global-2c5c2727.js.map +0 -1
- package/dist/esm-es5/http-service-3dc3b3e7.js.map +0 -1
- package/dist/esm-es5/interfaces-2b97fab2.js.map +0 -1
- package/dist/esm-es5/intl-4153b9ef.js +0 -2
- package/dist/esm-es5/intl-4153b9ef.js.map +0 -1
- package/dist/ripple/p-0400599e.system.entry.js.map +0 -1
- package/dist/ripple/p-075607ac.entry.js +0 -2
- package/dist/ripple/p-075607ac.entry.js.map +0 -1
- package/dist/ripple/p-08d17d5a.entry.js +0 -2
- package/dist/ripple/p-08d17d5a.entry.js.map +0 -1
- package/dist/ripple/p-0d36ceba.system.entry.js.map +0 -1
- package/dist/ripple/p-124da634.entry.js +0 -2
- package/dist/ripple/p-124da634.entry.js.map +0 -1
- package/dist/ripple/p-1aa16d42.js.map +0 -1
- package/dist/ripple/p-1be55579.system.entry.js.map +0 -1
- package/dist/ripple/p-20d0d019.entry.js.map +0 -1
- package/dist/ripple/p-219fbe2b.system.entry.js.map +0 -1
- package/dist/ripple/p-21bb563a.system.entry.js.map +0 -1
- package/dist/ripple/p-241d4d41.system.entry.js +0 -2
- package/dist/ripple/p-241d4d41.system.entry.js.map +0 -1
- package/dist/ripple/p-24ef6556.system.entry.js.map +0 -1
- package/dist/ripple/p-262713b9.entry.js.map +0 -1
- package/dist/ripple/p-28c12986.system.entry.js.map +0 -1
- package/dist/ripple/p-3f6c7e6c.entry.js.map +0 -1
- package/dist/ripple/p-42158d44.entry.js.map +0 -1
- package/dist/ripple/p-43f1298b.js.map +0 -1
- package/dist/ripple/p-47d223f1.system.entry.js.map +0 -1
- package/dist/ripple/p-4d30004f.entry.js +0 -2
- package/dist/ripple/p-4d30004f.entry.js.map +0 -1
- package/dist/ripple/p-58b1415e.system.js +0 -2
- package/dist/ripple/p-58b1415e.system.js.map +0 -1
- package/dist/ripple/p-5cda4e9c.system.entry.js +0 -2
- package/dist/ripple/p-5cda4e9c.system.entry.js.map +0 -1
- package/dist/ripple/p-64f15a9e.system.entry.js +0 -2
- package/dist/ripple/p-64f15a9e.system.entry.js.map +0 -1
- package/dist/ripple/p-6e6b5b2c.system.entry.js +0 -2
- package/dist/ripple/p-6e6b5b2c.system.entry.js.map +0 -1
- package/dist/ripple/p-70768add.entry.js.map +0 -1
- package/dist/ripple/p-76aafb99.system.entry.js.map +0 -1
- package/dist/ripple/p-7d0f3abe.entry.js.map +0 -1
- package/dist/ripple/p-8aa85021.system.entry.js +0 -2
- package/dist/ripple/p-8aa85021.system.entry.js.map +0 -1
- package/dist/ripple/p-8eebf787.entry.js.map +0 -1
- package/dist/ripple/p-96b0ca93.system.js +0 -2
- package/dist/ripple/p-96b0ca93.system.js.map +0 -1
- package/dist/ripple/p-980afed1.system.entry.js.map +0 -1
- package/dist/ripple/p-9d02957d.system.js.map +0 -1
- package/dist/ripple/p-adbeb6a8.system.entry.js +0 -2
- package/dist/ripple/p-adbeb6a8.system.entry.js.map +0 -1
- package/dist/ripple/p-b00991d9.system.entry.js.map +0 -1
- package/dist/ripple/p-b81ce905.system.entry.js.map +0 -1
- package/dist/ripple/p-bcba3ce8.entry.js.map +0 -1
- package/dist/ripple/p-bf808ec4.entry.js +0 -2
- package/dist/ripple/p-bf808ec4.entry.js.map +0 -1
- package/dist/ripple/p-c19ddc00.system.entry.js.map +0 -1
- package/dist/ripple/p-cc8ca6bd.system.js.map +0 -1
- package/dist/ripple/p-ce52357e.js +0 -2
- package/dist/ripple/p-ce52357e.js.map +0 -1
- package/dist/ripple/p-d0f5773a.entry.js +0 -2
- package/dist/ripple/p-d0f5773a.entry.js.map +0 -1
- package/dist/ripple/p-d5b0809e.entry.js.map +0 -1
- package/dist/ripple/p-d7b946ed.entry.js.map +0 -1
- package/dist/ripple/p-d7c55ce1.entry.js.map +0 -1
- package/dist/ripple/p-d7ffac2f.entry.js.map +0 -1
- package/dist/ripple/p-dbf657c5.js +0 -2
- package/dist/ripple/p-dbf657c5.js.map +0 -1
- package/dist/ripple/p-e1b812ed.entry.js +0 -2
- package/dist/ripple/p-e1b812ed.entry.js.map +0 -1
- package/dist/ripple/p-e5f84104.system.entry.js.map +0 -1
- package/dist/ripple/p-e6e7cb2d.entry.js.map +0 -1
- package/dist/ripple/p-e99a7f36.entry.js.map +0 -1
- package/dist/ripple/p-ed14d37c.system.entry.js +0 -2
- package/dist/ripple/p-ed14d37c.system.entry.js.map +0 -1
- package/dist/ripple/p-ee97c3f6.entry.js.map +0 -1
- package/dist/ripple/p-f3130941.entry.js +0 -2
- package/dist/ripple/p-f3130941.entry.js.map +0 -1
- package/dist/ripple/p-f36b1c58.system.entry.js.map +0 -1
- package/dist/ripple/p-f4a622a9.system.entry.js +0 -2
- package/dist/ripple/p-f4a622a9.system.entry.js.map +0 -1
- package/dist/ripple/p-f5df5903.system.js.map +0 -1
- package/dist/ripple/p-fd8070fb.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wm-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,86lBAA86lB;;MCSr7lB,MAAM;;;IAgCT,WAAM,GAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACnC,OAAE,GAAGA,oBAAU,EAAE,CAAC;IAClB,cAAS,GAAY,KAAK,CAAC;oBA5BU,KAAK;sBAKa,IAAI;uBACH,IAAI;;;;;;;2BAYxB,cAAc;6BACpB,KAAK;oBACf,IAAI;;0BAEU,KAAK;qBAEjB,KAAK;;EAvBnC,IAAI,UAAU;;IAEZ,OAAOC,gBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAC9B;EAGD,IAAI,cAAc;;;IAGhB,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC;GAC3D;EAmBD,IAAI,WAAW;IACb,QACE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAC9G;GACH;EAED,IAAI,UAAU;;IAEZ,OAAO,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,IAAI,IAAI,CAAC,WAAW,CAAC;GACzG;EAED,IAAI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AY,EAAE,mBAChB,IAAI,CAAC,SAAS,GAAG,MAAM,GAAG,IAAI,EAC7C,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,OAAO,EAAE,MAAM,IAAI,CAAC,2BAA2B,EAAE,EACjD,MAAM,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAChC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhC,IAAI,CAAC,IAAI,KACRA,kBAAM,KAAK,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IACrC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC5C,CACR,EACDA,kBAAM,KAAK,EAAC,aAAa,IACvBA,qBAAQ,CACH,CACA,CACJ,EACP;GACH;;;;;;;;;;;;;","names":["generateId","toBool","getIconCodeFromName","adjustTooltipPlacement","h","Host"],"sources":["./src/components/wm-button/wm-button.scss?tag=wm-button&encapsulation=shadow","./src/components/wm-button/wm-button.tsx"],"sourcesContent":[":host([disabled]),\r\n:host(.button-disabled) {\r\n pointer-events: none;\r\n}\r\n\r\n:host([disabled=\"false\"]) {\r\n // override disabled behavior from occuring when the string is \"false\", which would evaluate as truthy\r\n pointer-events: initial;\r\n}\r\n\r\n:host,\r\nwm-button {\r\n display: inline-block;\r\n width: fit-content;\r\n position: relative; // for tooltip\r\n @include box-shadow(none);\r\n\r\n .sr-only {\r\n @include srOnly;\r\n }\r\n\r\n @extend %wm-button;\r\n}\r\n","import { h, Component, Prop, Element, Listen, Watch, Host, State } from \"@stencil/core\";\r\nimport { getIconCodeFromName, TooltipPlacement, validButtonTypes } from \"../../global/interfaces\";\r\nimport { generateId, adjustTooltipPlacement, toBool } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-button\",\r\n styleUrl: \"wm-button.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class Button {\r\n @Element() el!: HTMLWmButtonElement;\r\n private buttonEl!: HTMLButtonElement;\r\n\r\n // icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute\r\n // and the component throws errors when they are required (when buttonType is icononly or navigational)\r\n @Prop({ reflect: true }) disabled: boolean = false;\r\n get isDisabled(): boolean {\r\n // string \"false\" needs to be treated as bool False because react wrappers convert bool to string.\r\n return toBool(this.disabled);\r\n }\r\n @Prop({ mutable: true }) buttonType: validButtonTypes | null = null;\r\n @Prop({ mutable: true }) buttonStyle: validButtonTypes | null = null; // DEPRECATED in favor of button-type\r\n get tempButtonType(): validButtonTypes {\r\n // uses of this getter should be replaced with this.buttonType when buttonStyle is fully phased out\r\n // don't forget to reset this.buttonType's default value to secondary\r\n return this.buttonType || this.buttonStyle || \"secondary\";\r\n }\r\n @Prop({ reflect: true, mutable: true }) icon?: string;\r\n @Prop() iconSize?: string;\r\n @Prop() iconRotate?: number;\r\n @Prop() iconFlip?: \"horizontal\" | \"vertical\";\r\n @Prop({ reflect: true, mutable: true }) tooltip?: string;\r\n @Prop() labelForIdenticalButtons?: string;\r\n @Prop() tooltipPosition: TooltipPlacement = \"bottom-right\";\r\n @Prop() permanentlyDelete?: boolean = false;\r\n @Prop() textWrap: boolean = true;\r\n @Prop() customBackground?: string;\r\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\r\n\r\n @State() isTabbing: boolean = false;\r\n\r\n private btnPos: any = { old: {}, new: {} }; // for tooltip position. old and new are DOMRect\r\n private id = generateId();\r\n private ariaPopup: boolean = false;\r\n\r\n get isTruncated(): boolean {\r\n return (\r\n !!this.buttonEl && this.tempButtonType === \"textonly\" && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth\r\n );\r\n }\r\n\r\n get hasTooltip(): boolean {\r\n // tooltip is only rendered for icononly and navigational types, or if the button text is truncated\r\n return this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\" || this.isTruncated;\r\n }\r\n\r\n get tooltipEl(): HTMLElement {\r\n return document.getElementById(\"wm-tooltip\")!;\r\n }\r\n\r\n get buttonClasses() {\r\n let classes = \"wm-button\";\r\n classes += this.permanentlyDelete ? \" -permanentlydelete\" : \"\";\r\n classes += this.tempButtonType ? \" -\" + this.tempButtonType : \" -secondary\";\r\n classes += this.textWrap ? \"\" : \" nowrap\";\r\n classes += this.isTabbing ? \" user-is-tabbing\" : \"\";\r\n classes += this.isTruncated ? \" -truncated\" : \"\";\r\n classes += this.customBackground === \"dark\" ? \" dark\" : \"\";\r\n return classes;\r\n }\r\n\r\n get iconStyles() {\r\n let transformStyle = \"\";\r\n transformStyle += this.iconRotate ? `rotate(${this.iconRotate}deg)` : \"\";\r\n transformStyle += this.iconFlip === \"horizontal\" ? `scaleX(-1)` : \"\";\r\n transformStyle += this.iconFlip === \"vertical\" ? `scaleY(-1)` : \"\";\r\n\r\n return {\r\n ...(this.iconSize && { fontSize: this.iconSize }),\r\n ...((this.iconRotate || this.iconFlip) && { transform: transformStyle }),\r\n };\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n // we need to listen for scroll events during the capture phase because they do not bubble up\r\n // there can be layouts where the main content has 100vh and overflows\r\n // in these cases window will register no scroll events unless we catch on they way down\r\n @Listen(\"scroll\", { target: \"window\", capture: true })\r\n handleScroll() {\r\n if (this.tooltipVisible) {\r\n this.hideTooltip();\r\n }\r\n }\r\n\r\n @Watch(\"buttonType\")\r\n validateType(newValue: string) {\r\n const valid = [\r\n \"primary\",\r\n \"secondary\",\r\n \"textonly\",\r\n \"icononly\",\r\n \"navigational\",\r\n \"selector\",\r\n \"selector-primary\",\r\n \"pairpositive\",\r\n \"pairnegative\",\r\n ].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonType = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n // remove entire watcher after buttonStyle has been fully removed\r\n @Watch(\"buttonStyle\")\r\n validateDeprecatedType(newValue: string) {\r\n const valid = [\"primary\", \"secondary\", \"textonly\", \"icononly\", \"navigational\", \"selector\"].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonStyle = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n @Watch(\"icon\")\r\n updateIcon() {\r\n this.icon = getIconCodeFromName(this.icon!);\r\n }\r\n\r\n validateIcon() {\r\n switch (this.tempButtonType) {\r\n case \"icononly\":\r\n case \"navigational\":\r\n // if the style is icononly or navigational...\r\n // - an icon must be provided\r\n if (!this.icon) {\r\n console.error(\r\n \"wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n // - if no tooltip text was passed and we couldn't generate one, throw an error\r\n if (!this.tooltip) {\r\n console.error(\r\n \"wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n break;\r\n case \"pairpositive\":\r\n this.icon = \"f12c\";\r\n break;\r\n case \"pairnegative\":\r\n this.icon = \"f739\";\r\n break;\r\n }\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKeydown(ev: KeyboardEvent) {\r\n switch (ev.key) {\r\n case \"Enter\":\r\n ev.preventDefault();\r\n if (!this.isDisabled) {\r\n this.el.click();\r\n }\r\n break;\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.buttonStyle) {\r\n console.warn(\"wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.\");\r\n }\r\n\r\n this.validateType(this.tempButtonType);\r\n\r\n if (this.icon) {\r\n this.icon = this.icon = getIconCodeFromName(this.icon);\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n\r\n this.ariaPopup = !!this.el.getAttribute(\"aria-haspopup\");\r\n\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n }\r\n\r\n showTooltip() {\r\n if (this.hasTooltip) {\r\n // set tooltip text\r\n let tooltipText = \"\";\r\n if (this.isTruncated && this.el.textContent) {\r\n // when truncated, tooltip text is the button's content\r\n tooltipText = this.el.textContent;\r\n } else if (this.tooltip) {\r\n // otherwise it is the tooltip property if present\r\n tooltipText = this.tooltip;\r\n }\r\n this.tooltipEl.textContent = tooltipText;\r\n\r\n // tooltip only has a maxWidth if it contains whitespace and can break\r\n const hasNoWhitespace = tooltipText.match(/^[^\\s]+$/);\r\n if (hasNoWhitespace) {\r\n this.tooltipEl.classList.add(\"single-word\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\r\n } else {\r\n this.tooltipEl.classList.remove(\"single-word\");\r\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\r\n }\r\n\r\n // adjust placement in case there is no space to place the tooltip where specified via prop\r\n // calculation outside of the function to keep it pure\r\n const adjustedTooltipPlacement = adjustTooltipPlacement(this.tooltipPosition, this.buttonEl, this.tooltipEl);\r\n\r\n this.btnPos.old = {};\r\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\r\n this.tooltipEl.style.transitionDelay = \"500ms\";\r\n this.tooltipEl.style.opacity = \"1\";\r\n // This slight delay fixes an issue for keyboard users:\r\n // if they tab to a button out of screen bounds, the page scrolls\r\n // and hideTooltip() would be triggered before the tooltip would show\r\n setTimeout(() => {\r\n this.tooltipVisible = true;\r\n this.positionTooltip(adjustedTooltipPlacement, tooltipRect);\r\n }, 50);\r\n }\r\n }\r\n\r\n positionTooltip(tPos: string, tooltipRect: DOMRect) {\r\n if (this.tooltipVisible) {\r\n window.requestAnimationFrame(() => this.positionTooltip(tPos, tooltipRect));\r\n }\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n if (this.btnPos.new.top != this.btnPos.old.top || this.btnPos.new.left != this.btnPos.old.left) {\r\n // this is to figure out how to offset, given the size of the button and of the tooltip\r\n // to get the center positions, calculate the difference between the button width and the tooltip width\r\n const vDiff = (this.btnPos.new.height - tooltipRect.height) / 2;\r\n const hDiff = (this.btnPos.new.width - tooltipRect.width) / 2;\r\n // the naming convention defaults to center in the absence of a value\r\n // Values \"top\" and \"bottom\" imply horizontal centering; Values \"right\" and \"left\" imply vertical centering\r\n // therefore we first set to center first, then adjust accordingly\r\n let vPos = this.btnPos.new.top + vDiff;\r\n let hPos = this.btnPos.new.left + hDiff;\r\n\r\n if (tPos.includes(\"top\")) {\r\n vPos = this.btnPos.new.top - tooltipRect.height - 8;\r\n }\r\n if (tPos.includes(\"bottom\")) {\r\n vPos = this.btnPos.new.bottom + 8;\r\n }\r\n if (tPos.includes(\"left\")) {\r\n hPos = this.btnPos.new.left - tooltipRect.width - 8;\r\n }\r\n if (tPos.includes(\"right\")) {\r\n hPos = this.btnPos.new.right + 8;\r\n }\r\n\r\n // after all positioning has been calculated, if tooltip is off-screen or closer than 24px it is readjusted\r\n // this only occurs when the tooltip is overflowing to the left and is positioned top or bottom\r\n // (button placed too far left, or screen size under 268px)\r\n hPos = Math.max(hPos, 24);\r\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", vPos + \"px\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", hPos + \"px\");\r\n // this.tooltipEl.style.top = vPos + \"px\";\r\n // this.tooltipEl.style.left = hPos + \"px\";\r\n // this.tooltipEl.style.top = (vPos / 16).toString() + \"rem\";\r\n // this.tooltipEl.style.left = (hPos / 16).toString() + \"rem\";\r\n\r\n this.btnPos.old = this.btnPos.new;\r\n }\r\n }\r\n\r\n hideTooltip() {\r\n if (this.hasTooltip) {\r\n this.tooltipEl.style.transitionDelay = \"0s\";\r\n this.tooltipEl.style.opacity = \"0\";\r\n this.tooltipVisible = false;\r\n }\r\n }\r\n\r\n showTooltipForKeyboardUsers() {\r\n if (this.isTabbing) {\r\n this.showTooltip();\r\n }\r\n }\r\n\r\n getAriaLabel() {\r\n if (this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\") {\r\n return this.labelForIdenticalButtons || this.tooltip;\r\n }\r\n\r\n if (this.labelForIdenticalButtons) {\r\n return this.labelForIdenticalButtons;\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class={this.isDisabled ? \"button-disabled\" : \"\"}>\r\n <button\r\n id={this.id}\r\n class={`${this.buttonClasses}`}\r\n disabled={this.isDisabled}\r\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\r\n aria-label={this.getAriaLabel()}\r\n aria-hasPopup={this.ariaPopup ? \"menu\" : null}\r\n onMouseEnter={() => this.showTooltip()}\r\n onMouseLeave={() => this.hideTooltip()}\r\n onFocus={() => this.showTooltipForKeyboardUsers()}\r\n onBlur={() => this.hideTooltip()}\r\n onClick={() => this.hideTooltip()}\r\n >\r\n {this.icon && (\r\n <span class=\"mdi\" style={this.iconStyles}>\r\n {String.fromCodePoint(parseInt(`0x${this.icon}`))}\r\n </span>\r\n )}\r\n <span class=\"button-text\">\r\n <slot />\r\n </span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"version":3}
|
|
1
|
+
{"file":"wm-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,86lBAA86lB;;MCSr7lB,MAAM;;;IAgCT,WAAM,GAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACnC,OAAE,GAAGA,oBAAU,EAAE,CAAC;IAClB,cAAS,GAAY,KAAK,CAAC;oBA5BU,KAAK;sBAKa,IAAI;uBACH,IAAI;;;;;;;2BAYxB,cAAc;6BACpB,KAAK;oBACf,IAAI;;0BAEU,KAAK;qBAEjB,KAAK;;EAvBnC,IAAI,UAAU;;IAEZ,OAAOC,gBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAC9B;EAGD,IAA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;KACtD;IAED,IAAI,IAAI,CAAC,wBAAwB,EAAE;MACjC,OAAO,IAAI,CAAC,wBAAwB,CAAC;KACtC;GACF;EAED,MAAM;IACJ,QACEC,QAACC,UAAI,IAAC,KAAK,EAAE,IAAI,CAAC,UAAU,GAAG,iBAAiB,GAAG,EAAE,IACnDD,oBACE,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,EAC9B,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,QAAQ,GAAG,EAAuB,CAAC,gBAC1C,IAAI,CAAC,YAAY,EAAE,mBAChB,IAAI,CAAC,SAAS,GAAG,MAAM,GAAG,IAAI,EAC7C,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,OAAO,EAAE,MAAM,IAAI,CAAC,2BAA2B,EAAE,EACjD,MAAM,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAChC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhC,IAAI,CAAC,IAAI,KACRA,kBAAM,KAAK,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IACrC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC5C,CACR,EACDA,kBAAM,KAAK,EAAC,aAAa,IACvBA,qBAAQ,CACH,CACA,CACJ,EACP;GACH;;;;;;;;;;;;;","names":["generateId","toBool","getIconCodeFromName","adjustTooltipPlacement","h","Host"],"sources":["./src/components/wm-button/wm-button.scss?tag=wm-button&encapsulation=shadow","./src/components/wm-button/wm-button.tsx"],"sourcesContent":[":host([disabled]),\n:host(.button-disabled) {\n pointer-events: none;\n}\n\n:host([disabled=\"false\"]) {\n // override disabled behavior from occuring when the string is \"false\", which would evaluate as truthy\n pointer-events: initial;\n}\n\n:host,\nwm-button {\n display: inline-block;\n width: fit-content;\n position: relative; // for tooltip\n @include box-shadow(none);\n\n .sr-only {\n @include srOnly;\n }\n\n @extend %wm-button;\n}\n","import { h, Component, Prop, Element, Listen, Watch, Host, State } from \"@stencil/core\";\nimport { getIconCodeFromName, TooltipPlacement, validButtonTypes } from \"../../global/interfaces\";\nimport { generateId, adjustTooltipPlacement, toBool } from \"../../global/functions\";\n\n@Component({\n tag: \"wm-button\",\n styleUrl: \"wm-button.scss\",\n shadow: { delegatesFocus: true },\n})\nexport class Button {\n @Element() el!: HTMLWmButtonElement;\n private buttonEl!: HTMLButtonElement;\n\n // icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute\n // and the component throws errors when they are required (when buttonType is icononly or navigational)\n @Prop({ reflect: true }) disabled: boolean = false;\n get isDisabled(): boolean {\n // string \"false\" needs to be treated as bool False because react wrappers convert bool to string.\n return toBool(this.disabled);\n }\n @Prop({ mutable: true }) buttonType: validButtonTypes | null = null;\n @Prop({ mutable: true }) buttonStyle: validButtonTypes | null = null; // DEPRECATED in favor of button-type\n get tempButtonType(): validButtonTypes {\n // uses of this getter should be replaced with this.buttonType when buttonStyle is fully phased out\n // don't forget to reset this.buttonType's default value to secondary\n return this.buttonType || this.buttonStyle || \"secondary\";\n }\n @Prop({ reflect: true, mutable: true }) icon?: string;\n @Prop() iconSize?: string;\n @Prop() iconRotate?: number;\n @Prop() iconFlip?: \"horizontal\" | \"vertical\";\n @Prop({ reflect: true, mutable: true }) tooltip?: string;\n @Prop() labelForIdenticalButtons?: string;\n @Prop() tooltipPosition: TooltipPlacement = \"bottom-right\";\n @Prop() permanentlyDelete?: boolean = false;\n @Prop() textWrap: boolean = true;\n @Prop() customBackground?: string;\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\n\n @State() isTabbing: boolean = false;\n\n private btnPos: any = { old: {}, new: {} }; // for tooltip position. old and new are DOMRect\n private id = generateId();\n private ariaPopup: boolean = false;\n\n get isTruncated(): boolean {\n return (\n !!this.buttonEl && this.tempButtonType === \"textonly\" && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth\n );\n }\n\n get hasTooltip(): boolean {\n // tooltip is only rendered for icononly and navigational types, or if the button text is truncated\n return this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\" || this.isTruncated;\n }\n\n get tooltipEl(): HTMLElement {\n return document.getElementById(\"wm-tooltip\")!;\n }\n\n get buttonClasses() {\n let classes = \"wm-button\";\n classes += this.permanentlyDelete ? \" -permanentlydelete\" : \"\";\n classes += this.tempButtonType ? \" -\" + this.tempButtonType : \" -secondary\";\n classes += this.textWrap ? \"\" : \" nowrap\";\n classes += this.isTabbing ? \" user-is-tabbing\" : \"\";\n classes += this.isTruncated ? \" -truncated\" : \"\";\n classes += this.customBackground === \"dark\" ? \" dark\" : \"\";\n return classes;\n }\n\n get iconStyles() {\n let transformStyle = \"\";\n transformStyle += this.iconRotate ? `rotate(${this.iconRotate}deg)` : \"\";\n transformStyle += this.iconFlip === \"horizontal\" ? `scaleX(-1)` : \"\";\n transformStyle += this.iconFlip === \"vertical\" ? `scaleY(-1)` : \"\";\n\n return {\n ...(this.iconSize && { fontSize: this.iconSize }),\n ...((this.iconRotate || this.iconFlip) && { transform: transformStyle }),\n };\n }\n\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\n toggleTabbingOn() {\n this.isTabbing = true;\n }\n\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\n toggleTabbingOff() {\n this.isTabbing = false;\n }\n\n // we need to listen for scroll events during the capture phase because they do not bubble up\n // there can be layouts where the main content has 100vh and overflows\n // in these cases window will register no scroll events unless we catch on they way down\n @Listen(\"scroll\", { target: \"window\", capture: true })\n handleScroll() {\n if (this.tooltipVisible) {\n this.hideTooltip();\n }\n }\n\n @Watch(\"buttonType\")\n validateType(newValue: string) {\n const valid = [\n \"primary\",\n \"secondary\",\n \"textonly\",\n \"icononly\",\n \"navigational\",\n \"selector\",\n \"selector-primary\",\n \"pairpositive\",\n \"pairnegative\",\n ].includes(newValue);\n\n if (!valid) {\n this.buttonType = \"secondary\";\n }\n\n this.validateIcon();\n }\n\n // remove entire watcher after buttonStyle has been fully removed\n @Watch(\"buttonStyle\")\n validateDeprecatedType(newValue: string) {\n const valid = [\"primary\", \"secondary\", \"textonly\", \"icononly\", \"navigational\", \"selector\"].includes(newValue);\n\n if (!valid) {\n this.buttonStyle = \"secondary\";\n }\n\n this.validateIcon();\n }\n\n @Watch(\"icon\")\n updateIcon() {\n this.icon = getIconCodeFromName(this.icon!);\n }\n\n validateIcon() {\n switch (this.tempButtonType) {\n case \"icononly\":\n case \"navigational\":\n // if the style is icononly or navigational...\n // - an icon must be provided\n if (!this.icon) {\n console.error(\n \"wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.\"\n );\n }\n // - if no tooltip text was passed and we couldn't generate one, throw an error\n if (!this.tooltip) {\n console.error(\n \"wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.\"\n );\n }\n break;\n case \"pairpositive\":\n this.icon = \"f12c\";\n break;\n case \"pairnegative\":\n this.icon = \"f739\";\n break;\n }\n }\n\n @Listen(\"keydown\")\n handleKeydown(ev: KeyboardEvent) {\n switch (ev.key) {\n case \"Enter\":\n ev.preventDefault();\n if (!this.isDisabled) {\n this.el.click();\n }\n break;\n }\n }\n\n componentWillLoad() {\n if (this.buttonStyle) {\n console.warn(\"wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.\");\n }\n\n this.validateType(this.tempButtonType);\n\n if (this.icon) {\n this.icon = this.icon = getIconCodeFromName(this.icon);\n }\n }\n\n componentDidLoad() {\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\n this.toggleTabbingOn();\n }\n\n this.ariaPopup = !!this.el.getAttribute(\"aria-haspopup\");\n\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\n }\n\n showTooltip() {\n if (this.hasTooltip) {\n // set tooltip text\n let tooltipText = \"\";\n if (this.isTruncated && this.el.textContent) {\n // when truncated, tooltip text is the button's content\n tooltipText = this.el.textContent;\n } else if (this.tooltip) {\n // otherwise it is the tooltip property if present\n tooltipText = this.tooltip;\n }\n this.tooltipEl.textContent = tooltipText;\n\n // tooltip only has a maxWidth if it contains whitespace and can break\n const hasNoWhitespace = tooltipText.match(/^[^\\s]+$/);\n if (hasNoWhitespace) {\n this.tooltipEl.classList.add(\"single-word\");\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\n } else {\n this.tooltipEl.classList.remove(\"single-word\");\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\n }\n\n // adjust placement in case there is no space to place the tooltip where specified via prop\n // calculation outside of the function to keep it pure\n const adjustedTooltipPlacement = adjustTooltipPlacement(this.tooltipPosition, this.buttonEl, this.tooltipEl);\n\n this.btnPos.old = {};\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\n this.tooltipEl.style.transitionDelay = \"500ms\";\n this.tooltipEl.style.opacity = \"1\";\n // This slight delay fixes an issue for keyboard users:\n // if they tab to a button out of screen bounds, the page scrolls\n // and hideTooltip() would be triggered before the tooltip would show\n setTimeout(() => {\n this.tooltipVisible = true;\n this.positionTooltip(adjustedTooltipPlacement, tooltipRect);\n }, 50);\n }\n }\n\n positionTooltip(tPos: string, tooltipRect: DOMRect) {\n if (this.tooltipVisible) {\n window.requestAnimationFrame(() => this.positionTooltip(tPos, tooltipRect));\n }\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\n if (this.btnPos.new.top != this.btnPos.old.top || this.btnPos.new.left != this.btnPos.old.left) {\n // this is to figure out how to offset, given the size of the button and of the tooltip\n // to get the center positions, calculate the difference between the button width and the tooltip width\n const vDiff = (this.btnPos.new.height - tooltipRect.height) / 2;\n const hDiff = (this.btnPos.new.width - tooltipRect.width) / 2;\n // the naming convention defaults to center in the absence of a value\n // Values \"top\" and \"bottom\" imply horizontal centering; Values \"right\" and \"left\" imply vertical centering\n // therefore we first set to center first, then adjust accordingly\n let vPos = this.btnPos.new.top + vDiff;\n let hPos = this.btnPos.new.left + hDiff;\n\n if (tPos.includes(\"top\")) {\n vPos = this.btnPos.new.top - tooltipRect.height - 8;\n }\n if (tPos.includes(\"bottom\")) {\n vPos = this.btnPos.new.bottom + 8;\n }\n if (tPos.includes(\"left\")) {\n hPos = this.btnPos.new.left - tooltipRect.width - 8;\n }\n if (tPos.includes(\"right\")) {\n hPos = this.btnPos.new.right + 8;\n }\n\n // after all positioning has been calculated, if tooltip is off-screen or closer than 24px it is readjusted\n // this only occurs when the tooltip is overflowing to the left and is positioned top or bottom\n // (button placed too far left, or screen size under 268px)\n hPos = Math.max(hPos, 24);\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", vPos + \"px\");\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", hPos + \"px\");\n // this.tooltipEl.style.top = vPos + \"px\";\n // this.tooltipEl.style.left = hPos + \"px\";\n // this.tooltipEl.style.top = (vPos / 16).toString() + \"rem\";\n // this.tooltipEl.style.left = (hPos / 16).toString() + \"rem\";\n\n this.btnPos.old = this.btnPos.new;\n }\n }\n\n hideTooltip() {\n if (this.hasTooltip) {\n this.tooltipEl.style.transitionDelay = \"0s\";\n this.tooltipEl.style.opacity = \"0\";\n this.tooltipVisible = false;\n }\n }\n\n showTooltipForKeyboardUsers() {\n if (this.isTabbing) {\n this.showTooltip();\n }\n }\n\n getAriaLabel() {\n if (this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\") {\n return this.labelForIdenticalButtons || this.tooltip;\n }\n\n if (this.labelForIdenticalButtons) {\n return this.labelForIdenticalButtons;\n }\n }\n\n render() {\n return (\n <Host class={this.isDisabled ? \"button-disabled\" : \"\"}>\n <button\n id={this.id}\n class={`${this.buttonClasses}`}\n disabled={this.isDisabled}\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\n aria-label={this.getAriaLabel()}\n aria-hasPopup={this.ariaPopup ? \"menu\" : null}\n onMouseEnter={() => this.showTooltip()}\n onMouseLeave={() => this.hideTooltip()}\n onFocus={() => this.showTooltipForKeyboardUsers()}\n onBlur={() => this.hideTooltip()}\n onClick={() => this.hideTooltip()}\n >\n {this.icon && (\n <span class=\"mdi\" style={this.iconStyles}>\n {String.fromCodePoint(parseInt(`0x${this.icon}`))}\n </span>\n )}\n <span class=\"button-text\">\n <slot />\n </span>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,24 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1f84c034.js');
|
|
6
6
|
|
|
7
|
-
const ChartSlice = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
index.registerInstance(this, hostRef);
|
|
10
|
-
this.wmChartSliceUpdated = index.createEvent(this, "wmChartSliceUpdated", 7);
|
|
11
|
-
this.legend = undefined;
|
|
12
|
-
this.amount = undefined;
|
|
13
|
-
this.popoverTitle = undefined;
|
|
14
|
-
this.popoverText = undefined;
|
|
15
|
-
this.popoverButtonText = undefined;
|
|
16
|
-
}
|
|
17
|
-
componentDidLoad() {
|
|
18
|
-
if (parseInt(this.amount) > 0 && !this.legend) {
|
|
19
|
-
throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
componentDidUpdate() {
|
|
23
|
-
this.wmChartSliceUpdated.emit();
|
|
24
|
-
}
|
|
7
|
+
const ChartSlice = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.wmChartSliceUpdated = index.createEvent(this, "wmChartSliceUpdated", 7);
|
|
11
|
+
this.legend = undefined;
|
|
12
|
+
this.amount = undefined;
|
|
13
|
+
this.popoverTitle = undefined;
|
|
14
|
+
this.popoverText = undefined;
|
|
15
|
+
this.popoverButtonText = undefined;
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
if (parseInt(this.amount) > 0 && !this.legend) {
|
|
19
|
+
throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
componentDidUpdate() {
|
|
23
|
+
this.wmChartSliceUpdated.emit();
|
|
24
|
+
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
exports.wm_chart_slice = ChartSlice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"wm-chart-slice.entry.cjs.js","mappings":";;;;;;MAKa,UAAU;;;;;;;;;;EASrB,gBAAgB;IACd,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MAC9C,MAAM,IAAI,KAAK,CACb,oMAAoM,CACrM,CAAC;KACH;GACF;EAED,kBAAkB;IAChB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;GACjC;;;;;","names":[],"sources":["./src/components/charts/wm-chart/wm-chart-slice.tsx"],"sourcesContent":["import { Component, Prop, Event, EventEmitter } from \"@stencil/core\";\
|
|
1
|
+
{"file":"wm-chart-slice.entry.cjs.js","mappings":";;;;;;MAKa,UAAU;;;;;;;;;;EASrB,gBAAgB;IACd,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MAC9C,MAAM,IAAI,KAAK,CACb,oMAAoM,CACrM,CAAC;KACH;GACF;EAED,kBAAkB;IAChB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;GACjC;;;;;","names":[],"sources":["./src/components/charts/wm-chart/wm-chart-slice.tsx"],"sourcesContent":["import { Component, Prop, Event, EventEmitter } from \"@stencil/core\";\n\n@Component({\n tag: \"wm-chart-slice\",\n})\nexport class ChartSlice {\n @Prop() legend?: string;\n @Prop() amount?: string;\n @Prop() popoverTitle?: string;\n @Prop() popoverText?: string;\n @Prop() popoverButtonText?: string;\n\n @Event() wmChartSliceUpdated!: EventEmitter<void>;\n\n componentDidLoad() {\n if (parseInt(this.amount!) > 0 && !this.legend) {\n throw new Error(\n \"wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart\"\n );\n }\n }\n\n componentDidUpdate() {\n this.wmChartSliceUpdated.emit();\n }\n}\n"],"version":3}
|
|
@@ -3,188 +3,188 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1f84c034.js');
|
|
6
|
-
const functions = require('./functions-
|
|
7
|
-
const chartFunctions = require('./chartFunctions-
|
|
6
|
+
const functions = require('./functions-d2d99997.js');
|
|
7
|
+
const chartFunctions = require('./chartFunctions-2f04ab6a.js');
|
|
8
8
|
|
|
9
9
|
const wmChartCss = ":host,wm-chart{display:block}:host .component-wrapper,wm-chart .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper .label,wm-chart .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-chart .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .label.custom-width,wm-chart .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-chart .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-chart .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-chart .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper,wm-chart .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type),wm-chart .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden,wm-chart .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper path:active,wm-chart .component-wrapper path:active,:host .component-wrapper path:hover,wm-chart .component-wrapper path:hover,:host .component-wrapper path:focus,wm-chart .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,wm-chart .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,wm-chart .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus,wm-chart .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-chart .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-chart .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-chart .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-chart .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner,wm-chart .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-chart .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-chart .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-chart .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-chart .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2plus label,wm-chart .component-wrapper.doughnut2plus label,:host .component-wrapper.doughnut2plus .label-text,wm-chart .component-wrapper.doughnut2plus .label-text,:host .component-wrapper.doughnut3 label,wm-chart .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-chart .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-chart .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-chart .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-chart .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-chart .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-chart .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,wm-chart .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-chart .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-chart .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-chart .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-chart .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-chart .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-chart .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-chart .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-chart .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-chart .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-chart .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-chart .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-chart .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-chart .component-wrapper.bar2,:host .component-wrapper.bar3,wm-chart .component-wrapper.bar3,:host .component-wrapper.bar4,wm-chart .component-wrapper.bar4,:host .component-wrapper.bar5,wm-chart .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-chart .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-chart .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-chart .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning,wm-chart .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,wm-chart .component-wrapper.bar6,:host .component-wrapper.bar7,wm-chart .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,wm-chart .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper,wm-chart .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,wm-chart .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart,wm-chart .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,wm-chart .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines,wm-chart .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, #8f8f8f 1px, transparent 1px);background-position:-1px;border-left:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,wm-chart .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows,wm-chart .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,wm-chart .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label,wm-chart .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,wm-chart .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden,wm-chart .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,wm-chart .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar,wm-chart .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,wm-chart .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value,wm-chart .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,wm-chart .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis,wm-chart .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,wm-chart .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick,wm-chart .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,wm-chart .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span,wm-chart .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,wm-chart .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero,wm-chart .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,wm-chart .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,wm-chart .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,wm-chart .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,wm-chart .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,wm-chart .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus,wm-chart .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,wm-chart .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,wm-chart .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,wm-chart .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,wm-chart .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,wm-chart .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar,wm-chart .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.left-label,wm-chart .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-chart .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning,wm-chart .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions,wm-chart #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper,wm-chart .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-chart .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar1,wm-chart .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6,wm-chart .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top,wm-chart .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-chart .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-chart .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-chart .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-chart .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-chart .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .legend.bar3,wm-chart .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";
|
|
10
10
|
|
|
11
|
-
const Chart = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.uid = functions.generateId();
|
|
15
|
-
this.slicesDetails = [];
|
|
16
|
-
this.handleStackedBarResize = functions.debounce(async () => {
|
|
17
|
-
let hasHiddenBarValue = false;
|
|
18
|
-
// if any value text overlaps with another, hide it and display warning
|
|
19
|
-
const valueEls = this.el.shadowRoot.querySelectorAll(".value");
|
|
20
|
-
if (valueEls.length) {
|
|
21
|
-
let lastVisibleRightEdge = valueEls.length ? valueEls[0].getBoundingClientRect().right : 0;
|
|
22
|
-
let margin = 4;
|
|
23
|
-
valueEls.forEach((valueEl, idx) => {
|
|
24
|
-
// checks are to the left of each valueEl, so skip the first one
|
|
25
|
-
if (idx > 0) {
|
|
26
|
-
const bounds = valueEl.getBoundingClientRect();
|
|
27
|
-
if (bounds.left - margin < lastVisibleRightEdge) {
|
|
28
|
-
// left edge of current value is overlapping right edge of last visible value
|
|
29
|
-
valueEl.classList.add("hidden");
|
|
30
|
-
hasHiddenBarValue = true;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
valueEl.classList.remove("hidden");
|
|
34
|
-
lastVisibleRightEdge = bounds.right;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
this.hasHiddenBarValue = hasHiddenBarValue;
|
|
40
|
-
}, 100);
|
|
41
|
-
this.debouncedUpdate = functions.debounce(async () => {
|
|
42
|
-
index.forceUpdate(this.el);
|
|
43
|
-
}, 10);
|
|
44
|
-
this.debouncedSliceUpdate = functions.debounce(async () => {
|
|
45
|
-
await chartFunctions.getDetails.call(this, this.currentChartType);
|
|
46
|
-
index.forceUpdate(this.el);
|
|
47
|
-
}, 100);
|
|
48
|
-
this.chartType = "doughnut1";
|
|
49
|
-
this.label = undefined;
|
|
50
|
-
this.labelWidth = "150px";
|
|
51
|
-
this.subinfo = undefined;
|
|
52
|
-
this.completionMessage = undefined;
|
|
53
|
-
this.valueFormat = undefined;
|
|
54
|
-
this.showValues = undefined;
|
|
55
|
-
this.showGrid = true;
|
|
56
|
-
this.showLegend = true;
|
|
57
|
-
this.showBarLegend = false;
|
|
58
|
-
this.notStartedColor = false;
|
|
59
|
-
this.labelPosition = "top";
|
|
60
|
-
this.isTabbing = false;
|
|
61
|
-
this.userIsNavigating = false;
|
|
62
|
-
this.hasHiddenBarValue = false;
|
|
63
|
-
}
|
|
64
|
-
get tempValueFormat() {
|
|
65
|
-
// use of this getter should be replaced with dateFormat when showValues is fully phased out
|
|
66
|
-
return this.valueFormat || this.showValues || "none";
|
|
67
|
-
}
|
|
68
|
-
get hybridType() {
|
|
69
|
-
return window.innerWidth > 1340 ? "doughnut0" : "bar1";
|
|
70
|
-
}
|
|
71
|
-
get popoverEl() {
|
|
72
|
-
return this.el.shadowRoot.querySelector("priv-chart-popover");
|
|
73
|
-
}
|
|
74
|
-
get sliceEls() {
|
|
75
|
-
return Array.from(this.el.shadowRoot.querySelectorAll(".segment"));
|
|
76
|
-
}
|
|
77
|
-
get currentChartType() {
|
|
78
|
-
let current = this.chartType;
|
|
79
|
-
if (this.chartType === "hybrid") {
|
|
80
|
-
current = this.hybridType;
|
|
81
|
-
}
|
|
82
|
-
else if (this.chartType === "doughnut2" && this.el.children.length > 3) {
|
|
83
|
-
// render an internal type (that includes an additional color) if doughnut2 has more than 3 slices
|
|
84
|
-
current = "doughnut2plus";
|
|
85
|
-
}
|
|
86
|
-
return current;
|
|
87
|
-
}
|
|
88
|
-
get chartDetails() {
|
|
89
|
-
return chartFunctions.allChartsDetails[this.currentChartType];
|
|
90
|
-
}
|
|
91
|
-
get ariaLabelText() {
|
|
92
|
-
let text = `${this.label}`;
|
|
93
|
-
if (this.subinfo) {
|
|
94
|
-
text += ` ${this.subinfo}`;
|
|
95
|
-
}
|
|
96
|
-
return text;
|
|
97
|
-
}
|
|
98
|
-
get isDoughnut() {
|
|
99
|
-
return this.chartDetails.category === "doughnut";
|
|
100
|
-
}
|
|
101
|
-
get isStackedBar() {
|
|
102
|
-
return this.chartDetails.category === "stackedBar";
|
|
103
|
-
}
|
|
104
|
-
get isSimpleBar() {
|
|
105
|
-
return this.chartDetails.category === "simpleBar";
|
|
106
|
-
}
|
|
107
|
-
get isBar() {
|
|
108
|
-
return this.isStackedBar || this.isSimpleBar;
|
|
109
|
-
}
|
|
110
|
-
get chartRoleDescription() {
|
|
111
|
-
return functions.intl.formatMessage({
|
|
112
|
-
id: "chart.roleDescription",
|
|
113
|
-
defaultMessage: "Interactive chart",
|
|
114
|
-
description: "For screen readers only, a description clarifying the role of the chart widget",
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
toggleTabbingOn() {
|
|
118
|
-
this.isTabbing = true;
|
|
119
|
-
}
|
|
120
|
-
toggleTabbingOff() {
|
|
121
|
-
this.isTabbing = false;
|
|
122
|
-
}
|
|
123
|
-
handleKeydown(ev) {
|
|
124
|
-
chartFunctions.handleChartKeydown.call(this, ev);
|
|
125
|
-
}
|
|
126
|
-
/* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */
|
|
127
|
-
async componentWillLoad() {
|
|
128
|
-
if (!this.label) {
|
|
129
|
-
throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");
|
|
130
|
-
}
|
|
131
|
-
if (this.showValues) {
|
|
132
|
-
console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.");
|
|
133
|
-
}
|
|
134
|
-
await chartFunctions.getDetails.call(this, this.currentChartType);
|
|
135
|
-
// rerender on resize
|
|
136
|
-
// unnecessary for doughnuts (except hybrid) as layout doesn't change
|
|
137
|
-
if (this.chartType === "hybrid" || !this.isDoughnut) {
|
|
138
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
139
|
-
this.isStackedBar ? this.handleStackedBarResize() : this.debouncedUpdate();
|
|
140
|
-
});
|
|
141
|
-
resizeObserver.observe(this.el);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
handleSliceUpdate() {
|
|
145
|
-
this.debouncedSliceUpdate();
|
|
146
|
-
}
|
|
147
|
-
/* RENDERING */
|
|
148
|
-
renderBarText(s, idx) {
|
|
149
|
-
let val;
|
|
150
|
-
if (this.tempValueFormat === "percentage") {
|
|
151
|
-
// if segment has an amount, but "0" percentage (it's below 0.5% and rounded down), still display it as <1%
|
|
152
|
-
val = s.perc === 0 && s.amount > 0 ? "<1%" : `${s.perc}%`;
|
|
153
|
-
}
|
|
154
|
-
else if (this.tempValueFormat === "amount") {
|
|
155
|
-
val = s.amount;
|
|
156
|
-
}
|
|
157
|
-
// even though we do not display the value text if it has an amount of 0, we still want to render the value-wrapper
|
|
158
|
-
// in order to not disturb the positioning of the other value texts in the entire row
|
|
159
|
-
return (index.h("div", { class: "value-wrapper", style: {
|
|
160
|
-
width: `calc(${chartFunctions.amountToPercent(s.amount, this.total, false)}%
|
|
161
|
-
${idx !== this.slicesDetails.length - 1 ? " - 2px" : ""}`,
|
|
162
|
-
} }, index.h("span", { class: "value" }, s.amount > 0 && val)));
|
|
163
|
-
}
|
|
164
|
-
drawAxis() {
|
|
165
|
-
if (this.currentChartType === "bar3") {
|
|
166
|
-
return (index.h("svg", { class: "axis" }, index.h("line", { x1: "0", x2: "100%", y1: "0", y2: "0" }), index.h("line", { x1: "0", x2: "0", y1: "0", y2: "-85px" }), index.h("line", { class: "tick", x1: "0.5", x2: "0.5", y1: "0", y2: "6" }), index.h("text", { x: "0.5", y: "-6" }, "0%"), index.h("line", { class: "tick", x1: "100%", x2: "100%", y1: "0", y2: "6" }), index.h("text", { x: "100%", y: "-6" }, "100%")));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
renderChart() {
|
|
170
|
-
if (this.total > 0) {
|
|
171
|
-
if (this.isStackedBar) {
|
|
172
|
-
return chartFunctions.renderStackedBar.call(this, this.currentChartType);
|
|
173
|
-
}
|
|
174
|
-
else if (this.isSimpleBar) {
|
|
175
|
-
return chartFunctions.renderSimpleBar.call(this, this.currentChartType);
|
|
176
|
-
}
|
|
177
|
-
else if (this.isDoughnut) {
|
|
178
|
-
return chartFunctions.renderDoughnut.call(this, this.currentChartType);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
render() {
|
|
183
|
-
return (index.h(index.Host, { onBlur: () => chartFunctions.exitChart.call(this) }, index.h("div", { ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.currentChartType} ${this.isTabbing && !this.userIsNavigating ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.currentChartType === "bar4" ? "left-label" : ""}`, role: "application", "aria-label": this.ariaLabelText, tabindex: 0, "aria-roledescription": this.chartRoleDescription, "aria-describedby": "chart-instructions" }, index.h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `graphic-${this.uid}` }, index.h("span", { class: "label-text" }, this.label), this.subinfo ? index.h("span", { class: "subinfo" }, this.subinfo) : ""), this.isBar && chartFunctions.renderLegend.call(this, this.currentChartType), this.renderChart(), this.isDoughnut && chartFunctions.renderLegend.call(this, this.currentChartType), index.h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "" }), this.currentChartType === "doughnut0" ? chartFunctions.renderCompletionMessage.call(this) : "", this.hasHiddenBarValue && chartFunctions.renderHiddenValuesMessage()), chartFunctions.renderInstructionsText()));
|
|
184
|
-
}
|
|
185
|
-
static get delegatesFocus() { return true; }
|
|
186
|
-
get el() { return index.getElement(this); }
|
|
187
|
-
};
|
|
11
|
+
const Chart = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.uid = functions.generateId();
|
|
15
|
+
this.slicesDetails = [];
|
|
16
|
+
this.handleStackedBarResize = functions.debounce(async () => {
|
|
17
|
+
let hasHiddenBarValue = false;
|
|
18
|
+
// if any value text overlaps with another, hide it and display warning
|
|
19
|
+
const valueEls = this.el.shadowRoot.querySelectorAll(".value");
|
|
20
|
+
if (valueEls.length) {
|
|
21
|
+
let lastVisibleRightEdge = valueEls.length ? valueEls[0].getBoundingClientRect().right : 0;
|
|
22
|
+
let margin = 4;
|
|
23
|
+
valueEls.forEach((valueEl, idx) => {
|
|
24
|
+
// checks are to the left of each valueEl, so skip the first one
|
|
25
|
+
if (idx > 0) {
|
|
26
|
+
const bounds = valueEl.getBoundingClientRect();
|
|
27
|
+
if (bounds.left - margin < lastVisibleRightEdge) {
|
|
28
|
+
// left edge of current value is overlapping right edge of last visible value
|
|
29
|
+
valueEl.classList.add("hidden");
|
|
30
|
+
hasHiddenBarValue = true;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
valueEl.classList.remove("hidden");
|
|
34
|
+
lastVisibleRightEdge = bounds.right;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
this.hasHiddenBarValue = hasHiddenBarValue;
|
|
40
|
+
}, 100);
|
|
41
|
+
this.debouncedUpdate = functions.debounce(async () => {
|
|
42
|
+
index.forceUpdate(this.el);
|
|
43
|
+
}, 10);
|
|
44
|
+
this.debouncedSliceUpdate = functions.debounce(async () => {
|
|
45
|
+
await chartFunctions.getDetails.call(this, this.currentChartType);
|
|
46
|
+
index.forceUpdate(this.el);
|
|
47
|
+
}, 100);
|
|
48
|
+
this.chartType = "doughnut1";
|
|
49
|
+
this.label = undefined;
|
|
50
|
+
this.labelWidth = "150px";
|
|
51
|
+
this.subinfo = undefined;
|
|
52
|
+
this.completionMessage = undefined;
|
|
53
|
+
this.valueFormat = undefined;
|
|
54
|
+
this.showValues = undefined;
|
|
55
|
+
this.showGrid = true;
|
|
56
|
+
this.showLegend = true;
|
|
57
|
+
this.showBarLegend = false;
|
|
58
|
+
this.notStartedColor = false;
|
|
59
|
+
this.labelPosition = "top";
|
|
60
|
+
this.isTabbing = false;
|
|
61
|
+
this.userIsNavigating = false;
|
|
62
|
+
this.hasHiddenBarValue = false;
|
|
63
|
+
}
|
|
64
|
+
get tempValueFormat() {
|
|
65
|
+
// use of this getter should be replaced with dateFormat when showValues is fully phased out
|
|
66
|
+
return this.valueFormat || this.showValues || "none";
|
|
67
|
+
}
|
|
68
|
+
get hybridType() {
|
|
69
|
+
return window.innerWidth > 1340 ? "doughnut0" : "bar1";
|
|
70
|
+
}
|
|
71
|
+
get popoverEl() {
|
|
72
|
+
return this.el.shadowRoot.querySelector("priv-chart-popover");
|
|
73
|
+
}
|
|
74
|
+
get sliceEls() {
|
|
75
|
+
return Array.from(this.el.shadowRoot.querySelectorAll(".segment"));
|
|
76
|
+
}
|
|
77
|
+
get currentChartType() {
|
|
78
|
+
let current = this.chartType;
|
|
79
|
+
if (this.chartType === "hybrid") {
|
|
80
|
+
current = this.hybridType;
|
|
81
|
+
}
|
|
82
|
+
else if (this.chartType === "doughnut2" && this.el.children.length > 3) {
|
|
83
|
+
// render an internal type (that includes an additional color) if doughnut2 has more than 3 slices
|
|
84
|
+
current = "doughnut2plus";
|
|
85
|
+
}
|
|
86
|
+
return current;
|
|
87
|
+
}
|
|
88
|
+
get chartDetails() {
|
|
89
|
+
return chartFunctions.allChartsDetails[this.currentChartType];
|
|
90
|
+
}
|
|
91
|
+
get ariaLabelText() {
|
|
92
|
+
let text = `${this.label}`;
|
|
93
|
+
if (this.subinfo) {
|
|
94
|
+
text += ` ${this.subinfo}`;
|
|
95
|
+
}
|
|
96
|
+
return text;
|
|
97
|
+
}
|
|
98
|
+
get isDoughnut() {
|
|
99
|
+
return this.chartDetails.category === "doughnut";
|
|
100
|
+
}
|
|
101
|
+
get isStackedBar() {
|
|
102
|
+
return this.chartDetails.category === "stackedBar";
|
|
103
|
+
}
|
|
104
|
+
get isSimpleBar() {
|
|
105
|
+
return this.chartDetails.category === "simpleBar";
|
|
106
|
+
}
|
|
107
|
+
get isBar() {
|
|
108
|
+
return this.isStackedBar || this.isSimpleBar;
|
|
109
|
+
}
|
|
110
|
+
get chartRoleDescription() {
|
|
111
|
+
return functions.intl.formatMessage({
|
|
112
|
+
id: "chart.roleDescription",
|
|
113
|
+
defaultMessage: "Interactive chart",
|
|
114
|
+
description: "For screen readers only, a description clarifying the role of the chart widget",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
toggleTabbingOn() {
|
|
118
|
+
this.isTabbing = true;
|
|
119
|
+
}
|
|
120
|
+
toggleTabbingOff() {
|
|
121
|
+
this.isTabbing = false;
|
|
122
|
+
}
|
|
123
|
+
handleKeydown(ev) {
|
|
124
|
+
chartFunctions.handleChartKeydown.call(this, ev);
|
|
125
|
+
}
|
|
126
|
+
/* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */
|
|
127
|
+
async componentWillLoad() {
|
|
128
|
+
if (!this.label) {
|
|
129
|
+
throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");
|
|
130
|
+
}
|
|
131
|
+
if (this.showValues) {
|
|
132
|
+
console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.");
|
|
133
|
+
}
|
|
134
|
+
await chartFunctions.getDetails.call(this, this.currentChartType);
|
|
135
|
+
// rerender on resize
|
|
136
|
+
// unnecessary for doughnuts (except hybrid) as layout doesn't change
|
|
137
|
+
if (this.chartType === "hybrid" || !this.isDoughnut) {
|
|
138
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
139
|
+
this.isStackedBar ? this.handleStackedBarResize() : this.debouncedUpdate();
|
|
140
|
+
});
|
|
141
|
+
resizeObserver.observe(this.el);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
handleSliceUpdate() {
|
|
145
|
+
this.debouncedSliceUpdate();
|
|
146
|
+
}
|
|
147
|
+
/* RENDERING */
|
|
148
|
+
renderBarText(s, idx) {
|
|
149
|
+
let val;
|
|
150
|
+
if (this.tempValueFormat === "percentage") {
|
|
151
|
+
// if segment has an amount, but "0" percentage (it's below 0.5% and rounded down), still display it as <1%
|
|
152
|
+
val = s.perc === 0 && s.amount > 0 ? "<1%" : `${s.perc}%`;
|
|
153
|
+
}
|
|
154
|
+
else if (this.tempValueFormat === "amount") {
|
|
155
|
+
val = s.amount;
|
|
156
|
+
}
|
|
157
|
+
// even though we do not display the value text if it has an amount of 0, we still want to render the value-wrapper
|
|
158
|
+
// in order to not disturb the positioning of the other value texts in the entire row
|
|
159
|
+
return (index.h("div", { class: "value-wrapper", style: {
|
|
160
|
+
width: `calc(${chartFunctions.amountToPercent(s.amount, this.total, false)}%
|
|
161
|
+
${idx !== this.slicesDetails.length - 1 ? " - 2px" : ""}`,
|
|
162
|
+
} }, index.h("span", { class: "value" }, s.amount > 0 && val)));
|
|
163
|
+
}
|
|
164
|
+
drawAxis() {
|
|
165
|
+
if (this.currentChartType === "bar3") {
|
|
166
|
+
return (index.h("svg", { class: "axis" }, index.h("line", { x1: "0", x2: "100%", y1: "0", y2: "0" }), index.h("line", { x1: "0", x2: "0", y1: "0", y2: "-85px" }), index.h("line", { class: "tick", x1: "0.5", x2: "0.5", y1: "0", y2: "6" }), index.h("text", { x: "0.5", y: "-6" }, "0%"), index.h("line", { class: "tick", x1: "100%", x2: "100%", y1: "0", y2: "6" }), index.h("text", { x: "100%", y: "-6" }, "100%")));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
renderChart() {
|
|
170
|
+
if (this.total > 0) {
|
|
171
|
+
if (this.isStackedBar) {
|
|
172
|
+
return chartFunctions.renderStackedBar.call(this, this.currentChartType);
|
|
173
|
+
}
|
|
174
|
+
else if (this.isSimpleBar) {
|
|
175
|
+
return chartFunctions.renderSimpleBar.call(this, this.currentChartType);
|
|
176
|
+
}
|
|
177
|
+
else if (this.isDoughnut) {
|
|
178
|
+
return chartFunctions.renderDoughnut.call(this, this.currentChartType);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
render() {
|
|
183
|
+
return (index.h(index.Host, { onBlur: () => chartFunctions.exitChart.call(this) }, index.h("div", { ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.currentChartType} ${this.isTabbing && !this.userIsNavigating ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.currentChartType === "bar4" ? "left-label" : ""}`, role: "application", "aria-label": this.ariaLabelText, tabindex: 0, "aria-roledescription": this.chartRoleDescription, "aria-describedby": "chart-instructions" }, index.h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `graphic-${this.uid}` }, index.h("span", { class: "label-text" }, this.label), this.subinfo ? index.h("span", { class: "subinfo" }, this.subinfo) : ""), this.isBar && chartFunctions.renderLegend.call(this, this.currentChartType), this.renderChart(), this.isDoughnut && chartFunctions.renderLegend.call(this, this.currentChartType), index.h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "" }), this.currentChartType === "doughnut0" ? chartFunctions.renderCompletionMessage.call(this) : "", this.hasHiddenBarValue && chartFunctions.renderHiddenValuesMessage()), chartFunctions.renderInstructionsText()));
|
|
184
|
+
}
|
|
185
|
+
static get delegatesFocus() { return true; }
|
|
186
|
+
get el() { return index.getElement(this); }
|
|
187
|
+
};
|
|
188
188
|
Chart.style = wmChartCss;
|
|
189
189
|
|
|
190
190
|
exports.wm_chart = Chart;
|