@watermarkinsights/ripple 5.23.0-alpha.4 → 5.23.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-b4f32f90.js → app-globals-3d5b637c.js} +26 -17
- package/dist/cjs/{chartFunctions-97471b69.js → chartFunctions-8d17cbb8.js} +19 -1
- package/dist/cjs/{functions-71af585d.js → functions-156cc201.js} +2 -2
- package/dist/cjs/{interfaces-069f135e.js → interfaces-8419be91.js} +22 -21
- package/dist/cjs/{intl-169a8805.js → intl-789e4b6c.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/priv-chart-popover-old.cjs.entry.js +1 -1
- package/dist/cjs/priv-chart-popover_2.cjs.entry.js +6 -6
- package/dist/cjs/priv-option-list.cjs.entry.js +2 -2
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +2 -2
- package/dist/cjs/wm-button.cjs.entry.js +3 -3
- package/dist/cjs/wm-chart-bar.cjs.entry.js +38 -24
- package/dist/cjs/wm-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +1 -1
- package/dist/cjs/wm-flyout.cjs.entry.js +2 -2
- package/dist/cjs/wm-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-modal_3.cjs.entry.js +6 -8
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-navigator.cjs.entry.js +2 -2
- package/dist/cjs/wm-nested-select.cjs.entry.js +2 -2
- package/dist/cjs/wm-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +48 -37
- package/dist/cjs/wm-pagination.cjs.entry.js +3 -3
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-search.cjs.entry.js +3 -3
- package/dist/cjs/wm-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
- package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +3 -3
- package/dist/collection/components/charts/chartFunctions.js +17 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +22 -22
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +5 -5
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.css +1 -6
- package/dist/collection/components/charts/wm-chart-bar/wm-chart-bar.js +37 -35
- package/dist/collection/components/selects/wm-select/wm-select.js +46 -35
- package/dist/collection/components/wm-button/wm-button.css +14 -15
- package/dist/collection/components/wm-modal/wm-modal.js +4 -6
- package/dist/collection/components/wm-pagination/wm-pagination.css +12 -17
- package/dist/collection/components/wm-search/wm-search.css +8 -8
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +10 -13
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +3 -2
- package/dist/collection/components/wm-uploader/wm-uploader.css +23 -16
- package/dist/collection/dev/chart-bar.js +1 -3
- package/dist/collection/global/functions.js +2 -2
- package/dist/collection/global/global.js +25 -16
- package/dist/collection/global/interfaces.js +21 -19
- package/dist/esm/{app-globals-fc98aff2.js → app-globals-f57d8c7f.js} +26 -17
- package/dist/esm/{chartFunctions-9c95674d.js → chartFunctions-93592f14.js} +19 -2
- package/dist/esm/{functions-2cfbd8c7.js → functions-c1d5f184.js} +2 -2
- package/dist/esm/{interfaces-30d10bc0.js → interfaces-7e50d034.js} +22 -20
- package/dist/esm/{intl-23d21b06.js → intl-8c69d10b.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/priv-calendar.entry.js +1 -1
- package/dist/esm/priv-chart-popover-old.entry.js +1 -1
- package/dist/esm/priv-chart-popover_2.entry.js +6 -6
- package/dist/esm/priv-option-list.entry.js +2 -2
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +2 -2
- package/dist/esm/wm-button.entry.js +3 -3
- package/dist/esm/wm-chart-bar.entry.js +38 -24
- package/dist/esm/wm-chart.entry.js +3 -3
- package/dist/esm/wm-date-range.entry.js +1 -1
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-file.entry.js +1 -1
- package/dist/esm/wm-flyout.entry.js +2 -2
- package/dist/esm/wm-input.entry.js +2 -2
- package/dist/esm/wm-line-chart.entry.js +3 -3
- package/dist/esm/wm-modal-pss_3.entry.js +2 -2
- package/dist/esm/wm-modal_3.entry.js +6 -8
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +2 -2
- package/dist/esm/wm-nested-select.entry.js +2 -2
- package/dist/esm/wm-optgroup.entry.js +1 -1
- package/dist/esm/wm-option_2.entry.js +48 -37
- package/dist/esm/wm-pagination.entry.js +3 -3
- package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
- package/dist/esm/wm-search.entry.js +3 -3
- package/dist/esm/wm-snackbar.entry.js +3 -3
- package/dist/esm/wm-tab-item_3.entry.js +2 -2
- package/dist/esm/wm-tag-input.entry.js +2 -2
- package/dist/esm/wm-tag-option.entry.js +1 -1
- package/dist/esm/wm-textarea.entry.js +2 -2
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +1 -1
- package/dist/esm/wm-uploader.entry.js +3 -3
- package/dist/esm-es5/app-globals-f57d8c7f.js +1 -0
- package/dist/esm-es5/{chartFunctions-9c95674d.js → chartFunctions-93592f14.js} +1 -1
- package/dist/esm-es5/{functions-2cfbd8c7.js → functions-c1d5f184.js} +1 -1
- package/dist/esm-es5/interfaces-7e50d034.js +1 -0
- package/dist/esm-es5/{intl-23d21b06.js → intl-8c69d10b.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover-old.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover_2.entry.js +1 -1
- package/dist/esm-es5/priv-option-list.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-bar.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-flyout.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
- package/dist/esm-es5/wm-modal_3.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-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-optgroup.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_3.entry.js +1 -1
- 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-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.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/ripple/{p-62cdc8c6.system.entry.js → p-035c3af8.system.entry.js} +1 -1
- package/dist/ripple/{p-d5e5c55a.system.entry.js → p-086da1c5.system.entry.js} +1 -1
- package/dist/ripple/{p-b939d3cb.system.entry.js → p-0886099f.system.entry.js} +1 -1
- package/dist/ripple/{p-5cbbaf69.system.entry.js → p-08ba2a77.system.entry.js} +1 -1
- package/dist/ripple/{p-5f50c561.system.entry.js → p-0cdb5b52.system.entry.js} +1 -1
- package/dist/ripple/{p-d49676b7.system.entry.js → p-0e418fe4.system.entry.js} +1 -1
- package/dist/ripple/{p-278accdb.system.entry.js → p-0efafbd8.system.entry.js} +1 -1
- package/dist/ripple/{p-00a9e425.system.entry.js → p-17f3fa47.system.entry.js} +1 -1
- package/dist/ripple/{p-842dcfd6.entry.js → p-23f08f5a.entry.js} +1 -1
- package/dist/ripple/{p-b3092643.entry.js → p-24598e3e.entry.js} +1 -1
- package/dist/ripple/{p-23ca86c6.entry.js → p-24ce5997.entry.js} +1 -1
- package/dist/ripple/{p-f55de899.entry.js → p-25043b32.entry.js} +1 -1
- package/dist/ripple/p-25ce5d58.js +1 -0
- package/dist/ripple/{p-10f93b97.system.entry.js → p-262d5bd5.system.entry.js} +1 -1
- package/dist/ripple/{p-bc052b23.entry.js → p-26dcc8e6.entry.js} +1 -1
- package/dist/ripple/{p-fab7195d.system.entry.js → p-275386c1.system.entry.js} +1 -1
- package/dist/ripple/{p-e7988695.system.entry.js → p-2d042b40.system.entry.js} +1 -1
- package/dist/ripple/{p-5c658003.system.entry.js → p-2d5bd606.system.entry.js} +1 -1
- package/dist/ripple/{p-79ec0bb2.entry.js → p-3410da36.entry.js} +1 -1
- package/dist/ripple/p-3436e819.entry.js +1 -0
- package/dist/ripple/{p-e2a2f3ca.system.entry.js → p-35dfeacb.system.entry.js} +1 -1
- package/dist/ripple/{p-7e56aca4.entry.js → p-367df770.entry.js} +1 -1
- package/dist/ripple/{p-f63ef9c1.entry.js → p-3b2e7166.entry.js} +1 -1
- package/dist/ripple/{p-d522499c.entry.js → p-3de0e2b0.entry.js} +1 -1
- package/dist/ripple/p-40334c5f.system.js +1 -0
- package/dist/ripple/{p-1feb49af.system.entry.js → p-46c77ecb.system.entry.js} +1 -1
- package/dist/ripple/{p-9bf3d4f1.entry.js → p-48950aef.entry.js} +1 -1
- package/dist/ripple/{p-b9a55887.entry.js → p-49b75a61.entry.js} +1 -1
- package/dist/ripple/{p-30f1afd4.entry.js → p-4b813987.entry.js} +1 -1
- package/dist/ripple/{p-0a226179.entry.js → p-6434eacf.entry.js} +1 -1
- package/dist/ripple/p-64dcc68f.system.js +1 -0
- package/dist/ripple/{p-9246f0dc.js → p-6a2fb1a1.js} +1 -1
- package/dist/ripple/{p-79b3dfc8.entry.js → p-724fbe77.entry.js} +1 -1
- package/dist/ripple/p-7450be2e.entry.js +1 -0
- package/dist/ripple/p-75816848.system.js +1 -0
- package/dist/ripple/{p-366f3ff0.system.entry.js → p-7c103a48.system.entry.js} +1 -1
- package/dist/ripple/{p-f41341a0.entry.js → p-7f4a409e.entry.js} +1 -1
- package/dist/ripple/p-8a4d79dc.system.entry.js +1 -0
- package/dist/ripple/p-8ac14bb1.system.js +1 -0
- package/dist/ripple/{p-acdfbdb8.system.entry.js → p-90f0283c.system.entry.js} +1 -1
- package/dist/ripple/{p-01e8cea6.entry.js → p-94842057.entry.js} +1 -1
- package/dist/ripple/{p-78524594.entry.js → p-986d1792.entry.js} +1 -1
- package/dist/ripple/{p-2f925b25.system.entry.js → p-99a1c382.system.entry.js} +1 -1
- package/dist/ripple/{p-8f4fcdf4.system.entry.js → p-a289d92b.system.entry.js} +1 -1
- package/dist/ripple/{p-c8c8e85f.system.js → p-a402c6bb.system.js} +1 -1
- package/dist/ripple/{p-6a6e4645.system.entry.js → p-af9e6028.system.entry.js} +1 -1
- package/dist/ripple/p-b1afda53.entry.js +1 -0
- package/dist/ripple/{p-1720b84f.entry.js → p-b37fbb7e.entry.js} +1 -1
- package/dist/ripple/{p-95677d9b.entry.js → p-b589b0da.entry.js} +1 -1
- package/dist/ripple/{p-6c01961b.system.entry.js → p-bfe3c687.system.entry.js} +1 -1
- package/dist/ripple/{p-25c56231.entry.js → p-c04fad73.entry.js} +1 -1
- package/dist/ripple/{p-84d41f0e.entry.js → p-c3ba7789.entry.js} +1 -1
- package/dist/ripple/{p-8dd40c17.system.entry.js → p-c5030fa3.system.entry.js} +1 -1
- package/dist/ripple/{p-d404695d.system.entry.js → p-c97b06b5.system.entry.js} +1 -1
- package/dist/ripple/{p-d13b78fd.system.entry.js → p-cd5aa832.system.entry.js} +1 -1
- package/dist/ripple/p-cda66d45.js +1 -0
- package/dist/ripple/{p-a0c4a12e.entry.js → p-d002e65f.entry.js} +1 -1
- package/dist/ripple/{p-fda4032a.system.entry.js → p-d4051c50.system.entry.js} +1 -1
- package/dist/ripple/{p-dddeb54c.entry.js → p-d9d16c9d.entry.js} +1 -1
- package/dist/ripple/{p-79e2e6f0.system.entry.js → p-da88bdfa.system.entry.js} +1 -1
- package/dist/ripple/{p-bf42cf44.system.entry.js → p-defdef0c.system.entry.js} +1 -1
- package/dist/ripple/{p-d4fe10ec.entry.js → p-e70f1e74.entry.js} +1 -1
- package/dist/ripple/p-eee663f4.system.entry.js +1 -0
- package/dist/ripple/{p-325393da.js → p-f031ced7.js} +1 -1
- package/dist/ripple/{p-685863a1.system.entry.js → p-f2b09954.system.entry.js} +1 -1
- package/dist/ripple/p-f32ca8fa.entry.js +1 -0
- package/dist/ripple/{p-c8d6b61a.system.js → p-f503991a.system.js} +1 -1
- package/dist/ripple/{p-8c0ba5b7.entry.js → p-f6844f41.entry.js} +1 -1
- package/dist/ripple/{p-5f822c17.system.entry.js → p-f91c86d2.system.entry.js} +1 -1
- package/dist/ripple/{p-ff70ddd9.entry.js → p-fc67950d.entry.js} +1 -1
- package/dist/ripple/{p-7457705b.system.entry.js → p-fce3ce5c.system.entry.js} +1 -1
- package/dist/ripple/{p-4eb3a4a9.system.entry.js → p-fe49bfb7.system.entry.js} +1 -1
- package/dist/ripple/{p-56d17ec6.js → p-fe625125.js} +1 -1
- package/dist/ripple/{p-5b0fe876.entry.js → p-ff25bdd6.entry.js} +1 -1
- package/dist/ripple/p-ffa6f621.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/chartFunctions.d.ts +1 -0
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +1 -1
- package/dist/types/components/charts/wm-chart-bar/wm-chart-bar.d.ts +7 -16
- package/dist/types/components/selects/wm-select/wm-select.d.ts +3 -2
- package/dist/types/components.d.ts +2 -2
- package/dist/types/global/interfaces.d.ts +13 -4
- package/package.json +3 -3
- package/dist/esm-es5/app-globals-fc98aff2.js +0 -1
- package/dist/esm-es5/interfaces-30d10bc0.js +0 -1
- package/dist/ripple/p-1eae5841.entry.js +0 -1
- package/dist/ripple/p-30a65553.system.js +0 -1
- package/dist/ripple/p-3b505b32.system.entry.js +0 -1
- package/dist/ripple/p-6646191c.entry.js +0 -1
- package/dist/ripple/p-7c0e1ef6.entry.js +0 -1
- package/dist/ripple/p-7f333b52.entry.js +0 -1
- package/dist/ripple/p-b3cd31d2.system.js +0 -1
- package/dist/ripple/p-bb3d887c.entry.js +0 -1
- package/dist/ripple/p-c40d4678.system.entry.js +0 -1
- package/dist/ripple/p-cea257ee.system.js +0 -1
- package/dist/ripple/p-d6effc35.system.js +0 -1
- package/dist/ripple/p-d7accb51.js +0 -1
- package/dist/ripple/p-f210f4ff.js +0 -1
|
@@ -860,12 +860,6 @@
|
|
|
860
860
|
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath style='fill: var(--icon-fill, currentColor)' d='M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z'/%3E%3C/svg%3E%0A");
|
|
861
861
|
}
|
|
862
862
|
|
|
863
|
-
priv-chart-popover {
|
|
864
|
-
--wmcolor-chart-popover-link-background: var(--wmcolor-background-transparent);
|
|
865
|
-
--wmcolor-chart-popover-link-text-focus: var(--wmcolor-interactive-focus);
|
|
866
|
-
--wmcolor-chart-popover-link-text: var(--wmcolor-interactive);
|
|
867
|
-
--wmcolor-chart-popover-background: var(--wmcolor-background);
|
|
868
|
-
}
|
|
869
863
|
priv-chart-popover.user-is-keying .button-text {
|
|
870
864
|
outline: 3px solid var(--wmcolor-interactive-focus);
|
|
871
865
|
outline-offset: 2px;
|
|
@@ -893,10 +887,10 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
893
887
|
-webkit-box-shadow: 0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);
|
|
894
888
|
-moz-box-shadow: 0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);
|
|
895
889
|
box-shadow: 0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);
|
|
896
|
-
background-color: var(--wmcolor-
|
|
890
|
+
background-color: var(--wmcolor-background);
|
|
897
891
|
font-size: 0.875rem;
|
|
898
|
-
text-align:
|
|
899
|
-
|
|
892
|
+
text-align: start;
|
|
893
|
+
inline-size: 10.5rem;
|
|
900
894
|
padding: 0.625rem 0.9375rem;
|
|
901
895
|
box-sizing: border-box;
|
|
902
896
|
}
|
|
@@ -904,9 +898,9 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
904
898
|
font-size: 1em;
|
|
905
899
|
font-weight: 500;
|
|
906
900
|
margin: 0;
|
|
907
|
-
padding-
|
|
908
|
-
padding-
|
|
909
|
-
padding-
|
|
901
|
+
padding-block-start: 0;
|
|
902
|
+
padding-inline-start: 0;
|
|
903
|
+
padding-block-end: 0.25rem;
|
|
910
904
|
}
|
|
911
905
|
.popover .title.positive {
|
|
912
906
|
color: var(--wmcolor-chart-label-text-positive);
|
|
@@ -916,7 +910,7 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
916
910
|
}
|
|
917
911
|
.popover .text {
|
|
918
912
|
margin: 0;
|
|
919
|
-
margin-
|
|
913
|
+
margin-block-end: 0.5rem;
|
|
920
914
|
}
|
|
921
915
|
.popover .popover-button {
|
|
922
916
|
-webkit-box-shadow: none;
|
|
@@ -924,12 +918,12 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
924
918
|
box-shadow: none;
|
|
925
919
|
position: relative;
|
|
926
920
|
display: inline-block;
|
|
927
|
-
margin-
|
|
928
|
-
padding-
|
|
929
|
-
padding-
|
|
930
|
-
|
|
921
|
+
margin-inline-start: 1rem;
|
|
922
|
+
padding-inline-start: 0;
|
|
923
|
+
padding-inline-end: 0;
|
|
924
|
+
block-size: auto;
|
|
931
925
|
border: none;
|
|
932
|
-
background: var(--wmcolor-
|
|
926
|
+
background: var(--wmcolor-background-transparent);
|
|
933
927
|
cursor: pointer;
|
|
934
928
|
text-decoration: none;
|
|
935
929
|
letter-spacing: 0;
|
|
@@ -937,7 +931,7 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
937
931
|
text-align: initial;
|
|
938
932
|
font-size: 0.875rem;
|
|
939
933
|
font-weight: 700;
|
|
940
|
-
color: var(--wmcolor-
|
|
934
|
+
color: var(--wmcolor-interactive);
|
|
941
935
|
line-height: normal;
|
|
942
936
|
}
|
|
943
937
|
.popover .popover-button .button-text {
|
|
@@ -945,8 +939,13 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
945
939
|
}
|
|
946
940
|
.popover .popover-button .btn-icon {
|
|
947
941
|
position: absolute;
|
|
948
|
-
|
|
949
|
-
|
|
942
|
+
inset-block-start: 0.1875rem;
|
|
943
|
+
inset-inline-start: -1rem;
|
|
944
|
+
}
|
|
945
|
+
.popover .popover-button span {
|
|
946
|
+
text-decoration: underline;
|
|
947
|
+
text-decoration-thickness: 0.0714285714em;
|
|
948
|
+
text-underline-offset: 0.1428571429em;
|
|
950
949
|
}
|
|
951
950
|
.popover .popover-button:focus {
|
|
952
951
|
outline: none;
|
|
@@ -959,5 +958,6 @@ priv-chart-popover.user-is-keying .button-text {
|
|
|
959
958
|
text-decoration: none;
|
|
960
959
|
}
|
|
961
960
|
.popover .popover-button:hover span {
|
|
962
|
-
text-
|
|
961
|
+
color: var(--wmcolor-link-text-hover);
|
|
962
|
+
text-decoration-thickness: 0.1428571429em;
|
|
963
963
|
}
|
|
@@ -57,7 +57,7 @@ export class ChartPopover {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
handleOpenChange() {
|
|
60
|
-
this.
|
|
60
|
+
this.intChartPopoverToggled.emit(this.open);
|
|
61
61
|
if (this.open) {
|
|
62
62
|
this.popoverEl.showPopover();
|
|
63
63
|
}
|
|
@@ -106,9 +106,9 @@ export class ChartPopover {
|
|
|
106
106
|
}
|
|
107
107
|
render() {
|
|
108
108
|
const titleAffordance = this.header && (this.header[0] === "-" ? "negative" : this.header[0] === "+" ? "positive" : "");
|
|
109
|
-
return (h(Host, { key: '
|
|
109
|
+
return (h(Host, { key: '264fac65cf26beb4e5f0d1e498b8c27446f34e06', class: this.isKeying ? "user-is-keying" : "" }, h("div", { key: '622125c6ec386e2830b46df0b24438e741813e47', ref: (el) => (this.popoverEl = el), popover: "manual", "aria-hidden": "true", class: "popover" }, h("h1", { key: '246546c176f65f4039e8d339473aa766381084d4', class: `title ${titleAffordance}` }, this.header), h("p", { key: '15ed78fcc033bbfb0d82a8579fa080c61b9430ce', class: "text" }, this.text), this.buttonText ? (h("button", { tabindex: "-1",
|
|
110
110
|
// @ts-ignore
|
|
111
|
-
focusable: "false", class: "popover-button", onClick: () => this.handleButtonClick() }, h("svg", { class: "btn-icon", height: "9", width: "9" }, h("path", { fill: "#575195", d: "M0 3.38v2.25h9V3.38H0zM0 0v2.25h4.5V0H0zm6.19 6.75H0V9h6.19V6.75z" })), h("span", { class: "button-text" }, this.buttonText))) : ("")), h("div", { key: '
|
|
111
|
+
focusable: "false", class: "popover-button", onClick: () => this.handleButtonClick() }, h("svg", { class: "btn-icon", height: "9", width: "9" }, h("path", { fill: "#575195", d: "M0 3.38v2.25h9V3.38H0zM0 0v2.25h4.5V0H0zm6.19 6.75H0V9h6.19V6.75z" })), h("span", { class: "button-text" }, this.buttonText))) : ("")), h("div", { key: 'dfaceb8543ecaa9d90697c4b1c34991cc0d3d2c9', ref: (el) => (this.liveRegionEl = el), class: "live-region sr-only", "aria-live": "polite", "aria-atomic": "true" }, this.announcement)));
|
|
112
112
|
}
|
|
113
113
|
static get is() { return "priv-chart-popover"; }
|
|
114
114
|
static get originalStyleUrls() {
|
|
@@ -263,8 +263,8 @@ export class ChartPopover {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
}, {
|
|
266
|
-
"method": "
|
|
267
|
-
"name": "
|
|
266
|
+
"method": "intChartPopoverToggled",
|
|
267
|
+
"name": "intChartPopoverToggled",
|
|
268
268
|
"bubbles": true,
|
|
269
269
|
"cancelable": true,
|
|
270
270
|
"composed": true,
|
|
@@ -903,6 +903,7 @@
|
|
|
903
903
|
display: flex;
|
|
904
904
|
flex-direction: column;
|
|
905
905
|
gap: 0.25rem;
|
|
906
|
+
margin-bottom: 1.5rem;
|
|
906
907
|
}
|
|
907
908
|
.label .label-text {
|
|
908
909
|
display: block;
|
|
@@ -917,12 +918,6 @@
|
|
|
917
918
|
width: 100%;
|
|
918
919
|
color: var(--wmcolor-chart-subinfo-text);
|
|
919
920
|
}
|
|
920
|
-
.label.--top {
|
|
921
|
-
margin-bottom: 1.5rem;
|
|
922
|
-
}
|
|
923
|
-
.label.--none {
|
|
924
|
-
display: none;
|
|
925
|
-
}
|
|
926
921
|
|
|
927
922
|
.chart-left-side {
|
|
928
923
|
grid-column: 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import {
|
|
3
|
-
import { formatDisplayValue, suffixNumber, renderInstructionsText, findLargestNiceInterval, getMaxTicks, } from "../chartFunctions";
|
|
2
|
+
import { chartPalettes, } from "../../../global/interfaces";
|
|
3
|
+
import { formatDisplayValue, suffixNumber, renderInstructionsText, findLargestNiceInterval, getMaxTicks, findNiceRoundNumber, } from "../chartFunctions";
|
|
4
4
|
import { chartMessages } from "../../../global/intl";
|
|
5
5
|
import { isElOrChild } from "../../../global/functions";
|
|
6
6
|
export class ChartBar {
|
|
@@ -21,10 +21,10 @@ export class ChartBar {
|
|
|
21
21
|
var _a, _b, _c, _d;
|
|
22
22
|
let palette = ["wmcolor-dataviz-discrete-01"]; // default to single color
|
|
23
23
|
if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.colors) === "semantic") {
|
|
24
|
-
palette =
|
|
24
|
+
palette = chartPalettes.semantic;
|
|
25
25
|
}
|
|
26
26
|
else if (((_b = this.config) === null || _b === void 0 ? void 0 : _b.colors) == "discrete") {
|
|
27
|
-
palette =
|
|
27
|
+
palette = chartPalettes.discrete;
|
|
28
28
|
}
|
|
29
29
|
else if ((_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.colors) === null || _d === void 0 ? void 0 : _d.startsWith("wmcolor-")) {
|
|
30
30
|
palette = [this.config.colors];
|
|
@@ -43,6 +43,10 @@ export class ChartBar {
|
|
|
43
43
|
var _a;
|
|
44
44
|
return this.subinfo || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.subinfo) || "";
|
|
45
45
|
}
|
|
46
|
+
get gridVisible() {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
return !!this.gridInfo && ((_a = this.config) === null || _a === void 0 ? void 0 : _a.gridMax) != undefined && ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showGrid) !== null && _c !== void 0 ? _c : true);
|
|
49
|
+
}
|
|
46
50
|
// #endregion getters
|
|
47
51
|
////////////////////////////////////////////////////////////
|
|
48
52
|
// #region Component lifecycle
|
|
@@ -63,10 +67,16 @@ export class ChartBar {
|
|
|
63
67
|
if (this.config && this.data) {
|
|
64
68
|
const itemTotal = this.data.reduce((acc, item) => acc + item.amount, 0);
|
|
65
69
|
const largest = Math.max(...this.data.map((item) => item.amount));
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
if (this.config.gridMax == "auto") {
|
|
71
|
+
this.gridMax = findNiceRoundNumber(largest);
|
|
72
|
+
}
|
|
73
|
+
else if (!!this.config.gridMax) {
|
|
74
|
+
this.gridMax = this.config.gridMax;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// fallback to 1 and chart should not render
|
|
78
|
+
this.gridMax = 1;
|
|
79
|
+
}
|
|
70
80
|
const processedItems = this.processItems(itemTotal);
|
|
71
81
|
if (this.sort === "ascending") {
|
|
72
82
|
processedItems.sort((a, b) => a.amount - b.amount);
|
|
@@ -80,6 +90,9 @@ export class ChartBar {
|
|
|
80
90
|
}
|
|
81
91
|
processItems(itemTotal) {
|
|
82
92
|
var _a, _b;
|
|
93
|
+
if (!this.data) {
|
|
94
|
+
return [];
|
|
95
|
+
}
|
|
83
96
|
const valueFormat = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.valueFormat) || "amount"; // default to amount
|
|
84
97
|
const printModeFormat = ((_b = this.config) === null || _b === void 0 ? void 0 : _b.printModeFormat) || "amount"; // default to amount
|
|
85
98
|
const defaultColor = "wmcolor-dataviz-discrete-01";
|
|
@@ -170,21 +183,15 @@ export class ChartBar {
|
|
|
170
183
|
this.highlightBar(idx);
|
|
171
184
|
}
|
|
172
185
|
}
|
|
173
|
-
|
|
186
|
+
handleLegendItemClick(ev) {
|
|
174
187
|
if (ev.target.nodeName === "WM-CHART-LEGEND") {
|
|
175
|
-
//
|
|
188
|
+
// If event from an internal legend bubbles up to the chart, ignore it
|
|
176
189
|
const legendEl = ev.target;
|
|
177
190
|
if (legendEl.chartIds.includes(this.el.id)) {
|
|
178
191
|
this.highlightBar(ev.detail.idx);
|
|
179
192
|
}
|
|
180
193
|
}
|
|
181
194
|
}
|
|
182
|
-
handleInternalLegendItemClick(ev) {
|
|
183
|
-
const legendEl = ev.target;
|
|
184
|
-
if (legendEl.chartIds.includes(this.el.id)) {
|
|
185
|
-
this.highlightBar(ev.detail.idx);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
195
|
handleDocumentClick(_ev) {
|
|
189
196
|
// Clear highlights when highlight is set from an external legend (not opening a popover)
|
|
190
197
|
if (!this.popoverEl.open) {
|
|
@@ -219,7 +226,7 @@ export class ChartBar {
|
|
|
219
226
|
y: barToFocus.getBoundingClientRect().top + cornerOffset,
|
|
220
227
|
});
|
|
221
228
|
}
|
|
222
|
-
|
|
229
|
+
handlePopoverToggled(_ev) {
|
|
223
230
|
setTimeout(() => {
|
|
224
231
|
// allow time for the popover to reopen if the click that closed it was on a bar, to prevent flash
|
|
225
232
|
if (this.popoverEl.open) {
|
|
@@ -231,6 +238,9 @@ export class ChartBar {
|
|
|
231
238
|
}, 30);
|
|
232
239
|
}
|
|
233
240
|
openPopover(clickedProcessedData, coords) {
|
|
241
|
+
if (!this.data || !this.config) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
234
244
|
let matchingChartData = this.data.find((item) => item.barLegend === clickedProcessedData.barLegend);
|
|
235
245
|
if (matchingChartData) {
|
|
236
246
|
this.popoverEl.chartData = matchingChartData;
|
|
@@ -262,7 +272,6 @@ export class ChartBar {
|
|
|
262
272
|
clearFocus() {
|
|
263
273
|
if (this.popoverEl.open) {
|
|
264
274
|
this.popoverEl.open = false;
|
|
265
|
-
console.log("popover closed from clearFocus: ", this.popoverEl.open);
|
|
266
275
|
}
|
|
267
276
|
this.clearHighlights();
|
|
268
277
|
}
|
|
@@ -274,6 +283,9 @@ export class ChartBar {
|
|
|
274
283
|
return this.processedData.map((item) => (h("div", { key: `legend-${item.barLegend}`, class: "bar-legend" }, item.barLegend)));
|
|
275
284
|
}
|
|
276
285
|
renderBars() {
|
|
286
|
+
if (!this.gridInfo || !this.processedData) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
277
289
|
// Use effective grid max (numTicks * interval) for accurate bar sizing
|
|
278
290
|
const effectiveGridMax = this.gridInfo.numTicks * this.gridInfo.interval;
|
|
279
291
|
return this.processedData.map((item, idx) => {
|
|
@@ -287,17 +299,19 @@ export class ChartBar {
|
|
|
287
299
|
_a.tickLabels.map((label) => (h("div", { class: "tick", key: label }, h("span", null, label))))));
|
|
288
300
|
}
|
|
289
301
|
renderGrid() {
|
|
290
|
-
|
|
302
|
+
var _a;
|
|
303
|
+
const backgroundSize = (_a = this.gridInfo) === null || _a === void 0 ? void 0 : _a.backgroundSize;
|
|
304
|
+
return h("div", { class: "grid-lines", style: { "--background-size": backgroundSize } });
|
|
291
305
|
}
|
|
292
306
|
renderLegend(orientation) {
|
|
293
307
|
var _a, _b, _c;
|
|
294
|
-
return (h("div", { class: `legend --${orientation} --${this.showLegend}` }, h("wm-chart-legend", { orientation: orientation, chartIds: this.el.id, processedData: this.processedData, printMode: (_c = (_a = this.printMode) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.printMode) !== null && _c !== void 0 ? _c : false, onWmLegendItemClick: (ev) => this.
|
|
308
|
+
return (h("div", { class: `legend --${orientation} --${this.showLegend}` }, h("wm-chart-legend", { orientation: orientation, chartIds: this.el.id, processedData: this.processedData, printMode: (_c = (_a = this.printMode) !== null && _a !== void 0 ? _a : (_b = this.config) === null || _b === void 0 ? void 0 : _b.printMode) !== null && _c !== void 0 ? _c : false, onWmLegendItemClick: (ev) => this.handleLegendItemClick(ev) })));
|
|
295
309
|
}
|
|
296
310
|
// #endregion rendering
|
|
297
311
|
render() {
|
|
298
312
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
299
313
|
const rowCount = this.processedData.length || 1;
|
|
300
|
-
return (h(Host, { key: '
|
|
314
|
+
return (h(Host, { key: '778b8642fd4cef3d90949740fce75151aaf44654' }, h("div", { key: 'dbcf9dfb3a3923e4e8fed64cb7f65d09d04192f1', class: "component-wrapper", tabindex: "0", role: "application", onKeyDown: (ev) => this.handleChartKeyDown(ev), onBlur: (ev) => this.handleComponentBlur(ev), "aria-roledescription": chartMessages.interactiveChart, "aria-describedby": "chart-instructions", "aria-label": (_a = this.config) === null || _a === void 0 ? void 0 : _a.label }, h("div", { key: '011f7671bbf2346282582cbcafb5b6e2fc1b2c68', class: "popover-wrapper" }, h("priv-chart-popover", { key: '37073f1f5b48dd11563d614ccd4a39fd0d875926', ref: (el) => (this.popoverEl = el), onIntChartPopoverToggled: (ev) => this.handlePopoverToggled(ev) })), ((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.showLabel) !== null && _c !== void 0 ? _c : true) && (h("label", { key: '59ce163b9551a0889a1ab69e00a8ae66f7d153de', id: "label", class: "label" }, h("span", { key: 'f9d24cee45469b072953e6e237ccbe2c740678c4', class: "label-text" }, (_d = this.config) === null || _d === void 0 ? void 0 : _d.label), this.subinfoText ? h("span", { class: "subinfo" }, this.subinfoText) : "")), this.showLegend === "top" && this.renderLegend("horizontal"), h("div", { key: '3f20081198b084e9336cfcca7ca206292446c2d2', class: "chart-wrapper" }, h("div", { key: '71c59296c0af14515241d781e44ff512bfa89cc2', class: "chart-left-side" }, this.showLegend === "left" && this.renderLegend("vertical"), h("div", { key: '11f895eda739c0af71f2f889595dfc35ea96e771', class: "category-axis-label" }, h("span", { key: '79043541f3efbc80ae165ad739af82ed89c51790', class: "axis-label-text" }, (_e = this.config) === null || _e === void 0 ? void 0 : _e.categoryAxisLabel))), h("div", { key: '0e88bfb0103df986f53dd3974adcf8932145a8d8', class: "chart-center" }, h("div", { key: 'eab8dfc1ae2fabb1caa95f4e91e8d901396a44dd', class: "chart-area", style: { "--row-count": rowCount.toString() } }, this.processedData && this.renderBarLegends(), h("div", { key: 'ae7fa3dd860b987af14ee1ffd2a48bb521745ec0', class: `bar-area ${this.isKeying ? "user-is-keying" : ""}`, ref: (el) => (this.barAreaEl = el) }, this.gridVisible && this.renderGrid(), ((_f = this.config) === null || _f === void 0 ? void 0 : _f.gridMax) != undefined && this.renderBars())), h("div", { key: '1e20f60338bbde68234a6315cac9fdecbb36c8ef', class: "value-axis-label" }, h("span", { key: 'a96919a4a6e540bffd0f8f40e8b791888944605e', class: "axis-label-text" }, (_g = this.config) === null || _g === void 0 ? void 0 : _g.valueAxisLabel)), this.gridVisible && this.renderXAxis()), h("div", { key: 'e9f6910f160952676ddf30f90c824277752d20d9', class: "chart-right-side" }, this.showLegend === "right" && this.renderLegend("vertical"))), this.showLegend === "bottom" && this.renderLegend("horizontal"), renderInstructionsText())));
|
|
301
315
|
}
|
|
302
316
|
static get is() { return "wm-chart-bar"; }
|
|
303
317
|
static get encapsulation() { return "shadow"; }
|
|
@@ -318,7 +332,7 @@ export class ChartBar {
|
|
|
318
332
|
"mutable": false,
|
|
319
333
|
"complexType": {
|
|
320
334
|
"original": "ChartConfig",
|
|
321
|
-
"resolved": "undefined | { label: string;
|
|
335
|
+
"resolved": "undefined | { label: string; showLabel: boolean; valueAxisLabel: string; categoryAxisLabel: string; printMode: boolean; printModeFormat: \"amount\" | \"percentage\"; gridMax: number | \"auto\"; sort?: \"ascending\" | \"descending\" | \"none\" | undefined; showLegend?: \"top\" | \"bottom\" | \"left\" | \"right\" | \"none\" | undefined; showGrid?: boolean | undefined; subinfo?: string | undefined; completionMessage?: string | undefined; valueFormat?: \"amount\" | \"percentage\" | \"none\" | undefined; colors?: string | undefined; popoverTitle?: string | undefined; popoverText?: string | undefined; popoverButtonText?: string | undefined; }",
|
|
322
336
|
"references": {
|
|
323
337
|
"ChartConfig": {
|
|
324
338
|
"location": "import",
|
|
@@ -432,7 +446,7 @@ export class ChartBar {
|
|
|
432
446
|
static get listeners() {
|
|
433
447
|
return [{
|
|
434
448
|
"name": "wmLegendItemClick",
|
|
435
|
-
"method": "
|
|
449
|
+
"method": "handleLegendItemClick",
|
|
436
450
|
"target": "document",
|
|
437
451
|
"capture": false,
|
|
438
452
|
"passive": false
|
|
@@ -448,24 +462,12 @@ export class ChartBar {
|
|
|
448
462
|
"target": "window",
|
|
449
463
|
"capture": false,
|
|
450
464
|
"passive": false
|
|
451
|
-
}, {
|
|
452
|
-
"name": "wmUserIsTabbing",
|
|
453
|
-
"method": "handleUserIsKeying",
|
|
454
|
-
"target": "window",
|
|
455
|
-
"capture": false,
|
|
456
|
-
"passive": false
|
|
457
465
|
}, {
|
|
458
466
|
"name": "wmUserIsNotKeying",
|
|
459
467
|
"method": "handleUserIsNotKeying",
|
|
460
468
|
"target": "window",
|
|
461
469
|
"capture": false,
|
|
462
470
|
"passive": false
|
|
463
|
-
}, {
|
|
464
|
-
"name": "wmUserIsNotTabbing",
|
|
465
|
-
"method": "handleUserIsNotKeying",
|
|
466
|
-
"target": "window",
|
|
467
|
-
"capture": false,
|
|
468
|
-
"passive": false
|
|
469
471
|
}];
|
|
470
472
|
}
|
|
471
473
|
}
|
|
@@ -7,11 +7,8 @@ export class Select {
|
|
|
7
7
|
this.scrollableParents = [];
|
|
8
8
|
this.returnFocus = false;
|
|
9
9
|
this.hasAnchor = CSS.supports("top", "anchor(bottom)"); // for FF polyfill
|
|
10
|
-
//////////////////////////////////////
|
|
11
|
-
// for multiselect button text
|
|
12
|
-
this.overflowCount = 0;
|
|
13
10
|
this.displayedOptions = [];
|
|
14
|
-
this.
|
|
11
|
+
this.oldDisplayText = "";
|
|
15
12
|
this.debouncedReposition = debounce(() => {
|
|
16
13
|
this.dropdownPosition();
|
|
17
14
|
}, 100);
|
|
@@ -39,6 +36,9 @@ export class Select {
|
|
|
39
36
|
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
40
37
|
return toBool(this.disabled);
|
|
41
38
|
}
|
|
39
|
+
get displayText() {
|
|
40
|
+
return this.displayedOptions.map((x) => x.textContent).join(", ");
|
|
41
|
+
}
|
|
42
42
|
get selectedOptions() {
|
|
43
43
|
return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
|
|
44
44
|
}
|
|
@@ -274,22 +274,27 @@ export class Select {
|
|
|
274
274
|
this.announcement = message;
|
|
275
275
|
}
|
|
276
276
|
handleOverflow() {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
this.overflowCount
|
|
290
|
-
this.
|
|
291
|
-
|
|
292
|
-
optionsTotalWidth
|
|
277
|
+
if (!this.buttonEl) {
|
|
278
|
+
forceUpdate(this.el);
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
// handle overflow + counter for multiselect
|
|
282
|
+
// this is a fixed measurement accounting for the max width of a 3 character overflow counter
|
|
283
|
+
const overflowCounterWidth = 38;
|
|
284
|
+
const computedStyle = window.getComputedStyle(this.buttonEl);
|
|
285
|
+
// there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
|
|
286
|
+
const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
|
|
287
|
+
const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
|
|
288
|
+
const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
|
|
289
|
+
this.overflowCount = 0;
|
|
290
|
+
this.measurementAreaEl.textContent = this.displayText;
|
|
291
|
+
let optionsTotalWidth = this.measurementAreaEl.clientWidth;
|
|
292
|
+
while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
|
|
293
|
+
this.overflowCount++;
|
|
294
|
+
this.displayedOptions.pop();
|
|
295
|
+
this.measurementAreaEl.textContent = this.displayText;
|
|
296
|
+
optionsTotalWidth = this.measurementAreaEl.clientWidth;
|
|
297
|
+
}
|
|
293
298
|
}
|
|
294
299
|
}
|
|
295
300
|
setButtonText() {
|
|
@@ -299,28 +304,34 @@ export class Select {
|
|
|
299
304
|
}
|
|
300
305
|
else {
|
|
301
306
|
this.displayedOptions = this.childOptions.filter((x) => x.selected);
|
|
302
|
-
const hasChanged = this.
|
|
307
|
+
const hasChanged = this.displayText !== this.oldDisplayText;
|
|
303
308
|
const noDisplayedOptions = this.displayedOptions.length < 1;
|
|
304
309
|
if (noDisplayedOptions) {
|
|
310
|
+
this.overflowCount = 0;
|
|
305
311
|
return this.placeholder;
|
|
306
312
|
}
|
|
307
|
-
else if (!this.buttonEl) {
|
|
308
|
-
forceUpdate(this.el);
|
|
309
|
-
return "";
|
|
310
|
-
}
|
|
311
313
|
else if (hasChanged) {
|
|
312
314
|
this.handleOverflow();
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
if (this.allSelected) {
|
|
316
|
+
// we want all selected message only if there's an overflow.
|
|
317
|
+
if (!this.overflowCount) {
|
|
318
|
+
// but on first render we don't know: handleOverflow can't calculate measurements
|
|
319
|
+
// in that case, display all selected message even if there's a chance options could have been shown
|
|
320
|
+
this.buttonText = this.allSelectedMessage;
|
|
321
|
+
}
|
|
322
|
+
else if (this.overflowCount > 0)
|
|
323
|
+
// if calc could be made and there is an overflow, reset it as it shouldn't be shown
|
|
324
|
+
this.overflowCount = 0;
|
|
325
|
+
// then display all selected message
|
|
317
326
|
this.buttonText = this.allSelectedMessage;
|
|
318
327
|
}
|
|
319
328
|
else {
|
|
320
|
-
|
|
329
|
+
// otherwise, if handleOverflow was able to calculate, it set the count and the display text
|
|
330
|
+
// if it wasn't able to calculate, the text of all the selected options will be displayed and may truncate (acceptable as fallback)
|
|
331
|
+
this.buttonText = this.displayText;
|
|
321
332
|
}
|
|
322
333
|
}
|
|
323
|
-
this.
|
|
334
|
+
this.oldDisplayText = this.displayText;
|
|
324
335
|
// the reason for setting a global variable and returning it
|
|
325
336
|
// is that we need the stored value when displayedOptions haven't changed.
|
|
326
337
|
return this.buttonText; // multiselect value
|
|
@@ -333,14 +344,14 @@ export class Select {
|
|
|
333
344
|
}
|
|
334
345
|
render() {
|
|
335
346
|
const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
|
|
336
|
-
return (h(Host, { key: '
|
|
347
|
+
return (h(Host, { key: 'b9e427db71b61d4731a3c8c31826358efb2e71c9', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '6a8ad960dfcf56ba23736c5dc7306517a0f4cc61', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: 'a1829bc5949a9e75629bb645ab63331af4ae71f1', class: "label-wrapper" }, h("label", { key: '329944256ca0c0a76881b03192579849106fc0b8', class: "label", id: "label", htmlFor: "selectbtn", onMouseEnter: (ev) => this.handleLabelMouseEnter(ev), onMouseLeave: () => hideTooltip() }, this.label),
|
|
337
348
|
// we can't use aria-required because the listbox is in a sub-component and it is not announced
|
|
338
|
-
this.requiredField && (h("span", { key: '
|
|
349
|
+
this.requiredField && (h("span", { key: '5a7d128c99b2eb064c038aecca4097304775b94c', class: "required" }, h("span", { key: 'fea081b4029d61add6f8a1a6743e30eb64329f89', class: "sr-only" }, globalMessages.requiredField), h("span", { key: 'a8f8fd3695883555ccfdf1d63a56aa0b54472ac7', "aria-hidden": "true" }, "*")))), h("div", { key: 'd8c783d92db1f7599ad431ff14069d26f335efee', class: "button-wrapper" }, h("button", { key: '56a36ae5267f5323a595f411d9a4a7257e04ede1', id: "selectbtn", disabled: this.isDisabled, "aria-labelledby": "label selectbtn", "aria-describedby": "error", popoverTarget: "dropdown", popoverTargetAction: "toggle", class: "displayedoption", ref: (el) => (this.buttonEl = el) }, h("span", { key: 'f026cf1c1f331ef84253a55df3308e518e8c38ed', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'c48385d25e0ac06b1faa8b5760949c4e3872a6c1', class: "button-text" }, this.setButtonText()), showSubinfo && h("span", { key: 'd47f6e6ccb3dfda11fdfd74c3880038a3582f593', class: "subinfo" }, this.selectedOptions[0].subinfo)), h("div", { key: 'ec2f38fce7005421341b176bbb9a07a2f4f930f2', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: '76e51beef029574af384673324937b78631baac0', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '5ada44373bccb9ff83b8d33d5454f197fdbcece2',
|
|
339
350
|
// is-open is for the CSS transition in modern browsers
|
|
340
351
|
// hidden is to wait for position calculations in Firefox
|
|
341
352
|
class: `dropdown ${this.isExpanded ? "is-open" : ""} ${this.isHidden ? "hidden" : ""} ${this.openUp ? "upward" : ""}`, id: "dropdown", popover: "auto", ref: (el) => (this.dropdownEl = el),
|
|
342
353
|
// @ts-ignore -- don't tell typescript but we're in the future
|
|
343
|
-
onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '
|
|
354
|
+
onToggle: (ev) => this.handleToggle(ev) }, h("priv-option-list", { key: '85262c7c088219e1bb7e50953c4fd058d8750a12', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, maxHeight: this.maxHeight, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => {
|
|
344
355
|
this.dropdownEl.hidePopover();
|
|
345
356
|
}, onOptionListAllSelected: () => {
|
|
346
357
|
this.returnFocus = true;
|
|
@@ -348,7 +359,7 @@ export class Select {
|
|
|
348
359
|
}, onOptionListAllDeselected: () => {
|
|
349
360
|
this.returnFocus = true;
|
|
350
361
|
this.wmSelectAllDeselected.emit();
|
|
351
|
-
} }, h("slot", { key: '
|
|
362
|
+
} }, h("slot", { key: '66b4a65b4477b82cb8e0073cc49842e4d2a9e724' }))), h("div", { key: 'a3e19f185805e5ce1818fbc101e8e41ebeda3b8d', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: 'e524c3fdfc16d96750e7ddfa84207fb92803b648', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
|
|
352
363
|
}
|
|
353
364
|
static get is() { return "wm-select"; }
|
|
354
365
|
static get encapsulation() { return "shadow"; }
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
:host .wm-button.nowrap {
|
|
162
162
|
display: inline-block;
|
|
163
163
|
width: 100%;
|
|
164
|
-
overflow: hidden;
|
|
164
|
+
overflow-x: hidden;
|
|
165
165
|
white-space: nowrap;
|
|
166
166
|
text-overflow: ellipsis;
|
|
167
167
|
}
|
|
@@ -233,7 +233,10 @@
|
|
|
233
233
|
border-color: transparent;
|
|
234
234
|
}
|
|
235
235
|
:host .wm-button.-textonly {
|
|
236
|
-
color: var(--wmcolor-
|
|
236
|
+
color: var(--wmcolor-link-text);
|
|
237
|
+
text-decoration: underline;
|
|
238
|
+
text-decoration-thickness: 0.0714285714em;
|
|
239
|
+
text-underline-offset: 0.1428571429em;
|
|
237
240
|
box-shadow: none;
|
|
238
241
|
display: inline-block;
|
|
239
242
|
letter-spacing: 0;
|
|
@@ -245,31 +248,27 @@
|
|
|
245
248
|
padding: 0;
|
|
246
249
|
height: auto;
|
|
247
250
|
min-height: unset;
|
|
248
|
-
line-height: 1;
|
|
249
251
|
overflow-wrap: anywhere;
|
|
250
252
|
border-radius: 2px;
|
|
251
253
|
}
|
|
252
254
|
:host .wm-button.-textonly.small {
|
|
253
255
|
font-size: 0.625rem;
|
|
254
256
|
}
|
|
255
|
-
:host .wm-button.-textonly:hover:not(:disabled):not(.disabled)
|
|
256
|
-
text-decoration:
|
|
257
|
+
:host .wm-button.-textonly:hover:not(:disabled):not(.disabled) {
|
|
258
|
+
text-decoration-thickness: 0.1428571429em;
|
|
257
259
|
}
|
|
258
|
-
:host .wm-button.-textonly.
|
|
259
|
-
color: var(--wmcolor-
|
|
260
|
+
:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete):not(.ai) {
|
|
261
|
+
color: var(--wmcolor-link-text-hover);
|
|
260
262
|
}
|
|
261
|
-
:host .wm-button.-textonly.dark:
|
|
262
|
-
text-
|
|
263
|
+
:host .wm-button.-textonly.dark:not(:disabled):not(.disabled):not(.-permanentlydelete):not(.ai) {
|
|
264
|
+
color: var(--wmcolor-link-text-ondark);
|
|
265
|
+
}
|
|
266
|
+
:host .wm-button.-textonly.dark:not(:disabled):not(.disabled):not(.-permanentlydelete):not(.ai):hover {
|
|
267
|
+
color: var(--wmcolor-link-text-hover-ondark);
|
|
263
268
|
}
|
|
264
269
|
:host .wm-button.-textonly.-permanentlydelete {
|
|
265
270
|
color: var(--wmcolor-button-background-delete);
|
|
266
271
|
}
|
|
267
|
-
:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark) {
|
|
268
|
-
text-decoration: underline;
|
|
269
|
-
}
|
|
270
|
-
:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled) {
|
|
271
|
-
color: var(--wmcolor-button-text-textonly-ondark);
|
|
272
|
-
}
|
|
273
272
|
:host .wm-button.-icononly, :host .wm-button.-navigational {
|
|
274
273
|
-webkit-border-radius: 50%;
|
|
275
274
|
-moz-border-radius: 50%;
|
|
@@ -31,10 +31,8 @@ export class Modal {
|
|
|
31
31
|
return customElementToFocus;
|
|
32
32
|
}
|
|
33
33
|
get hasBrowserPopoverSupport() {
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
//@ts-ignore
|
|
37
|
-
return tooltipEl ? !!tooltipEl.showPopover : false;
|
|
34
|
+
// For browsers without popover support, render a fallback tooltip inside the dialog so it appears above it
|
|
35
|
+
return typeof HTMLElement.prototype.showPopover === 'function';
|
|
38
36
|
}
|
|
39
37
|
toggleModal() {
|
|
40
38
|
this.open ? this.showModal() : this.hideModal();
|
|
@@ -116,11 +114,11 @@ export class Modal {
|
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
render() {
|
|
119
|
-
return (h("dialog", { key: '
|
|
117
|
+
return (h("dialog", { key: '633554a1b1e5df10d410e1c31e2f960642718e57', class: `${"wm-" + this.modalType}`, "aria-labelledby": `wm-modal-heading-text-${this.uid}`, ref: (el) => (this.dialogEl = el), onKeyDown: (ev) => this.handleKeyDown(ev) }, h("div", { key: '3d6d3bbce8760bfb1e642771f534b1d603f6a74b', class: "tabtrap sr-only", tabindex: "0", onFocus: (ev) => {
|
|
120
118
|
const focusedFromCloseButton = ev.relatedTarget && ev.relatedTarget == this.closeButtonEl;
|
|
121
119
|
// no related target means we're coming from outside the page (browser chrome), and first element should be focused instead
|
|
122
120
|
focusedFromCloseButton ? this.focusLastElement.emit() : this.focusFirstElement.emit();
|
|
123
|
-
} }), !this.hasBrowserPopoverSupport && h("div", { key: '
|
|
121
|
+
} }), !this.hasBrowserPopoverSupport && h("div", { key: '7c660029e60f4b8df004dd3b830025f047710ccc', class: "wm-tooltip" }), h("slot", { key: '7779d237802e80dd2c7f84516bd1327438813ce2' }), h("div", { key: 'eb2fa33d5fdae1b8c41102380471c593b10e1826', class: "tabtrap sr-only", tabindex: "0", onFocus: () => {
|
|
124
122
|
this.focusFirstElement.emit();
|
|
125
123
|
} })));
|
|
126
124
|
}
|