@watermarkinsights/ripple 3.14.1 → 3.15.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-0ea0888f.js → chartFunctions-08494c24.js} +419 -419
- package/dist/cjs/{functions-8d3ceccd.js → functions-e1b590e0.js} +528 -446
- package/dist/cjs/{global-12a09ffa.js → global-0a41410c.js} +62 -62
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-chart-popover.cjs.entry.js +86 -86
- package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
- package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
- package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +329 -335
- package/dist/cjs/wm-button.cjs.entry.js +248 -241
- package/dist/cjs/wm-chart-slice.cjs.entry.js +13 -13
- package/dist/cjs/wm-chart.cjs.entry.js +110 -110
- package/dist/cjs/wm-datepicker.cjs.entry.js +265 -265
- package/dist/cjs/wm-input.cjs.entry.js +134 -134
- package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
- package/dist/cjs/wm-modal-header.cjs.entry.js +36 -36
- package/dist/cjs/wm-modal.cjs.entry.js +163 -163
- package/dist/cjs/wm-navigation_3.cjs.entry.js +227 -227
- package/dist/cjs/wm-navigator.cjs.entry.js +268 -268
- package/dist/cjs/wm-network-uploader.cjs.entry.js +455 -454
- package/dist/cjs/wm-option_2.cjs.entry.js +720 -720
- package/dist/cjs/wm-pagination.cjs.entry.js +167 -167
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +129 -129
- package/dist/cjs/wm-search.cjs.entry.js +232 -232
- package/dist/cjs/wm-snackbar.cjs.entry.js +170 -170
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +296 -296
- package/dist/cjs/wm-tag-input.cjs.entry.js +579 -579
- package/dist/cjs/wm-timepicker.cjs.entry.js +383 -383
- package/dist/cjs/wm-toggletip.cjs.entry.js +124 -124
- package/dist/cjs/wm-uploader.cjs.entry.js +599 -629
- package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
- package/dist/collection/components/charts/wm-chart/wm-chart.js +328 -328
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +195 -195
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +442 -448
- package/dist/collection/components/wm-button/wm-button.js +545 -504
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
- 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 +136 -136
- package/dist/collection/components/wm-modal/wm-modal-header.js +87 -87
- package/dist/collection/components/wm-modal/wm-modal.js +461 -461
- 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 +218 -218
- 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.js +428 -428
- 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.js +1001 -1001
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- 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.js +810 -810
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +788 -787
- package/dist/collection/components/wm-uploader/wm-uploader.js +1043 -1072
- 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 +421 -421
- package/dist/collection/global/functions.js +441 -441
- package/dist/collection/global/global.js +69 -69
- 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 +43 -43
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{chartFunctions-6f90586d.js → chartFunctions-a310b9d0.js} +419 -419
- package/dist/esm/{functions-11c0c4e2.js → functions-b4b62a23.js} +528 -446
- package/dist/esm/{global-5abca73e.js → global-e80a0ec8.js} +62 -62
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +86 -86
- package/dist/esm/priv-datepicker.entry.js +657 -657
- package/dist/esm/priv-navigator-button.entry.js +18 -18
- package/dist/esm/priv-navigator-item.entry.js +23 -23
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +329 -335
- package/dist/esm/wm-button.entry.js +248 -241
- package/dist/esm/wm-chart-slice.entry.js +13 -13
- package/dist/esm/wm-chart.entry.js +110 -110
- package/dist/esm/wm-datepicker.entry.js +265 -265
- package/dist/esm/wm-input.entry.js +134 -134
- package/dist/esm/wm-modal-footer.entry.js +33 -33
- package/dist/esm/wm-modal-header.entry.js +36 -36
- package/dist/esm/wm-modal.entry.js +163 -163
- package/dist/esm/wm-navigation_3.entry.js +227 -227
- package/dist/esm/wm-navigator.entry.js +268 -268
- package/dist/esm/wm-network-uploader.entry.js +455 -454
- package/dist/esm/wm-option_2.entry.js +720 -720
- package/dist/esm/wm-pagination.entry.js +167 -167
- package/dist/esm/wm-progress-indicator_3.entry.js +129 -129
- package/dist/esm/wm-search.entry.js +232 -232
- package/dist/esm/wm-snackbar.entry.js +170 -170
- package/dist/esm/wm-tab-item_3.entry.js +296 -296
- package/dist/esm/wm-tag-input.entry.js +579 -579
- package/dist/esm/wm-timepicker.entry.js +383 -383
- package/dist/esm/wm-toggletip.entry.js +124 -124
- package/dist/esm/wm-uploader.entry.js +599 -629
- package/dist/esm/wm-wrapper.entry.js +12 -12
- package/dist/esm-es5/{chartFunctions-6f90586d.js → chartFunctions-a310b9d0.js} +1 -1
- package/dist/esm-es5/functions-b4b62a23.js +1 -0
- package/dist/esm-es5/global-e80a0ec8.js +1 -0
- package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +0 -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/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.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-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_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-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-07ebdcd4.system.entry.js → p-0f08a806.system.entry.js} +1 -1
- package/dist/ripple/{p-b793bc6f.system.entry.js → p-1ba2134b.system.entry.js} +1 -1
- package/dist/ripple/{p-626d5017.entry.js → p-1c75615f.entry.js} +1 -1
- package/dist/ripple/{p-42dbd978.entry.js → p-1cadcfc1.entry.js} +1 -1
- package/dist/ripple/{p-b2a9b5d6.system.entry.js → p-2531b343.system.entry.js} +1 -1
- package/dist/ripple/p-32da7cdf.entry.js +1 -0
- package/dist/ripple/p-375a850f.system.js +1 -0
- package/dist/ripple/p-3a71d9a3.entry.js +1 -0
- package/dist/ripple/{p-0e22a3a4.entry.js → p-428b8b24.entry.js} +1 -1
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/{p-80a00759.entry.js → p-477688c8.entry.js} +1 -1
- package/dist/ripple/{p-d927de70.system.entry.js → p-4be49461.system.entry.js} +1 -1
- package/dist/ripple/{p-7cb0035a.system.entry.js → p-51b60241.system.entry.js} +1 -1
- package/dist/ripple/p-5754e2b8.system.js +1 -0
- package/dist/ripple/{p-b5b7c71f.system.js → p-591fae61.system.js} +1 -1
- package/dist/ripple/p-5f589556.entry.js +1 -0
- package/dist/ripple/{p-b4837126.system.entry.js → p-617b738b.system.entry.js} +1 -1
- package/dist/ripple/{p-06012eb7.system.entry.js → p-61e2a39a.system.entry.js} +1 -1
- package/dist/ripple/{p-5018f8ae.entry.js → p-65d5f494.entry.js} +1 -1
- package/dist/ripple/{p-4f3f7b2b.entry.js → p-6ac734b7.entry.js} +1 -1
- package/dist/ripple/p-6d7a6954.js +1 -0
- package/dist/ripple/{p-97683ddc.entry.js → p-6ddfada6.entry.js} +1 -1
- package/dist/ripple/{p-57a718f0.system.entry.js → p-719864a5.system.entry.js} +1 -1
- package/dist/ripple/{p-caef11cc.entry.js → p-73a66a6c.entry.js} +1 -1
- package/dist/ripple/{p-c656fcf1.entry.js → p-75346877.entry.js} +1 -1
- package/dist/ripple/{p-dfa80ed1.entry.js → p-7833008a.entry.js} +1 -1
- package/dist/ripple/{p-08fc668c.system.entry.js → p-79542ae3.system.entry.js} +1 -1
- package/dist/ripple/{p-4073ac6a.entry.js → p-79b8e996.entry.js} +1 -1
- package/dist/ripple/{p-8b54c589.system.entry.js → p-7a07096b.system.entry.js} +1 -1
- package/dist/ripple/{p-c4c21c82.system.entry.js → p-93321f18.system.entry.js} +1 -1
- package/dist/ripple/p-96b47a13.js +1 -0
- package/dist/ripple/{p-c49ef079.system.entry.js → p-981788dd.system.entry.js} +1 -1
- package/dist/ripple/p-990db03b.system.entry.js +1 -0
- package/dist/ripple/p-99791f7a.system.js +1 -0
- package/dist/ripple/{p-e012273a.entry.js → p-9ad7db55.entry.js} +1 -1
- package/dist/ripple/{p-910b6dd5.system.entry.js → p-9caf189d.system.entry.js} +1 -1
- package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +0 -0
- package/dist/ripple/{p-ffc34819.system.entry.js → p-9ef524df.system.entry.js} +1 -1
- package/dist/ripple/{p-84d0d2ff.system.entry.js → p-9fd29197.system.entry.js} +1 -1
- package/dist/ripple/{p-f0d3ceb1.system.entry.js → p-a2f8608f.system.entry.js} +1 -1
- package/dist/ripple/{p-dc7e5609.system.entry.js → p-aa35c9dd.system.entry.js} +1 -1
- package/dist/ripple/{p-6ffdab0d.system.entry.js → p-ab7ce269.system.entry.js} +1 -1
- package/dist/ripple/{p-410687ea.entry.js → p-b5a6aebc.entry.js} +1 -1
- package/dist/ripple/{p-4650a83c.system.entry.js → p-b6c197c7.system.entry.js} +1 -1
- package/dist/ripple/{p-9c60325b.entry.js → p-c5a3766f.entry.js} +1 -1
- package/dist/ripple/{p-2af0b657.system.entry.js → p-c95317b4.system.entry.js} +1 -1
- package/dist/ripple/p-ce696630.entry.js +1 -0
- package/dist/ripple/{p-17438cd5.entry.js → p-d3326191.entry.js} +1 -1
- package/dist/ripple/{p-fe4c1194.system.entry.js → p-e47b10b1.system.entry.js} +1 -1
- package/dist/ripple/{p-490dafa4.js → p-eb308bc7.js} +1 -1
- package/dist/ripple/{p-4afa52d4.entry.js → p-f5cec3d1.entry.js} +1 -1
- package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
- package/dist/ripple/{p-8a2cabf2.entry.js → p-f7c2b508.entry.js} +1 -1
- package/dist/ripple/{p-cb357a84.entry.js → p-fcb81a4e.entry.js} +1 -1
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +36 -36
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +27 -27
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +47 -47
- package/dist/types/components/wm-button/wm-button.d.ts +49 -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 +14 -14
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
- 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 +28 -28
- 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 +35 -35
- 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 +94 -94
- 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 +121 -118
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +28 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/chartFunctions.d.ts +29 -29
- 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 -44
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/package.json +47 -47
- package/dist/esm-es5/functions-11c0c4e2.js +0 -1
- package/dist/esm-es5/global-5abca73e.js +0 -1
- package/dist/ripple/p-37b0a23c.system.js +0 -1
- package/dist/ripple/p-3e875e87.system.entry.js +0 -1
- package/dist/ripple/p-42bf2cd4.system.js +0 -1
- package/dist/ripple/p-70d0e993.js +0 -1
- package/dist/ripple/p-80b62707.entry.js +0 -1
- package/dist/ripple/p-d2a11410.entry.js +0 -1
- package/dist/ripple/p-db899686.system.js +0 -1
- package/dist/ripple/p-e2d5f8bd.js +0 -1
- package/dist/ripple/p-e4cb8aad.entry.js +0 -1
- package/dist/ripple/p-fa632547.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-726b9452.system.js","./p-db899686.system.js"],(function(t){"use strict";var e,i,o,a,r,n,s,l,p;return{setters:[function(t){e=t.r;i=t.c;o=t.h;a=t.H;r=t.g},function(t){n=t.g;s=t.i;l=t.d;p=t.l}],execute:function(){var d=':host,wm-tag-input{font-family:inherit;width:100%}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;min-height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .lower-row,wm-tag-input .lower-row{width:100%;border-radius:0 0 3px 3px}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:1.875rem;background-color:#6b6b6b;padding:0.5rem 1rem;color:white;font-size:0.875rem}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option] .remove-btn,wm-tag-input .tag-area [role=option] .remove-btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;border:1px solid #575195;color:#575195;border-radius:50%;padding:0;margin-left:0.5rem;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .remove-btn:hover,wm-tag-input .tag-area [role=option] .remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .remove-btn:before,wm-tag-input .tag-area [role=option] .remove-btn:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var c=t("wm_tag_input",function(){function t(t){var o=this;e(this,t);this.wmTagInputChanged=i(this,"wmTagInputChanged",7);this.labelPosition="top";this.options="";this.selectedTags="";this.addNew=true;this.characterLimit=50;this.uid=this.el.id?this.el.id:n();this.openUp=false;this.isExpanded=false;this.tagsList=this.csvToArray(this.selectedTags);this.optionsList=this.csvToArray(this.options);this.charCount=0;this.liveRegionMessage="";this.tagAreaInstructions=s.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."});this.maxTagsReachedMessage=s.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"The maximum amount of tags has been reached, no additional tags can be added."});this.debouncedResize=l((function(){o.positionInput()}),30)}Object.defineProperty(t.prototype,"focusedElement",{get:function(){return this.el.shadowRoot.activeElement},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"listItemEls",{get:function(){return Array.from(this.dropdownEl.querySelectorAll("li"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tagEls",{get:function(){return Array.from(this.tagAreaEl.querySelectorAll(".tag"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"optionEls",{get:function(){return Array.from(this.dropdownEl.querySelectorAll(".option"))},enumerable:false,configurable:true});t.prototype.generateTagAddedMessage=function(t){return s.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})};t.prototype.generateTagAlreadyAddedMessage=function(t){return s.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})};t.prototype.generateTagCounterMessage=function(t,e){return s.formatMessage({id:"tagInput.tagsAddedCounter",defaultMessage:"Tags added: {x, number}/{y, number}",description:"For the user to understand how close they are to the tag limit."},{x:t,y:e})};t.prototype.generateCharacterLimitLabel=function(t){return s.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:t})};t.prototype.componentWillLoad=function(){if(!this.placeholder){this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)}if(!this.label){console.error("wm-tag-input must have a label property")}this.el.focus=function(){if(this.selectedTags){this.shadowRoot.querySelector("ul.tag-area").focus()}else{this.shadowRoot.querySelector("input").focus()}};this.consolidateSelectedTags()};t.prototype.componentDidLoad=function(){this.tagEls.forEach((function(t){return t.classList.remove("highlight")}))};t.prototype.componentDidRender=function(){this.positionInput()};t.prototype.consolidateSelectedTags=function(){var t=this;this.tagsList.forEach((function(e){if(!t.includesCaseInsensitive(t.optionsList,e)){t.options+="".concat(t.options.length>0?",":"").concat(e)}}));this.optionsList=this.csvToArray(this.options)};t.prototype.createPlaceholderDefault=function(t,e){var i=s.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"});var o=s.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"});var a=s.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});var r="";if(t&&e){r=i}else if(!t&&e){r=o}else if(t){r=a}return r};t.prototype.reflectSelectedTags=function(){this.selectedTags=this.listToCSV(this.tagsList);this.wmTagInputChanged.emit({value:this.tagsList})};t.prototype.closeIfNotElOrChild=function(t){var e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);if(e&&this.isExpanded){this.closeDropdown()}};t.prototype.handleResize=function(){this.debouncedResize()};t.prototype.handleInputKeyDown=function(t){if(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit){this.announceCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)}t.stopPropagation();switch(t.key){case"Enter":case",":t.preventDefault();this.submitInput(this.addNew,this.inputEl.value.trim());break;case"ArrowDown":t.preventDefault();this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault();this.handleInputArrowUp();break;case"Escape":if(this.isExpanded){this.closeDropdown()}break;case"ArrowLeft":case"Backspace":this.handleInputBackspace();break}};t.prototype.handleInputChanged=function(t){this.charCount=t.length;if(this.charCount>=this.characterLimit-5){this.announceCharacterLimitWarning(this.charCount,this.characterLimit)}this.announceExistingOptions();if(!this.isExpanded){this.openDropdown()}};t.prototype.submitInput=function(t,e){var i=e.match(/\S/);if(t&&i){this.tagsList=this.addTag(e);this.optionsList=this.addOption(e);this.resetInput();if(this.maxTags&&this.tagsList.length>=this.maxTags){this.tagAreaEl.focus()}}};t.prototype.handleInputArrowDown=function(){if(this.isExpanded){this.moveDownListItem()}else{this.openDropdown()}};t.prototype.handleInputArrowUp=function(){if(this.isExpanded){this.moveUpListItem()}else{this.openDropdown()}};t.prototype.handleInputBackspace=function(){var t=this;if(this.inputEl.value===""&&this.tagsList.length>0){window.requestAnimationFrame((function(){t.tagAreaEl.focus();t.focusTag(t.tagEls[t.tagEls.length-1])}))}};t.prototype.handleListItemKeyDown=function(t){var e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault();e.click();break;case"ArrowDown":t.preventDefault();this.moveDownListItem();break;case"ArrowUp":t.preventDefault();this.moveUpListItem();break;case"Escape":if(this.focusedElement!==this.inputEl){this.inputEl.focus()}else{this.closeDropdown()}break}};t.prototype.handleListItemClick=function(t){var e=t.target;var i=e.dataset.option.trim()||"";if(this.includesCaseInsensitive(this.tagsList,i)){this.announce(this.generateTagAlreadyAddedMessage(i))}else{this.announce(this.generateTagAddedMessage(i));this.resetInput();this.tagsList=this.addTag(i);this.optionsList=this.addOption(i);this.focusedListItem=null;var o=this.maxTags&&this.tagsList.length>=this.maxTags?this.tagAreaEl:this.inputEl;o.focus()}};t.prototype.handleTagAreaKeyDown=function(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault();this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete();break}};t.prototype.handleTagAreaDelete=function(){if(this.focusedTag&&this.focusedTag.dataset.tag){this.removeTag(this.focusedTag.dataset.tag);if(this.tagsList.length===0){this.inputEl.focus()}else if(this.focusedTag===this.tagEls[this.tagEls.length-1]){this.focusedTag=this.tagEls[this.tagEls.length-2];this.focusTag(this.focusedTag)}}};t.prototype.handleBlur=function(t,e){var i=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);if(i){this.closeDropdown();this.fieldWrapperEl.classList.remove("focused")}};t.prototype.handleTagAreaFocus=function(){this.closeDropdown();if(!this.focusedTag){this.focusedTag=this.tagEls[0]}this.focusTag(this.focusedTag)};t.prototype.handleRemoveButtonClick=function(t){this.moveLeftTag();this.removeTag(t)};t.prototype.moveDownListItem=function(){if(this.listItemEls.length>0){var t=this.listItemEls[0];if(!this.focusedListItem){this.focusListItem(t)}else if(this.focusedListItem.nextElementSibling){this.focusListItem(this.focusedListItem.nextElementSibling)}else{this.focusListItem(t)}}};t.prototype.moveUpListItem=function(){if(this.listItemEls.length>0){var t=this.listItemEls[this.listItemEls.length-1];if(!this.focusedListItem){this.focusListItem(t)}else if(this.focusedListItem.previousElementSibling){this.focusListItem(this.focusedListItem.previousElementSibling)}else{this.focusedListItem=null;this.inputEl.focus()}}};t.prototype.moveLeftTag=function(){var t=this.tagEls[this.tagEls.length-1];if(this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)){this.focusedTag=this.focusedTag.previousElementSibling}else{this.focusedTag=t}this.focusTag(this.focusedTag)};t.prototype.moveRightTag=function(){var t=this.tagEls[0];if(this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)){this.focusedTag=this.focusedTag.nextElementSibling}else{this.focusedTag=t}this.focusTag(this.focusedTag)};t.prototype.addOption=function(t){var e=this.optionsList;var i=this.includesCaseInsensitive(this.optionsList,t);if(!i){e=e.concat(t)}return e};t.prototype.removeOption=function(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)};t.prototype.addTag=function(t){var e=this.tagsList;var i=this.includesCaseInsensitive(this.tagsList,t);var o=this.optionsList.filter((function(e){return e.toLowerCase()===t.toLowerCase()}))[0];if(!i){this.announce(this.generateTagAddedMessage(t));e=e.concat(o||t)}return e};t.prototype.removeTag=function(t){var e=s.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:t});this.announce(e);this.tagsList=this.filterCaseInsensitive(this.tagsList,t);var i=this.csvToArray(this.options);if(this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(i,t)){this.removeOption(t)}};t.prototype.focusListItem=function(t){this.focusedListItem=t;t.focus()};t.prototype.focusTag=function(t){this.focusedTag=t;this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id)};t.prototype.clearTagFocus=function(){this.tagAreaEl.removeAttribute("aria-activedescendant");this.focusedTag=null};t.prototype.openDropdown=function(){this.openUp=p(this.el,this.dropdownEl,this.el.clientHeight,-2);this.isExpanded=true};t.prototype.closeDropdown=function(){this.focusedListItem=null;this.isExpanded=false};t.prototype.clearListItemFocus=function(){this.focusedListItem=null;this.listItemEls.forEach((function(t){t.tabIndex=-1;t.classList.remove("focused")}))};t.prototype.resetInput=function(){this.charCount=0;this.inputEl.value=""};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionMessage=t};t.prototype.announceExistingOptions=function(){var t=this;window.requestAnimationFrame((function(){var e=s.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t.optionEls.length});if(t.optionEls.length>0){t.announce(e)}}))};t.prototype.announceCharacterLimitWarning=function(t,e){var i=s.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:t,y:e});var o=s.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"});this.announce("".concat(i).concat(t>=e?" "+o:""))};t.prototype.positionInput=function(){var t=this.tagEls[this.tagEls.length-1];this.inputEl.style.position="static";this.inputEl.style.width="100%";if(t){var e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;if(e>=150){this.inputEl.style.position="absolute";this.inputEl.style.top=t.offsetTop.toString()+"px";this.inputEl.style.width=(this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right-8).toString()+"px"}}};t.prototype.listToCSV=function(t){return t.join(",")};t.prototype.csvToArray=function(t){return t?t.split(/, ?/):[]};t.prototype.includesCaseInsensitive=function(t,e){var i=t.map((function(t){return t.toLowerCase()}));return i.includes(e.toLowerCase())};t.prototype.filterCaseInsensitive=function(t,e){return t.filter((function(t){return t.toLowerCase()!==e.toLowerCase()}))};t.prototype.sortCaseInsensitive=function(t){return t.sort((function(t,e){t=t.toLowerCase();e=e.toLowerCase();return t>e?1:t<e?-1:0}))};t.prototype.renderTags=function(){var t=this;return this.tagsList.map((function(e,i){var a="tag".concat(i+1);return o("li",{id:a,class:"tag highlight ".concat(t.focusedTag&&t.focusedTag.id===a?"focused":""),"data-tag":e,role:"option"},e,o("button",{class:"remove-btn",tabIndex:-1,onClick:function(){return t.handleRemoveButtonClick(e)}}))}))};t.prototype.renderListItems=function(t){var e=this;t=this.sortCaseInsensitive(t);if(this.inputEl&&this.inputEl.value){t=this.optionsList.filter((function(t){return t.toLowerCase().includes(e.inputEl.value.toLowerCase())}))}return t.map((function(t,i){var a="option".concat(i+1);var r=e.focusedListItem&&e.focusedListItem.id===a;var n=e.includesCaseInsensitive(e.tagsList,t);return o("li",{class:"option ".concat(r?"focused":""),role:"option",id:a,"data-option":t,tabIndex:r?0:-1,"aria-selected":n?"true":"false","aria-disabled":n?"true":"false",onKeyDown:function(t){return e.handleListItemKeyDown(t)},onBlur:function(t){return e.handleBlur(t,e.el)},onClick:function(t){return e.handleListItemClick(t)}},t)}))};t.prototype.renderAddNewButton=function(){var t=this;var e=this.inputEl.value.match(/\S/);var i=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&e&&!i){var a="add-new-btn";var r=this.focusedListItem&&this.focusedListItem.id===a;return o("li",{role:"option",class:"add-new-btn ".concat(r?"focused":""),id:a,"data-option":this.inputEl.value,onKeyDown:function(e){return t.handleListItemKeyDown(e)},onBlur:function(e){return t.handleBlur(e,t.el)},onClick:function(e){return t.handleListItemClick(e)},tabIndex:r?0:-1},'Add "'.concat(this.inputEl.value.trim(),'"'))}else return""};t.prototype.renderHelpText=function(){var t=s.formatMessage({id:"tagInput.helpTextCanSelect",defaultMessage:"Search and select a tag.",description:"Placeholder text. Use imperative"});var e=s.formatMessage({id:"tagInput.helpTextEditable",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Placeholder text. Use imperative"});var i="";if(this.optionsList.length>0){i+=t}if(this.addNew){i+=" "+e}return i};t.prototype.renderTagCounter=function(){if(this.maxTags){return o("div",{class:"lower-row"},o("div",{id:"max-tags"},this.generateTagCounterMessage(this.tagsList.length,this.maxTags),this.tagsList.length>=this.maxTags&&o("span",{class:"sr-only"},this.maxTagsReachedMessage)))}};t.prototype.render=function(){var t=this;var e=this.focusedElement&&(this.focusedElement===this.inputEl||this.focusedElement===this.tagAreaEl||this.focusedElement.classList.contains("add-new-btn")||this.optionsList.length>0&&this.listItemEls.includes(this.focusedElement));return o(a,{id:this.uid},o("div",{class:"wrapper label-".concat(this.labelPosition)},o("div",{class:"label-wrapper"},o("label",{class:"label",htmlFor:"input".concat(this.uid)},this.label)),o("div",{class:"field-wrapper ".concat(e?"focused":""),ref:function(e){return t.fieldWrapperEl=e}},o("div",{class:"upper-row"},o("div",{class:"tags-and-input-wrapper"},o("ul",{ref:function(e){return t.tagAreaEl=e},class:"tag-area",role:"listbox","aria-orientation":"horizontal","aria-label":"".concat(this.label," ").concat(this.tagsList.length>0?this.tagAreaInstructions:""),tabindex:this.tagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:function(){return t.handleTagAreaFocus()},onBlur:function(e){t.clearTagFocus();t.handleBlur(e,t.el)},onKeyDown:function(e){return t.handleTagAreaKeyDown(e)}},this.renderTags()),o("input",{id:"input".concat(this.uid),class:this.maxTags&&this.tagsList.length>=this.maxTags?"hidden":"",role:"combobox",ref:function(e){return t.inputEl=e},autocomplete:"off","aria-controls":"dropdown","aria-describedby":"help-text","aria-label":"".concat(this.label," ").concat(this.generateCharacterLimitLabel(this.characterLimit)),"aria-expanded":this.isExpanded?"true":"false",placeholder:this.placeholder,maxLength:this.characterLimit,onInput:function(){return t.handleInputChanged(t.inputEl.value)},onBlur:function(e){t.handleBlur(e,t.el)},onFocus:function(){t.openDropdown();t.clearListItemFocus()},onKeyDown:function(e){return t.handleInputKeyDown(e)}})),o("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),o("div",{class:"dropdown-wrapper ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},o("div",{id:"help-text",class:"help-text"},this.renderHelpText()),o("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":this.isExpanded?"true":false,"aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))),this.info?o("div",{id:"info",class:"info-text"},this.info):"",o("div",{class:"sr-only","aria-live":"assertive",ref:function(e){return t.liveRegionEl=e},"aria-atomic":"true"},this.liveRegionMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{tagsList:["reflectSelectedTags"]}},enumerable:false,configurable:true});return t}());c.style=d}}}));
|
|
1
|
+
System.register(["./p-726b9452.system.js","./p-5754e2b8.system.js"],(function(t){"use strict";var e,i,o,a,r,n,s,l,p;return{setters:[function(t){e=t.r;i=t.c;o=t.h;a=t.H;r=t.g},function(t){n=t.g;s=t.i;l=t.d;p=t.l}],execute:function(){var d=':host,wm-tag-input{font-family:inherit;width:100%}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;min-height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .lower-row,wm-tag-input .lower-row{width:100%;border-radius:0 0 3px 3px}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:1.875rem;background-color:#6b6b6b;padding:0.5rem 1rem;color:white;font-size:0.875rem}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option] .remove-btn,wm-tag-input .tag-area [role=option] .remove-btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;border:1px solid #575195;color:#575195;border-radius:50%;padding:0;margin-left:0.5rem;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .remove-btn:hover,wm-tag-input .tag-area [role=option] .remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .remove-btn:before,wm-tag-input .tag-area [role=option] .remove-btn:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var c=t("wm_tag_input",function(){function t(t){var o=this;e(this,t);this.wmTagInputChanged=i(this,"wmTagInputChanged",7);this.labelPosition="top";this.options="";this.selectedTags="";this.addNew=true;this.characterLimit=50;this.uid=this.el.id?this.el.id:n();this.openUp=false;this.isExpanded=false;this.tagsList=this.csvToArray(this.selectedTags);this.optionsList=this.csvToArray(this.options);this.charCount=0;this.liveRegionMessage="";this.tagAreaInstructions=s.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."});this.maxTagsReachedMessage=s.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"The maximum amount of tags has been reached, no additional tags can be added."});this.debouncedResize=l((function(){o.positionInput()}),30)}Object.defineProperty(t.prototype,"focusedElement",{get:function(){return this.el.shadowRoot.activeElement},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"listItemEls",{get:function(){return Array.from(this.dropdownEl.querySelectorAll("li"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tagEls",{get:function(){return Array.from(this.tagAreaEl.querySelectorAll(".tag"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"optionEls",{get:function(){return Array.from(this.dropdownEl.querySelectorAll(".option"))},enumerable:false,configurable:true});t.prototype.generateTagAddedMessage=function(t){return s.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})};t.prototype.generateTagAlreadyAddedMessage=function(t){return s.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})};t.prototype.generateTagCounterMessage=function(t,e){return s.formatMessage({id:"tagInput.tagsAddedCounter",defaultMessage:"Tags added: {x, number}/{y, number}",description:"For the user to understand how close they are to the tag limit."},{x:t,y:e})};t.prototype.generateCharacterLimitLabel=function(t){return s.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:t})};t.prototype.componentWillLoad=function(){if(!this.placeholder){this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)}if(!this.label){console.error("wm-tag-input must have a label property")}this.el.focus=function(){if(this.selectedTags){this.shadowRoot.querySelector("ul.tag-area").focus()}else{this.shadowRoot.querySelector("input").focus()}};this.consolidateSelectedTags()};t.prototype.componentDidLoad=function(){this.tagEls.forEach((function(t){return t.classList.remove("highlight")}))};t.prototype.componentDidRender=function(){this.positionInput()};t.prototype.consolidateSelectedTags=function(){var t=this;this.tagsList.forEach((function(e){if(!t.includesCaseInsensitive(t.optionsList,e)){t.options+="".concat(t.options.length>0?",":"").concat(e)}}));this.optionsList=this.csvToArray(this.options)};t.prototype.createPlaceholderDefault=function(t,e){var i=s.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"});var o=s.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"});var a=s.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});var r="";if(t&&e){r=i}else if(!t&&e){r=o}else if(t){r=a}return r};t.prototype.reflectSelectedTags=function(){this.selectedTags=this.listToCSV(this.tagsList);this.wmTagInputChanged.emit({value:this.tagsList})};t.prototype.closeIfNotElOrChild=function(t){var e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);if(e&&this.isExpanded){this.closeDropdown()}};t.prototype.handleResize=function(){this.debouncedResize()};t.prototype.handleInputKeyDown=function(t){if(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit){this.announceCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)}t.stopPropagation();switch(t.key){case"Enter":case",":t.preventDefault();this.submitInput(this.addNew,this.inputEl.value.trim());break;case"ArrowDown":t.preventDefault();this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault();this.handleInputArrowUp();break;case"Escape":if(this.isExpanded){this.closeDropdown()}break;case"ArrowLeft":case"Backspace":this.handleInputBackspace();break}};t.prototype.handleInputChanged=function(t){this.charCount=t.length;if(this.charCount>=this.characterLimit-5){this.announceCharacterLimitWarning(this.charCount,this.characterLimit)}this.announceExistingOptions();if(!this.isExpanded){this.openDropdown()}};t.prototype.submitInput=function(t,e){var i=e.match(/\S/);if(t&&i){this.tagsList=this.addTag(e);this.optionsList=this.addOption(e);this.resetInput();if(this.maxTags&&this.tagsList.length>=this.maxTags){this.tagAreaEl.focus()}}};t.prototype.handleInputArrowDown=function(){if(this.isExpanded){this.moveDownListItem()}else{this.openDropdown()}};t.prototype.handleInputArrowUp=function(){if(this.isExpanded){this.moveUpListItem()}else{this.openDropdown()}};t.prototype.handleInputBackspace=function(){var t=this;if(this.inputEl.value===""&&this.tagsList.length>0){window.requestAnimationFrame((function(){t.tagAreaEl.focus();t.focusTag(t.tagEls[t.tagEls.length-1])}))}};t.prototype.handleListItemKeyDown=function(t){var e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault();e.click();break;case"ArrowDown":t.preventDefault();this.moveDownListItem();break;case"ArrowUp":t.preventDefault();this.moveUpListItem();break;case"Escape":if(this.focusedElement!==this.inputEl){this.inputEl.focus()}else{this.closeDropdown()}break}};t.prototype.handleListItemClick=function(t){var e=t.target;var i=e.dataset.option.trim()||"";if(this.includesCaseInsensitive(this.tagsList,i)){this.announce(this.generateTagAlreadyAddedMessage(i))}else{this.announce(this.generateTagAddedMessage(i));this.resetInput();this.tagsList=this.addTag(i);this.optionsList=this.addOption(i);this.focusedListItem=null;var o=this.maxTags&&this.tagsList.length>=this.maxTags?this.tagAreaEl:this.inputEl;o.focus()}};t.prototype.handleTagAreaKeyDown=function(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault();this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete();break}};t.prototype.handleTagAreaDelete=function(){if(this.focusedTag&&this.focusedTag.dataset.tag){this.removeTag(this.focusedTag.dataset.tag);if(this.tagsList.length===0){this.inputEl.focus()}else if(this.focusedTag===this.tagEls[this.tagEls.length-1]){this.focusedTag=this.tagEls[this.tagEls.length-2];this.focusTag(this.focusedTag)}}};t.prototype.handleBlur=function(t,e){var i=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);if(i){this.closeDropdown();this.fieldWrapperEl.classList.remove("focused")}};t.prototype.handleTagAreaFocus=function(){this.closeDropdown();if(!this.focusedTag){this.focusedTag=this.tagEls[0]}this.focusTag(this.focusedTag)};t.prototype.handleRemoveButtonClick=function(t){this.moveLeftTag();this.removeTag(t)};t.prototype.moveDownListItem=function(){if(this.listItemEls.length>0){var t=this.listItemEls[0];if(!this.focusedListItem){this.focusListItem(t)}else if(this.focusedListItem.nextElementSibling){this.focusListItem(this.focusedListItem.nextElementSibling)}else{this.focusListItem(t)}}};t.prototype.moveUpListItem=function(){if(this.listItemEls.length>0){var t=this.listItemEls[this.listItemEls.length-1];if(!this.focusedListItem){this.focusListItem(t)}else if(this.focusedListItem.previousElementSibling){this.focusListItem(this.focusedListItem.previousElementSibling)}else{this.focusedListItem=null;this.inputEl.focus()}}};t.prototype.moveLeftTag=function(){var t=this.tagEls[this.tagEls.length-1];if(this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)){this.focusedTag=this.focusedTag.previousElementSibling}else{this.focusedTag=t}this.focusTag(this.focusedTag)};t.prototype.moveRightTag=function(){var t=this.tagEls[0];if(this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)){this.focusedTag=this.focusedTag.nextElementSibling}else{this.focusedTag=t}this.focusTag(this.focusedTag)};t.prototype.addOption=function(t){var e=this.optionsList;var i=this.includesCaseInsensitive(this.optionsList,t);if(!i){e=e.concat(t)}return e};t.prototype.removeOption=function(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)};t.prototype.addTag=function(t){var e=this.tagsList;var i=this.includesCaseInsensitive(this.tagsList,t);var o=this.optionsList.filter((function(e){return e.toLowerCase()===t.toLowerCase()}))[0];if(!i){this.announce(this.generateTagAddedMessage(t));e=e.concat(o||t)}return e};t.prototype.removeTag=function(t){var e=s.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:t});this.announce(e);this.tagsList=this.filterCaseInsensitive(this.tagsList,t);var i=this.csvToArray(this.options);if(this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(i,t)){this.removeOption(t)}};t.prototype.focusListItem=function(t){this.focusedListItem=t;t.focus()};t.prototype.focusTag=function(t){this.focusedTag=t;this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id)};t.prototype.clearTagFocus=function(){this.tagAreaEl.removeAttribute("aria-activedescendant");this.focusedTag=null};t.prototype.openDropdown=function(){this.openUp=p(this.el,this.dropdownEl,this.el.clientHeight,-2);this.isExpanded=true};t.prototype.closeDropdown=function(){this.focusedListItem=null;this.isExpanded=false};t.prototype.clearListItemFocus=function(){this.focusedListItem=null;this.listItemEls.forEach((function(t){t.tabIndex=-1;t.classList.remove("focused")}))};t.prototype.resetInput=function(){this.charCount=0;this.inputEl.value=""};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.liveRegionMessage=t};t.prototype.announceExistingOptions=function(){var t=this;window.requestAnimationFrame((function(){var e=s.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t.optionEls.length});if(t.optionEls.length>0){t.announce(e)}}))};t.prototype.announceCharacterLimitWarning=function(t,e){var i=s.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:t,y:e});var o=s.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"});this.announce("".concat(i).concat(t>=e?" "+o:""))};t.prototype.positionInput=function(){var t=this.tagEls[this.tagEls.length-1];this.inputEl.style.position="static";this.inputEl.style.width="100%";if(t){var e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;if(e>=150){this.inputEl.style.position="absolute";this.inputEl.style.top=t.offsetTop.toString()+"px";this.inputEl.style.width=(this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right-8).toString()+"px"}}};t.prototype.listToCSV=function(t){return t.join(",")};t.prototype.csvToArray=function(t){return t?t.split(/, ?/):[]};t.prototype.includesCaseInsensitive=function(t,e){var i=t.map((function(t){return t.toLowerCase()}));return i.includes(e.toLowerCase())};t.prototype.filterCaseInsensitive=function(t,e){return t.filter((function(t){return t.toLowerCase()!==e.toLowerCase()}))};t.prototype.sortCaseInsensitive=function(t){return t.sort((function(t,e){t=t.toLowerCase();e=e.toLowerCase();return t>e?1:t<e?-1:0}))};t.prototype.renderTags=function(){var t=this;return this.tagsList.map((function(e,i){var a="tag".concat(i+1);return o("li",{id:a,class:"tag highlight ".concat(t.focusedTag&&t.focusedTag.id===a?"focused":""),"data-tag":e,role:"option"},e,o("button",{class:"remove-btn",tabIndex:-1,onClick:function(){return t.handleRemoveButtonClick(e)}}))}))};t.prototype.renderListItems=function(t){var e=this;t=this.sortCaseInsensitive(t);if(this.inputEl&&this.inputEl.value){t=this.optionsList.filter((function(t){return t.toLowerCase().includes(e.inputEl.value.toLowerCase())}))}return t.map((function(t,i){var a="option".concat(i+1);var r=e.focusedListItem&&e.focusedListItem.id===a;var n=e.includesCaseInsensitive(e.tagsList,t);return o("li",{class:"option ".concat(r?"focused":""),role:"option",id:a,"data-option":t,tabIndex:r?0:-1,"aria-selected":n?"true":"false","aria-disabled":n?"true":"false",onKeyDown:function(t){return e.handleListItemKeyDown(t)},onBlur:function(t){return e.handleBlur(t,e.el)},onClick:function(t){return e.handleListItemClick(t)}},t)}))};t.prototype.renderAddNewButton=function(){var t=this;var e=this.inputEl.value.match(/\S/);var i=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&e&&!i){var a="add-new-btn";var r=this.focusedListItem&&this.focusedListItem.id===a;return o("li",{role:"option",class:"add-new-btn ".concat(r?"focused":""),id:a,"data-option":this.inputEl.value,onKeyDown:function(e){return t.handleListItemKeyDown(e)},onBlur:function(e){return t.handleBlur(e,t.el)},onClick:function(e){return t.handleListItemClick(e)},tabIndex:r?0:-1},'Add "'.concat(this.inputEl.value.trim(),'"'))}else return""};t.prototype.renderHelpText=function(){var t=s.formatMessage({id:"tagInput.helpTextCanSelect",defaultMessage:"Search and select a tag.",description:"Placeholder text. Use imperative"});var e=s.formatMessage({id:"tagInput.helpTextEditable",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Placeholder text. Use imperative"});var i="";if(this.optionsList.length>0){i+=t}if(this.addNew){i+=" "+e}return i};t.prototype.renderTagCounter=function(){if(this.maxTags){return o("div",{class:"lower-row"},o("div",{id:"max-tags"},this.generateTagCounterMessage(this.tagsList.length,this.maxTags),this.tagsList.length>=this.maxTags&&o("span",{class:"sr-only"},this.maxTagsReachedMessage)))}};t.prototype.render=function(){var t=this;var e=this.focusedElement&&(this.focusedElement===this.inputEl||this.focusedElement===this.tagAreaEl||this.focusedElement.classList.contains("add-new-btn")||this.optionsList.length>0&&this.listItemEls.includes(this.focusedElement));return o(a,{id:this.uid},o("div",{class:"wrapper label-".concat(this.labelPosition)},o("div",{class:"label-wrapper"},o("label",{class:"label",htmlFor:"input".concat(this.uid)},this.label)),o("div",{class:"field-wrapper ".concat(e?"focused":""),ref:function(e){return t.fieldWrapperEl=e}},o("div",{class:"upper-row"},o("div",{class:"tags-and-input-wrapper"},o("ul",{ref:function(e){return t.tagAreaEl=e},class:"tag-area",role:"listbox","aria-orientation":"horizontal","aria-label":"".concat(this.label," ").concat(this.tagsList.length>0?this.tagAreaInstructions:""),tabindex:this.tagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:function(){return t.handleTagAreaFocus()},onBlur:function(e){t.clearTagFocus();t.handleBlur(e,t.el)},onKeyDown:function(e){return t.handleTagAreaKeyDown(e)}},this.renderTags()),o("input",{id:"input".concat(this.uid),class:this.maxTags&&this.tagsList.length>=this.maxTags?"hidden":"",role:"combobox",ref:function(e){return t.inputEl=e},autocomplete:"off","aria-controls":"dropdown","aria-describedby":"help-text","aria-label":"".concat(this.label," ").concat(this.generateCharacterLimitLabel(this.characterLimit)),"aria-expanded":this.isExpanded?"true":"false",placeholder:this.placeholder,maxLength:this.characterLimit,onInput:function(){return t.handleInputChanged(t.inputEl.value)},onBlur:function(e){t.handleBlur(e,t.el)},onFocus:function(){t.openDropdown();t.clearListItemFocus()},onKeyDown:function(e){return t.handleInputKeyDown(e)}})),o("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),o("div",{class:"dropdown-wrapper ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},o("div",{id:"help-text",class:"help-text"},this.renderHelpText()),o("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":this.isExpanded?"true":false,"aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))),this.info?o("div",{id:"info",class:"info-text"},this.info):"",o("div",{class:"sr-only","aria-live":"assertive",ref:function(e){return t.liveRegionEl=e},"aria-atomic":"true"},this.liveRegionMessage)))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{tagsList:["reflectSelectedTags"]}},enumerable:false,configurable:true});return t}());c.style=d}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-c2abdcba.js";import{c as s,i,b as e,f as n,d as a}from"./p-
|
|
1
|
+
import{h as t}from"./p-c2abdcba.js";import{c as s,i,b as e,f as n,d as a}from"./p-6d7a6954.js";const o={doughnut:{size:155,colors:["#088000","#bfbfbf"],thickness:.73,padding:25,isBar:!1},doughnut0:{size:155,colors:["#088000","#bfbfbf"],thickness:.73,padding:25,isBar:!1},doughnut1:{size:130,colors:["#8b86ca","#2e1b46","#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut2:{size:130,colors:["#19a1a9","#ff5f4e","#d4d4d4"],thickness:.5,padding:90,isBar:!1},doughnut3:{size:130,colors:["#8b86ca","#2e1b46","#919834","#c177cf","#c16e00","#029af2","#2a6993"],thickness:.5,padding:90,isBar:!1},bar:{size:350,colors:["#088000","#bfbfbf"],padding:0,isBar:!0},bar1:{size:350,colors:["#088000","#bfbfbf"],padding:0,isBar:!0},bar2:{size:400,colors:["#d4d4d4","#7f97ad","#19a1a9","#ff5f4e"],padding:0,isBar:!0},bar3:{size:300,colors:["#0d696e","#19a1a9","#8e4129","#ff5f4e"],padding:0,isBar:!0},bar4:{size:400,colors:["#d4d4d4","#7f97ad","#33a919"],padding:0,isBar:!0},bar5:{size:400,colors:["#d4d4d4","#8b86ca","#2e1b46","#919834","#c177cf","#c16e00","#029af2","#2a6993"],padding:0,isBar:!0}};function r(t,s,i){return i?Math.round(100*t/s):Math.round(1e4*t/s)/100}function h(t,s){return 360*t/s}function c(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function d(t,s,i,e){var n=c(t+t*s*Math.cos(Math.PI*i/180)),a=c(t+t*s*Math.sin(Math.PI*i/180));return void 0!==e?{x1:n,y1:a,x2:c(t+t*s*Math.cos(Math.PI*e/180)),y2:c(t+t*s*Math.sin(Math.PI*e/180))}:{x:n,y:a}}function l(t,s,i,e,n){var a=c(n/2*t);return`A ${a}, ${a} 0 ${s} ${c(i)}, ${c(e)}`}function u(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function f(t,s){this.popoverEl&&!this.isTabbing&&(s.coords={x:t.clientX,y:t.clientY},b.call(this,s))}function p(t,s){this.popoverEl&&this.isTabbing&&(s.coords=e(t.target),b.call(this,s))}function g(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,w.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,m.call(this);break;case"Tab":x.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function b(t){if(this.popoverEl&&t.title&&t.text){this.popoverEl.popoverTitle=t.title,this.popoverEl.popoverText=t.text,this.popoverEl.buttonText=t.buttonText,this.popoverEl.coords=t.coords,this.popoverEl.sliceRef=t.sliceRef,window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),30);const s=a((async()=>{this.popoverEl.open=!1}),10);document.addEventListener("scroll",(()=>{s()}));const i=n(this.el);i&&i.addEventListener("scroll",(()=>{s()}))}}function m(){const t=s(document.activeElement),i=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;v.call(this,i)}function w(){if(this.sliceEls){const t=s(document.activeElement);let i=this.sliceEls.indexOf(t);-1===i?i=0:0===i?i=this.sliceEls.length-1:i-=1,v.call(this,i)}}function v(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.popoverEl&&(this.popoverEl.open=!1),this.el.tabIndex=-1,this.el.focusable=!1,this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.sliceEls[t].tabIndex=0,this.sliceEls[t].focusable=!0,this.sliceEls[t].focus(),window.setTimeout((()=>{this.popoverEl&&(this.popoverEl.open=!0)}),10))}function x(){this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.el&&(this.el.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1))}),100)}async function $(t){this.slicesData=[];let s=0;const i=Array.from(this.el.children);this.total=i.reduce(((t,s)=>t+parseInt(s.getAttribute("amount")||"0")),0),i.forEach(((e,n)=>{const a=parseInt(e.getAttribute("amount")||"0"),h=r(a,this.total,!0),c=r(parseInt(i[0===n?i.length-1:n-1].getAttribute("amount")||"0"),this.total,!0),d=r(parseInt(i[n===i.length-1?0:n+1].getAttribute("amount")||"0"),this.total,!0);let l=h<4&&(c<5||d<5);0===h&&a>0&&(d<8||c<8)&&(l=!0);const u=o[t].colors["bar5"===t?this.notStartedColor?n:n+1:n],f={amount:a,perc:h,legend:e.getAttribute("legend"),color:u||"#d4d4d4",offset:s,id:`${this.uid}-${n+1}`,title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:l};s+=a,this.slicesData.push(f)}))}function M(t,s,i){const e=h(s,this.total)-90,n=t/this.total*360;let a=e+n;const o=n>180?"1 1":"0 1",r=n>180?"1 0":"0 0",c=this.chartData.size/2,u=this.chartData.thickness,f="doughnut0"===i||"doughnut"===i?2.25:3;360===n&&(a-=.01);const p=d(c,1,e+1.5,a),g=d(c,u,e+f,a);return`M ${p.x1}, ${p.y1} `+l(1,o,p.x2,p.y2,this.chartData.size)+` L ${g.x2}, ${g.y2} `+l(u,r,g.x1,g.y1,this.chartData.size)+" z"}function y(s){const i=this.chartData.size+this.chartData.padding,e="doughnut0"===s||"doughnut"===s;return t("div",{class:"chart-wrapper doughnut-wrapper"},t("svg",{width:i+"px",height:i+"px",id:`graphic-${this.uid}`,class:"doughnut-svg"},t("defs",null,t("filter",{id:"wmHoverDropShadow"},t("feGaussianBlur",{stdDeviation:"3"}),t("feOffset",{result:"offsetblur"}),t("feFlood",{"flood-color":"#333"}),t("feComposite",{operator:"in",in2:"offsetblur"}),t("feMerge",null,t("feMergeNode",null),t("feMergeNode",{in:"SourceGraphic"})))),this.slicesData.map((t=>k.call(this,t,s))),e?t("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},r(this.slicesData[0].amount,this.total,!0)+"%"):t("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},this.slicesData.map((t=>t.amount>0?z.call(this,t):"")))))}function k(s,i){return t("g",{transform:`translate(${this.chartData.padding/2}, ${this.chartData.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.amount?s.color:"transparent",d:M.call(this,s.amount,s.offset,i),onClick:t=>f.call(this,t,s),onFocus:t=>p.call(this,t,s),onKeyDown:t=>u.call(this,t),role:"img","aria-label":s.legend}))}function z(s){if(!s.inSmallCluster){const i=h(s.offset+s.amount/2,this.total);let{x:e,y:n}=d(this.chartData.size/2,1.4,i-90);return t("text",{class:"value",x:e+"px",y:n+"px"},`${s.perc>0?s.perc:"<1"}%`)}}function B(s){const i="bar1"===s||"bar"===s;return t("div",{class:"chart-wrapper bar-wrapper"},i?t("div",{class:"single-perc"},r(this.slicesData[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:{"inner-bar-wrapper":!0,"show-values":"percentage"===this.tempValueFormat||"amount"===this.tempValueFormat}},i?"":t("div",{class:"values"},this.slicesData.map(((t,s)=>t.perc>0?this.renderBarText(t,s):""))),t("div",{class:"bar-segments-wrapper"},this.slicesData.map(((t,s)=>A.call(this,t,s)))),i?D.call(this):""))}function A(s,i){const e=i!==this.slicesData.length-1,n=`calc(${r(s.amount,this.total,!1)}%${e?" - 2px":""})`;return t("div",{class:"segment bar-segment "+(0===r(s.amount,this.total,!1)?"zero":""),style:{backgroundColor:s.color,width:n},onClick:t=>f.call(this,t,s),onFocus:t=>p.call(this,t,s),onKeyDown:t=>u.call(this,t)},t("span",{class:"sr-only"},s.legend))}function C(){if(this.showLegend){const s=this.slicesData.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return t("div",{class:"legend-wrapper"},t("div",{class:"legend "+("bar"===this.mode?"--top":"--bottom"),"aria-hidden":"true"},this.total>0?this.slicesData.map((s=>{if(s.amount||s.legend)return t("div",{class:"legend-item"},t("div",{class:"legend-color",style:{"background-color":s.color}}),t("div",{class:"legend-text"},s.legend))})):""),!this.chartData.isBar&&s?t("div",{class:"cluster-warning"},i.formatMessage({id:"chart.hiddenPercentages",defaultMessage:"Percentages smaller than 5% are not shown when too close to each other."}),t("br",null),i.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details."})):"")}}function D(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}export{B as a,y as b,D as c,r as d,x as e,$ as g,g as h,C as r,o as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as r,g as a}from"./p-c2abdcba.js";import{g as s,i as o,d as n,l as d}from"./p-70d0e993.js";const p=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.labelPosition="top",this.options="",this.selectedTags="",this.addNew=!0,this.characterLimit=50,this.uid=this.el.id?this.el.id:s(),this.openUp=!1,this.isExpanded=!1,this.tagsList=this.csvToArray(this.selectedTags),this.optionsList=this.csvToArray(this.options),this.charCount=0,this.liveRegionMessage="",this.tagAreaInstructions=o.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),this.maxTagsReachedMessage=o.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"The maximum amount of tags has been reached, no additional tags can be added."}),this.debouncedResize=n((()=>{this.positionInput()}),30)}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return Array.from(this.tagAreaEl.querySelectorAll(".tag"))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}generateTagAddedMessage(t){return o.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return o.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}generateTagCounterMessage(t,e){return o.formatMessage({id:"tagInput.tagsAddedCounter",defaultMessage:"Tags added: {x, number}/{y, number}",description:"For the user to understand how close they are to the tag limit."},{x:t,y:e})}generateCharacterLimitLabel(t){return o.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.el.focus=function(){this.selectedTags?this.shadowRoot.querySelector("ul.tag-area").focus():this.shadowRoot.querySelector("input").focus()},this.consolidateSelectedTags()}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput()}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=this.csvToArray(this.options)}createPlaceholderDefault(t,e){const i=o.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),r=o.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),a=o.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=i:!t&&e?s=r:t&&(s=a),s}reflectSelectedTags(){this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:this.tagsList})}closeIfNotElOrChild(t){t.target!==this.el&&!this.el.shadowRoot.contains(t.target)&&this.isExpanded&&this.closeDropdown()}handleResize(){this.debouncedResize()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announceCharacterLimitWarning(this.inputEl.value.length,this.characterLimit),t.stopPropagation(),t.key){case"Enter":case",":t.preventDefault(),this.submitInput(this.addNew,this.inputEl.value.trim());break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"Escape":this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputChanged(t){this.charCount=t.length,this.charCount>=this.characterLimit-5&&this.announceCharacterLimitWarning(this.charCount,this.characterLimit),this.announceExistingOptions(),this.isExpanded||this.openDropdown()}submitInput(t,e){const i=e.match(/\S/);t&&i&&(this.tagsList=this.addTag(e),this.optionsList=this.addOption(e),this.resetInput(),this.maxTags&&this.tagsList.length>=this.maxTags&&this.tagAreaEl.focus())}handleInputArrowDown(){this.isExpanded?this.moveDownListItem():this.openDropdown()}handleInputArrowUp(){this.isExpanded?this.moveUpListItem():this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1])}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():this.closeDropdown()}}handleListItemClick(t){const e=t.target.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.announce(this.generateTagAddedMessage(e)),this.resetInput(),this.tagsList=this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null,(this.maxTags&&this.tagsList.length>=this.maxTags?this.tagAreaEl:this.inputEl).focus())}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){this.focusedTag&&this.focusedTag.dataset.tag&&(this.removeTag(this.focusedTag.dataset.tag),0===this.tagsList.length?this.inputEl.focus():this.focusedTag===this.tagEls[this.tagEls.length-1]&&(this.focusedTag=this.tagEls[this.tagEls.length-2],this.focusTag(this.focusedTag)))}handleBlur(t,e){t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget)&&(this.closeDropdown(),this.fieldWrapperEl.classList.remove("focused"))}handleTagAreaFocus(){this.closeDropdown(),this.focusedTag||(this.focusedTag=this.tagEls[0]),this.focusTag(this.focusedTag)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[0];this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:t)}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):(this.focusedListItem=null,this.inputEl.focus()):this.focusListItem(t)}}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const i=this.includesCaseInsensitive(this.tagsList,t),r=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];return i||(this.announce(this.generateTagAddedMessage(t)),e=e.concat(r||t)),e}removeTag(t){const e=o.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:t});this.announce(e),this.tagsList=this.filterCaseInsensitive(this.tagsList,t);const i=this.csvToArray(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(i,t)&&this.removeOption(t)}focusListItem(t){this.focusedListItem=t,t.focus()}focusTag(t){this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id)}clearTagFocus(){this.tagAreaEl.removeAttribute("aria-activedescendant"),this.focusedTag=null}openDropdown(){this.openUp=d(this.el,this.dropdownEl,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.focusedListItem=null,this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.listItemEls.forEach((t=>{t.tabIndex=-1,t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{const t=o.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:this.optionEls.length});this.optionEls.length>0&&this.announce(t)}))}announceCharacterLimitWarning(t,e){const i=o.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:t,y:e}),r=o.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"});this.announce(`${i}${t>=e?" "+r:""}`)}positionInput(){const t=this.tagEls[this.tagEls.length-1];this.inputEl.style.position="static",this.inputEl.style.width="100%",t&&this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right>=150&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right-8).toString()+"px")}listToCSV(t){return t.join(",")}csvToArray(t){return t?t.split(/, ?/):[]}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){return this.tagsList.map(((t,e)=>{const r=`tag${e+1}`;return i("li",{id:r,class:"tag highlight "+(this.focusedTag&&this.focusedTag.id===r?"focused":""),"data-tag":t,role:"option"},t,i("button",{class:"remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(t)}))}))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const r=`option${e+1}`,a=this.focusedListItem&&this.focusedListItem.id===r,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(a?"focused":""),role:"option",id:r,"data-option":t,tabIndex:a?0:-1,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){const t=o.formatMessage({id:"tagInput.helpTextCanSelect",defaultMessage:"Search and select a tag.",description:"Placeholder text. Use imperative"}),e=o.formatMessage({id:"tagInput.helpTextEditable",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Placeholder text. Use imperative"});let i="";return this.optionsList.length>0&&(i+=t),this.addNew&&(i+=" "+e),i}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},this.generateTagCounterMessage(this.tagsList.length,this.maxTags),this.tagsList.length>=this.maxTags&&i("span",{class:"sr-only"},this.maxTagsReachedMessage)))}render(){const t=this.focusedElement&&(this.focusedElement===this.inputEl||this.focusedElement===this.tagAreaEl||this.focusedElement.classList.contains("add-new-btn")||this.optionsList.length>0&&this.listItemEls.includes(this.focusedElement));return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label)),i("div",{class:"field-wrapper "+(t?"focused":""),ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper"},i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.tagAreaInstructions:""}`,tabindex:this.tagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:this.maxTags&&this.tagsList.length>=this.maxTags?"hidden":"",role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-controls":"dropdown","aria-describedby":"help-text","aria-label":`${this.label} ${this.generateCharacterLimitLabel(this.characterLimit)}`,"aria-expanded":this.isExpanded?"true":"false",placeholder:this.placeholder,maxLength:this.characterLimit,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>{this.openDropdown(),this.clearListItemFocus()},onKeyDown:t=>this.handleInputKeyDown(t)})),i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))),this.info?i("div",{id:"info",class:"info-text"},this.info):"",i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage)))}get el(){return a(this)}static get watchers(){return{tagsList:["reflectSelectedTags"]}}};p.style=':host,wm-tag-input{font-family:inherit;width:100%}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;min-height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .lower-row,wm-tag-input .lower-row{width:100%;border-radius:0 0 3px 3px}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:1.875rem;background-color:#6b6b6b;padding:0.5rem 1rem;color:white;font-size:0.875rem}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option] .remove-btn,wm-tag-input .tag-area [role=option] .remove-btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;border:1px solid #575195;color:#575195;border-radius:50%;padding:0;margin-left:0.5rem;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .remove-btn:hover,wm-tag-input .tag-area [role=option] .remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .remove-btn:before,wm-tag-input .tag-area [role=option] .remove-btn:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{p as wm_tag_input}
|
|
1
|
+
import{r as t,c as e,h as i,H as r,g as a}from"./p-c2abdcba.js";import{g as s,i as o,d as n,l as d}from"./p-6d7a6954.js";const p=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.labelPosition="top",this.options="",this.selectedTags="",this.addNew=!0,this.characterLimit=50,this.uid=this.el.id?this.el.id:s(),this.openUp=!1,this.isExpanded=!1,this.tagsList=this.csvToArray(this.selectedTags),this.optionsList=this.csvToArray(this.options),this.charCount=0,this.liveRegionMessage="",this.tagAreaInstructions=o.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),this.maxTagsReachedMessage=o.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"The maximum amount of tags has been reached, no additional tags can be added."}),this.debouncedResize=n((()=>{this.positionInput()}),30)}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return Array.from(this.tagAreaEl.querySelectorAll(".tag"))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}generateTagAddedMessage(t){return o.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return o.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}generateTagCounterMessage(t,e){return o.formatMessage({id:"tagInput.tagsAddedCounter",defaultMessage:"Tags added: {x, number}/{y, number}",description:"For the user to understand how close they are to the tag limit."},{x:t,y:e})}generateCharacterLimitLabel(t){return o.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.el.focus=function(){this.selectedTags?this.shadowRoot.querySelector("ul.tag-area").focus():this.shadowRoot.querySelector("input").focus()},this.consolidateSelectedTags()}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput()}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=this.csvToArray(this.options)}createPlaceholderDefault(t,e){const i=o.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),r=o.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),a=o.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=i:!t&&e?s=r:t&&(s=a),s}reflectSelectedTags(){this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:this.tagsList})}closeIfNotElOrChild(t){t.target!==this.el&&!this.el.shadowRoot.contains(t.target)&&this.isExpanded&&this.closeDropdown()}handleResize(){this.debouncedResize()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announceCharacterLimitWarning(this.inputEl.value.length,this.characterLimit),t.stopPropagation(),t.key){case"Enter":case",":t.preventDefault(),this.submitInput(this.addNew,this.inputEl.value.trim());break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"Escape":this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputChanged(t){this.charCount=t.length,this.charCount>=this.characterLimit-5&&this.announceCharacterLimitWarning(this.charCount,this.characterLimit),this.announceExistingOptions(),this.isExpanded||this.openDropdown()}submitInput(t,e){const i=e.match(/\S/);t&&i&&(this.tagsList=this.addTag(e),this.optionsList=this.addOption(e),this.resetInput(),this.maxTags&&this.tagsList.length>=this.maxTags&&this.tagAreaEl.focus())}handleInputArrowDown(){this.isExpanded?this.moveDownListItem():this.openDropdown()}handleInputArrowUp(){this.isExpanded?this.moveUpListItem():this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1])}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():this.closeDropdown()}}handleListItemClick(t){const e=t.target.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.announce(this.generateTagAddedMessage(e)),this.resetInput(),this.tagsList=this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null,(this.maxTags&&this.tagsList.length>=this.maxTags?this.tagAreaEl:this.inputEl).focus())}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){this.focusedTag&&this.focusedTag.dataset.tag&&(this.removeTag(this.focusedTag.dataset.tag),0===this.tagsList.length?this.inputEl.focus():this.focusedTag===this.tagEls[this.tagEls.length-1]&&(this.focusedTag=this.tagEls[this.tagEls.length-2],this.focusTag(this.focusedTag)))}handleBlur(t,e){t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget)&&(this.closeDropdown(),this.fieldWrapperEl.classList.remove("focused"))}handleTagAreaFocus(){this.closeDropdown(),this.focusedTag||(this.focusedTag=this.tagEls[0]),this.focusTag(this.focusedTag)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[0];this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:t)}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):(this.focusedListItem=null,this.inputEl.focus()):this.focusListItem(t)}}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const i=this.includesCaseInsensitive(this.tagsList,t),r=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];return i||(this.announce(this.generateTagAddedMessage(t)),e=e.concat(r||t)),e}removeTag(t){const e=o.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:t});this.announce(e),this.tagsList=this.filterCaseInsensitive(this.tagsList,t);const i=this.csvToArray(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(i,t)&&this.removeOption(t)}focusListItem(t){this.focusedListItem=t,t.focus()}focusTag(t){this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id)}clearTagFocus(){this.tagAreaEl.removeAttribute("aria-activedescendant"),this.focusedTag=null}openDropdown(){this.openUp=d(this.el,this.dropdownEl,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.focusedListItem=null,this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.listItemEls.forEach((t=>{t.tabIndex=-1,t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{const t=o.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:this.optionEls.length});this.optionEls.length>0&&this.announce(t)}))}announceCharacterLimitWarning(t,e){const i=o.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:t,y:e}),r=o.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"});this.announce(`${i}${t>=e?" "+r:""}`)}positionInput(){const t=this.tagEls[this.tagEls.length-1];this.inputEl.style.position="static",this.inputEl.style.width="100%",t&&this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right>=150&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right-8).toString()+"px")}listToCSV(t){return t.join(",")}csvToArray(t){return t?t.split(/, ?/):[]}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){return this.tagsList.map(((t,e)=>{const r=`tag${e+1}`;return i("li",{id:r,class:"tag highlight "+(this.focusedTag&&this.focusedTag.id===r?"focused":""),"data-tag":t,role:"option"},t,i("button",{class:"remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(t)}))}))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const r=`option${e+1}`,a=this.focusedListItem&&this.focusedListItem.id===r,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(a?"focused":""),role:"option",id:r,"data-option":t,tabIndex:a?0:-1,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){const t=o.formatMessage({id:"tagInput.helpTextCanSelect",defaultMessage:"Search and select a tag.",description:"Placeholder text. Use imperative"}),e=o.formatMessage({id:"tagInput.helpTextEditable",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Placeholder text. Use imperative"});let i="";return this.optionsList.length>0&&(i+=t),this.addNew&&(i+=" "+e),i}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},this.generateTagCounterMessage(this.tagsList.length,this.maxTags),this.tagsList.length>=this.maxTags&&i("span",{class:"sr-only"},this.maxTagsReachedMessage)))}render(){const t=this.focusedElement&&(this.focusedElement===this.inputEl||this.focusedElement===this.tagAreaEl||this.focusedElement.classList.contains("add-new-btn")||this.optionsList.length>0&&this.listItemEls.includes(this.focusedElement));return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label)),i("div",{class:"field-wrapper "+(t?"focused":""),ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper"},i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.tagAreaInstructions:""}`,tabindex:this.tagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:this.maxTags&&this.tagsList.length>=this.maxTags?"hidden":"",role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-controls":"dropdown","aria-describedby":"help-text","aria-label":`${this.label} ${this.generateCharacterLimitLabel(this.characterLimit)}`,"aria-expanded":this.isExpanded?"true":"false",placeholder:this.placeholder,maxLength:this.characterLimit,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>{this.openDropdown(),this.clearListItemFocus()},onKeyDown:t=>this.handleInputKeyDown(t)})),i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))),this.info?i("div",{id:"info",class:"info-text"},this.info):"",i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage)))}get el(){return a(this)}static get watchers(){return{tagsList:["reflectSelectedTags"]}}};p.style=':host,wm-tag-input{font-family:inherit;width:100%}:host *,wm-tag-input *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper,wm-tag-input .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label,wm-tag-input .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-tag-input .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-tag-input .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-tag-input .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-tag-input .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label,wm-tag-input .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label,wm-tag-input .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-tag-input .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after,[dir=RTL] wm-tag-input .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-tag-input .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper,wm-tag-input .wrapper{width:100%;position:relative}:host .field-wrapper,wm-tag-input .field-wrapper{position:relative;width:100%;min-height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused,wm-tag-input .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}:host .character-count,wm-tag-input .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:rgba(74, 74, 74, 0.05);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper,wm-tag-input .tags-and-input-wrapper{position:relative;width:100%;padding:0.5rem 0.25rem;margin-bottom:-0.5rem}:host .upper-row,wm-tag-input .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .lower-row,wm-tag-input .lower-row{width:100%;border-radius:0 0 3px 3px}:host #max-tags,wm-tag-input #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:1.875rem;background-color:#6b6b6b;padding:0.5rem 1rem;color:white;font-size:0.875rem}:host .tag-area,wm-tag-input .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}:host .tag-area:focus,wm-tag-input .tag-area:focus{outline:none}:host .tag-area [role=option],wm-tag-input .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:#4a4a4a;background-color:rgba(3, 0, 0, 0.1);padding:0.5rem 0.625rem;margin-bottom:0.5rem;margin-right:0.25rem;margin-left:0.25rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight,wm-tag-input .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}@keyframes fadeIn{0%{background-color:rgba(3, 0, 0, 0.1)}50%{background-color:#c8dfcc}100%{background-color:rgba(3, 0, 0, 0.1)}}:host .tag-area [role=option].focused,wm-tag-input .tag-area [role=option].focused{background-color:#d1d1d1}:host .tag-area [role=option] .remove-btn,wm-tag-input .tag-area [role=option] .remove-btn{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;border:1px solid #575195;color:#575195;border-radius:50%;padding:0;margin-left:0.5rem;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1)}:host .tag-area [role=option] .remove-btn:hover,wm-tag-input .tag-area [role=option] .remove-btn:hover{color:white;background-color:#575195}:host .tag-area [role=option] .remove-btn:before,wm-tag-input .tag-area [role=option] .remove-btn:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156"}:host input,wm-tag-input input{font-family:inherit;border:none;height:1.75rem;padding:0;margin-bottom:0.5rem;margin-right:0.25rem;padding-left:0.5rem;right:0px}:host input.hidden,wm-tag-input input.hidden{display:none}:host input:focus,wm-tag-input input:focus{outline:none}:host .dropdown-wrapper,wm-tag-input .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown,wm-tag-input .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open,wm-tag-input .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards,wm-tag-input .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div,wm-tag-input .dropdown-wrapper li,wm-tag-input .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:#fff;list-style:none;height:2.6875rem;white-space:pre}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn,wm-tag-input .dropdown-wrapper li[role=option],wm-tag-input .dropdown-wrapper li.add-new-btn,wm-tag-input .dropdown-wrapper div[role=option],wm-tag-input .dropdown-wrapper div.add-new-btn{cursor:pointer;color:#575195;font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper li[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper li.add-new-btn[aria-selected=true],wm-tag-input .dropdown-wrapper div[role=option][aria-selected=true],wm-tag-input .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:#6b6b6b;font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused,wm-tag-input .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li[role=option].focused,wm-tag-input .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper li.add-new-btn.focused,wm-tag-input .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div[role=option].focused,wm-tag-input .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),wm-tag-input .dropdown-wrapper div.add-new-btn.focused{outline:none;background:#f4f4f4}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text,wm-tag-input .dropdown-wrapper li.help-text,wm-tag-input .dropdown-wrapper div.help-text{color:#4a4a4a;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child),wm-tag-input .dropdown-wrapper li:not(:last-child),wm-tag-input .dropdown-wrapper div:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .info-text,wm-tag-input .info-text{font-style:italic;margin-top:0.25rem}:host .sr-only,wm-tag-input .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{p as wm_tag_input}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as o,f as n}from"./p-c2abdcba.js";import{i as a,r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as o,f as n}from"./p-c2abdcba.js";import{i as a,r}from"./p-6d7a6954.js";const l=class{constructor(e){t(this,e),this.wmNavigationStateChanged=i(this,"wmNavigationStateChanged",7),this.open=!1,this.isTabbing=!1,this.mainNavigationMessage=a.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"}),this.openTooltipMessage=a.formatMessage({id:"global.openVerb",defaultMessage:"Open",description:"For a button, to open a user interface element"}),this.closeTooltipMessage=a.formatMessage({id:"global.closeVerb",defaultMessage:"Close",description:"For a button, to close a user interface element"}),this.throttledRerender=r((()=>n(this.el)),50)}get isCollapsible(){return window.innerWidth<1024}get ariaExpanded(){return this.isCollapsible?this.open.toString():void 0}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}closeOnEscape(t){"Escape"===t.key&&(this.open=!1)}handleWindowResize(){this.throttledRerender()}handleHamburgerClicked(){this.open=!this.open}handleClickOnItem(){this.open=!1}handleStateChange(){this.isCollapsible&&(this.wmNavigationStateChanged.emit(),this.open?this.expand():this.collapse())}componentWillLoad(){document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.el.focus=()=>{const t=this.open?this.el.shadowRoot.querySelector(".toggle"):document.querySelector("wm-navigation-hamburger"),i=this.el.querySelector("wm-navigation-item");this.isCollapsible?t.focus():i.focus()},this.isCollapsible&&this.open&&(this.wmNavigationStateChanged.emit(),this.expand())}redirectFocusFromBody(t){"BODY"!==document.activeElement.tagName||t.relatedTarget||this.el.focus()}expand(){document.body.tabIndex=0,document.body.addEventListener("focus",this.redirectFocusFromBody.bind(this),!0),setTimeout((()=>this.toggleEl.focus()),250)}collapse(){document.body.tabIndex=-1,document.body.removeEventListener("focus",this.redirectFocusFromBody.bind(this));const t=document.querySelector("wm-navigation-hamburger");t&&t.focus()}focusLastItem(){const t=this.el.querySelectorAll("wm-navigation-item");Array.from(t).pop().focus()}renderOverlay(){return e("div",{class:"overlay",onClick:()=>{this.open=!1}})}render(){return e(s,{role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&e("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.focusLastItem()}),e("div",{class:"tray"},e("div",{class:"toggle-wrapper"},e("wm-button",{ref:t=>this.toggleEl=t,class:"toggle "+(this.isTabbing?"user-is-tabbing":""),"button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?this.closeTooltipMessage:this.openTooltipMessage,"tooltip-position":"left",tabIndex:this.open?void 0:-1,onClick:()=>{this.open=!this.open}})),e("ul",{class:"navlist"},e("slot",null))),this.isCollapsible&&e("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.toggleEl.focus()}))}get el(){return o(this)}static get watchers(){return{open:["handleStateChange"]}}};l.style=":host{z-index:10}:host([aria-expanded=true]){z-index:5000}.tray{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:#fff;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.tray{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.tray ul{visibility:hidden}.tray .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([aria-expanded=true]) .tray{-webkit-transform:translateX(0);transform:translateX(0)}:host([aria-expanded=true]) .tray ul{visibility:visible}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";const h=class{constructor(e){t(this,e),this.wmNavigationHamburgerClicked=i(this,"wmNavigationHamburgerClicked",7),this.tooltipVisible=!1,this.isTabbing=!1,this.open=!1,this.showNavMessage=a.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"})}get tooltipEl(){return document.getElementById("wm-tooltip")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleNavigationStateChanged(t){this.open=t.target.open}componentWillLoad(){this.el.focus=function(){this.shadowRoot.querySelector("button").focus(),requestAnimationFrame((()=>{this.tooltipVisible=!1}))},document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.navId||console.error("wm-navigation-hamburger: nav-id is a required prop")}showTooltip(){this.tooltipEl.textContent=this.showNavMessage,this.tooltipEl.style.top="1.125rem",this.tooltipEl.style.left="2.75rem",this.tooltipEl.style.transitionDelay="500ms",this.tooltipEl.style.opacity="1",setTimeout((()=>{this.tooltipVisible=!0}),500)}hideTooltip(){this.tooltipEl.style.transitionDelay="0s",this.tooltipEl.style.opacity="0",this.tooltipVisible=!1}showTooltipForKeyboardUsers(){this.isTabbing&&this.showTooltip()}handleClick(){this.hideTooltip(),this.wmNavigationHamburgerClicked.emit()}render(){return e(s,{class:"hamburger "+(this.open?"nav-open":"nav-closed")},e("button",{class:this.isTabbing?"user-is-tabbing":void 0,"aria-expanded":this.open,"aria-controls":this.navId,"aria-label":this.showNavMessage,onMouseEnter:()=>this.showTooltip(),onMouseLeave:()=>this.hideTooltip(),onFocus:()=>this.showTooltipForKeyboardUsers(),onBlur:()=>this.hideTooltip(),onClick:()=>this.handleClick()},e("span",{class:"icon"})))}get el(){return o(this)}};h.style='button{display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}button.user-is-tabbing:focus::-moz-focus-inner{border:0}button:hover{background-color:#d7d6d9}.icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f35c";font-size:1.5rem;color:#575195}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';const c=class{constructor(e){t(this,e),this.wmNavigationItemClicked=i(this,"wmNavigationItemClicked",7),this.isTabbing=!1}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.el.focus=function(){this.shadowRoot.querySelector(".link").focus()},document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn()}render(){return e(s,{role:"listitem"},e("a",{class:`link ${this.active?"active":""} ${this.isTabbing?"user-is-tabbing":""}`,href:this.href,onClick:()=>this.wmNavigationItemClicked.emit()},e("div",{class:"icon","aria-hidden":"true"},e("slot",null)),e("div",{class:"text"},this.text)))}get el(){return o(this)}};c.style='.link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative}.link:hover{background-color:#f2f2f2}.link .icon{font-size:1.375rem;color:#6b6b6b}.link .text{font-size:0.875rem}.link.user-is-tabbing:focus{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}.link.active{background-color:#e9e7ec}.link.active:before{content:"";background-color:#575195;position:absolute;height:100%;width:5px;left:0}.link.active .text{color:#575195}.link.active .icon{color:#575195}';export{l as wm_navigation,h as wm_navigation_hamburger,c as wm_navigation_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as r,g as a}from"./p-c2abdcba.js";import{a as e}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as r,g as a}from"./p-c2abdcba.js";import{a as e}from"./p-43f1298b.js";import{s as o,k as n,i as h}from"./p-6d7a6954.js";import{g as p}from"./p-fd8070fb.js";const l=class{constructor(s){t(this,s),this.wmNavigatorLogout=i(this,"wmNavigatorLogout",7),this.authType=1,this.loadFromUserinfo=!1,this.retrievedInfo=!this.loadFromUserinfo,this.parsedProducts=[],this.isOpen=!1,this.openRight=!1,this.isTabbing=!1,this.itemIndexToFocus=0}async componentWillLoad(){this.userName||console.error("wm-navigator: user-name is a required property."),await this.parseData(),this.setFocusIndex()}async parseData(){this.loadFromUserinfo?await p("/platform/navigator/userinfo").then((t=>{this.email=t.email,this.currentProductId=t.current_product_id,this.parsedProducts=this.productKeysToCamelCase(t.products),this.logoutUrl=this.logoutUrl?this.logoutUrl:t.logout_url,this.connectionName=this.connectionName?this.connectionName:t.connection_name,this.email&&this.currentProductId&&(this.retrievedInfo=!0)})).catch((t=>{console.error(t)})):(this.currentProductId=e(this.el),this.products&&(this.parsedProducts="string"==typeof this.products?JSON.parse(this.products):this.products,this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts))),this.parsedProducts.sort(((t,i)=>t.name<i.name?-1:1))}productKeysToCamelCase(t){return t.map((t=>{const i=Object.keys(t);let s={};return i.forEach((i=>{s[o(i)]=t[i]})),s}))}setFocusIndex(){if(this.parsedProducts.length>1){const t=this.getProduct(this.currentProductId);t&&(this.itemIndexToFocus=this.parsedProducts.indexOf(t))}}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeys(t){switch(t.key){case"Escape":t.preventDefault(),this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault(),this.isOpen||(this.itemIndexToFocus=n(this.itemIndexToFocus,t.key,this.navigatorItems.length),this.openMenu())}}handleKeydown(t){const i=t.detail.key,s=t.detail.navItem;switch(i){case"Tab":this.closeMenu();break;case"Enter":case" ":s.click();break;case"ArrowDown":case"ArrowUp":const t=this.itemIndexToFocus;this.itemIndexToFocus=n(this.itemIndexToFocus,i,this.navigatorItems.length),this.focusItem(),this.unfocusItem(t)}}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isOpen&&this.closeMenu()}handleButtonClick(){this.isOpen?this.closeMenu():this.openMenu()}openMenu(){if(this.wrapperEl){const t=this.wrapperEl.clientWidth,i=this.el.getBoundingClientRect().left,s=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>i&&s>i}this.isOpen=!0,this.focusItem()}closeMenu(){this.isOpen=!1,this.buttonFocusHandler(),this.unfocusItem(this.itemIndexToFocus),this.setFocusIndex()}focusItem(){const t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0,t.focused=!0,window.requestAnimationFrame((()=>t.focus()))}unfocusItem(t){const i=this.navigatorItems[t];i.tabIndex=-1,i.focused=!1}buttonFocusHandler(){const t=this.el.shadowRoot.querySelector("priv-navigator-button").shadowRoot.querySelector("button");window.requestAnimationFrame((()=>t.focus()))}renderUserInfo(){return s("div",{class:"user",id:"wm-nav-user","aria-label":h.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},s("p",null,this.userName),s("p",null,this.email))}setAltText(){return h.formatMessage(this.parsedProducts.length>1?{id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"}:{id:"navigator.userinfo",defaultMessage:"User information"})}renderHeading(){return s("h2",null,h.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))}renderList(){return s("ul",{role:"listbox","aria-label":`${h.formatMessage({id:"navigator.WatermarkAppNavigation",defaultMessage:"Watermark App Navigation",description:"list of applications by Watermark Insights"})}`,"aria-describedby":"wm-nav-user"},this.parsedProducts.length>1&&this.renderProductOptions(),this.renderLogoutOption())}renderProductOptions(){return this.parsedProducts.map((t=>{let i,r,a,e;if(i=t.name,r=t.iconUrl,e=this.setProductOnClick(t.id),i&&r)return a=this.currentProductId===t.id,s("priv-navigator-item",{selected:a,id:t.id,onClick:e,role:"option","aria-label":i},s("img",{src:r,alt:i}))}))}setProductOnClick(t){const i=this.getProduct(t);if(this.currentProductId===t)return()=>{};if(i){if(this.loadFromUserinfo||2===this.authType)return()=>window.location.href=i.linkUrl;if(3===this.authType){const t=this.connectionName?`/?connection_name=${this.connectionName}`:"";return()=>window.location.href=i.samlLinkUrl+t}}}renderLogoutOption(){return s("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},s("span",{class:"logout"},h.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))}setLogoutOnclick(){return()=>{this.wmNavigatorLogout.emit(),this.logoutUrl&&(window.location.href=this.logoutUrl)}}get navigatorItems(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))}getProduct(t){return this.parsedProducts.find((i=>i.id===t))}render(){return this.retrievedInfo?s(r,{class:this.isTabbing?"user-is-tabbing":""},s("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText(),isTabbing:this.isTabbing}),s("div",{class:`wrapper ${this.isOpen?"":"hide"} ${this.openRight?"right":""}`,ref:t=>this.wrapperEl=t},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""}get el(){return a(this)}static get watchers(){return{products:["parseData"]}}};l.style=":host,wm-navigator{height:100%;min-width:0;position:relative;display:inline-block}:host .wrapper,wm-navigator .wrapper{overflow:auto;font-size:1.125rem;min-width:13.125rem;width:auto;max-height:80vh;text-align:left;position:absolute;z-index:50;top:100%;right:20px;left:auto;background:#fff;letter-spacing:normal;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper .user,wm-navigator .wrapper .user{background:#f4f4f4;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p,wm-navigator .wrapper .user p{margin:0}:host .wrapper .user p:first-child,wm-navigator .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2,wm-navigator .wrapper h2{background:#2e1b46;color:#fff;font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox],wm-navigator .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide,wm-navigator .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right,wm-navigator .wrapper.right{right:auto;left:20px}:host img,wm-navigator img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout,wm-navigator .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";export{l as wm_navigator}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-c2abdcba.js";import"./p-e2d5f8bd.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-fa632547",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"showInfo":[1,"show-info"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"numFilesInProgress":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["p-e012273a",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["p-cb357a84",[[1,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["p-80b62707",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["p-8a2cabf2",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-5018f8ae",[[1,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]]],[1,"wm-progress-monitor",{"breakpoint":[8]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-410687ea",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-97683ddc",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["p-2e5cb321",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-4073ac6a",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-4f3f7b2b",[[1,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-57c94258",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-80a00759",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["p-caef11cc",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["p-626d5017",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["p-4afa52d4",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["p-c656fcf1",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["p-9c60325b",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["p-b0536ddb",[[0,"wm-wrapper"]]],["p-42dbd978",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["p-962f51ff",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["p-262c75ff",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-dfa80ed1",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["p-0e22a3a4",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["p-17438cd5",[[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]]],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]]]],["p-d2a11410",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]],["p-e4cb8aad",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]]]'),e)));
|
|
1
|
+
import{p as e,b as t}from"./p-c2abdcba.js";import"./p-96b47a13.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t(JSON.parse('[["p-5f589556",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[2,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"showInfo":[1,"show-info"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"announcement":[32],"numFilesInProgress":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["p-9ad7db55",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["p-fcb81a4e",[[1,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["p-ce696630",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["p-f7c2b508",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-65d5f494",[[1,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]]],[1,"wm-progress-monitor",{"breakpoint":[8]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-b5a6aebc",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-6ddfada6",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["p-2e5cb321",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-79b8e996",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-6ac734b7",[[1,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["p-57c94258",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-477688c8",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["p-73a66a6c",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["p-1c75615f",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["p-f5cec3d1",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["p-75346877",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["p-c5a3766f",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["p-b0536ddb",[[0,"wm-wrapper"]]],["p-1cadcfc1",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["p-962f51ff",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["p-262c75ff",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-7833008a",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["p-428b8b24",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["p-d3326191",[[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusOption"]]],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]]]],["p-32da7cdf",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]],["p-3a71d9a3",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]]]'),e)));
|
package/dist/ripple/ripple.js
CHANGED
|
@@ -114,7 +114,7 @@ DOMTokenList
|
|
|
114
114
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
|
-
var url = new URL('./p-
|
|
117
|
+
var url = new URL('./p-375a850f.system.js', new URL(resourcesUrl, window.location.origin));
|
|
118
118
|
System.import(url.href);
|
|
119
119
|
};
|
|
120
120
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
-
export declare class ChartPopover {
|
|
3
|
-
el: HTMLPrivChartPopoverElement;
|
|
4
|
-
private chartEl;
|
|
5
|
-
private btnEl?;
|
|
6
|
-
private liveRegion?;
|
|
7
|
-
wmChartPopoverButtonTriggered: EventEmitter<HTMLWmChartSliceElement>;
|
|
8
|
-
wmProgressIndicatorButtonTriggered: EventEmitter<HTMLWmProgressSliceElement>;
|
|
9
|
-
get eventToEmit(): EventEmitter<HTMLWmChartSliceElement>;
|
|
10
|
-
sliceRef?: HTMLWmChartSliceElement;
|
|
11
|
-
popoverTitle?: string;
|
|
12
|
-
popoverText?: string;
|
|
13
|
-
buttonText?: string;
|
|
14
|
-
open: boolean;
|
|
15
|
-
coords: {
|
|
16
|
-
x?: number;
|
|
17
|
-
y?: number;
|
|
18
|
-
};
|
|
19
|
-
private popoverWidth;
|
|
20
|
-
private popoverClicked;
|
|
21
|
-
handleClickOnDocument(): void;
|
|
22
|
-
handleClick(ev: MouseEvent): void;
|
|
23
|
-
handleButtonClick(): void;
|
|
24
|
-
renderLiveRegion(): void;
|
|
25
|
-
positionPopover(): void;
|
|
26
|
-
render(): any;
|
|
27
|
-
}
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
export declare class ChartPopover {
|
|
3
|
+
el: HTMLPrivChartPopoverElement;
|
|
4
|
+
private chartEl;
|
|
5
|
+
private btnEl?;
|
|
6
|
+
private liveRegion?;
|
|
7
|
+
wmChartPopoverButtonTriggered: EventEmitter<HTMLWmChartSliceElement>;
|
|
8
|
+
wmProgressIndicatorButtonTriggered: EventEmitter<HTMLWmProgressSliceElement>;
|
|
9
|
+
get eventToEmit(): EventEmitter<HTMLWmChartSliceElement>;
|
|
10
|
+
sliceRef?: HTMLWmChartSliceElement;
|
|
11
|
+
popoverTitle?: string;
|
|
12
|
+
popoverText?: string;
|
|
13
|
+
buttonText?: string;
|
|
14
|
+
open: boolean;
|
|
15
|
+
coords: {
|
|
16
|
+
x?: number;
|
|
17
|
+
y?: number;
|
|
18
|
+
};
|
|
19
|
+
private popoverWidth;
|
|
20
|
+
private popoverClicked;
|
|
21
|
+
handleClickOnDocument(): void;
|
|
22
|
+
handleClick(ev: MouseEvent): void;
|
|
23
|
+
handleButtonClick(): void;
|
|
24
|
+
renderLiveRegion(): void;
|
|
25
|
+
positionPopover(): void;
|
|
26
|
+
render(): any;
|
|
27
|
+
}
|