@watermarkinsights/ripple 3.8.2 → 3.9.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/chartFunctions-a1dd1291.js +429 -0
- package/dist/cjs/{functions-b90816b8.js → functions-0750b767.js} +506 -532
- package/dist/cjs/{global-cf9485c4.js → global-0a6b313f.js} +60 -60
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{index-0e7e3668.js → index-98c6524c.js} +69 -96
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -79
- package/dist/cjs/priv-datepicker.cjs.entry.js +659 -659
- package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
- package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
- package/dist/cjs/ripple.cjs.js +4 -4
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
- package/dist/cjs/wm-button.cjs.entry.js +228 -228
- package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
- package/dist/cjs/wm-chart.cjs.entry.js +117 -473
- package/dist/cjs/wm-datepicker.cjs.entry.js +267 -267
- package/dist/cjs/wm-input.cjs.entry.js +136 -136
- package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
- package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
- package/dist/cjs/wm-modal.cjs.entry.js +164 -164
- package/dist/cjs/wm-navigation_3.cjs.entry.js +222 -222
- package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
- package/dist/cjs/wm-network-uploader.cjs.entry.js +422 -422
- package/dist/cjs/wm-option_2.cjs.entry.js +487 -487
- package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
- package/dist/cjs/wm-progress-indicator.cjs.entry.js +92 -0
- package/dist/cjs/wm-progress-monitor.cjs.entry.js +57 -0
- package/dist/cjs/wm-progress-slice.cjs.entry.js +17 -0
- package/dist/cjs/wm-search.cjs.entry.js +233 -233
- package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
- package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
- package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
- package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
- package/dist/cjs/wm-uploader.cjs.entry.js +348 -348
- package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.css +0 -0
- package/dist/collection/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.js +258 -232
- package/dist/collection/components/{wm-chart → charts/wm-chart}/wm-chart-slice.js +115 -115
- package/dist/collection/components/charts/wm-chart/wm-chart.css +460 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +460 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +53 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +95 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
- package/dist/collection/components/wm-button/wm-button.css +2 -1
- package/dist/collection/components/wm-button/wm-button.js +491 -491
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -3
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
- package/dist/collection/components/wm-input/wm-input.css +2 -1
- package/dist/collection/components/wm-input/wm-input.js +423 -423
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
- package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
- package/dist/collection/components/wm-modal/wm-modal.js +461 -461
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +2 -1
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
- package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.css +3 -2
- package/dist/collection/components/wm-option/wm-option.js +414 -414
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +480 -480
- package/dist/collection/components/wm-select/wm-select.css +3 -2
- package/dist/collection/components/wm-select/wm-select.js +718 -718
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -2
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -2
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -1
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +2 -1
- package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/chartFunctions.js +417 -0
- package/dist/collection/global/functions.js +468 -468
- package/dist/collection/global/global.js +67 -67
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +39 -39
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/chartFunctions-fc11df2b.js +420 -0
- package/dist/esm/{functions-8d09a511.js → functions-b478ef24.js} +506 -532
- package/dist/esm/{global-d1d68bab.js → global-b8be90a6.js} +60 -60
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{index-cd8f9ae2.js → index-d649a861.js} +69 -96
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- 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 +87 -79
- package/dist/esm/priv-datepicker.entry.js +659 -659
- package/dist/esm/priv-navigator-button.entry.js +19 -19
- package/dist/esm/priv-navigator-item.entry.js +24 -24
- package/dist/esm/ripple.js +4 -4
- package/dist/esm/wm-action-menu_2.entry.js +342 -342
- package/dist/esm/wm-button.entry.js +228 -228
- package/dist/esm/wm-chart-slice.entry.js +14 -14
- package/dist/esm/wm-chart.entry.js +117 -473
- package/dist/esm/wm-datepicker.entry.js +267 -267
- package/dist/esm/wm-input.entry.js +136 -136
- package/dist/esm/wm-modal-footer.entry.js +32 -32
- package/dist/esm/wm-modal-header.entry.js +35 -35
- package/dist/esm/wm-modal.entry.js +164 -164
- package/dist/esm/wm-navigation_3.entry.js +222 -222
- package/dist/esm/wm-navigator.entry.js +269 -269
- package/dist/esm/wm-network-uploader.entry.js +422 -422
- package/dist/esm/wm-option_2.entry.js +487 -487
- package/dist/esm/wm-pagination.entry.js +168 -168
- package/dist/esm/wm-progress-indicator.entry.js +88 -0
- package/dist/esm/wm-progress-monitor.entry.js +53 -0
- package/dist/esm/wm-progress-slice.entry.js +13 -0
- package/dist/esm/wm-search.entry.js +233 -233
- package/dist/esm/wm-snackbar.entry.js +172 -172
- package/dist/esm/wm-tab-item_3.entry.js +298 -298
- package/dist/esm/wm-tag-input.entry.js +581 -581
- package/dist/esm/wm-timepicker.entry.js +385 -385
- package/dist/esm/wm-toggletip.entry.js +126 -126
- package/dist/esm/wm-uploader.entry.js +348 -348
- package/dist/esm/wm-wrapper.entry.js +13 -13
- package/dist/esm-es5/chartFunctions-fc11df2b.js +1 -0
- package/dist/esm-es5/functions-b478ef24.js +15 -0
- package/dist/esm-es5/global-b8be90a6.js +1 -0
- package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
- package/dist/esm-es5/index-d649a861.js +1 -0
- package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator.entry.js +1 -0
- package/dist/esm-es5/wm-progress-monitor.entry.js +1 -0
- package/dist/esm-es5/wm-progress-slice.entry.js +1 -0
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/index.d.ts +1 -0
- package/dist/ripple/p-063bc67c.system.entry.js +1 -0
- package/dist/ripple/{p-504579c2.system.entry.js → p-099df7b7.system.entry.js} +1 -1
- package/dist/ripple/p-0b23a4fe.entry.js +1 -0
- package/dist/ripple/p-1b2c3251.system.entry.js +1 -0
- package/dist/ripple/{p-34e0410e.system.entry.js → p-1b7be30d.system.entry.js} +1 -1
- package/dist/ripple/p-1e2c46f1.entry.js +1 -0
- package/dist/ripple/p-1e7fc028.entry.js +1 -0
- package/dist/ripple/p-2296c2c3.entry.js +1 -0
- package/dist/ripple/p-24cd6213.system.entry.js +1 -0
- package/dist/ripple/p-2587031d.system.entry.js +1 -0
- package/dist/ripple/p-29d527c8.entry.js +1 -0
- package/dist/ripple/p-2b6246d9.entry.js +1 -0
- package/dist/ripple/{p-a5177480.system.entry.js → p-2b63995f.system.entry.js} +1 -1
- package/dist/ripple/p-2b9c54e7.system.entry.js +1 -0
- package/dist/ripple/p-2cc9e6cf.system.entry.js +1 -0
- package/dist/ripple/p-30db4ad7.entry.js +1 -0
- package/dist/ripple/{p-dc0e6d55.system.entry.js → p-30e1daf7.system.entry.js} +1 -1
- package/dist/ripple/p-3388ca40.entry.js +1 -0
- package/dist/ripple/p-34736928.entry.js +1 -0
- package/dist/ripple/p-366e00f9.js +1 -0
- package/dist/ripple/p-36be0612.js +1 -0
- package/dist/ripple/p-3b31eaec.system.js +1 -0
- package/dist/ripple/p-3eb3a1f8.entry.js +1 -0
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/p-492ad5d0.system.entry.js +1 -0
- package/dist/ripple/p-4f23cdc6.entry.js +1 -0
- package/dist/ripple/p-50be3b44.js +1 -0
- package/dist/ripple/p-5743d4bc.system.entry.js +1 -0
- package/dist/ripple/p-59963be9.system.entry.js +1 -0
- package/dist/ripple/p-5d6cc9da.system.js +1 -0
- package/dist/ripple/p-5e5f162c.system.entry.js +1 -0
- package/dist/ripple/{p-53caf7e4.system.entry.js → p-647edff3.system.entry.js} +1 -1
- package/dist/ripple/p-6c295beb.entry.js +1 -0
- package/dist/ripple/p-6c751341.entry.js +1 -0
- package/dist/ripple/p-6f9e8fbc.entry.js +1 -0
- package/dist/ripple/p-70ececb5.entry.js +1 -0
- package/dist/ripple/p-7674c9b0.system.entry.js +1 -0
- package/dist/ripple/p-76b96f77.entry.js +1 -0
- package/dist/ripple/p-7a2a0d2e.js +16 -0
- package/dist/ripple/p-7c2b1682.entry.js +1 -0
- package/dist/ripple/p-7f0c64ac.entry.js +1 -0
- package/dist/ripple/p-803f1f22.entry.js +1 -0
- package/dist/ripple/p-84fb34b5.entry.js +1 -0
- package/dist/ripple/p-8a583f84.entry.js +1 -0
- package/dist/ripple/p-8daa2613.system.entry.js +1 -0
- package/dist/ripple/p-935a266f.entry.js +1 -0
- package/dist/ripple/p-9d02957d.system.js +1 -0
- package/dist/ripple/p-a14ac623.entry.js +1 -0
- package/dist/ripple/{p-e758db14.system.entry.js → p-a1511315.system.entry.js} +1 -1
- package/dist/ripple/p-b325c35a.system.entry.js +1 -0
- package/dist/ripple/{p-9a9743f5.system.entry.js → p-bfc1ab2e.system.entry.js} +1 -1
- package/dist/ripple/p-bfe93d8d.system.entry.js +1 -0
- package/dist/ripple/p-c1c7b0b1.system.js +15 -0
- package/dist/ripple/p-c20a179f.system.entry.js +1 -0
- package/dist/ripple/p-c8bbf15e.entry.js +1 -0
- package/dist/ripple/{p-7913283e.system.entry.js → p-cb7d8ade.system.entry.js} +1 -1
- package/dist/ripple/p-cfb62ded.entry.js +1 -0
- package/dist/ripple/p-d12e0f49.system.js +1 -0
- package/dist/ripple/p-d648d193.entry.js +1 -0
- package/dist/ripple/p-d7ff84eb.entry.js +1 -0
- package/dist/ripple/{p-c19298a5.system.entry.js → p-ddf157c8.system.entry.js} +1 -1
- package/dist/ripple/p-e90f6915.system.js +1 -0
- package/dist/ripple/p-ea33bda7.system.entry.js +1 -0
- package/dist/ripple/p-f2566a42.system.entry.js +1 -0
- package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
- package/dist/ripple/p-f62fc5ea.system.entry.js +1 -0
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/{p-dcfe93ea.system.entry.js → p-fd9380f2.system.entry.js} +1 -1
- package/dist/ripple/p-fe0abd10.system.entry.js +1 -0
- package/dist/ripple/p-fe2a30d3.entry.js +1 -0
- package/dist/ripple/p-ffbc5db3.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/{wm-chart → charts}/priv-chart-popover/priv-chart-popover.d.ts +27 -23
- package/dist/types/components/{wm-chart → charts/wm-chart}/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -0
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -0
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
- package/dist/types/components/wm-button/wm-button.d.ts +43 -43
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
- 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 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +86 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/chartFunctions.d.ts +28 -0
- package/dist/types/global/functions.d.ts +42 -42
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +44 -34
- 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/dist/types/stencil-public-runtime.d.ts +4 -6
- package/package.json +47 -47
- package/dist/collection/components/wm-chart/wm-chart.css +0 -346
- package/dist/collection/components/wm-chart/wm-chart.js +0 -715
- package/dist/esm-es5/functions-8d09a511.js +0 -15
- package/dist/esm-es5/global-d1d68bab.js +0 -1
- package/dist/esm-es5/index-cd8f9ae2.js +0 -1
- package/dist/ripple/p-09508c2d.entry.js +0 -1
- package/dist/ripple/p-0a916c6e.entry.js +0 -1
- package/dist/ripple/p-11a9ce3f.system.js +0 -1
- package/dist/ripple/p-1ef19ec1.entry.js +0 -1
- package/dist/ripple/p-20856a2d.system.js +0 -1
- package/dist/ripple/p-244877c8.entry.js +0 -1
- package/dist/ripple/p-253a08fe.system.js +0 -15
- package/dist/ripple/p-268622b5.system.entry.js +0 -1
- package/dist/ripple/p-27f0d9be.entry.js +0 -1
- package/dist/ripple/p-29d3ca15.system.entry.js +0 -1
- package/dist/ripple/p-2a27dba5.entry.js +0 -1
- package/dist/ripple/p-2b209cf3.js +0 -1
- package/dist/ripple/p-313b6073.system.js +0 -1
- package/dist/ripple/p-38062c39.js +0 -1
- package/dist/ripple/p-39eea6bd.system.entry.js +0 -1
- package/dist/ripple/p-3b6b7618.entry.js +0 -1
- package/dist/ripple/p-3ba3afca.entry.js +0 -1
- package/dist/ripple/p-4de0799d.entry.js +0 -1
- package/dist/ripple/p-56963e2f.system.entry.js +0 -1
- package/dist/ripple/p-597985b9.entry.js +0 -1
- package/dist/ripple/p-5adc422a.entry.js +0 -1
- package/dist/ripple/p-5e0d47b9.system.entry.js +0 -1
- package/dist/ripple/p-67f74636.entry.js +0 -1
- package/dist/ripple/p-69735b23.system.entry.js +0 -1
- package/dist/ripple/p-6c65643e.system.entry.js +0 -1
- package/dist/ripple/p-7484c4e6.system.entry.js +0 -1
- package/dist/ripple/p-764fa608.entry.js +0 -1
- package/dist/ripple/p-81c023a7.entry.js +0 -1
- package/dist/ripple/p-8a0450fd.entry.js +0 -1
- package/dist/ripple/p-8e2cbae6.system.entry.js +0 -1
- package/dist/ripple/p-93b1c864.system.entry.js +0 -1
- package/dist/ripple/p-991abdb9.system.entry.js +0 -1
- package/dist/ripple/p-99d610f9.entry.js +0 -1
- package/dist/ripple/p-a8d66745.js +0 -16
- package/dist/ripple/p-b53962af.entry.js +0 -1
- package/dist/ripple/p-b53cecad.system.entry.js +0 -1
- package/dist/ripple/p-bdbc14ee.system.entry.js +0 -1
- package/dist/ripple/p-bf3c22d9.entry.js +0 -1
- package/dist/ripple/p-c58520e4.entry.js +0 -1
- package/dist/ripple/p-c7660ed9.entry.js +0 -1
- package/dist/ripple/p-c8040acd.system.entry.js +0 -1
- package/dist/ripple/p-c9284e6b.entry.js +0 -1
- package/dist/ripple/p-cd75be7a.entry.js +0 -1
- package/dist/ripple/p-cdd5ce00.entry.js +0 -1
- package/dist/ripple/p-d680d98f.entry.js +0 -1
- package/dist/ripple/p-e597d7bb.system.entry.js +0 -1
- package/dist/ripple/p-e6bcfdd5.entry.js +0 -1
- package/dist/ripple/p-e8761ba1.system.js +0 -1
- package/dist/ripple/p-ef344252.entry.js +0 -1
- package/dist/ripple/p-fc254870.system.entry.js +0 -1
- package/dist/types/components/wm-chart/wm-chart.d.ts +0 -82
|
@@ -1,715 +0,0 @@
|
|
|
1
|
-
import { Component, Element, h, Host, Prop, State, Listen } from "@stencil/core";
|
|
2
|
-
import { forceUpdate } from "@stencil/core";
|
|
3
|
-
import { debounce, generateId, checkForActiveElInShadow, getPosition, intl, findParentWithScrollbar, } from "../../global/functions";
|
|
4
|
-
export class Chart {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.chartType = "doughnut1";
|
|
7
|
-
this.showLegend = true;
|
|
8
|
-
this.notStartedColor = false;
|
|
9
|
-
// left labels are a temporary solution for the lack of a stacked bar chart and is undocumented
|
|
10
|
-
// it only works with bar4 and should be used without a legend
|
|
11
|
-
this.labelPosition = "top";
|
|
12
|
-
this.isTabbing = false;
|
|
13
|
-
this.uid = generateId();
|
|
14
|
-
this.slicesData = [];
|
|
15
|
-
this.colors = {
|
|
16
|
-
salmon: "#ff5f4e",
|
|
17
|
-
cyan: "#19a1a9",
|
|
18
|
-
forest: "#088000",
|
|
19
|
-
sleet: "#7f97ad",
|
|
20
|
-
midnight: "#2e1b46",
|
|
21
|
-
lavender: "#8b86ca",
|
|
22
|
-
};
|
|
23
|
-
this.types = {
|
|
24
|
-
doughnut0: {
|
|
25
|
-
size: 155,
|
|
26
|
-
colors: [this.colors.forest, "#bfbfbf"],
|
|
27
|
-
thickness: 0.73,
|
|
28
|
-
padding: 25,
|
|
29
|
-
isBar: false,
|
|
30
|
-
},
|
|
31
|
-
doughnut1: {
|
|
32
|
-
size: 130,
|
|
33
|
-
colors: [this.colors.lavender, this.colors.midnight, "#d4d4d4"],
|
|
34
|
-
thickness: 0.5,
|
|
35
|
-
padding: 90,
|
|
36
|
-
isBar: false,
|
|
37
|
-
},
|
|
38
|
-
doughnut2: {
|
|
39
|
-
size: 130,
|
|
40
|
-
colors: [this.colors.cyan, this.colors.salmon, "#d4d4d4"],
|
|
41
|
-
thickness: 0.5,
|
|
42
|
-
padding: 90,
|
|
43
|
-
isBar: false,
|
|
44
|
-
},
|
|
45
|
-
doughnut3: {
|
|
46
|
-
size: 130,
|
|
47
|
-
colors: [this.colors.lavender, this.colors.midnight, "#919834", "#c177cf", "#c16e00", "#029af2", "#2a6993"],
|
|
48
|
-
thickness: 0.5,
|
|
49
|
-
padding: 90,
|
|
50
|
-
isBar: false,
|
|
51
|
-
},
|
|
52
|
-
bar1: {
|
|
53
|
-
size: 350,
|
|
54
|
-
colors: [this.colors.forest, "#bfbfbf"],
|
|
55
|
-
padding: 0,
|
|
56
|
-
isBar: true,
|
|
57
|
-
},
|
|
58
|
-
bar2: {
|
|
59
|
-
size: 400,
|
|
60
|
-
colors: ["#d4d4d4", this.colors.sleet, this.colors.cyan, this.colors.salmon],
|
|
61
|
-
padding: 0,
|
|
62
|
-
isBar: true,
|
|
63
|
-
},
|
|
64
|
-
bar3: {
|
|
65
|
-
size: 300,
|
|
66
|
-
colors: ["#0d696e", this.colors.cyan, "#8e4129", this.colors.salmon],
|
|
67
|
-
padding: 0,
|
|
68
|
-
isBar: true,
|
|
69
|
-
},
|
|
70
|
-
bar4: {
|
|
71
|
-
size: 400,
|
|
72
|
-
colors: ["#d4d4d4", this.colors.sleet, "#33a919"],
|
|
73
|
-
padding: 0,
|
|
74
|
-
isBar: true,
|
|
75
|
-
},
|
|
76
|
-
bar5: {
|
|
77
|
-
size: 400,
|
|
78
|
-
colors: [
|
|
79
|
-
"#d4d4d4",
|
|
80
|
-
this.colors.lavender,
|
|
81
|
-
this.colors.midnight,
|
|
82
|
-
"#919834",
|
|
83
|
-
"#c177cf",
|
|
84
|
-
"#c16e00",
|
|
85
|
-
"#029af2",
|
|
86
|
-
"#2a6993",
|
|
87
|
-
],
|
|
88
|
-
padding: 0,
|
|
89
|
-
isBar: true,
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
/* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */
|
|
93
|
-
this.debouncedResize = debounce(async () => {
|
|
94
|
-
this.setHybridType();
|
|
95
|
-
await this.getData();
|
|
96
|
-
forceUpdate(this.el);
|
|
97
|
-
}, 10);
|
|
98
|
-
this.debouncedSliceUpdate = debounce(async () => {
|
|
99
|
-
await this.getData();
|
|
100
|
-
forceUpdate(this.el);
|
|
101
|
-
}, 100);
|
|
102
|
-
}
|
|
103
|
-
get tempValueFormat() {
|
|
104
|
-
// use of this getter should be replaced with dateFormat when showValues is fully phased out
|
|
105
|
-
return this.valueFormat || this.showValues || "none";
|
|
106
|
-
}
|
|
107
|
-
get sliceEls() {
|
|
108
|
-
const isBarType = this.currentChartType.includes("bar");
|
|
109
|
-
const isDoughnutType = this.currentChartType.includes("doughnut");
|
|
110
|
-
return isBarType
|
|
111
|
-
? Array.from(this.barEl.querySelectorAll(".bar-segment"))
|
|
112
|
-
: isDoughnutType
|
|
113
|
-
? Array.from(this.doughnutEl.querySelectorAll(".doughnut-segment"))
|
|
114
|
-
: undefined;
|
|
115
|
-
}
|
|
116
|
-
get currentChartType() {
|
|
117
|
-
return this.chartType === "hybrid" ? this.hybridType : this.chartType;
|
|
118
|
-
}
|
|
119
|
-
toggleTabbingOn() {
|
|
120
|
-
this.isTabbing = true;
|
|
121
|
-
}
|
|
122
|
-
toggleTabbingOff() {
|
|
123
|
-
this.isTabbing = false;
|
|
124
|
-
}
|
|
125
|
-
handleKeydown(ev) {
|
|
126
|
-
switch (ev.key) {
|
|
127
|
-
case "ArrowUp":
|
|
128
|
-
case "ArrowLeft":
|
|
129
|
-
ev.preventDefault();
|
|
130
|
-
this.isTabbing = true; // shd already be true. just in case user clicked on chart then pressed an arrow key
|
|
131
|
-
this.focusPrevious();
|
|
132
|
-
break;
|
|
133
|
-
case "ArrowRight":
|
|
134
|
-
case "ArrowDown":
|
|
135
|
-
ev.preventDefault();
|
|
136
|
-
this.isTabbing = true; // shd already be true. just in case user clicked on chart then pressed an arrow key
|
|
137
|
-
this.focusNext();
|
|
138
|
-
break;
|
|
139
|
-
case "Tab":
|
|
140
|
-
this.exitChart();
|
|
141
|
-
break;
|
|
142
|
-
case "Escape":
|
|
143
|
-
this.popoverEl.open = false;
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
handleSliceClick(ev, s) {
|
|
148
|
-
if (this.popoverEl && !this.isTabbing) {
|
|
149
|
-
s.coords = { x: ev.clientX, y: ev.clientY };
|
|
150
|
-
this.openPopover(s);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
handleSliceFocus(ev, s) {
|
|
154
|
-
if (this.popoverEl && this.isTabbing) {
|
|
155
|
-
s.coords = getPosition(ev.target);
|
|
156
|
-
this.openPopover(s);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
handleSliceKeyDown(ev) {
|
|
160
|
-
if (this.popoverEl && this.popoverEl.open && ev.key === "Enter") {
|
|
161
|
-
const popoverBtn = this.popoverEl.querySelector("button");
|
|
162
|
-
popoverBtn && popoverBtn.click();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
focusNext() {
|
|
166
|
-
const activeEl = checkForActiveElInShadow(document.activeElement);
|
|
167
|
-
const index =
|
|
168
|
-
// if the active el is not in the array the first element gets focused
|
|
169
|
-
(this.sliceEls.indexOf(activeEl) + 1) % this.sliceEls.length;
|
|
170
|
-
this.focusSlice(index);
|
|
171
|
-
}
|
|
172
|
-
focusPrevious() {
|
|
173
|
-
if (this.sliceEls) {
|
|
174
|
-
const activeEl = checkForActiveElInShadow(document.activeElement);
|
|
175
|
-
let index = this.sliceEls.indexOf(activeEl);
|
|
176
|
-
if (index === -1) {
|
|
177
|
-
// not in the array : focus the first slice
|
|
178
|
-
index = 0;
|
|
179
|
-
}
|
|
180
|
-
else if (index === 0) {
|
|
181
|
-
// first slice : focus the last slice
|
|
182
|
-
index = this.sliceEls.length - 1;
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
// anything else: focus previous
|
|
186
|
-
index -= 1;
|
|
187
|
-
}
|
|
188
|
-
this.focusSlice(index);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
focusSlice(index) {
|
|
192
|
-
if (this.sliceEls && this.el) {
|
|
193
|
-
if (this.popoverEl) {
|
|
194
|
-
this.popoverEl.open = false;
|
|
195
|
-
}
|
|
196
|
-
this.el.tabIndex = -1;
|
|
197
|
-
// @ts-ignore
|
|
198
|
-
this.el.focusable = false; // for Edge
|
|
199
|
-
this.sliceEls.map((p) => {
|
|
200
|
-
p.tabIndex = -1;
|
|
201
|
-
// @ts-ignore
|
|
202
|
-
p.focusable = false; // for Edge
|
|
203
|
-
});
|
|
204
|
-
this.sliceEls[index].tabIndex = 0;
|
|
205
|
-
// @ts-ignore
|
|
206
|
-
this.sliceEls[index].focusable = true; // for Edge
|
|
207
|
-
this.sliceEls[index].focus();
|
|
208
|
-
window.setTimeout(() => {
|
|
209
|
-
if (this.popoverEl) {
|
|
210
|
-
this.popoverEl.open = true;
|
|
211
|
-
}
|
|
212
|
-
}, 10);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
exitChart() {
|
|
216
|
-
this.sliceEls &&
|
|
217
|
-
this.sliceEls.map((p) => {
|
|
218
|
-
p.tabIndex = -1;
|
|
219
|
-
// @ts-ignore
|
|
220
|
-
p.focusable = false; // for Edge
|
|
221
|
-
});
|
|
222
|
-
// delay so that we can tab out of component before chart becomes focusable again
|
|
223
|
-
// and in case user was still pressing an arrow key when they pressed tab
|
|
224
|
-
window.setTimeout(() => {
|
|
225
|
-
if (this.el) {
|
|
226
|
-
this.el.tabIndex = 0;
|
|
227
|
-
// @ts-ignore
|
|
228
|
-
this.el.focusable = true; // for Edge
|
|
229
|
-
if (this.popoverEl) {
|
|
230
|
-
this.popoverEl.open = false;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}, 100);
|
|
234
|
-
}
|
|
235
|
-
openPopover(s) {
|
|
236
|
-
if (!!this.popoverEl && !!s.title && !!s.text) {
|
|
237
|
-
this.popoverEl.popoverTitle = s.title;
|
|
238
|
-
this.popoverEl.popoverText = s.text;
|
|
239
|
-
this.popoverEl.buttonText = s.buttonText;
|
|
240
|
-
this.popoverEl.coords = s.coords;
|
|
241
|
-
this.popoverEl.sliceRef = s.sliceRef;
|
|
242
|
-
window.setTimeout(() => {
|
|
243
|
-
if (this.popoverEl) {
|
|
244
|
-
this.popoverEl.open = true;
|
|
245
|
-
}
|
|
246
|
-
}, 30);
|
|
247
|
-
const debouncedClosePopover = debounce(async () => {
|
|
248
|
-
this.popoverEl.open = false;
|
|
249
|
-
}, 10);
|
|
250
|
-
// set up event listeners for scrolling
|
|
251
|
-
// to close popover on page scroll
|
|
252
|
-
document.addEventListener("scroll", () => {
|
|
253
|
-
debouncedClosePopover();
|
|
254
|
-
});
|
|
255
|
-
// ... and on parent scroll
|
|
256
|
-
const scrollableParent = findParentWithScrollbar(this.el);
|
|
257
|
-
if (!!scrollableParent) {
|
|
258
|
-
scrollableParent.addEventListener("scroll", () => {
|
|
259
|
-
debouncedClosePopover();
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
/* UTILS */
|
|
265
|
-
amountToPercent(val, asInt) {
|
|
266
|
-
return asInt ? Math.round((val * 100) / this.total) : Math.round((val * 10000) / this.total) / 100; // with 2 decimals
|
|
267
|
-
}
|
|
268
|
-
amountToDegree(val) {
|
|
269
|
-
return (val * 360) / this.total;
|
|
270
|
-
}
|
|
271
|
-
toFixed(number) {
|
|
272
|
-
var val = parseFloat((Math.floor(number * 100) / 100).toFixed(2));
|
|
273
|
-
return val;
|
|
274
|
-
}
|
|
275
|
-
polarToCartesian(half, radius, startAngle, endAngle) {
|
|
276
|
-
var x = this.toFixed(half + half * radius * Math.cos((Math.PI * startAngle) / 180));
|
|
277
|
-
var y = this.toFixed(half + half * radius * Math.sin((Math.PI * startAngle) / 180));
|
|
278
|
-
if (endAngle !== undefined) {
|
|
279
|
-
// if a 2nd angle value was passed, return 2 pairs of coords
|
|
280
|
-
var x2 = this.toFixed(half + half * radius * Math.cos((Math.PI * endAngle) / 180));
|
|
281
|
-
var y2 = this.toFixed(half + half * radius * Math.sin((Math.PI * endAngle) / 180));
|
|
282
|
-
return { x1: x, y1: y, x2, y2 };
|
|
283
|
-
}
|
|
284
|
-
return { x, y };
|
|
285
|
-
}
|
|
286
|
-
/* CRUNCH THE NUMBERS */
|
|
287
|
-
getPathData(amount, offset) {
|
|
288
|
-
var startAngle = this.amountToDegree(offset) - 90; // start at noon, not at 3 o'clock
|
|
289
|
-
var activeAngle = (amount / this.total) * 360;
|
|
290
|
-
var endAngle = startAngle + activeAngle;
|
|
291
|
-
var largeArcFlagOuter = activeAngle > 180 ? "1 1" : "0 1";
|
|
292
|
-
var largeArcFlagInner = activeAngle > 180 ? "1 0" : "0 0";
|
|
293
|
-
var half = this.chartData.size / 2;
|
|
294
|
-
var innerRadius = this.chartData.thickness;
|
|
295
|
-
var outerRadius = 1;
|
|
296
|
-
if (activeAngle === 360) {
|
|
297
|
-
// fix to avoid bad svg shape when the path goes all around (100%)
|
|
298
|
-
endAngle -= 0.01;
|
|
299
|
-
}
|
|
300
|
-
var outerCoords = this.polarToCartesian(half, outerRadius, startAngle + 1.5, // 1.5 for slice separator
|
|
301
|
-
endAngle);
|
|
302
|
-
var innerCoords = this.polarToCartesian(half, innerRadius, startAngle + 3, // 3 for slice separator
|
|
303
|
-
endAngle);
|
|
304
|
-
const moveTo = `M ${outerCoords.x1}, ${outerCoords.y1} `;
|
|
305
|
-
const arc1 = this.getArc(outerRadius, largeArcFlagOuter, outerCoords.x2, outerCoords.y2);
|
|
306
|
-
const line = ` L ${innerCoords.x2}, ${innerCoords.y2} `;
|
|
307
|
-
const arc2 = this.getArc(innerRadius, largeArcFlagInner, innerCoords.x1, innerCoords.y1);
|
|
308
|
-
return moveTo + arc1 + line + arc2 + " z";
|
|
309
|
-
}
|
|
310
|
-
getArc(radius, largeArcFlag, x, y) {
|
|
311
|
-
var z = this.toFixed((this.chartData.size / 2) * radius);
|
|
312
|
-
return `A ${z}, ${z} 0 ${largeArcFlag} ${this.toFixed(x)}, ${this.toFixed(y)}`;
|
|
313
|
-
}
|
|
314
|
-
setHybridType() {
|
|
315
|
-
this.hybridType = window.innerWidth > 1340 ? "doughnut0" : "bar1";
|
|
316
|
-
}
|
|
317
|
-
/* GET THE DATA */
|
|
318
|
-
async getData() {
|
|
319
|
-
this.slicesData = [];
|
|
320
|
-
let acc = 0;
|
|
321
|
-
const children = this.el.querySelectorAll("wm-chart-slice");
|
|
322
|
-
this.total = Array.from(children).reduce((total, slice) => (total += parseInt(slice.getAttribute("amount") || "0")), 0);
|
|
323
|
-
children.forEach((c, i) => {
|
|
324
|
-
const amount = parseInt(c.getAttribute("amount") || "0");
|
|
325
|
-
const perc = this.amountToPercent(amount, true);
|
|
326
|
-
// determine whether the slice is in a cluster of small values
|
|
327
|
-
// to avoid percentage text overlap for small values
|
|
328
|
-
const prev = children[i === 0 ? children.length - 1 : i - 1];
|
|
329
|
-
const prevPerc = this.amountToPercent(parseInt(prev.getAttribute("amount") || "0"), true);
|
|
330
|
-
const next = children[i === children.length - 1 ? 0 : i + 1];
|
|
331
|
-
const nextPerc = this.amountToPercent(parseInt(next.getAttribute("amount") || "0"), true);
|
|
332
|
-
const isSmall = perc < 4;
|
|
333
|
-
const prevIsSmall = prevPerc < 5;
|
|
334
|
-
const nextIsSmall = nextPerc < 5;
|
|
335
|
-
let inSmallCluster = isSmall && (prevIsSmall || nextIsSmall);
|
|
336
|
-
// because <1% slice percentage text has an additional character
|
|
337
|
-
// the inSmallCluster threshold needs to be widened for that slice only
|
|
338
|
-
const lessThanOnePerc = perc === 0 && amount > 0;
|
|
339
|
-
if (lessThanOnePerc && (nextPerc < 8 || prevPerc < 8)) {
|
|
340
|
-
inSmallCluster = true;
|
|
341
|
-
}
|
|
342
|
-
// for bar5, first color should be skipped unless notStartedColor is set to true
|
|
343
|
-
const ind = this.currentChartType === "bar5" ? (this.notStartedColor ? i : i + 1) : i;
|
|
344
|
-
const color = this.types[this.currentChartType].colors[ind];
|
|
345
|
-
const sliceData = {
|
|
346
|
-
amount: amount,
|
|
347
|
-
perc: perc,
|
|
348
|
-
legend: c.getAttribute("legend"),
|
|
349
|
-
color: color || "#d4d4d4",
|
|
350
|
-
offset: acc,
|
|
351
|
-
id: `${this.uid}-${i + 1}`,
|
|
352
|
-
title: c.getAttribute("popover-title"),
|
|
353
|
-
text: c.getAttribute("popover-text"),
|
|
354
|
-
buttonText: c.getAttribute("popover-button-text"),
|
|
355
|
-
sliceRef: c,
|
|
356
|
-
inSmallCluster: inSmallCluster,
|
|
357
|
-
};
|
|
358
|
-
acc += amount;
|
|
359
|
-
this.slicesData.push(sliceData);
|
|
360
|
-
});
|
|
361
|
-
this.chartData = this.types[this.currentChartType];
|
|
362
|
-
}
|
|
363
|
-
handleResize() {
|
|
364
|
-
if (this.chartType === "hybrid") {
|
|
365
|
-
this.debouncedResize();
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
async componentWillLoad() {
|
|
369
|
-
if (!this.label) {
|
|
370
|
-
throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");
|
|
371
|
-
}
|
|
372
|
-
if (this.showValues) {
|
|
373
|
-
console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.");
|
|
374
|
-
}
|
|
375
|
-
if (this.chartType === "hybrid") {
|
|
376
|
-
this.setHybridType();
|
|
377
|
-
}
|
|
378
|
-
await this.getData();
|
|
379
|
-
}
|
|
380
|
-
handleSliceUpdate() {
|
|
381
|
-
this.debouncedSliceUpdate();
|
|
382
|
-
}
|
|
383
|
-
/* RENDERING */
|
|
384
|
-
renderFilter() {
|
|
385
|
-
return (h("defs", null,
|
|
386
|
-
h("filter", { id: "wmHoverDropShadow" },
|
|
387
|
-
h("feGaussianBlur", { stdDeviation: "3" }),
|
|
388
|
-
h("feOffset", { result: "offsetblur" }),
|
|
389
|
-
h("feFlood", { "flood-color": "#333" }),
|
|
390
|
-
h("feComposite", { operator: "in", in2: "offsetblur" }),
|
|
391
|
-
h("feMerge", null,
|
|
392
|
-
h("feMergeNode", null),
|
|
393
|
-
h("feMergeNode", { in: "SourceGraphic" })))));
|
|
394
|
-
}
|
|
395
|
-
// DOUGHNUT
|
|
396
|
-
renderDoughnut() {
|
|
397
|
-
const outerSize = this.chartData.size + this.chartData.padding;
|
|
398
|
-
return (h("div", { class: "chart-wrapper doughnut-wrapper" },
|
|
399
|
-
h("svg", { width: outerSize + "px", height: outerSize + "px", ref: (el) => (this.doughnutEl = el), id: `graphic-${this.uid}`, class: "doughnut-svg" },
|
|
400
|
-
this.renderFilter(),
|
|
401
|
-
this.slicesData.map((s) => this.renderPath(s)),
|
|
402
|
-
this.currentChartType === "doughnut0" ? (h("text", { class: "value", x: "50%", y: "50%", "font-size": "1.5rem", "font-weight": "500", "text-anchor": "middle", "dominant-baseline": "middle" }, this.amountToPercent(this.slicesData[0].amount, true) + "%")) : (h("g", { transform: `translate(${this.chartData.padding / 2}, ${this.chartData.padding / 2})`, "text-anchor": "middle", "dominant-baseline": "middle" }, this.slicesData.map((s) => (s.amount > 0 ? this.renderDoughnutText(s) : "")))))));
|
|
403
|
-
}
|
|
404
|
-
renderPath(s) {
|
|
405
|
-
return (h("g", { transform: `translate(${this.chartData.padding / 2}, ${this.chartData.padding / 2})` },
|
|
406
|
-
h("path", { id: s.id, class: "doughnut-segment", fill: s.amount ? s.color : "transparent", d: this.getPathData(s.amount, s.offset), onClick: (ev) => this.handleSliceClick(ev, s), onFocus: (ev) => this.handleSliceFocus(ev, s), onKeyDown: (ev) => this.handleSliceKeyDown(ev), role: "img", "aria-label": s.legend })));
|
|
407
|
-
}
|
|
408
|
-
renderDoughnutText(s) {
|
|
409
|
-
if (!s.inSmallCluster) {
|
|
410
|
-
const arcMiddle = this.amountToDegree(s.offset + s.amount / 2);
|
|
411
|
-
let { x, y } = this.polarToCartesian(this.chartData.size / 2, 1.4, arcMiddle - 90);
|
|
412
|
-
return (h("text", { class: "value", x: x + "px", y: y + "px" }, `${s.perc > 0 ? s.perc : "<1"}%`));
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
// BAR
|
|
416
|
-
renderBar() {
|
|
417
|
-
return (h("div", { class: "chart-wrapper bar-wrapper" },
|
|
418
|
-
this.currentChartType === "bar1" ? (h("div", { class: "single-perc" }, this.amountToPercent(this.slicesData[0].amount, true) + "%")) : (""),
|
|
419
|
-
this.drawAxis(),
|
|
420
|
-
h("div", { class: {
|
|
421
|
-
"inner-bar-wrapper": true,
|
|
422
|
-
"show-values": this.tempValueFormat === "percentage" || this.tempValueFormat === "amount",
|
|
423
|
-
} },
|
|
424
|
-
this.currentChartType !== "bar1" ? (h("div", { class: "values" }, this.slicesData.map((s, idx) => (s.perc > 0 ? this.renderBarText(s, idx) : "")))) : (""),
|
|
425
|
-
h("div", { class: "bar-segments-wrapper", ref: (el) => (this.barEl = el) }, this.slicesData.map((s, idx) => this.renderBarSegment(s, idx))),
|
|
426
|
-
this.renderCompletionMessage())));
|
|
427
|
-
}
|
|
428
|
-
renderBarSegment(s, idx) {
|
|
429
|
-
const isLastSlice = idx !== this.slicesData.length - 1;
|
|
430
|
-
const width = `calc(${this.amountToPercent(s.amount, false)}%${isLastSlice ? " - 2px" : ""})`;
|
|
431
|
-
return (h("div", { class: `bar-segment ${this.amountToPercent(s.amount, false) === 0 ? "zero" : ""}`, style: {
|
|
432
|
-
backgroundColor: s.color,
|
|
433
|
-
width: width,
|
|
434
|
-
}, onClick: (ev) => this.handleSliceClick(ev, s), onFocus: (ev) => this.handleSliceFocus(ev, s), onKeyDown: (ev) => this.handleSliceKeyDown(ev) },
|
|
435
|
-
h("text", { class: "sr-only" }, s.legend)));
|
|
436
|
-
}
|
|
437
|
-
renderBarText(s, idx) {
|
|
438
|
-
let val;
|
|
439
|
-
if (this.tempValueFormat === "percentage") {
|
|
440
|
-
val = s.perc + "%";
|
|
441
|
-
}
|
|
442
|
-
else if (this.tempValueFormat === "amount") {
|
|
443
|
-
val = s.amount;
|
|
444
|
-
}
|
|
445
|
-
else {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
return (h("span", { class: "value", style: {
|
|
449
|
-
width: `calc(${this.amountToPercent(s.amount, false)}%
|
|
450
|
-
${idx !== this.slicesData.length - 1 ? " - 2px" : ""}`,
|
|
451
|
-
} }, val));
|
|
452
|
-
}
|
|
453
|
-
drawAxis() {
|
|
454
|
-
if (this.currentChartType === "bar3") {
|
|
455
|
-
return (h("svg", { class: "axis" },
|
|
456
|
-
h("line", { x1: "0", x2: "100%", y1: "0", y2: "0" }),
|
|
457
|
-
h("line", { x1: "0", x2: "0", y1: "0", y2: "-85px" }),
|
|
458
|
-
h("line", { class: "tick", x1: "0.5", x2: "0.5", y1: "0", y2: "6" }),
|
|
459
|
-
h("text", { x: "0.5", y: "-6" }, "0%"),
|
|
460
|
-
h("line", { class: "tick", x1: "100%", x2: "100%", y1: "0", y2: "6" }),
|
|
461
|
-
h("text", { x: "100%", y: "-6" }, "100%")));
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
renderCompletionMessage() {
|
|
465
|
-
if (this.chartType === "hybrid" && this.completionMessage) {
|
|
466
|
-
return h("div", { class: "completion-message" }, this.completionMessage);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
renderLegend() {
|
|
470
|
-
// legend is hidden for bar1 type regardless of showLegend value
|
|
471
|
-
if (this.showLegend) {
|
|
472
|
-
const hasCluster = this.slicesData.reduce((hasCluster, cur) => (hasCluster = cur.inSmallCluster ? true : hasCluster), false);
|
|
473
|
-
return (h("div", { class: "legend-wrapper" },
|
|
474
|
-
h("div", { class: `legend ${this.chartData.isBar ? "--top" : "--bottom"}`, "aria-hidden": "true" }, this.total > 0
|
|
475
|
-
? this.slicesData.map((s) => {
|
|
476
|
-
// when both legend and amount are omitted, the legend is not shown for that particular option (it's been deactivated by the user)
|
|
477
|
-
if (!!s.amount || !!s.legend) {
|
|
478
|
-
return (h("div", { class: "legend-item" },
|
|
479
|
-
h("div", { class: "legend-color", style: { "background-color": s.color } }),
|
|
480
|
-
h("div", { class: "legend-text" }, s.legend)));
|
|
481
|
-
}
|
|
482
|
-
})
|
|
483
|
-
: ""),
|
|
484
|
-
!this.chartData.isBar && hasCluster ? (h("div", { class: "cluster-warning" },
|
|
485
|
-
intl.formatMessage({
|
|
486
|
-
id: "chart.hiddenPercentages",
|
|
487
|
-
defaultMessage: "Percentages smaller than 5% are not shown when too close to each other.",
|
|
488
|
-
}),
|
|
489
|
-
h("br", null),
|
|
490
|
-
intl.formatMessage({
|
|
491
|
-
id: "chart.clickToSeeDetails",
|
|
492
|
-
defaultMessage: "Click or use arrow keys to see details.",
|
|
493
|
-
}))) : ("")));
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
render() {
|
|
497
|
-
return (h(Host, { role: "application", "aria-label": this.label +
|
|
498
|
-
", " +
|
|
499
|
-
intl.formatMessage({
|
|
500
|
-
id: "chart.interactiveChart",
|
|
501
|
-
defaultMessage: "Interactive chart. Use arrow keys to browse elements, press Tab to exit.",
|
|
502
|
-
}), tabindex: "0" },
|
|
503
|
-
h("div", { class: `component-wrapper ${this.currentChartType} ${this.isTabbing ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.chartType === "bar4" ? "left-label" : ""}` },
|
|
504
|
-
h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `graphic-${this.uid}` },
|
|
505
|
-
h("span", { class: "label-text" }, this.label),
|
|
506
|
-
this.subinfo ? h("span", { class: "subinfo" }, this.subinfo) : ""),
|
|
507
|
-
this.chartData.isBar ? this.renderLegend() : "",
|
|
508
|
-
this.total > 0 && this.chartData.isBar ? this.renderBar() : this.renderDoughnut(),
|
|
509
|
-
!this.chartData.isBar ? this.renderLegend() : "",
|
|
510
|
-
h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "", ref: (el) => (this.popoverEl = el) }),
|
|
511
|
-
this.hybridType === "doughnut0" ? this.renderCompletionMessage() : "")));
|
|
512
|
-
}
|
|
513
|
-
static get is() { return "wm-chart"; }
|
|
514
|
-
static get encapsulation() { return "shadow"; }
|
|
515
|
-
static get originalStyleUrls() { return {
|
|
516
|
-
"$": ["wm-chart.scss"]
|
|
517
|
-
}; }
|
|
518
|
-
static get styleUrls() { return {
|
|
519
|
-
"$": ["wm-chart.css"]
|
|
520
|
-
}; }
|
|
521
|
-
static get properties() { return {
|
|
522
|
-
"chartType": {
|
|
523
|
-
"type": "string",
|
|
524
|
-
"mutable": false,
|
|
525
|
-
"complexType": {
|
|
526
|
-
"original": "\"doughnut1\" | \"doughnut2\" | \"doughnut3\" | \"hybrid\" | \"bar1\" | \"bar2\" | \"bar3\" | \"bar4\" | \"bar5\"",
|
|
527
|
-
"resolved": "\"bar1\" | \"bar2\" | \"bar3\" | \"bar4\" | \"bar5\" | \"doughnut1\" | \"doughnut2\" | \"doughnut3\" | \"hybrid\"",
|
|
528
|
-
"references": {}
|
|
529
|
-
},
|
|
530
|
-
"required": false,
|
|
531
|
-
"optional": false,
|
|
532
|
-
"docs": {
|
|
533
|
-
"tags": [],
|
|
534
|
-
"text": ""
|
|
535
|
-
},
|
|
536
|
-
"attribute": "chart-type",
|
|
537
|
-
"reflect": false,
|
|
538
|
-
"defaultValue": "\"doughnut1\""
|
|
539
|
-
},
|
|
540
|
-
"label": {
|
|
541
|
-
"type": "string",
|
|
542
|
-
"mutable": false,
|
|
543
|
-
"complexType": {
|
|
544
|
-
"original": "string",
|
|
545
|
-
"resolved": "string | undefined",
|
|
546
|
-
"references": {}
|
|
547
|
-
},
|
|
548
|
-
"required": false,
|
|
549
|
-
"optional": true,
|
|
550
|
-
"docs": {
|
|
551
|
-
"tags": [],
|
|
552
|
-
"text": ""
|
|
553
|
-
},
|
|
554
|
-
"attribute": "label",
|
|
555
|
-
"reflect": false
|
|
556
|
-
},
|
|
557
|
-
"subinfo": {
|
|
558
|
-
"type": "string",
|
|
559
|
-
"mutable": false,
|
|
560
|
-
"complexType": {
|
|
561
|
-
"original": "string",
|
|
562
|
-
"resolved": "string | undefined",
|
|
563
|
-
"references": {}
|
|
564
|
-
},
|
|
565
|
-
"required": false,
|
|
566
|
-
"optional": true,
|
|
567
|
-
"docs": {
|
|
568
|
-
"tags": [],
|
|
569
|
-
"text": ""
|
|
570
|
-
},
|
|
571
|
-
"attribute": "subinfo",
|
|
572
|
-
"reflect": false
|
|
573
|
-
},
|
|
574
|
-
"completionMessage": {
|
|
575
|
-
"type": "string",
|
|
576
|
-
"mutable": false,
|
|
577
|
-
"complexType": {
|
|
578
|
-
"original": "string",
|
|
579
|
-
"resolved": "string | undefined",
|
|
580
|
-
"references": {}
|
|
581
|
-
},
|
|
582
|
-
"required": false,
|
|
583
|
-
"optional": true,
|
|
584
|
-
"docs": {
|
|
585
|
-
"tags": [],
|
|
586
|
-
"text": ""
|
|
587
|
-
},
|
|
588
|
-
"attribute": "completion-message",
|
|
589
|
-
"reflect": false
|
|
590
|
-
},
|
|
591
|
-
"valueFormat": {
|
|
592
|
-
"type": "string",
|
|
593
|
-
"mutable": false,
|
|
594
|
-
"complexType": {
|
|
595
|
-
"original": "\"percentage\" | \"amount\"",
|
|
596
|
-
"resolved": "\"amount\" | \"percentage\" | undefined",
|
|
597
|
-
"references": {}
|
|
598
|
-
},
|
|
599
|
-
"required": false,
|
|
600
|
-
"optional": true,
|
|
601
|
-
"docs": {
|
|
602
|
-
"tags": [],
|
|
603
|
-
"text": ""
|
|
604
|
-
},
|
|
605
|
-
"attribute": "value-format",
|
|
606
|
-
"reflect": false
|
|
607
|
-
},
|
|
608
|
-
"showValues": {
|
|
609
|
-
"type": "string",
|
|
610
|
-
"mutable": false,
|
|
611
|
-
"complexType": {
|
|
612
|
-
"original": "\"percentage\" | \"amount\"",
|
|
613
|
-
"resolved": "\"amount\" | \"percentage\" | undefined",
|
|
614
|
-
"references": {}
|
|
615
|
-
},
|
|
616
|
-
"required": false,
|
|
617
|
-
"optional": true,
|
|
618
|
-
"docs": {
|
|
619
|
-
"tags": [],
|
|
620
|
-
"text": ""
|
|
621
|
-
},
|
|
622
|
-
"attribute": "show-values",
|
|
623
|
-
"reflect": false
|
|
624
|
-
},
|
|
625
|
-
"showLegend": {
|
|
626
|
-
"type": "boolean",
|
|
627
|
-
"mutable": false,
|
|
628
|
-
"complexType": {
|
|
629
|
-
"original": "boolean",
|
|
630
|
-
"resolved": "boolean",
|
|
631
|
-
"references": {}
|
|
632
|
-
},
|
|
633
|
-
"required": false,
|
|
634
|
-
"optional": false,
|
|
635
|
-
"docs": {
|
|
636
|
-
"tags": [],
|
|
637
|
-
"text": ""
|
|
638
|
-
},
|
|
639
|
-
"attribute": "show-legend",
|
|
640
|
-
"reflect": false,
|
|
641
|
-
"defaultValue": "true"
|
|
642
|
-
},
|
|
643
|
-
"notStartedColor": {
|
|
644
|
-
"type": "boolean",
|
|
645
|
-
"mutable": false,
|
|
646
|
-
"complexType": {
|
|
647
|
-
"original": "boolean",
|
|
648
|
-
"resolved": "boolean",
|
|
649
|
-
"references": {}
|
|
650
|
-
},
|
|
651
|
-
"required": false,
|
|
652
|
-
"optional": false,
|
|
653
|
-
"docs": {
|
|
654
|
-
"tags": [],
|
|
655
|
-
"text": ""
|
|
656
|
-
},
|
|
657
|
-
"attribute": "not-started-color",
|
|
658
|
-
"reflect": false,
|
|
659
|
-
"defaultValue": "false"
|
|
660
|
-
},
|
|
661
|
-
"labelPosition": {
|
|
662
|
-
"type": "string",
|
|
663
|
-
"mutable": false,
|
|
664
|
-
"complexType": {
|
|
665
|
-
"original": "\"left\" | \"top\"",
|
|
666
|
-
"resolved": "\"left\" | \"top\"",
|
|
667
|
-
"references": {}
|
|
668
|
-
},
|
|
669
|
-
"required": false,
|
|
670
|
-
"optional": false,
|
|
671
|
-
"docs": {
|
|
672
|
-
"tags": [],
|
|
673
|
-
"text": ""
|
|
674
|
-
},
|
|
675
|
-
"attribute": "label-position",
|
|
676
|
-
"reflect": false,
|
|
677
|
-
"defaultValue": "\"top\""
|
|
678
|
-
}
|
|
679
|
-
}; }
|
|
680
|
-
static get states() { return {
|
|
681
|
-
"isTabbing": {}
|
|
682
|
-
}; }
|
|
683
|
-
static get elementRef() { return "el"; }
|
|
684
|
-
static get listeners() { return [{
|
|
685
|
-
"name": "wmUserIsTabbing",
|
|
686
|
-
"method": "toggleTabbingOn",
|
|
687
|
-
"target": "window",
|
|
688
|
-
"capture": false,
|
|
689
|
-
"passive": false
|
|
690
|
-
}, {
|
|
691
|
-
"name": "wmUserIsNotTabbing",
|
|
692
|
-
"method": "toggleTabbingOff",
|
|
693
|
-
"target": "window",
|
|
694
|
-
"capture": false,
|
|
695
|
-
"passive": false
|
|
696
|
-
}, {
|
|
697
|
-
"name": "keydown",
|
|
698
|
-
"method": "handleKeydown",
|
|
699
|
-
"target": undefined,
|
|
700
|
-
"capture": false,
|
|
701
|
-
"passive": false
|
|
702
|
-
}, {
|
|
703
|
-
"name": "resize",
|
|
704
|
-
"method": "handleResize",
|
|
705
|
-
"target": "window",
|
|
706
|
-
"capture": false,
|
|
707
|
-
"passive": true
|
|
708
|
-
}, {
|
|
709
|
-
"name": "wmChartSliceUpdated",
|
|
710
|
-
"method": "handleSliceUpdate",
|
|
711
|
-
"target": undefined,
|
|
712
|
-
"capture": false,
|
|
713
|
-
"passive": false
|
|
714
|
-
}]; }
|
|
715
|
-
}
|