@watermarkinsights/ripple 4.2.0-1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chartFunctions-2c3e010e.js +600 -0
- package/dist/cjs/{functions-4208c444.js → functions-91da05e9.js} +362 -362
- package/dist/cjs/{global-2806c327.js → global-b85941b0.js} +24 -24
- package/dist/cjs/{index-f8ef86de.js → index-fae02cd7.js} +150 -436
- package/dist/cjs/interfaces-245d7bff.js +38 -0
- package/dist/cjs/intl-fa3bb4ae.js +179 -0
- package/dist/cjs/loader.cjs.js +13 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +85 -85
- package/dist/cjs/priv-datepicker.cjs.entry.js +637 -637
- package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
- package/dist/cjs/priv-navigator-item.cjs.entry.js +21 -21
- package/dist/cjs/ripple.cjs.js +7 -4
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +314 -314
- package/dist/cjs/wm-button.cjs.entry.js +174 -174
- package/dist/cjs/wm-chart-slice.cjs.entry.js +17 -17
- package/dist/cjs/wm-chart.cjs.entry.js +164 -164
- package/dist/cjs/wm-datepicker.cjs.entry.js +160 -160
- package/dist/cjs/wm-file-list.cjs.entry.js +10 -10
- package/dist/cjs/wm-file.cjs.entry.js +178 -178
- package/dist/cjs/wm-input.cjs.entry.js +102 -102
- package/dist/cjs/wm-line-chart.cjs.entry.js +448 -448
- package/dist/cjs/wm-modal-footer.cjs.entry.js +27 -27
- package/dist/cjs/wm-modal-header.cjs.entry.js +21 -21
- package/dist/cjs/wm-modal.cjs.entry.js +92 -92
- package/dist/cjs/wm-navigation_3.cjs.entry.js +179 -179
- package/dist/cjs/wm-navigator.cjs.entry.js +251 -251
- package/dist/cjs/wm-option_2.cjs.entry.js +710 -710
- package/dist/cjs/wm-pagination.cjs.entry.js +169 -169
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +151 -151
- package/dist/cjs/wm-search.cjs.entry.js +192 -192
- package/dist/cjs/wm-snackbar.cjs.entry.js +114 -114
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +247 -247
- package/dist/cjs/wm-tag-input.cjs.entry.js +849 -849
- package/dist/cjs/wm-tag-option.cjs.entry.js +33 -33
- package/dist/cjs/wm-timepicker.cjs.entry.js +270 -270
- package/dist/cjs/wm-toggletip.cjs.entry.js +99 -99
- package/dist/cjs/wm-uploader.cjs.entry.js +198 -198
- package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
- package/dist/collection/collection-manifest.json +41 -41
- package/dist/collection/components/charts/chartFunctions.js +456 -456
- package/dist/collection/components/charts/chartFunctions.spec.js +13 -13
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +73 -73
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +254 -257
- package/dist/collection/components/charts/screenshots.e2e.js +30 -30
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +121 -121
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +160 -160
- package/dist/collection/components/charts/wm-chart/wm-chart.js +381 -382
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +26 -26
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +2 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +138 -138
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +717 -717
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +106 -106
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +202 -202
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +54 -54
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +136 -136
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +31 -31
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +119 -119
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +187 -187
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +435 -435
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +35 -35
- package/dist/collection/components/wm-button/wm-button.e2e.js +58 -58
- package/dist/collection/components/wm-button/wm-button.js +452 -454
- package/dist/collection/components/wm-button/wm-button.spec.js +63 -63
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +939 -943
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +71 -71
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -1
- package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +359 -359
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +413 -415
- package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +13 -13
- package/dist/collection/components/wm-file/wm-file.js +380 -380
- package/dist/collection/components/wm-file/wm-file.spec.js +107 -107
- package/dist/collection/components/wm-file-list/wm-file-list.js +42 -42
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +47 -47
- package/dist/collection/components/wm-input/wm-input.e2e.js +26 -26
- package/dist/collection/components/wm-input/wm-input.js +453 -453
- package/dist/collection/components/wm-input/wm-input.spec.js +168 -168
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +18 -18
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +436 -446
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +46 -46
- package/dist/collection/components/wm-modal/wm-modal-footer.js +130 -130
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +8 -8
- package/dist/collection/components/wm-modal/wm-modal-header.js +68 -68
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +5 -5
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +65 -65
- package/dist/collection/components/wm-modal/wm-modal.js +296 -299
- package/dist/collection/components/wm-modal/wm-modal.spec.js +22 -22
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +1 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +112 -112
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +125 -125
- package/dist/collection/components/wm-navigation/wm-navigation.css +2 -0
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +86 -86
- package/dist/collection/components/wm-navigation/wm-navigation.js +209 -209
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +79 -79
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +30 -30
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +103 -103
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +118 -119
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +180 -180
- package/dist/collection/components/wm-navigator/wm-navigator.js +454 -454
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +153 -153
- package/dist/collection/components/wm-option/wm-option.e2e.js +19 -19
- package/dist/collection/components/wm-option/wm-option.js +463 -474
- package/dist/collection/components/wm-option/wm-option.spec.js +39 -39
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +301 -301
- package/dist/collection/components/wm-pagination/wm-pagination.js +327 -327
- package/dist/collection/components/wm-search/wm-search.e2e.js +69 -69
- package/dist/collection/components/wm-search/wm-search.js +414 -415
- package/dist/collection/components/wm-search/wm-search.spec.js +64 -64
- package/dist/collection/components/wm-select/wm-select.e2e.js +443 -443
- package/dist/collection/components/wm-select/wm-select.js +966 -967
- package/dist/collection/components/wm-select/wm-select.spec.js +250 -250
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +114 -114
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +207 -209
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +4 -4
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +188 -190
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +261 -261
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +79 -79
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +6 -6
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -2
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +168 -168
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +1159 -1159
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +147 -147
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +234 -236
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +2 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +147 -147
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +527 -531
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +151 -151
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +61 -61
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +208 -209
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +16 -16
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +56 -56
- package/dist/collection/components/wm-uploader/wm-uploader.js +422 -423
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +149 -149
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +26 -26
- package/dist/collection/global/__mocks__/functions.js +1 -1
- package/dist/collection/global/functions.js +510 -510
- package/dist/collection/global/functions.spec.js +123 -123
- package/dist/collection/global/global.js +16 -16
- package/dist/collection/global/interfaces.js +39 -39
- package/dist/collection/global/intl.js +162 -162
- package/dist/collection/global/services/__mocks__/http-service.js +112 -112
- package/dist/collection/global/services/http-service.js +41 -41
- package/dist/collection/global/themes/default.js +4 -4
- package/dist/collection/global/themes/neutral.js +4 -4
- package/dist/collection/lang/lang.spec.js +13 -13
- package/dist/esm/chartFunctions-36634c04.js +584 -0
- package/dist/esm/{functions-d0e70094.js → functions-5afd09f4.js} +362 -362
- package/dist/esm/{global-08dce155.js → global-91088105.js} +24 -24
- package/dist/esm/{index-f164fbca.js → index-7e11ea42.js} +150 -436
- package/dist/esm/interfaces-89cad2fc.js +35 -0
- package/dist/esm/intl-e2da750a.js +174 -0
- package/dist/esm/loader.js +14 -5
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/priv-chart-popover.entry.js +85 -85
- package/dist/esm/priv-datepicker.entry.js +637 -637
- package/dist/esm/priv-navigator-button.entry.js +18 -18
- package/dist/esm/priv-navigator-item.entry.js +21 -21
- package/dist/esm/ripple.js +8 -5
- package/dist/esm/wm-action-menu_2.entry.js +314 -314
- package/dist/esm/wm-button.entry.js +174 -174
- package/dist/esm/wm-chart-slice.entry.js +17 -17
- package/dist/esm/wm-chart.entry.js +164 -164
- package/dist/esm/wm-datepicker.entry.js +160 -160
- package/dist/esm/wm-file-list.entry.js +10 -10
- package/dist/esm/wm-file.entry.js +178 -178
- package/dist/esm/wm-input.entry.js +102 -102
- package/dist/esm/wm-line-chart.entry.js +448 -448
- package/dist/esm/wm-modal-footer.entry.js +27 -27
- package/dist/esm/wm-modal-header.entry.js +21 -21
- package/dist/esm/wm-modal.entry.js +92 -92
- package/dist/esm/wm-navigation_3.entry.js +179 -179
- package/dist/esm/wm-navigator.entry.js +251 -251
- package/dist/esm/wm-option_2.entry.js +710 -710
- package/dist/esm/wm-pagination.entry.js +169 -169
- package/dist/esm/wm-progress-indicator_3.entry.js +151 -151
- package/dist/esm/wm-search.entry.js +192 -192
- package/dist/esm/wm-snackbar.entry.js +114 -114
- package/dist/esm/wm-tab-item_3.entry.js +247 -247
- package/dist/esm/wm-tag-input.entry.js +849 -849
- package/dist/esm/wm-tag-option.entry.js +33 -33
- package/dist/esm/wm-timepicker.entry.js +270 -270
- package/dist/esm/wm-toggletip.entry.js +99 -99
- package/dist/esm/wm-uploader.entry.js +198 -198
- package/dist/esm/wm-wrapper.entry.js +12 -12
- package/dist/esm-es5/chartFunctions-36634c04.js +1 -0
- package/dist/esm-es5/functions-5afd09f4.js +1 -0
- package/dist/esm-es5/global-91088105.js +1 -0
- package/dist/esm-es5/index-7e11ea42.js +2 -0
- package/dist/esm-es5/{intl-05c9e0c9.js → intl-e2da750a.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/ripple/p-00acacbe.system.entry.js +1 -0
- package/dist/ripple/{p-3446852f.system.entry.js → p-0631be01.system.entry.js} +1 -1
- package/dist/ripple/{p-ad6dc751.entry.js → p-0aecac86.entry.js} +1 -1
- package/dist/ripple/{p-c717d895.entry.js → p-0d9f70ab.entry.js} +1 -1
- package/dist/ripple/{p-b253d2fc.entry.js → p-0f1ff645.entry.js} +1 -1
- package/dist/ripple/{p-63f75d43.entry.js → p-1205fdc1.entry.js} +1 -1
- package/dist/ripple/{p-27f47edc.entry.js → p-1283e85d.entry.js} +1 -1
- package/dist/ripple/{p-43e2a49a.entry.js → p-13594c2e.entry.js} +1 -1
- package/dist/ripple/{p-5a921e55.entry.js → p-13af8346.entry.js} +1 -1
- package/dist/ripple/{p-ceced3d9.system.entry.js → p-15497721.system.entry.js} +1 -1
- package/dist/ripple/p-16363e1c.system.entry.js +1 -0
- package/dist/ripple/{p-3a070f35.entry.js → p-19773c40.entry.js} +1 -1
- package/dist/ripple/{p-b4d862e1.system.entry.js → p-1cde16a7.system.entry.js} +1 -1
- package/dist/ripple/{p-f711c914.entry.js → p-20f5c695.entry.js} +1 -1
- package/dist/ripple/{p-13ca30d8.js → p-24b08e1f.js} +1 -1
- package/dist/ripple/{p-2c834d27.system.entry.js → p-2a95b63f.system.entry.js} +1 -1
- package/dist/ripple/{p-c96a5c94.system.entry.js → p-2e773564.system.entry.js} +1 -1
- package/dist/ripple/p-30bf24f8.system.js +2 -0
- package/dist/ripple/p-3248c0fa.system.entry.js +1 -0
- package/dist/ripple/{p-28e4583c.system.entry.js → p-32b1126c.system.entry.js} +1 -1
- package/dist/ripple/{p-aadf8c59.entry.js → p-36049d2f.entry.js} +1 -1
- package/dist/ripple/p-3aca2871.js +1 -0
- package/dist/ripple/{p-633cd89a.system.entry.js → p-3becce62.system.entry.js} +1 -1
- package/dist/ripple/{p-58174f4e.entry.js → p-3c80bf67.entry.js} +1 -1
- package/dist/ripple/p-40fcae38.system.js +1 -0
- package/dist/ripple/p-47c20b05.entry.js +1 -0
- package/dist/ripple/p-4825101c.system.js +1 -0
- package/dist/ripple/p-56d64283.system.entry.js +1 -0
- package/dist/ripple/p-5e85967a.system.js +1 -0
- package/dist/ripple/{p-067d7922.system.entry.js → p-622a7791.system.entry.js} +1 -1
- package/dist/ripple/{p-aba5a00e.system.entry.js → p-676c1089.system.entry.js} +1 -1
- package/dist/ripple/{p-153701f9.entry.js → p-6abb903c.entry.js} +1 -1
- package/dist/ripple/{p-372faf33.entry.js → p-7529706d.entry.js} +1 -1
- package/dist/ripple/{p-de349bee.entry.js → p-7962f562.entry.js} +1 -1
- package/dist/ripple/{p-8d4734ad.entry.js → p-80aef387.entry.js} +1 -1
- package/dist/ripple/{p-8cace32f.entry.js → p-84a7e757.entry.js} +1 -1
- package/dist/ripple/{p-9fecbc8a.system.js → p-85f744ed.system.js} +1 -1
- package/dist/ripple/{p-05d4e49b.js → p-863e737a.js} +1 -1
- package/dist/ripple/{p-7e56da2e.system.entry.js → p-8ea68cb3.system.entry.js} +1 -1
- package/dist/ripple/{p-1402cfa2.system.js → p-8f3f903f.system.js} +1 -1
- package/dist/ripple/{p-c249063c.entry.js → p-8f8c3705.entry.js} +1 -1
- package/dist/ripple/{p-67d48c33.system.entry.js → p-90ea7e3a.system.entry.js} +1 -1
- package/dist/ripple/{p-a82a8931.entry.js → p-9288659b.entry.js} +1 -1
- package/dist/ripple/{p-6cf7a34a.entry.js → p-935513f8.entry.js} +1 -1
- package/dist/ripple/{p-b452d1d7.entry.js → p-a0bf5eef.entry.js} +1 -1
- package/dist/ripple/{p-06776596.system.entry.js → p-a1e95b05.system.entry.js} +1 -1
- package/dist/ripple/{p-25446670.entry.js → p-a52c5a1c.entry.js} +1 -1
- package/dist/ripple/{p-2c4f312d.system.entry.js → p-a5b23781.system.entry.js} +1 -1
- package/dist/ripple/p-a6be3cca.system.entry.js +1 -0
- package/dist/ripple/{p-fa87bce3.entry.js → p-a9c096b5.entry.js} +1 -1
- package/dist/ripple/p-aafa111a.system.js +1 -0
- package/dist/ripple/{p-1d8b0039.entry.js → p-ad37cdfd.entry.js} +1 -1
- package/dist/ripple/{p-350fe5da.entry.js → p-ae674a54.entry.js} +1 -1
- package/dist/ripple/{p-e24ddae1.entry.js → p-b3c73bc9.entry.js} +1 -1
- package/dist/ripple/{p-e8b58666.system.entry.js → p-b3e08b14.system.entry.js} +1 -1
- package/dist/ripple/p-b5bedd63.js +2 -0
- package/dist/ripple/{p-a69c37e0.entry.js → p-b71a83e3.entry.js} +1 -1
- package/dist/ripple/p-bd537299.system.entry.js +1 -0
- package/dist/ripple/{p-42ebfcfa.entry.js → p-c41603e6.entry.js} +1 -1
- package/dist/ripple/{p-5a4d9897.system.entry.js → p-c5e8f8a5.system.entry.js} +1 -1
- package/dist/ripple/{p-7a8816d9.system.entry.js → p-c76bbedf.system.entry.js} +1 -1
- package/dist/ripple/{p-3af72848.js → p-c7b5ac39.js} +1 -1
- package/dist/ripple/{p-361cc8fc.system.entry.js → p-cbd8a60b.system.entry.js} +1 -1
- package/dist/ripple/{p-3583d113.system.entry.js → p-d04ba5f8.system.entry.js} +1 -1
- package/dist/ripple/{p-1fa2a756.system.entry.js → p-d0f1b8c4.system.entry.js} +1 -1
- package/dist/ripple/{p-bdd4f919.system.entry.js → p-d496bc44.system.entry.js} +1 -1
- package/dist/ripple/{p-7e8daaac.entry.js → p-deb4f5a2.entry.js} +1 -1
- package/dist/ripple/{p-5ac980e2.system.entry.js → p-e3f0b57f.system.entry.js} +1 -1
- package/dist/ripple/{p-f1a92576.system.entry.js → p-e4919f95.system.entry.js} +1 -1
- package/dist/ripple/{p-49118468.entry.js → p-ed942b42.entry.js} +1 -1
- package/dist/ripple/{p-0ecbf569.system.entry.js → p-f30839a1.system.entry.js} +1 -1
- package/dist/ripple/{p-d3f9d028.system.entry.js → p-ff14e4ec.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +20 -16
- package/dist/types/components/charts/chartFunctions.d.ts +13 -13
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +24 -24
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +8 -8
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +39 -39
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +73 -73
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -26
- 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 +7 -7
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +43 -43
- package/dist/types/components/wm-button/wm-button.d.ts +40 -40
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -76
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +31 -31
- package/dist/types/components/wm-file/wm-file.d.ts +40 -40
- package/dist/types/components/wm-file-list/wm-file-list.d.ts +3 -3
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +31 -31
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +11 -11
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +7 -7
- package/dist/types/components/wm-modal/wm-modal.d.ts +24 -24
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +13 -13
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +10 -10
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +23 -23
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +7 -7
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +10 -10
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +57 -57
- package/dist/types/components/wm-option/wm-option.d.ts +36 -36
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +27 -27
- package/dist/types/components/wm-search/wm-search.d.ts +73 -73
- package/dist/types/components/wm-select/wm-select.d.ts +99 -99
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +24 -24
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +30 -30
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +41 -41
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +16 -16
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +48 -48
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +20 -20
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +47 -47
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +4 -4
- package/dist/types/components.d.ts +0 -382
- package/dist/types/global/__mocks__/functions.d.ts +1 -1
- package/dist/types/global/functions.d.ts +4 -4
- package/dist/types/global/interfaces.d.ts +49 -49
- package/dist/types/global/intl.d.ts +31 -31
- package/dist/types/global/services/__mocks__/http-service.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +5 -46
- package/package.json +1 -1
- package/dist/cjs/chartFunctions-cecf8134.js +0 -600
- package/dist/cjs/interfaces-ad9e80a6.js +0 -38
- package/dist/cjs/intl-3fafc6d1.js +0 -179
- package/dist/esm/chartFunctions-23173fce.js +0 -584
- package/dist/esm/interfaces-9b75fb61.js +0 -35
- package/dist/esm/intl-05c9e0c9.js +0 -174
- package/dist/esm-es5/chartFunctions-23173fce.js +0 -1
- package/dist/esm-es5/functions-d0e70094.js +0 -1
- package/dist/esm-es5/global-08dce155.js +0 -1
- package/dist/esm-es5/index-f164fbca.js +0 -2
- package/dist/ripple/p-028ef6db.system.entry.js +0 -1
- package/dist/ripple/p-09d62ddd.entry.js +0 -1
- package/dist/ripple/p-0fe97e85.system.js +0 -2
- package/dist/ripple/p-1453ea51.system.entry.js +0 -1
- package/dist/ripple/p-17d3440b.system.js +0 -1
- package/dist/ripple/p-1cc91907.system.js +0 -1
- package/dist/ripple/p-30b17818.system.entry.js +0 -1
- package/dist/ripple/p-4de51706.js +0 -2
- package/dist/ripple/p-88406560.system.entry.js +0 -1
- package/dist/ripple/p-8f76a838.system.entry.js +0 -1
- package/dist/ripple/p-a99b05de.system.entry.js +0 -1
- package/dist/ripple/p-c18b398c.system.js +0 -1
- package/dist/ripple/p-c235754b.js +0 -1
- package/dist/ripple/p-d03095e7.system.js +0 -1
- /package/dist/esm-es5/{interfaces-9b75fb61.js → interfaces-89cad2fc.js} +0 -0
- /package/dist/ripple/{p-196eb2f3.js → p-c0c111fd.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-30bf24f8.system.js","./p-aafa111a.system.js","./p-85f744ed.system.js"],(function(e){"use strict";var t,r,i,a,n,o,s,l;return{setters:[function(e){t=e.r;r=e.c;i=e.h;a=e.g},function(e){n=e.t;o=e.a;s=e.b},function(e){l=e.g}],execute:function(){var p=':host{font-family:inherit;width:100%}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .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{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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{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{color:var(--wmcolor-text-error)}:host .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{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper{width:100%}:host .wrapper .text-after-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}:host .wrapper .text-after{-ms-flex:0 1 fit-content;flex:0 1 fit-content}:host .wrapper .inputfield-wrapper{height:2.5rem;min-width:6.25rem;border:1px solid var(--wmcolor-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:-ms-flexbox;display:flex}:host .wrapper .inputfield-wrapper.disabled{background-color:var(--wmcolor-input-background-disabled);color:var(--wmcolor-input-text-disabled)}:host .wrapper .inputfield-wrapper.disabled .symbol{background:none}:host .wrapper .symbol{display:-ms-flexbox;display:flex;background-color:var(--wmcolor-input-unit-background);-ms-flex:0 0 44px;flex:0 0 44px;padding-inline:8px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .wrapper .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:var(--wmcolor-input-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .wrapper input{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:none;font-family:inherit;font-size:0.875rem;height:100%;-ms-flex:1;flex:1;padding:0.75rem 1rem;width:100%}:host .wrapper input:focus{outline:none}:host .wrapper input[type=number]{padding-right:0}:host .wrapper .info{font-style:italic;line-height:100%;margin:4px 0}:host .wrapper.invalid .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper.invalid .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;line-height:100%}:host .wrapper:focus .inputfield-wrapper,:host .wrapper.focus .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}:host .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 h=e("wm_input",function(){function e(e){t(this,e);this.wmInputValueChanged=r(this,"wmInputValueChanged",7);this.previousValue="";this.label=undefined;this.labelPosition="top";this.value="";this.disabled=false;this.info=undefined;this.inputWidth="";this.placeholder="";this.requiredField=false;this.errorMessage=undefined;this.characterLimit=undefined;this.symbolBefore=undefined;this.symbolAfter=undefined;this.textAfter=undefined;this.type="text";this.step=1;this.min=undefined;this.max=undefined;this.isSubmit=false;this.announcement=""}e.prototype.getInputWidth=function(){return this.inputWidth?{width:this.inputWidth}:{flex:"1"}};Object.defineProperty(e.prototype,"charCount",{get:function(){return this.value.length},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return n(this.disabled)},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){if(!this.label){console.error("wm-input requires the label property")}o(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){this.previousValue=this.inputEl.value};e.prototype.handleDisabledChange=function(){o(this.el,this.isDisabled)};e.prototype.handleInput=function(e){this.value=e.target.value;if(this.characterLimit&&this.charCount>=this.characterLimit-5){this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}};e.prototype.handleKeyDown=function(e){var t=e.ctrlKey||e.metaKey||e.altKey;var r=/^.$/.test(e.key)&&!t;var i=r&&this.characterLimit&&this.inputEl.value.length>=this.characterLimit;if(i){this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}if(e.key==="Enter"){this.isSubmit&&s(this.el.closest("form"))}};e.prototype.handleBlur=function(){if(this.value!==this.previousValue){this.wmInputValueChanged.emit({value:this.value})}this.previousValue=this.value;this.inputWrapperEl.classList.remove("focus")};e.prototype.handleFocus=function(){this.inputWrapperEl.classList.add("focus")};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.generateCharacterLimitWarning=function(e,t){var r=l.getCharactersEntered(e,t);if(e>=t){r+=" ".concat(l.characterLimitReached)}return r};e.prototype.descriptors=function(){return this.symbolBefore||this.symbolAfter||this.textAfter?"symbol-before inputfield symbol-after text-after info error":"info error"};e.prototype.render=function(){var e=this;return i("div",{class:"wrapper label-".concat(this.labelPosition," ").concat(this.errorMessage?"invalid":""),ref:function(t){return e.inputWrapperEl=t}},i("div",{class:"label-wrapper"},i("label",{htmlFor:"inputfield",class:"label"},this.label,this.characterLimit&&i("span",{class:"sr-only"}," ",l.getCharacterLimit(this.characterLimit)),this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",{class:"inner-wrapper"},i("div",{class:"text-after-wrapper"},i("div",{class:"inputfield-wrapper ".concat(this.isDisabled?"disabled":""),style:this.getInputWidth()},this.symbolBefore&&i("span",{class:"symbol",id:"symbol-before"},this.symbolBefore),i("input",{ref:function(t){return e.inputEl=t},id:"inputfield",disabled:this.isDisabled,"aria-describedby":this.descriptors(),onInput:function(t){return e.handleInput(t)},onKeyDown:function(t){return e.handleKeyDown(t)},onBlur:function(){return e.handleBlur()},onFocus:function(){return e.handleFocus()},placeholder:this.placeholder,autocomplete:"off","aria-required":this.requiredField?"true":null,maxLength:this.characterLimit||undefined,type:this.type,step:this.step,max:this.max,min:this.min,value:this.el.value}),this.symbolAfter&&i("span",{class:"symbol",id:"symbol-after"},this.symbolAfter),this.characterLimit&&typeof this.characterLimit==="number"?i("div",{class:"character-count"},this.charCount,"/",this.characterLimit):""),this.textAfter&&i("span",{class:"text-after",id:"text-after"},this.textAfter)),this.info&&i("div",{id:"info",class:"info"},this.info),i("div",{id:"error","aria-live":"assertive",class:"error-message","aria-atomic":"true"},this.errorMessage),i("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:function(t){return e.liveRegionEl=t}},this.announcement)))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}());h.style=p}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-30bf24f8.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.h;n=e.g}],execute:function(){var i=":host{display:block}.list-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem}";var s=e("wm_file_list",function(){function e(e){t(this,e);this.showInfo="time"}e.prototype.render=function(){return r("div",{role:"list",class:"list-wrapper"},r("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());s.style=i}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i}from"./p-
|
|
1
|
+
import{r as t,c as i}from"./p-b5bedd63.js";const s=class{constructor(s){t(this,s),this.wmChartSliceUpdated=i(this,"wmChartSliceUpdated",7),this.legend=void 0,this.amount=void 0,this.popoverTitle=void 0,this.popoverText=void 0,this.popoverButtonText=void 0}componentDidLoad(){if(parseInt(this.amount)>0&&!this.legend)throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart")}componentDidUpdate(){this.wmChartSliceUpdated.emit()}};export{s as wm_chart_slice}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,e,t,i){function o(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,n){function a(r){try{p(i.next(r))}catch(r){n(r)}}function s(r){try{p(i["throw"](r))}catch(r){n(r)}}function p(r){r.done?t(r.value):o(r.value).then(a,s)}p((i=i.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(r){return function(e){return p([r,e])}}function p(s){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(i=1,o&&(n=s[0]&2?o["return"]:s[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;if(o=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1];n=s;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(s);break}if(n[2])t.ops.pop();t.trys.pop();continue}s=e.call(r,t)}catch(r){s=[6,r];o=0}finally{i=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-0fe97e85.system.js","./p-c18b398c.system.js"],(function(r){"use strict";var e,t,i,o,n,a,s,p,l;return{setters:[function(r){e=r.r;t=r.c;i=r.h;o=r.H;n=r.g},function(r){a=r.i;s=r.t;p=r.a;l=r.m}],execute:function(){var c=':host{--wmcolor-timepicker-background:var(--wmcolor-background);--wmcolor-timepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-timepicker-input-background:var(--wmcolor-input-background);--wmcolor-timepicker-input-border:var(--wmcolor-input-border);--wmcolor-timepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-timepicker-input-text:var(--wmcolor-text);--wmcolor-timepicker-option-background-focus:var(--wmcolor-interactive-background-hover);--wmcolor-timepicker-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-timepicker-option-background:var(--wmcolor-option-background);--wmcolor-timepicker-option-border:var(--wmcolor-option-border);--wmcolor-timepicker-option-text:var(--wmcolor-option-text);--wmcolor-timepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-timepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-timepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-timepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-timepicker-toggle-icon:var(--wmcolor-interactive);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .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}:host .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{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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{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{color:var(--wmcolor-text-error)}:host .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{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid;border-color:var(--wmcolor-timepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled{background-color:var(--wmcolor-timepicker-input-background-disabled);color:var(--wmcolor-timepicker-input-text-disabled)}:host .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-timepicker-toggle-background);border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}:host .wrapper .inner-wrapper button .clock::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:"\\f150";color:var(--wmcolor-timepicker-toggle-icon);font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover{background:var(--wmcolor-timepicker-toggle-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-timepicker-toggle-background-disabled)}:host .wrapper .inner-wrapper button:disabled .clock::after{color:var(--wmcolor-timepicker-toggle-icon-disabled)}[dir=RTL] :host .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper 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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-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:2.5rem;right:0;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-timepicker-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-timepicker-option-text)}:host .wrapper .inner-wrapper .options [role=option]:hover{background:var(--wmcolor-timepicker-option-background-hover);outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:var(--wmcolor-timepicker-option-background-focus)}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-timepicker-option-border)}:host .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper.invalid .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;margin-bottom:4px;top:100%;left:0}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}';var u=r("wm_timepicker",function(){function r(r){e(this,r);this.wmTimepickerInputBlurred=t(this,"wmTimepickerInputBlurred",7);this.wmTimepickerTimeSelected=t(this,"wmTimepickerTimeSelected",7);this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i;this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/;this.timeFormat="hh:mm";this.times=this.generateTimeIntervals();this.openUp=false;this.buttonAriaLabel=a.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."});this.disabled=false;this.value="";this.errorMessage=undefined;this.label="";this.labelPosition="top";this.requiredField=false;this.preselected=undefined;this.isExpanded=false;this.isTabbing=false}Object.defineProperty(r.prototype,"selectedOption",{get:function(){return this.optionsList.filter((function(r){return r.tabIndex===0}))[0]},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"optionsList",{get:function(){return Array.from(this.optionsEl.querySelectorAll("li"))},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"isDisabled",{get:function(){return s(this.disabled)},enumerable:false,configurable:true});r.prototype.isValidTime=function(r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.isValidTimeInternal(r)]}))}))};r.prototype.isValidTimeInternal=function(r){return this.twelveHrValid.test(r)||this.twentyFourHrValid.test(r)};r.prototype.reformatTime=function(r,e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.reformatTimeInternal(r,e)]}))}))};r.prototype.reformatTimeInternal=function(r,e){var t=this.splitTime(e),i=t[0],o=t[1],n=t[2];if(r==="12"){if(i===12&&!n){n="PM"}if(i===0||i===24){i=12}if(i>12){i-=12;n="PM"}if(n&&n.toUpperCase().includes("P")){n="PM"}else{n="AM"}return"".concat(i.toString().padStart(2,"0"),":").concat(o," ").concat(n)}else if(r==="24"){if(i===24){i=0}if(i===12&&n&&n.toUpperCase().includes("A")){i-=12}if(n&&n.toUpperCase().includes("P")&&i!==12){i+=12}return"".concat(i.toString().padStart(2,"0"),":").concat(o)}else{return e}};r.prototype.toggleTabbingOn=function(){this.isTabbing=true};r.prototype.toggleTabbingOff=function(){this.isTabbing=false};r.prototype.handleKey=function(r){switch(r.key){case"ArrowDown":r.preventDefault();if(this.isExpanded===false){this.open("next")}else{this.moveNext(this.selectedOption)}break;case"ArrowUp":r.preventDefault();if(this.isExpanded===false){this.open("previous")}else{this.movePrevious(this.selectedOption)}break;case"Enter":case" ":if(this.isExpanded){r.preventDefault();this.handleOptionClick(this.selectedOption.dataset.time)}break;case"Escape":r.preventDefault();if(this.isExpanded){r.stopPropagation();this.close()}break;case"Tab":if(this.isExpanded){this.close(false)}break;case"Home":r.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[0])}break;case"End":r.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[this.optionsList.length-1])}break}};r.prototype.handleDisabledChange=function(){p(this.el,this.isDisabled)};r.prototype.handleValueChange=function(){this.inputEl.value=this.value?this.value:""};r.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none.")}this.timeFormat=a.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"});p(this.el,this.isDisabled)};r.prototype.componentDidLoad=function(){this.optionsEl.classList.add("hidden")};r.prototype.handleOptionClick=function(r){this.close();this.wmTimepickerTimeSelected.emit({time:r})};r.prototype.handleInputBlur=function(){this.wmTimepickerInputBlurred.emit();this.tpWrapper.classList.remove("focus")};r.prototype.generateTimeIntervals=function(){var r=[];var e=0;for(var t=0;e<24*60;t++){var i=Math.floor(e/60);var o=i.toString().padStart(2,"0");var n=(e%60).toString();var a=n.padStart(2,"0");r[t]="".concat(o,":").concat(a);e=e+15}return r};r.prototype.splitTime=function(r){var e=this.twelveHrValid.exec(r)||this.twentyFourHrValid.exec(r);var t=parseInt(e[1]);var i=e[2]||"00";var o=e?e[3]:undefined;if(t===0&&(o===null||o===void 0?void 0:o.toUpperCase().includes("P"))){o="AM"}return[t,i,o]};r.prototype.open=function(r){var e=this;this.openUp=l(this.el,this.optionsEl.clientHeight);this.isExpanded=true;this.optionsEl.classList.remove("hidden");var t=this.optionsList[36];if(this.preselected){t=this.optionsList.filter((function(r){return r.dataset.time==e.preselected}))[0]}else if(this.isValidTimeInternal(this.value)){var i=this.findNearestTimeInterval(this.reformatTimeInternal("24",this.value));t=this.optionsList.filter((function(r){return r.dataset.time==i}))[0]}this.optionsEl.scrollTop=(this.optionsList.findIndex((function(r){return r.textContent===(t===null||t===void 0?void 0:t.textContent)}))-2)*t.offsetHeight;this.focusOption(t);window.requestAnimationFrame((function(){if(r==="next"){e.moveNext(e.selectedOption)}else if(r==="previous"){e.movePrevious(e.selectedOption)}}))};r.prototype.close=function(r){var e=this;if(r===void 0){r=true}this.isExpanded=false;window.setTimeout((function(){e.optionsEl.classList.add("hidden");if(r){e.buttonEl.focus()}}),150)};r.prototype.focusOption=function(r){this.optionsList.forEach((function(r){r.tabIndex=-1}));r.tabIndex=0;r.scrollIntoView({block:"nearest"});r.focus()};r.prototype.movePrevious=function(r){this.focusOption(r.previousElementSibling?r.previousElementSibling:this.optionsList[this.optionsList.length-1])};r.prototype.moveNext=function(r){this.focusOption(r.nextElementSibling?r.nextElementSibling:this.optionsList[0])};r.prototype.findNearestTimeInterval=function(r){var e=parseInt(r.slice(3,5));if(e%15!==0){var t=parseInt(r.slice(0,2));var i=(Math.round(e/15)*15).toString().padStart(2,"0");if(i==="60"){i="00";var o=t+1;if(o===24){o=0}r=r.replace("".concat(t.toString().padStart(2,"0"),":"),"".concat(o.toString().padStart(2,"0"),":"))}if(parseInt(i)<8){i="00"}r=r.replace(":".concat(e.toString().padStart(2,"0")),":".concat(i))}return r};r.prototype.renderOptions=function(){var r=this;return this.times.map((function(e,t){return i("li",{id:"option".concat(t+1),"data-time":e,role:"option",onClick:function(){return r.handleOptionClick(e)}},r.reformatTimeInternal("12",e))}))};r.prototype.render=function(){var r=this;return i(o,{onBlur:function(){return r.close(false)}},i("div",{class:"wrapper label-".concat(this.labelPosition," ").concat(!!this.errorMessage?"invalid":""),ref:function(e){return r.tpWrapper=e}},i("div",{class:"label-wrapper"},this.labelPosition!=="none"&&i("label",{id:"label",class:"label",htmlFor:"time-input"},this.label,this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",null,i("div",{class:"inner-wrapper"},i("input",{id:"time-input","aria-label":this.label,"aria-describedby":"error",ref:function(e){return r.inputEl=e},onBlur:function(){return r.handleInputBlur()},onInput:function(){return r.value=r.inputEl.value},disabled:this.isDisabled,"aria-required":this.requiredField?"true":null,placeholder:this.timeFormat,autocomplete:"off",value:this.value,onFocus:function(){return r.tpWrapper.classList.add("focus")}}),i("button",{id:"btn",class:this.isTabbing?"user-is-tabbing":"",ref:function(e){return r.buttonEl=e},disabled:this.isDisabled,"aria-controls":"list","aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":"time-input",onClick:function(){return r.isExpanded?r.close():r.open()},onMouseDown:function(e){e.preventDefault();r.buttonEl.focus()}},i("span",{class:"clock"})),i("ul",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list",role:"listbox","aria-labelledby":"label","aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:function(e){return r.optionsEl=e}},this.renderOptions())),i("div",{id:"error",class:"error","aria-live":"assertive","aria-atomic":"true"},this.errorMessage))))};Object.defineProperty(r,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(r.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(r,"watchers",{get:function(){return{disabled:["handleDisabledChange"],value:["handleValueChange"]}},enumerable:false,configurable:true});return r}());u.style=c}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function a(e){try{p(o.next(e))}catch(e){n(e)}}function s(e){try{p(o["throw"](e))}catch(e){n(e)}}function p(e){e.done?r(e.value):i(e.value).then(a,s)}p((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,i,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return p([e,t])}}function p(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(n=r.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){r.label=s[1];break}if(s[0]===6&&r.label<n[1]){r.label=n[1];n=s;break}if(n&&r.label<n[2]){r.label=n[2];r.ops.push(s);break}if(n[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{o=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-30bf24f8.system.js","./p-aafa111a.system.js"],(function(e){"use strict";var t,r,o,i,n,a,s,p,l;return{setters:[function(e){t=e.r;r=e.c;o=e.h;i=e.H;n=e.g},function(e){a=e.i;s=e.t;p=e.a;l=e.m}],execute:function(){var c=':host{--wmcolor-timepicker-background:var(--wmcolor-background);--wmcolor-timepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-timepicker-input-background:var(--wmcolor-input-background);--wmcolor-timepicker-input-border:var(--wmcolor-input-border);--wmcolor-timepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-timepicker-input-text:var(--wmcolor-text);--wmcolor-timepicker-option-background-focus:var(--wmcolor-interactive-background-hover);--wmcolor-timepicker-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-timepicker-option-background:var(--wmcolor-option-background);--wmcolor-timepicker-option-border:var(--wmcolor-option-border);--wmcolor-timepicker-option-text:var(--wmcolor-option-text);--wmcolor-timepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-timepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-timepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-timepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-timepicker-toggle-icon:var(--wmcolor-interactive);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .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}:host .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{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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{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{color:var(--wmcolor-text-error)}:host .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{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid;border-color:var(--wmcolor-timepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled{background-color:var(--wmcolor-timepicker-input-background-disabled);color:var(--wmcolor-timepicker-input-text-disabled)}:host .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-timepicker-toggle-background);border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}:host .wrapper .inner-wrapper button .clock::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:"\\f150";color:var(--wmcolor-timepicker-toggle-icon);font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover{background:var(--wmcolor-timepicker-toggle-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-timepicker-toggle-background-disabled)}:host .wrapper .inner-wrapper button:disabled .clock::after{color:var(--wmcolor-timepicker-toggle-icon-disabled)}[dir=RTL] :host .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper 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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-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:2.5rem;right:0;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-timepicker-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-timepicker-option-text)}:host .wrapper .inner-wrapper .options [role=option]:hover{background:var(--wmcolor-timepicker-option-background-hover);outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:var(--wmcolor-timepicker-option-background-focus)}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-timepicker-option-border)}:host .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper.invalid .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;margin-bottom:4px;top:100%;left:0}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}';var d=e("wm_timepicker",function(){function e(e){t(this,e);this.wmTimepickerInputBlurred=r(this,"wmTimepickerInputBlurred",7);this.wmTimepickerTimeSelected=r(this,"wmTimepickerTimeSelected",7);this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i;this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/;this.timeFormat="hh:mm";this.times=this.generateTimeIntervals();this.openUp=false;this.buttonAriaLabel=a.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."});this.disabled=false;this.value="";this.errorMessage=undefined;this.label="";this.labelPosition="top";this.requiredField=false;this.preselected=undefined;this.isExpanded=false;this.isTabbing=false}Object.defineProperty(e.prototype,"selectedOption",{get:function(){return this.optionsList.filter((function(e){return e.tabIndex===0}))[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"optionsList",{get:function(){return Array.from(this.optionsEl.querySelectorAll("li"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return s(this.disabled)},enumerable:false,configurable:true});e.prototype.isValidTime=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.isValidTimeInternal(e)]}))}))};e.prototype.isValidTimeInternal=function(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)};e.prototype.reformatTime=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){return[2,this.reformatTimeInternal(e,t)]}))}))};e.prototype.reformatTimeInternal=function(e,t){var r=this.splitTime(t),o=r[0],i=r[1],n=r[2];if(e==="12"){if(o===12&&!n){n="PM"}if(o===0||o===24){o=12}if(o>12){o-=12;n="PM"}if(n&&n.toUpperCase().includes("P")){n="PM"}else{n="AM"}return"".concat(o.toString().padStart(2,"0"),":").concat(i," ").concat(n)}else if(e==="24"){if(o===24){o=0}if(o===12&&n&&n.toUpperCase().includes("A")){o-=12}if(n&&n.toUpperCase().includes("P")&&o!==12){o+=12}return"".concat(o.toString().padStart(2,"0"),":").concat(i)}else{return t}};e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":e.preventDefault();if(this.isExpanded===false){this.open("next")}else{this.moveNext(this.selectedOption)}break;case"ArrowUp":e.preventDefault();if(this.isExpanded===false){this.open("previous")}else{this.movePrevious(this.selectedOption)}break;case"Enter":case" ":if(this.isExpanded){e.preventDefault();this.handleOptionClick(this.selectedOption.dataset.time)}break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.close()}break;case"Tab":if(this.isExpanded){this.close(false)}break;case"Home":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[0])}break;case"End":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[this.optionsList.length-1])}break}};e.prototype.handleDisabledChange=function(){p(this.el,this.isDisabled)};e.prototype.handleValueChange=function(){this.inputEl.value=this.value?this.value:""};e.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none.")}this.timeFormat=a.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"});p(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){this.optionsEl.classList.add("hidden")};e.prototype.handleOptionClick=function(e){this.close();this.wmTimepickerTimeSelected.emit({time:e})};e.prototype.handleInputBlur=function(){this.wmTimepickerInputBlurred.emit();this.tpWrapper.classList.remove("focus")};e.prototype.generateTimeIntervals=function(){var e=[];var t=0;for(var r=0;t<24*60;r++){var o=Math.floor(t/60);var i=o.toString().padStart(2,"0");var n=(t%60).toString();var a=n.padStart(2,"0");e[r]="".concat(i,":").concat(a);t=t+15}return e};e.prototype.splitTime=function(e){var t=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);var r=parseInt(t[1]);var o=t[2]||"00";var i=t?t[3]:undefined;if(r===0&&(i===null||i===void 0?void 0:i.toUpperCase().includes("P"))){i="AM"}return[r,o,i]};e.prototype.open=function(e){var t=this;this.openUp=l(this.el,this.optionsEl.clientHeight);this.isExpanded=true;this.optionsEl.classList.remove("hidden");var r=this.optionsList[36];if(this.preselected){r=this.optionsList.filter((function(e){return e.dataset.time==t.preselected}))[0]}else if(this.isValidTimeInternal(this.value)){var o=this.findNearestTimeInterval(this.reformatTimeInternal("24",this.value));r=this.optionsList.filter((function(e){return e.dataset.time==o}))[0]}this.optionsEl.scrollTop=(this.optionsList.findIndex((function(e){return e.textContent===(r===null||r===void 0?void 0:r.textContent)}))-2)*r.offsetHeight;this.focusOption(r);window.requestAnimationFrame((function(){if(e==="next"){t.moveNext(t.selectedOption)}else if(e==="previous"){t.movePrevious(t.selectedOption)}}))};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.buttonEl.focus()}}),150)};e.prototype.focusOption=function(e){this.optionsList.forEach((function(e){e.tabIndex=-1}));e.tabIndex=0;e.scrollIntoView({block:"nearest"});e.focus()};e.prototype.movePrevious=function(e){this.focusOption(e.previousElementSibling?e.previousElementSibling:this.optionsList[this.optionsList.length-1])};e.prototype.moveNext=function(e){this.focusOption(e.nextElementSibling?e.nextElementSibling:this.optionsList[0])};e.prototype.findNearestTimeInterval=function(e){var t=parseInt(e.slice(3,5));if(t%15!==0){var r=parseInt(e.slice(0,2));var o=(Math.round(t/15)*15).toString().padStart(2,"0");if(o==="60"){o="00";var i=r+1;if(i===24){i=0}e=e.replace("".concat(r.toString().padStart(2,"0"),":"),"".concat(i.toString().padStart(2,"0"),":"))}if(parseInt(o)<8){o="00"}e=e.replace(":".concat(t.toString().padStart(2,"0")),":".concat(o))}return e};e.prototype.renderOptions=function(){var e=this;return this.times.map((function(t,r){return o("li",{id:"option".concat(r+1),"data-time":t,role:"option",onClick:function(){return e.handleOptionClick(t)}},e.reformatTimeInternal("12",t))}))};e.prototype.render=function(){var e=this;return o(i,{onBlur:function(){return e.close(false)}},o("div",{class:"wrapper label-".concat(this.labelPosition," ").concat(!!this.errorMessage?"invalid":""),ref:function(t){return e.tpWrapper=t}},o("div",{class:"label-wrapper"},this.labelPosition!=="none"&&o("label",{id:"label",class:"label",htmlFor:"time-input"},this.label,this.requiredField&&o("span",{class:"required","aria-hidden":"true"},"*"))),o("div",null,o("div",{class:"inner-wrapper"},o("input",{id:"time-input","aria-label":this.label,"aria-describedby":"error",ref:function(t){return e.inputEl=t},onBlur:function(){return e.handleInputBlur()},onInput:function(){return e.value=e.inputEl.value},disabled:this.isDisabled,"aria-required":this.requiredField?"true":null,placeholder:this.timeFormat,autocomplete:"off",value:this.value,onFocus:function(){return e.tpWrapper.classList.add("focus")}}),o("button",{id:"btn",class:this.isTabbing?"user-is-tabbing":"",ref:function(t){return e.buttonEl=t},disabled:this.isDisabled,"aria-controls":"list","aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":"time-input",onClick:function(){return e.isExpanded?e.close():e.open()},onMouseDown:function(t){t.preventDefault();e.buttonEl.focus()}},o("span",{class:"clock"})),o("ul",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list",role:"listbox","aria-labelledby":"label","aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:function(t){return e.optionsEl=t}},this.renderOptions())),o("div",{id:"error",class:"error","aria-live":"assertive","aria-atomic":"true"},this.errorMessage))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["handleDisabledChange"],value:["handleValueChange"]}},enumerable:false,configurable:true});return e}());d.style=c}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as i,h as e,H as o,g as s}from"./p-4de51706.js";import{d as r,y as n,v as a,z as l,A as h,B as p}from"./p-3af72848.js";import{m as c,n as d}from"./p-13ca30d8.js";import{l as g,c as v,g as x}from"./p-05d4e49b.js";const b=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.displayedPopover=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-p(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.displayedPopover=-1,this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.displayedPopover=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},c(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:p}=o;if(null!==a){const{color:c,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":c,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let b=`${r} ${p?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];b+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":b,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.displayedPopover=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.displayedPopover=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.displayedPopover=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.displayedPopover=i}))))}renderPopover(){const t=this.popoverData[this.displayedPopover],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.displayedPopover].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+c+"%":"unset","--rightPosition":p?100-i+c+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!p&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.displayedPopover>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.displayedPopover-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.displayedPopover].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.displayedPopover>0?this.popoverData[this.displayedPopover-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.displayedPopover].xPositionPercent+"%"}})}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.displayedPopover=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.displayedPopover&&this.renderHoverIndicator(),-1!==this.displayedPopover&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};b.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{-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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus);border-radius:3px}:host .line .icon:focus:before::-moz-focus-inner{border:0}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .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{b as wm_line_chart}
|
|
1
|
+
import{r as t,f as i,h as e,H as o,g as s}from"./p-b5bedd63.js";import{d as r,y as n,v as a,z as l,A as h,B as p}from"./p-c7b5ac39.js";import{m as c,n as d}from"./p-24b08e1f.js";import{l as g,c as v,g as x}from"./p-863e737a.js";const b=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.displayedPopover=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-p(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.displayedPopover=-1,this.plotAreaEl.querySelectorAll(".point").forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.displayedPopover=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},c(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:p}=o;if(null!==a){const{color:c,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":c,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let b=`${r} ${p?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];b+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":b,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.displayedPopover=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.displayedPopover=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.displayedPopover=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.displayedPopover=i}))))}renderPopover(){const t=this.popoverData[this.displayedPopover],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.displayedPopover].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+c+"%":"unset","--rightPosition":p?100-i+c+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!p&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.displayedPopover>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.displayedPopover-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.displayedPopover].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.displayedPopover>0?this.popoverData[this.displayedPopover-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.displayedPopover].xPositionPercent+"%"}})}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.displayedPopover=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.displayedPopover&&this.renderHoverIndicator(),-1!==this.displayedPopover&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};b.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{-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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus);border-radius:3px}:host .line .icon:focus:before::-moz-focus-inner{border:0}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}:host .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{b as wm_line_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-4de51706.js";import{i as s,c as i,f as e,e as n,d as a}from"./p-3af72848.js";const r="#ff5f4e",o="#19a1a9",h="#088000",c="#2e1b46",l="#8b86ca",d="#575195",u="#6b6b6b",g={doughnut:{size:155,colors:[h,u],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[l,c,u],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[o,r,u],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[d,o,r,u],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[l,c,"#0089e4",h,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[h,u],padding:0,category:"stackedBar"},bar2:{size:400,colors:[u,d,o,r],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[u,d,c,o,r],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",o,"#8e4129",r],padding:0,category:"stackedBar"},bar4:{size:400,colors:[r,o,d],padding:0,category:"stackedBar"},bar5:{size:400,colors:[u,l,c,"#0089e4",h,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[l],padding:0,category:"simpleBar"},bar7:{size:400,colors:[d,o,r,u],padding:0,category:"simpleBar"}};function p(t){return"percentage"===t||"amount"===t?"show-values":""}const f=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),b=s.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function m(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function v(t,s,i){return i?Math.round(100*t/s):Math.round(1e4*t/s)/100}function w(t,s){return 360*t/s}function y(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function k(t,s,i,e){var n=y(t+t*s*Math.cos(Math.PI*i/180)),a=y(t+t*s*Math.sin(Math.PI*i/180));return void 0!==e?{x1:n,y1:a,x2:y(t+t*s*Math.cos(Math.PI*e/180)),y2:y(t+t*s*Math.sin(Math.PI*e/180))}:{x:n,y:a}}function x(t,s,i,e,n){var a=y(n/2*t);return`A ${a}, ${a} 0 ${s} ${y(i)}, ${y(e)}`}function $(t,s){const i=t/s,e=10**Math.floor(Math.log10(i)),n=i/e;let a;return a=n>5?10*e:n>3?5*e:n>2?3*e:n>1.5?2*e:n>1?1.5*e:e,a}function M(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function z(t,s){this.popoverEl&&!this.isTabbing&&(s.coords={x:t.clientX,y:t.clientY},D.call(this,s))}function C(t,s){this.popoverEl&&this.isTabbing&&(s.coords=i(t.target),D.call(this,s))}function B(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,F.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,A.call(this);break;case"Tab":T.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function D(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=e(this.el);i&&i.addEventListener("scroll",(()=>{s()}))}}function A(){const t=n(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,s)}function F(){if(this.sliceEls){const t=n(document.activeElement);let s=this.sliceEls.indexOf(t);-1===s?s=0:0===s?s=this.sliceEls.length-1:s-=1,S.call(this,s)}}function S(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.popoverEl&&(this.popoverEl.open=!1),this.componentWrapperEl.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 T(){this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.componentWrapperEl.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1)}),100)}async function K(t){this.slicesDetails=[];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(((i,e)=>{const n=parseInt(i.getAttribute("amount")||"0"),a=v(n,this.total,!0);let r=e;"bar5"===t&&(r=this.notStartedColor?e:e+1),"bar6"===t&&(r=0);const o=g[t].colors[r],h={amount:n,perc:a,legend:i.getAttribute("legend"),color:o||u,offset:s,id:`${this.uid}-${e+1}`,title:i.getAttribute("popover-title"),text:i.getAttribute("popover-text"),buttonText:i.getAttribute("popover-button-text"),sliceRef:i,inSmallCluster:!1};s+=n,this.slicesDetails.push(h)}))}function j(t,s,i){const e=w(s,this.total)-90,n=t/this.total*360;let a=e+n;const r=n>180?"1 1":"0 1",o=n>180?"1 0":"0 0",h=this.chartDetails.size/2,c=this.chartDetails.thickness,l="doughnut"===i?2.25:3;360===n&&(a-=.01);const d=k(h,1,e+1.5,a),u=k(h,c,e+l,a);return`M ${d.x1}, ${d.y1} `+x(1,r,d.x2,d.y2,this.chartDetails.size)+` L ${u.x2}, ${u.y2} `+x(c,o,u.x1,u.y1,this.chartDetails.size)+" z"}function I(){const i=s.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return t("div",{id:"chart-instructions"},i)}function W(s){const i=this.chartDetails.size+this.chartDetails.padding,e="doughnut"===s;let n=e?this.slicesDetails:function(t,s){let i=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),e=0;return i.forEach(((t,n)=>{const a=i[n===i.length-1?0:n+1],r=v(i[0===n?i.length-1:n-1].amount,s,!0),o=v(a.amount,s,!0);t.offset=e,e+=t.amount,t.inSmallCluster=function(t,s,i,e){let n=s<4&&(t<5||e<5);return 0===s&&i>0&&(e<8||t<8)&&(n=!0),n}(r,t.perc,t.amount,o)})),i}(this.slicesDetails,this.total);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"})))),n.map((t=>E.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"},v(n[0].amount,this.total,!0)+"%"):t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},n.map((t=>t.amount>0&&!t.inSmallCluster?G.call(this,t):"")))))}function E(s,i){return t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.amount?s.color:"transparent",d:j.call(this,s.amount,s.offset,i),onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t),role:"img","aria-label":s.legend}))}function G(s){const i=w(s.offset+s.amount/2,this.total);let{x:e,y:n}=k(this.chartDetails.size/2,1.4,i-90);return t("text",{class:"value",x:e+"px",y:n+"px"},`${s.perc>0?s.perc:"<1"}%`)}function L(s){const i="bar"===s;return t("div",{class:"chart-wrapper bar-wrapper"},i?t("div",{class:"single-perc"},v(this.slicesDetails[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:`inner-stacked-bar-wrapper ${p(this.valueFormat)}`},i?"":t("div",{class:"values"},this.slicesDetails.map(((t,s)=>this.renderBarText(t,s)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map(((t,s)=>N.call(this,t,s)))),i?O.call(this):""))}function N(s,i){const e=i!==this.slicesDetails.length-1,n=`calc(${v(s.amount,this.total,!1)}%${e?" - 2px":""})`;return t("div",{class:"segment stacked-bar-segment "+(0===v(s.amount,this.total,!1)?"zero":""),style:{backgroundColor:s.color,width:n},onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t)},t("span",{class:"sr-only"},s.legend))}function R(s){const i=this.slicesDetails.map((t=>t.amount)).reduce(((t,s)=>t>s?t:s)),e=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);let n=(a=this.el.getBoundingClientRect().width-e-48,Math.round(a/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(a)));var a;let r=$(i,n);const o=Math.floor((n*r-i)/r);n-=o,this.el.style.setProperty("--backgroundSize",100/n+"%"),this.el.style.setProperty("--labelWidth",this.labelWidth),"bar7"!==s||this.showBarLegend||this.el.style.setProperty("--labelWidth","0px");const h=[];this.slicesDetails.forEach((e=>{e.legend&&h.push(function(s,i,e){return t("label",{class:`label${"bar7"!==e||i?"":" hidden"}`},s)}(e.legend,this.showBarLegend,s)),h.push(U.call(this,e,r,n,i))}));const c=[];for(let s=1;s<=n;s++){const i=m(s*r);c.push(t("div",{class:"tick"},t("span",null,i)))}const l="bar6"===s&&this.showGrid&&this.el.getBoundingClientRect().width>300;return t("div",{class:"chart-wrapper simple-bar-wrapper"},t("div",{class:`chart ${p(this.valueFormat)}`},l&&t("div",{class:"gridlines"}),t("div",{class:"rows"},h)),l&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),c))}function U(s,i,e,n){const a=v(s.amount,"bar6"===this.currentChartType?i*e:n,!1),r=a?a+"%":"1px",o=m(s.amount);let h="amount"===this.valueFormat?o:"";return"bar6"===this.currentChartType&&"percentage"===this.valueFormat?h=s.amount+"%":"bar7"===this.currentChartType&&"percentage"===this.valueFormat&&(h=(0===this.total?"0":v(s.amount,this.total,!0))+"%"),t("div",{class:"bar segment",style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t)},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const i=!this.chartDetails.isBar&&this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return t("div",{class:"legend-wrapper"},t("div",{class:`legend ${s} ${"bar"===this.mode?"--top":"--bottom"}`,"aria-hidden":"true"},this.slicesDetails.map((t=>{if(t.amount||t.legend)return H({key:t.legend,color:t.color})}))),i&&q())}}function H(s){return t("div",{class:"legend-item"},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key))}function O(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function q(){return t("div",{class:"hidden-values-warning"},f,t("br",null),b)}export{g as a,v as b,L as c,W as d,I as e,V as f,K as g,B as h,q as i,T as j,O as k,H as l,m,$ as n,R as r}
|
|
1
|
+
import{h as t}from"./p-b5bedd63.js";import{i as s,c as i,f as e,e as n,d as a}from"./p-c7b5ac39.js";const r="#ff5f4e",o="#19a1a9",h="#088000",c="#2e1b46",d="#8b86ca",l="#575195",u="#6b6b6b",g={doughnut:{size:155,colors:[h,u],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[d,c,u],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[o,r,u],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[l,o,r,u],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[d,c,"#0089e4",h,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[h,u],padding:0,category:"stackedBar"},bar2:{size:400,colors:[u,l,o,r],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[u,l,c,o,r],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",o,"#8e4129",r],padding:0,category:"stackedBar"},bar4:{size:400,colors:[r,o,l],padding:0,category:"stackedBar"},bar5:{size:400,colors:[u,d,c,"#0089e4",h,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[d],padding:0,category:"simpleBar"},bar7:{size:400,colors:[l,o,r,u],padding:0,category:"simpleBar"}};function p(t){return"percentage"===t||"amount"===t?"show-values":""}const f=s.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"}),b=s.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function m(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function v(t,s,i){return i?Math.round(100*t/s):Math.round(1e4*t/s)/100}function w(t,s){return 360*t/s}function y(t){return parseFloat((Math.floor(100*t)/100).toFixed(2))}function k(t,s,i,e){var n=y(t+t*s*Math.cos(Math.PI*i/180)),a=y(t+t*s*Math.sin(Math.PI*i/180));return void 0!==e?{x1:n,y1:a,x2:y(t+t*s*Math.cos(Math.PI*e/180)),y2:y(t+t*s*Math.sin(Math.PI*e/180))}:{x:n,y:a}}function x(t,s,i,e,n){var a=y(n/2*t);return`A ${a}, ${a} 0 ${s} ${y(i)}, ${y(e)}`}function $(t,s){const i=t/s,e=10**Math.floor(Math.log10(i)),n=i/e;let a;return a=n>5?10*e:n>3?5*e:n>2?3*e:n>1.5?2*e:n>1?1.5*e:e,a}function M(t){if(this.popoverEl&&this.popoverEl.open&&"Enter"===t.key){const t=this.popoverEl.querySelector("button");t&&t.click()}}function z(t,s){this.popoverEl&&!this.isTabbing&&(s.coords={x:t.clientX,y:t.clientY},D.call(this,s))}function C(t,s){this.popoverEl&&this.isTabbing&&(s.coords=i(t.target),D.call(this,s))}function B(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),this.isTabbing=!0,F.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.isTabbing=!0,A.call(this);break;case"Tab":T.call(this);break;case"Escape":this.popoverEl.open=!1,this.userIsNavigating=!1}}function D(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=e(this.el);i&&i.addEventListener("scroll",(()=>{s()}))}}function A(){const t=n(document.activeElement),s=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,s)}function F(){if(this.sliceEls){const t=n(document.activeElement);let s=this.sliceEls.indexOf(t);-1===s?s=0:0===s?s=this.sliceEls.length-1:s-=1,S.call(this,s)}}function S(t){this.sliceEls&&this.el&&(this.userIsNavigating=!0,this.popoverEl&&(this.popoverEl.open=!1),this.componentWrapperEl.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 T(){this.sliceEls&&this.sliceEls.map((t=>{t.tabIndex=-1,t.focusable=!1})),this.userIsNavigating=!1,window.setTimeout((()=>{this.componentWrapperEl.tabIndex=0,this.el.focusable=!0,this.popoverEl&&(this.popoverEl.open=!1)}),100)}async function K(t){this.slicesDetails=[];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(((i,e)=>{const n=parseInt(i.getAttribute("amount")||"0"),a=v(n,this.total,!0);let r=e;"bar5"===t&&(r=this.notStartedColor?e:e+1),"bar6"===t&&(r=0);const o=g[t].colors[r],h={amount:n,perc:a,legend:i.getAttribute("legend"),color:o||u,offset:s,id:`${this.uid}-${e+1}`,title:i.getAttribute("popover-title"),text:i.getAttribute("popover-text"),buttonText:i.getAttribute("popover-button-text"),sliceRef:i,inSmallCluster:!1};s+=n,this.slicesDetails.push(h)}))}function j(t,s,i){const e=w(s,this.total)-90,n=t/this.total*360;let a=e+n;const r=n>180?"1 1":"0 1",o=n>180?"1 0":"0 0",h=this.chartDetails.size/2,c=this.chartDetails.thickness,d="doughnut"===i?2.25:3;360===n&&(a-=.01);const l=k(h,1,e+1.5,a),u=k(h,c,e+d,a);return`M ${l.x1}, ${l.y1} `+x(1,r,l.x2,l.y2,this.chartDetails.size)+` L ${u.x2}, ${u.y2} `+x(c,o,u.x1,u.y1,this.chartDetails.size)+" z"}function I(){const i=s.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return t("div",{id:"chart-instructions"},i)}function W(s){const i=this.chartDetails.size+this.chartDetails.padding,e="doughnut"===s;let n=e?this.slicesDetails:function(t,s){let i=[...t].sort(((t,s)=>t.amount===s.amount?0:t.amount>s.amount?-1:1)),e=0;return i.forEach(((t,n)=>{const a=i[n===i.length-1?0:n+1],r=v(i[0===n?i.length-1:n-1].amount,s,!0),o=v(a.amount,s,!0);t.offset=e,e+=t.amount,t.inSmallCluster=function(t,s,i,e){let n=s<4&&(t<5||e<5);return 0===s&&i>0&&(e<8||t<8)&&(n=!0),n}(r,t.perc,t.amount,o)})),i}(this.slicesDetails,this.total);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"})))),n.map((t=>E.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"},v(n[0].amount,this.total,!0)+"%"):t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`,"text-anchor":"middle","dominant-baseline":"middle"},n.map((t=>t.amount>0&&!t.inSmallCluster?G.call(this,t):"")))))}function E(s,i){return t("g",{transform:`translate(${this.chartDetails.padding/2}, ${this.chartDetails.padding/2})`},t("path",{id:s.id,class:"segment doughnut-segment",fill:s.amount?s.color:"transparent",d:j.call(this,s.amount,s.offset,i),onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t),role:"img","aria-label":s.legend}))}function G(s){const i=w(s.offset+s.amount/2,this.total);let{x:e,y:n}=k(this.chartDetails.size/2,1.4,i-90);return t("text",{class:"value",x:e+"px",y:n+"px"},`${s.perc>0?s.perc:"<1"}%`)}function L(s){const i="bar"===s;return t("div",{class:"chart-wrapper bar-wrapper"},i?t("div",{class:"single-perc"},v(this.slicesDetails[0].amount,this.total,!0)+"%"):"","bar3"===this.chartType&&this.drawAxis(),t("div",{class:`inner-stacked-bar-wrapper ${p(this.valueFormat)}`},i?"":t("div",{class:"values"},this.slicesDetails.map(((t,s)=>this.renderBarText(t,s)))),t("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map(((t,s)=>N.call(this,t,s)))),i?O.call(this):""))}function N(s,i){const e=i!==this.slicesDetails.length-1,n=`calc(${v(s.amount,this.total,!1)}%${e?" - 2px":""})`;return t("div",{class:"segment stacked-bar-segment "+(0===v(s.amount,this.total,!1)?"zero":""),style:{backgroundColor:s.color,width:n},onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t)},t("span",{class:"sr-only"},s.legend))}function R(s){const i=this.slicesDetails.map((t=>t.amount)).reduce(((t,s)=>t>s?t:s)),e=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);let n=(a=this.el.getBoundingClientRect().width-e-48,Math.round(a/function(t){return function(t){let s=80*(t-300)/600+70;return s<70?70:s>150?150:s}(t)}(a)));var a;let r=$(i,n);const o=Math.floor((n*r-i)/r);n-=o,this.el.style.setProperty("--backgroundSize",100/n+"%"),this.el.style.setProperty("--labelWidth",this.labelWidth),"bar7"!==s||this.showBarLegend||this.el.style.setProperty("--labelWidth","0px");const h=[];this.slicesDetails.forEach((e=>{e.legend&&h.push(function(s,i,e){return t("label",{class:`label${"bar7"!==e||i?"":" hidden"}`},s)}(e.legend,this.showBarLegend,s)),h.push(U.call(this,e,r,n,i))}));const c=[];for(let s=1;s<=n;s++){const i=m(s*r);c.push(t("div",{class:"tick"},t("span",null,i)))}const d="bar6"===s&&this.showGrid&&this.el.getBoundingClientRect().width>300;return t("div",{class:"chart-wrapper simple-bar-wrapper"},t("div",{class:`chart ${p(this.valueFormat)}`},d&&t("div",{class:"gridlines"}),t("div",{class:"rows"},h)),d&&t("div",{class:"x-axis","aria-hidden":"true"},t("div",{class:"zero"},t("span",null,"0")),c))}function U(s,i,e,n){const a=v(s.amount,"bar6"===this.currentChartType?i*e:n,!1),r=a?a+"%":"1px",o=m(s.amount);let h="amount"===this.valueFormat?o:"";return"bar6"===this.currentChartType&&"percentage"===this.valueFormat?h=s.amount+"%":"bar7"===this.currentChartType&&"percentage"===this.valueFormat&&(h=(0===this.total?"0":v(s.amount,this.total,!0))+"%"),t("div",{class:"bar segment",style:{backgroundColor:s.color,width:r},onClick:t=>z.call(this,t,s),onFocus:t=>C.call(this,t,s),onKeyDown:t=>M.call(this,t)},t("div",{class:"value"},h))}function V(s){if(this.showLegend){const i=!this.chartDetails.isBar&&this.slicesDetails.reduce(((t,s)=>!!s.inSmallCluster||t),!1);return t("div",{class:"legend-wrapper"},t("div",{class:`legend ${s} ${"bar"===this.mode?"--top":"--bottom"}`,"aria-hidden":"true"},this.slicesDetails.map((t=>{if(t.amount||t.legend)return H({key:t.legend,color:t.color})}))),i&&q())}}function H(s){return t("div",{class:"legend-item"},t("div",{class:"legend-color",style:{backgroundColor:s.color}}),t("div",{class:"legend-text"},s.key))}function O(){if(this.completionMessage)return t("div",{class:"completion-message"},this.completionMessage)}function q(){return t("div",{class:"hidden-values-warning"},f,t("br",null),b)}export{g as a,v as b,L as c,W as d,I as e,V as f,K as g,B as h,q as i,T as j,O as k,H as l,m,$ as n,R as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,r,i,n){function e(t){return t instanceof i?t:new i((function(r){r(t)}))}return new(i||(i=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?i(t.value):e(t.value).then(o,s)}u((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,e,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(r){return u([t,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(i=0)),i)try{if(n=1,e&&(a=s[0]&2?e["return"]:s[0]?e["throw"]||((a=e["return"])&&a.call(e),0):e.next)&&!(a=a.call(e,s[1])).done)return a;if(e=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;e=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(s[0]===6&&i.label<a[1]){i.label=a[1];a=s;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(s);break}if(a[2])i.ops.pop();i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t];e=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-0fe97e85.system.js","./p-1402cfa2.system.js","./p-c18b398c.system.js"],(function(t){"use strict";var r,i,n,e,a,o,s,u,c;return{setters:[function(t){r=t.r;i=t.c;n=t.h;e=t.H;a=t.g},function(t){o=t.a},function(t){s=t.k;u=t.l;c=t.i}],execute:function(){var f=this;var h=function(t){return __awaiter(f,void 0,void 0,(function(){var r;return __generator(this,(function(i){switch(i.label){case 0:return[4,fetch(t)];case 1:r=i.sent();if(!(!!r&&!!r.ok))return[3,3];return[4,r.json()];case 2:return[2,i.sent()];case 3:throw new Error(r.statusText)}}))}))};var l=":host{--wmcolor-navigator-background:var(--wmcolor-background);--wmcolor-navigator-header-background:var(--wmcolor-brand-dark);--wmcolor-navigator-header-text:var(--wmcolor-text-ondark);--wmcolor-navigator-item-background-focus:var(--wmcolor-interactive-background-focus);--wmcolor-navigator-item-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigator-item-background:var(--wmcolor-background);--wmcolor-navigator-item-border:var(--wmcolor-border);--wmcolor-navigator-item-text:var(--wmcolor-text);--wmcolor-navigator-user-background:var(--wmcolor-background-readonly);min-width:0;position:relative;display:inline-block}:host .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:var(--wmcolor-navigator-background);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{background:var(--wmcolor-navigator-user-background);padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p{margin:0}:host .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2{background:var(--wmcolor-navigator-header-background);color:var(--wmcolor-navigator-header-text);font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right{right:auto;left:20px}:host img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var m=t("wm_navigator",function(){function t(t){r(this,t);this.wmNavigatorLogout=i(this,"wmNavigatorLogout",7);this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.openRight=false;this.userName=undefined;this.email=undefined;this.authType=1;this.connectionName=undefined;this.logoutUrl=undefined;this.products=undefined;this.loadFromUserinfo=false;this.isOpen=false;this.isTabbing=false;this.itemIndexToFocus=0}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){switch(r.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,h("/platform/navigator/userinfo").then((function(r){t.email=r.email;t.currentProductId=r.current_product_id;t.parsedProducts=t.productKeysToCamelCase(r.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:r.logout_url;t.connectionName=t.connectionName?t.connectionName:r.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:r.sent();return[3,3];case 2:this.currentProductId=o(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}r.label=3;case 3:this.parsedProducts.sort((function(t,r){return t.name<r.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var r=Object.keys(t);var i={};r.forEach((function(r){i[s(r)]=t[r]}));return i}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=u(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var r=t.detail.key;var i=t.detail.navItem;switch(r){case"Tab":this.closeMenu();break;case"Enter":case" ":i.click();break;case"ArrowDown":case"ArrowUp":var n=this.itemIndexToFocus;this.itemIndexToFocus=u(this.itemIndexToFocus,r,this.navigatorItems.length);this.focusItem();this.unfocusItem(n);break}};t.prototype.handleClick=function(t){var r=t.target===this.el||this.el.contains(t.target);if(!r&&this.isOpen){this.closeMenu()}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var r=this.el.getBoundingClientRect().left;var i=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&i>r}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(){this.isOpen=false;this.buttonFocusHandler();this.unfocusItem(this.itemIndexToFocus);this.setFocusIndex()};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var r=this.navigatorItems[t];r.tabIndex=-1;r.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var r=t.shadowRoot.querySelector("button");window.requestAnimationFrame((function(){return r.focus()}))};t.prototype.renderUserInfo=function(){return n("div",{class:"user",id:"wm-nav-user","aria-label":c.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},n("p",null,this.userName),n("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return c.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return c.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return n("h2",null,c.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return n("ul",{role:"listbox","aria-label":"".concat(c.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())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(r){var i,e,a,o;i=r.name;e=r.iconUrl;o=t.setProductOnClick(r.id);if(!!i&&!!e){a=t.currentProductId===r.id;return n("priv-navigator-item",{selected:a,id:r.id,onClick:o,role:"option","aria-label":i},n("img",{src:e,alt:i}))}}))};t.prototype.setProductOnClick=function(t){var r=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(r){if(!!this.loadFromUserinfo||this.authType===2){return function(){return window.location.href=r.linkUrl}}else if(this.authType===3){var i=this.connectionName?"/?connection_name=".concat(this.connectionName):"";return function(){return window.location.href=r.samlLinkUrl+i}}}};t.prototype.renderLogoutOption=function(){return n("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},n("span",{class:"logout"},c.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();if(t.logoutUrl){window.location.href=t.logoutUrl}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(r){return r.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?n(e,{class:this.isTabbing?"user-is-tabbing":""},n("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText(),isTabbing:this.isTabbing}),n("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(r){return t.wrapperEl=r}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}());m.style=l}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function a(t){try{u(o.next(t))}catch(t){i(t)}}function s(t){try{u(o["throw"](t))}catch(t){i(t)}}function u(t){t.done?r(t.value):n(t.value).then(a,s)}u((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return u([t,e])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-30bf24f8.system.js","./p-8f3f903f.system.js","./p-aafa111a.system.js"],(function(t){"use strict";var e,r,o,n,i,a,s,u,c;return{setters:[function(t){e=t.r;r=t.c;o=t.h;n=t.H;i=t.g},function(t){a=t.a},function(t){s=t.k;u=t.l;c=t.i}],execute:function(){var l=this;var d=function(t){return __awaiter(l,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,fetch(t)];case 1:e=r.sent();if(!(!!e&&!!e.ok))return[3,3];return[4,e.json()];case 2:return[2,r.sent()];case 3:throw new Error(e.statusText)}}))}))};var f=":host{--wmcolor-navigator-background:var(--wmcolor-background);--wmcolor-navigator-header-background:var(--wmcolor-brand-dark);--wmcolor-navigator-header-text:var(--wmcolor-text-ondark);--wmcolor-navigator-item-background-focus:var(--wmcolor-interactive-background-focus);--wmcolor-navigator-item-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigator-item-background:var(--wmcolor-background);--wmcolor-navigator-item-border:var(--wmcolor-border);--wmcolor-navigator-item-text:var(--wmcolor-text);--wmcolor-navigator-user-background:var(--wmcolor-background-readonly);min-width:0;position:relative;display:inline-block}:host .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:var(--wmcolor-navigator-background);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{background:var(--wmcolor-navigator-user-background);padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p{margin:0}:host .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2{background:var(--wmcolor-navigator-header-background);color:var(--wmcolor-navigator-header-text);font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right{right:auto;left:20px}:host img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var p=t("wm_navigator",function(){function t(t){e(this,t);this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7);this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.openRight=false;this.userName=undefined;this.email=undefined;this.authType=1;this.connectionName=undefined;this.logoutUrl=undefined;this.products=undefined;this.loadFromUserinfo=false;this.isOpen=false;this.isTabbing=false;this.itemIndexToFocus=0}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,d("/platform/navigator/userinfo").then((function(e){t.email=e.email;t.currentProductId=e.current_product_id;t.parsedProducts=t.productKeysToCamelCase(e.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:e.logout_url;t.connectionName=t.connectionName?t.connectionName:e.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:e.sent();return[3,3];case 2:this.currentProductId=a(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}e.label=3;case 3:this.parsedProducts.sort((function(t,e){return t.name<e.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var e=Object.keys(t);var r={};e.forEach((function(e){r[s(e)]=t[e]}));return r}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=u(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var r=t.detail.navItem;switch(e){case"Tab":this.closeMenu();break;case"Enter":case" ":r.click();break;case"ArrowDown":case"ArrowUp":var o=this.itemIndexToFocus;this.itemIndexToFocus=u(this.itemIndexToFocus,e,this.navigatorItems.length);this.focusItem();this.unfocusItem(o);break}};t.prototype.handleClick=function(t){var e=t.target===this.el||this.el.contains(t.target);if(!e&&this.isOpen){this.closeMenu()}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var e=this.el.getBoundingClientRect().left;var r=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>e&&r>e}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(){this.isOpen=false;this.buttonFocusHandler();this.unfocusItem(this.itemIndexToFocus);this.setFocusIndex()};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var e=this.navigatorItems[t];e.tabIndex=-1;e.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var e=t.shadowRoot.querySelector("button");window.requestAnimationFrame((function(){return e.focus()}))};t.prototype.renderUserInfo=function(){return o("div",{class:"user",id:"wm-nav-user","aria-label":c.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},o("p",null,this.userName),o("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return c.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return c.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return o("h2",null,c.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return o("ul",{role:"listbox","aria-label":"".concat(c.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())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(e){var r,n,i,a;r=e.name;n=e.iconUrl;a=t.setProductOnClick(e.id);if(!!r&&!!n){i=t.currentProductId===e.id;return o("priv-navigator-item",{selected:i,id:e.id,onClick:a,role:"option","aria-label":r},o("img",{src:n,alt:r}))}}))};t.prototype.setProductOnClick=function(t){var e=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(e){if(!!this.loadFromUserinfo||this.authType===2){return function(){return window.location.href=e.linkUrl}}else if(this.authType===3){var r=this.connectionName?"/?connection_name=".concat(this.connectionName):"";return function(){return window.location.href=e.samlLinkUrl+r}}}};t.prototype.renderLogoutOption=function(){return o("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},o("span",{class:"logout"},c.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();if(t.logoutUrl){window.location.href=t.logoutUrl}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(e){return e.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?o(n,{class:this.isTabbing?"user-is-tabbing":""},o("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText(),isTabbing:this.isTabbing}),o("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(e){return t.wrapperEl=e}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}());p.style=f}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var a=0,i=n.length,r;a<i;a++){if(r||!(a in n)){if(!r)r=Array.prototype.slice.call(n,0,a);r[a]=n[a]}}return t.concat(r||Array.prototype.slice.call(n))};System.register(["./p-0fe97e85.system.js","./p-c18b398c.system.js"],(function(t){"use strict";var n,e,a,i,r;return{setters:[function(t){n=t.r;e=t.c;a=t.h;i=t.g},function(t){r=t.d}],execute:function(){var o=':host,wm-pagination{--wmcolor-pagination-arrow-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-button-text-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-button-text:var(--wmcolor-interactive);--wmcolor-pagination-current-background-hover:var(--wmcolor-interactive-hover);--wmcolor-pagination-current-background:var(--wmcolor-interactive);--wmcolor-pagination-current-text:var(--wmcolor-interactive-text);--wmcolor-pagination-focus:var(--wmcolor-interactive-focus-textonly);display:block}nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:var(--wmcolor-pagination-button-text);background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:var(--wmcolor-pagination-arrow)}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:var(--wmcolor-pagination-button-text-disabled);pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:var(--wmcolor-pagination-arrow-disabled)}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-pagination-focus)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-pagination-focus) 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]: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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-pagination-current-background);color:var(--wmcolor-pagination-current-text)}nav .largescreen .paginationbtn[aria-current=page]:hover{background:var(--wmcolor-pagination-current-background-hover)}.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 s=t("wm_pagination",function(){function t(t){var a=this;n(this,t);this.wmPaginationPageClicked=e(this,"wmPaginationPageClicked",7);this.focusCurrentPage=e(this,"focusCurrentPage",7);this.totalPages=0;this.debouncedResize=r((function(){return a.isLargeSize=a.el.clientWidth>500}),100);this.getMiddlePageNums=function(){var t;if(a.currentPage<4){t=[2,3,4]}else if(a.currentPage>a.totalPages-3){t=[a.totalPages-3,a.totalPages-2,a.totalPages-1]}else{t=[a.currentPage-1,a.currentPage,a.currentPage+1]}return t};this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeSize=window.innerWidth>600;this.isTabbing=false;this.srAnnouncement=""}t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.maintainFocusOnNumberChange=function(t){var n=this;window.requestAnimationFrame((function(){switch(t){case"previous":n.currentPage===1&&n.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":n.currentPage===n.totalPages&&n.el.shadowRoot.querySelector("button#wm-".concat(n.totalPages)).focus();break;case"prev-arrow":n.currentPage===1&&n.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":n.currentPage===n.totalPages&&n.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":n.el.shadowRoot.querySelector("button#wm-".concat(n.currentPage)).focus();default:return}}))};t.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};t.prototype.componentWillLoad=function(){var t=this;if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.el.focus=function(){if(t.isLargeSize){t.el.shadowRoot.getElementById("wm-".concat(t.currentPage)).focus()}else{t.currentPage===1?t.el.shadowRoot.getElementById("next-arw").focus():t.el.shadowRoot.getElementById("wm-1-arw").focus()}};var n=new ResizeObserver((function(){return t.debouncedResize()}));n.observe(this.el)};t.prototype.updatePageDisplayed=function(t){this.value=t;this.wmPaginationPageClicked.emit();this.srAnnouncement="Current page, ".concat(this.currentPage,". ").concat(this.getCurrentPagesInView())};t.prototype.displayShortPagination=function(){var t=[];for(var n=1;n<=this.totalPages;n++){t.push(this.displayPageNumber(n))}return t};t.prototype.displayLongPagination=function(){var t=this;var n=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(n){return t.displayPageNumber(n)})),true),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)],false);return n};t.prototype.displayPageNumber=function(t){var n=this;return a("button",{id:"wm-".concat(t),class:"paginationbtn",onClick:function(){n.currentPage=t;n.updatePageDisplayed(t);n.maintainFocusOnNumberChange("page")},value:t,"aria-label":this.currentPage!==t?"Go to page ".concat(t):"","aria-current":this.currentPage===t?"page":undefined},t)};t.prototype.displayEllipsis=function(){return a("span",{class:"ellipsis"},"...")};t.prototype.getCurrentPagesInView=function(){var t=this.itemsPerPage*this.currentPage;var n=t-this.itemsPerPage+1;if(t>this.totalItems){t=this.totalItems}return"Viewing "+(n===t?"".concat(n):"".concat(n,"–").concat(t," of ").concat(this.totalItems))};t.prototype.renderLarge=function(){var t=this;return a("div",{class:"largescreen"},a("div",{class:"pageview"},this.getCurrentPagesInView()),a("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){t.currentPage=t.currentPage-1;t.updatePageDisplayed(t.currentPage);t.maintainFocusOnNumberChange("previous")},disabled:this.currentPage===1,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),a("button",{id:"next",class:"paginationbtn nextbtn",onClick:function(){t.currentPage=t.currentPage+1;t.updatePageDisplayed(t.currentPage);t.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};t.prototype.renderSmall=function(){var t=this;return a("div",{class:"smallscreen"},a("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){t.currentPage=1;t.updatePageDisplayed(1);t.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":this.currentPage===1?"page":undefined,"aria-label":"Go to page 1","aria-controls":"status",disabled:this.currentPage===1},a("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),a("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:function(){t.currentPage-=1;t.updatePageDisplayed(t.currentPage);t.maintainFocusOnNumberChange("prev-arrow")},disabled:this.currentPage===1,"aria-label":"Go to previous page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,a("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:function(){t.currentPage+=1;t.updatePageDisplayed(t.currentPage);t.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),a("button",{id:"wm-".concat(this.totalPages,"-arw"),class:"paginationbtn",onClick:function(){t.currentPage=t.totalPages;t.updatePageDisplayed(t.totalPages);t.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":undefined,"aria-label":"Go to last page, page ".concat(this.totalPages),"aria-controls":"status",disabled:this.currentPage===this.totalPages},a("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))};t.prototype.render=function(){return this.totalItems>this.itemsPerPage&&a("nav",{"aria-label":"Pagination Navigation. ".concat(this.getCurrentPagesInView(),". Current page, ").concat(this.currentPage,".")},this.isLargeSize?this.renderLarge():this.renderSmall(),a("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return t}());s.style=o}}}));
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var n=0,r=t.length,i;n<r;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register(["./p-30bf24f8.system.js","./p-aafa111a.system.js"],(function(e){"use strict";var t,a,n,r,i;return{setters:[function(e){t=e.r;a=e.c;n=e.h;r=e.g},function(e){i=e.d}],execute:function(){var o=':host,wm-pagination{--wmcolor-pagination-arrow-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-button-text-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-button-text:var(--wmcolor-interactive);--wmcolor-pagination-current-background-hover:var(--wmcolor-interactive-hover);--wmcolor-pagination-current-background:var(--wmcolor-interactive);--wmcolor-pagination-current-text:var(--wmcolor-interactive-text);--wmcolor-pagination-focus:var(--wmcolor-interactive-focus-textonly);display:block}nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:var(--wmcolor-pagination-button-text);background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:var(--wmcolor-pagination-arrow)}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:var(--wmcolor-pagination-button-text-disabled);pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:var(--wmcolor-pagination-arrow-disabled)}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-pagination-focus)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-pagination-focus) 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]: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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-pagination-current-background);color:var(--wmcolor-pagination-current-text)}nav .largescreen .paginationbtn[aria-current=page]:hover{background:var(--wmcolor-pagination-current-background-hover)}.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 s=e("wm_pagination",function(){function e(e){var n=this;t(this,e);this.wmPaginationPageClicked=a(this,"wmPaginationPageClicked",7);this.focusCurrentPage=a(this,"focusCurrentPage",7);this.totalPages=0;this.debouncedResize=i((function(){return n.isLargeSize=n.el.clientWidth>500}),100);this.getMiddlePageNums=function(){var e;if(n.currentPage<4){e=[2,3,4]}else if(n.currentPage>n.totalPages-3){e=[n.totalPages-3,n.totalPages-2,n.totalPages-1]}else{e=[n.currentPage-1,n.currentPage,n.currentPage+1]}return e};this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeSize=window.innerWidth>600;this.isTabbing=false;this.srAnnouncement=""}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.maintainFocusOnNumberChange=function(e){var t=this;window.requestAnimationFrame((function(){switch(e){case"previous":t.currentPage===1&&t.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("button#wm-".concat(t.totalPages)).focus();break;case"prev-arrow":t.currentPage===1&&t.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":t.el.shadowRoot.querySelector("button#wm-".concat(t.currentPage)).focus();default:return}}))};e.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};e.prototype.componentWillLoad=function(){var e=this;if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.el.focus=function(){if(e.isLargeSize){e.el.shadowRoot.getElementById("wm-".concat(e.currentPage)).focus()}else{e.currentPage===1?e.el.shadowRoot.getElementById("next-arw").focus():e.el.shadowRoot.getElementById("wm-1-arw").focus()}};var t=new ResizeObserver((function(){return e.debouncedResize()}));t.observe(this.el)};e.prototype.updatePageDisplayed=function(e){this.value=e;this.wmPaginationPageClicked.emit();this.srAnnouncement="Current page, ".concat(this.currentPage,". ").concat(this.getCurrentPagesInView())};e.prototype.displayShortPagination=function(){var e=[];for(var t=1;t<=this.totalPages;t++){e.push(this.displayPageNumber(t))}return e};e.prototype.displayLongPagination=function(){var e=this;var t=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(t){return e.displayPageNumber(t)})),true),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)],false);return t};e.prototype.displayPageNumber=function(e){var t=this;return n("button",{id:"wm-".concat(e),class:"paginationbtn",onClick:function(){t.currentPage=e;t.updatePageDisplayed(e);t.maintainFocusOnNumberChange("page")},value:e,"aria-label":this.currentPage!==e?"Go to page ".concat(e):"","aria-current":this.currentPage===e?"page":undefined},e)};e.prototype.displayEllipsis=function(){return n("span",{class:"ellipsis"},"...")};e.prototype.getCurrentPagesInView=function(){var e=this.itemsPerPage*this.currentPage;var t=e-this.itemsPerPage+1;if(e>this.totalItems){e=this.totalItems}return"Viewing "+(t===e?"".concat(t):"".concat(t,"–").concat(e," of ").concat(this.totalItems))};e.prototype.renderLarge=function(){var e=this;return n("div",{class:"largescreen"},n("div",{class:"pageview"},this.getCurrentPagesInView()),n("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},n("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){e.currentPage=e.currentPage-1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("previous")},disabled:this.currentPage===1,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),n("button",{id:"next",class:"paginationbtn nextbtn",onClick:function(){e.currentPage=e.currentPage+1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};e.prototype.renderSmall=function(){var e=this;return n("div",{class:"smallscreen"},n("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},n("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){e.currentPage=1;e.updatePageDisplayed(1);e.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":this.currentPage===1?"page":undefined,"aria-label":"Go to page 1","aria-controls":"status",disabled:this.currentPage===1},n("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),n("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:function(){e.currentPage-=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("prev-arrow")},disabled:this.currentPage===1,"aria-label":"Go to previous page"},n("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,n("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:function(){e.currentPage+=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},n("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),n("button",{id:"wm-".concat(this.totalPages,"-arw"),class:"paginationbtn",onClick:function(){e.currentPage=e.totalPages;e.updatePageDisplayed(e.totalPages);e.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":undefined,"aria-label":"Go to last page, page ".concat(this.totalPages),"aria-controls":"status",disabled:this.currentPage===this.totalPages},n("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},n("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))};e.prototype.render=function(){return this.totalItems>this.itemsPerPage&&n("nav",{"aria-label":"Pagination Navigation. ".concat(this.getCurrentPagesInView(),". Current page, ").concat(this.currentPage,".")},this.isLargeSize?this.renderLarge():this.renderSmall(),n("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return e}());s.style=o}}}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function s(e){try{o(n.next(e))}catch(e){i(e)}}function l(e){try{o(n["throw"](e))}catch(e){i(e)}}function o(e){e.done?r(e.value):a(e.value).then(s,l)}o((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(t){return o([e,t])}}function o(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(r=0)),r)try{if(n=1,a&&(i=l[0]&2?a["return"]:l[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;if(a=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;a=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1];i=l;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(l);break}if(i[2])r.ops.pop();r.trys.pop();continue}l=t.call(e,r)}catch(e){l=[6,e];a=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};System.register([],(function(e,t){"use strict";return{execute:function(){var r=this;var n="ripple";var a;var i;var s;var l=false;var o=false;var f=false;var $=false;var u=false;var c=function(e,t){if(t===void 0){t=""}{return function(){return}}};var v=function(e,t){{return function(){return}}};var d="{visibility:hidden}.hydrated{visibility:inherit}";var h="http://www.w3.org/1999/xlink";var p={};var m="http://www.w3.org/2000/svg";var g="http://www.w3.org/1999/xhtml";var y=function(e){return e!=null};var b=function(e){e=typeof e;return e==="object"||e==="function"};function w(e){var t,r,n;return(n=(r=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&n!==void 0?n:undefined}var N=e("h",(function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var a=null;var i=null;var s=null;var l=false;var o=false;var f=[];var $=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){$(a)}else if(a!=null&&typeof a!=="boolean"){if(l=typeof e!=="function"&&!b(a)){a=String(a)}if(l&&o){f[f.length-1].$text$+=a}else{f.push(l?R(null,a):a)}o=l}}};$(r);if(t){if(t.key){i=t.key}if(t.name){s=t.name}{var u=t.className||t.class;if(u){t.class=typeof u!=="object"?u:Object.keys(u).filter((function(e){return u[e]})).join(" ")}}}var c=R(e,null);c.$attrs$=t;if(f.length>0){c.$children$=f}{c.$key$=i}{c.$name$=s}return c}));var R=function(e,t){var r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{r.$attrs$=null}{r.$key$=null}{r.$name$=null}return r};var S=e("H",{});var _=function(e){return e&&e.$tag$===S};var x=function(e,t){if(e!=null&&!b(e)){if(t&4){return e==="false"?false:e===""||!!e}if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var k=e("g",(function(e){return xe(e).$hostElement$}));var T=e("c",(function(e,t,r){var n=k(e);return{emit:function(e){return C(n,t,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}}));var C=function(e,t,r){var n=Me.ce(t,r);e.dispatchEvent(n);return n};var L=new WeakMap;var A=function(e,t,r){var n=je.get(e);if(Be&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}je.set(e,n)};var P=function(e,t,r,n){var a;var i=E(t);var s=je.get(i);e=e.nodeType===11?e:Oe;if(s){if(typeof s==="string"){e=e.head||e;var l=L.get(e);var o=void 0;if(!l){L.set(e,l=new Set)}if(!l.has(i)){{{o=Oe.createElement("style");o.innerHTML=s}var f=(a=Me.$nonce$)!==null&&a!==void 0?a:w(Oe);if(f!=null){o.setAttribute("nonce",f)}e.insertBefore(o,e.querySelector("link"))}if(l){l.add(i)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[s],false)}}return i};var j=function(e){var t=e.$cmpMeta$;var r=e.$hostElement$;var n=t.$flags$;var a=c("attachStyles",t.$tagName$);var i=P(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);if(n&10){r["s-sc"]=i;r.classList.add(i+"-h")}a()};var E=function(e,t){return"sc-"+e.$tagName$};var O=function(e,t,r,n,a,i){if(r!==n){var s=Ce(e,t);var l=t.toLowerCase();if(t==="class"){var o=e.classList;var f=I(r);var $=I(n);o.remove.apply(o,f.filter((function(e){return e&&!$.includes(e)})));o.add.apply(o,$.filter((function(e){return e&&!f.includes(e)})))}else if(t==="style"){{for(var u in r){if(!n||n[u]==null){if(u.includes("-")){e.style.removeProperty(u)}else{e.style[u]=""}}}}for(var u in n){if(!r||n[u]!==r[u]){if(u.includes("-")){e.style.setProperty(u,n[u])}else{e.style[u]=n[u]}}}}else if(t==="key");else if(t==="ref"){if(n){n(e)}}else if(!s&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(Ce(Ee,l)){t=l.slice(2)}else{t=l[2]+t.slice(3)}if(r){Me.rel(e,t,r,false)}if(n){Me.ael(e,t,n,false)}}else{var c=b(n);if((s||c&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var v=n==null?"":n;if(t==="list"){s=false}else if(r==null||e[t]!=v){e[t]=v}}else{e[t]=n}}catch(e){}}var d=false;{if(l!==(l=l.replace(/^xlink\:?/,""))){t=l;d=true}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){if(d){e.removeAttributeNS(h,t)}else{e.removeAttribute(t)}}}else if((!s||i&4||a)&&!c){n=n===true?"":n;if(d){e.setAttributeNS(h,t,n)}else{e.setAttribute(t,n)}}}}};var M=/\s/;var I=function(e){return!e?[]:e.split(M)};var B=function(e,t,r,n){var a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$;var i=e&&e.$attrs$||p;var s=t.$attrs$||p;{for(n in i){if(!(n in s)){O(a,n,i[n],undefined,r,t.$flags$)}}}for(n in s){O(a,n,i[n],s[n],r,t.$flags$)}};var q=function(e,t,r,n){var o=t.$children$[r];var u=0;var c;var v;var d;if(!l){f=true;if(o.$tag$==="slot"){if(a){n.classList.add(a+"-s")}o.$flags$|=o.$children$?2:1}}if(o.$text$!==null){c=o.$elm$=Oe.createTextNode(o.$text$)}else if(o.$flags$&1){c=o.$elm$=Oe.createTextNode("")}else{if(!$){$=o.$tag$==="svg"}c=o.$elm$=Oe.createElementNS($?m:g,o.$flags$&2?"slot-fb":o.$tag$);if($&&o.$tag$==="foreignObject"){$=false}{B(null,o,$)}if(y(a)&&c["s-si"]!==a){c.classList.add(c["s-si"]=a)}if(o.$children$){for(u=0;u<o.$children$.length;++u){v=q(e,o,u,c);if(v){c.appendChild(v)}}}{if(o.$tag$==="svg"){$=false}else if(c.tagName==="foreignObject"){$=true}}}{c["s-hn"]=s;if(o.$flags$&(2|1)){c["s-sr"]=true;c["s-cr"]=i;c["s-sn"]=o.$name$||"";d=e&&e.$children$&&e.$children$[r];if(d&&d.$tag$===o.$tag$&&e.$elm$){U(e.$elm$,false)}}}return c};var U=function(e,t){Me.$flags$|=1;var r=e.childNodes;for(var n=r.length-1;n>=0;n--){var a=r[n];if(a["s-hn"]!==s&&a["s-ol"]){F(a).insertBefore(a,D(a));a["s-ol"].remove();a["s-ol"]=undefined;f=true}if(t){U(a,t)}}Me.$flags$&=~1};var z=function(e,t,r,n,a,i){var l=e["s-cr"]&&e["s-cr"].parentNode||e;var o;if(l.shadowRoot&&l.tagName===s){l=l.shadowRoot}for(;a<=i;++a){if(n[a]){o=q(null,r,a,e);if(o){n[a].$elm$=o;l.insertBefore(o,D(t))}}}};var H=function(e,t,r){for(var n=t;n<=r;++n){var a=e[n];if(a){var i=a.$elm$;Y(a);if(i){{o=true;if(i["s-ol"]){i["s-ol"].remove()}else{U(i,true)}}i.remove()}}}};var V=function(e,t,r,n){var a=0;var i=0;var s=0;var l=0;var o=t.length-1;var f=t[0];var $=t[o];var u=n.length-1;var c=n[0];var v=n[u];var d;var h;while(a<=o&&i<=u){if(f==null){f=t[++a]}else if($==null){$=t[--o]}else if(c==null){c=n[++i]}else if(v==null){v=n[--u]}else if(W(f,c)){G(f,c);f=t[++a];c=n[++i]}else if(W($,v)){G($,v);$=t[--o];v=n[--u]}else if(W(f,v)){if(f.$tag$==="slot"||v.$tag$==="slot"){U(f.$elm$.parentNode,false)}G(f,v);e.insertBefore(f.$elm$,$.$elm$.nextSibling);f=t[++a];v=n[--u]}else if(W($,c)){if(f.$tag$==="slot"||v.$tag$==="slot"){U($.$elm$.parentNode,false)}G($,c);e.insertBefore($.$elm$,f.$elm$);$=t[--o];c=n[++i]}else{s=-1;{for(l=a;l<=o;++l){if(t[l]&&t[l].$key$!==null&&t[l].$key$===c.$key$){s=l;break}}}if(s>=0){h=t[s];if(h.$tag$!==c.$tag$){d=q(t&&t[i],r,s,e)}else{G(h,c);t[s]=undefined;d=h.$elm$}c=n[++i]}else{d=q(t&&t[i],r,i,e);c=n[++i]}if(d){{F(f.$elm$).insertBefore(d,D(f.$elm$))}}}}if(a>o){z(e,n[u+1]==null?null:n[u+1].$elm$,r,n,i,u)}else if(i>u){H(t,a,o)}};var W=function(e,t){if(e.$tag$===t.$tag$){if(e.$tag$==="slot"){return e.$name$===t.$name$}{return e.$key$===t.$key$}}return false};var D=function(e){return e&&e["s-ol"]||e};var F=function(e){return(e["s-ol"]?e["s-ol"]:e).parentNode};var G=function(e,t){var r=t.$elm$=e.$elm$;var n=e.$children$;var a=t.$children$;var i=t.$tag$;var s=t.$text$;var l;if(s===null){{$=i==="svg"?true:i==="foreignObject"?false:$}{if(i==="slot");else{B(e,t,$)}}if(n!==null&&a!==null){V(r,n,t,a)}else if(a!==null){if(e.$text$!==null){r.textContent=""}z(r,null,t,a,0,a.length-1)}else if(n!==null){H(n,0,n.length-1)}if($&&i==="svg"){$=false}}else if(l=r["s-cr"]){l.parentNode.textContent=s}else if(e.$text$!==s){r.data=s}};var J=function(e){var t=e.childNodes;var r;var n;var a;var i;var s;var l;for(n=0,a=t.length;n<a;n++){r=t[n];if(r.nodeType===1){if(r["s-sr"]){s=r["s-sn"];r.hidden=false;for(i=0;i<a;i++){l=t[i].nodeType;if(t[i]["s-hn"]!==r["s-hn"]||s!==""){if(l===1&&s===t[i].getAttribute("slot")){r.hidden=true;break}}else{if(l===1||l===3&&t[i].textContent.trim()!==""){r.hidden=true;break}}}}J(r)}}};var K=[];var Q=function(e){var t;var r;var n;var a;var i;var s;var l=0;var f=e.childNodes;var $=f.length;for(;l<$;l++){t=f[l];if(t["s-sr"]&&(r=t["s-cr"])&&r.parentNode){n=r.parentNode.childNodes;a=t["s-sn"];for(s=n.length-1;s>=0;s--){r=n[s];if(!r["s-cn"]&&!r["s-nr"]&&r["s-hn"]!==t["s-hn"]){if(X(r,a)){i=K.find((function(e){return e.$nodeToRelocate$===r}));o=true;r["s-sn"]=r["s-sn"]||a;if(i){i.$slotRefNode$=t}else{K.push({$slotRefNode$:t,$nodeToRelocate$:r})}if(r["s-sr"]){K.map((function(e){if(X(e.$nodeToRelocate$,r["s-sn"])){i=K.find((function(e){return e.$nodeToRelocate$===r}));if(i&&!e.$slotRefNode$){e.$slotRefNode$=i.$slotRefNode$}}}))}}else if(!K.some((function(e){return e.$nodeToRelocate$===r}))){K.push({$nodeToRelocate$:r})}}}}if(t.nodeType===1){Q(t)}}};var X=function(e,t){if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var Y=function(e){{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null);e.$children$&&e.$children$.map(Y)}};var Z=function(e,t){var r=e.$hostElement$;var n=e.$cmpMeta$;var $=e.$vnode$||R(null,null);var u=_(t)?t:N(null,null,t);s=r.tagName;if(n.$attrsToReflect$){u.$attrs$=u.$attrs$||{};n.$attrsToReflect$.map((function(e){var t=e[0],n=e[1];return u.$attrs$[n]=r[t]}))}u.$tag$=null;u.$flags$|=4;e.$vnode$=u;u.$elm$=$.$elm$=r.shadowRoot||r;{a=r["s-sc"]}{i=r["s-cr"];l=(n.$flags$&1)!==0;o=false}G($,u);{Me.$flags$|=1;if(f){Q(u.$elm$);var c=void 0;var v=void 0;var d=void 0;var h=void 0;var p=void 0;var m=void 0;var g=0;for(;g<K.length;g++){c=K[g];v=c.$nodeToRelocate$;if(!v["s-ol"]){d=Oe.createTextNode("");d["s-nr"]=v;v.parentNode.insertBefore(v["s-ol"]=d,v)}}for(g=0;g<K.length;g++){c=K[g];v=c.$nodeToRelocate$;if(c.$slotRefNode$){h=c.$slotRefNode$.parentNode;p=c.$slotRefNode$.nextSibling;d=v["s-ol"];while(d=d.previousSibling){m=d["s-nr"];if(m&&m["s-sn"]===v["s-sn"]&&h===m.parentNode){m=m.nextSibling;if(!m||!m["s-nr"]){p=m;break}}}if(!p&&h!==v.parentNode||v.nextSibling!==p){if(v!==p){if(!v["s-hn"]&&v["s-ol"]){v["s-hn"]=v["s-ol"].parentNode.nodeName}h.insertBefore(v,p)}}}else{if(v.nodeType===1){v.hidden=true}}}}if(o){J(u.$elm$)}Me.$flags$&=~1;K.length=0}};var ee=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var te=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}ee(e,e.$ancestorComponent$);var r=function(){return re(e,t)};return De(r)};var re=function(e,t){var r=c("scheduleUpdate",e.$cmpMeta$.$tagName$);var n=e.$lazyInstance$;var a;if(t){{e.$flags$|=256;if(e.$queuedListeners$){e.$queuedListeners$.map((function(e){var t=e[0],r=e[1];return $e(n,t,r)}));e.$queuedListeners$=undefined}}{a=$e(n,"componentWillLoad")}}else{{a=$e(n,"componentWillUpdate")}}r();return ne(a,(function(){return ie(e,n,t)}))};var ne=function(e,t){return ae(e)?e.then(t):t()};var ae=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var ie=function(e,t,n){return __awaiter(r,void 0,void 0,(function(){var r,a,i,s,l,o,f;return __generator(this,(function($){a=e.$hostElement$;i=c("update",e.$cmpMeta$.$tagName$);s=a["s-rc"];if(n){j(e)}l=c("render",e.$cmpMeta$.$tagName$);{se(e,t)}if(s){s.map((function(e){return e()}));a["s-rc"]=undefined}l();i();{o=(r=a["s-p"])!==null&&r!==void 0?r:[];f=function(){return le(e)};if(o.length===0){f()}else{Promise.all(o).then(f);e.$flags$|=4;o.length=0}}return[2]}))}))};var se=function(e,t,r){try{t=t.render&&t.render();{e.$flags$&=~16}{e.$flags$|=2}{{{Z(e,t)}}}}catch(t){Le(t,e.$hostElement$)}return null};var le=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=c("postUpdate",t);var a=e.$lazyInstance$;var i=e.$ancestorComponent$;{$e(a,"componentDidRender")}if(!(e.$flags$&64)){e.$flags$|=64;{ue(r)}{$e(a,"componentDidLoad")}n();{e.$onReadyResolve$(r);if(!i){fe()}}}else{{$e(a,"componentDidUpdate")}n()}{e.$onInstanceResolve$(r)}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){We((function(){return te(e,false)}))}e.$flags$&=~(4|512)}};var oe=e("f",(function(e){{var t=xe(e);var r=t.$hostElement$.isConnected;if(r&&(t.$flags$&(2|16))===2){te(t,false)}return r}}));var fe=function(e){{ue(Oe.documentElement)}We((function(){return C(Ee,"appload",{detail:{namespace:n}})}))};var $e=function(e,t,r){if(e&&e[t]){try{return e[t](r)}catch(e){Le(e)}}return undefined};var ue=function(e){return e.classList.add("hydrated")};var ce=function(e,t){return xe(e).$instanceValues$.get(t)};var ve=function(e,t,r,n){var a=xe(e);var i=a.$hostElement$;var s=a.$instanceValues$.get(t);var l=a.$flags$;var o=a.$lazyInstance$;r=x(r,n.$members$[t][0]);var f=Number.isNaN(s)&&Number.isNaN(r);var $=r!==s&&!f;if((!(l&8)||s===undefined)&&$){a.$instanceValues$.set(t,r);if(o){if(n.$watchers$&&l&128){var u=n.$watchers$[t];if(u){u.map((function(e){try{o[e](r,s,t)}catch(e){Le(e,i)}}))}}if((l&(2|16))===2){te(a,false)}}}};var de=function(e,t,r){if(t.$members$){if(e.watchers){t.$watchers$=e.watchers}var n=Object.entries(t.$members$);var a=e.prototype;n.map((function(e){var n=e[0],i=e[1][0];if(i&31||r&2&&i&32){Object.defineProperty(a,n,{get:function(){return ce(this,n)},set:function(e){ve(this,n,e,t)},configurable:true,enumerable:true})}else if(r&1&&i&64){Object.defineProperty(a,n,{value:function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=xe(this);return r.$onInstancePromise$.then((function(){var t;return(t=r.$lazyInstance$)[n].apply(t,e)}))}})}}));if(r&1){var i=new Map;a.attributeChangedCallback=function(e,t,r){var n=this;Me.jmp((function(){var t=i.get(e);if(n.hasOwnProperty(t)){r=n[t];delete n[t]}else if(a.hasOwnProperty(t)&&typeof n[t]==="number"&&n[t]==r){return}n[t]=r===null&&typeof n[t]==="boolean"?false:r}))};e.observedAttributes=n.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],n=e[1];var a=n[1]||r;i.set(a,r);if(n[0]&512){t.$attrsToReflect$.push([r,a])}return a}))}}return e};var he=function(e,t,n,a,i){return __awaiter(r,void 0,void 0,(function(){var e,r,a,s,l,o,f;return __generator(this,(function($){switch($.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;i=Pe(n);if(!i.then)return[3,2];e=v();return[4,i];case 1:i=$.sent();e();$.label=2;case 2:if(!i.isProxied){{n.$watchers$=i.watchers}de(i,n,2);i.isProxied=true}r=c("createInstance",n.$tagName$);{t.$flags$|=8}try{new i(t)}catch(e){Le(e)}{t.$flags$&=~8}{t.$flags$|=128}r();if(i.style){a=i.style;s=E(n);if(!je.has(s)){l=c("registerStyles",n.$tagName$);A(s,a,!!(n.$flags$&1));l()}}$.label=3;case 3:o=t.$ancestorComponent$;f=function(){return te(t,true)};if(o&&o["s-rc"]){o["s-rc"].push(f)}else{f()}return[2]}}))}))};var pe=function(e){if((Me.$flags$&1)===0){var t=xe(e);var r=t.$cmpMeta$;var n=c("connectedCallback",r.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{if(r.$flags$&(4|8)){me(e)}}{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){ee(t,t.$ancestorComponent$=a);break}}}if(r.$members$){Object.entries(r.$members$).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{he(e,t,r)}}else{be(e,t,r.$listeners$)}n()}};var me=function(e){var t=e["s-cr"]=Oe.createComment("");t["s-cn"]=true;e.insertBefore(t,e.firstChild)};var ge=function(e){if((Me.$flags$&1)===0){var t=xe(e);{if(t.$rmListeners$){t.$rmListeners$.map((function(e){return e()}));t.$rmListeners$=undefined}}}};var ye=e("b",(function(e,t){if(t===void 0){t={}}var r;var n=c();var a=[];var i=t.exclude||[];var s=Ee.customElements;var l=Oe.head;var o=l.querySelector("meta[charset]");var f=Oe.createElement("style");var $=[];var u;var v=true;Object.assign(Me,t);Me.$resourcesUrl$=new URL(t.resourcesUrl||"./",Oe.baseURI).href;e.map((function(e){e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{r.$members$=t[2]}{r.$listeners$=t[3]}{r.$attrsToReflect$=[]}{r.$watchers$={}}var n=r.$tagName$;var l=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;Te(t,r);if(r.$flags$&1){{{t.attachShadow({mode:"open",delegatesFocus:!!(r.$flags$&16)})}}}return n}t.prototype.connectedCallback=function(){var e=this;if(u){clearTimeout(u);u=null}if(v){$.push(this)}else{Me.jmp((function(){return pe(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;Me.jmp((function(){return ge(e)}))};t.prototype.componentOnReady=function(){return xe(this).$onReadyPromise$};return t}(HTMLElement);r.$lazyBundleId$=e[0];if(!i.includes(n)&&!s.get(n)){a.push(n);s.define(n,de(l,r,1))}}))}));{f.innerHTML=a+d;f.setAttribute("data-styles","");var h=(r=Me.$nonce$)!==null&&r!==void 0?r:w(Oe);if(h!=null){f.setAttribute("nonce",h)}l.insertBefore(f,o?o.nextSibling:l.firstChild)}v=false;if($.length){$.map((function(e){return e.connectedCallback()}))}else{{Me.jmp((function(){return u=setTimeout(fe,30)}))}}n()}));var be=function(e,t,r,n){if(r){r.map((function(r){var n=r[0],a=r[1],i=r[2];var s=Ne(e,n);var l=we(t,i);var o=Re(n);Me.ael(s,a,l,o);(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return Me.rel(s,a,l,o)}))}))}};var we=function(e,t){return function(r){try{{if(e.$flags$&256){e.$lazyInstance$[t](r)}else{(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,r])}}}catch(e){Le(e)}}};var Ne=function(e,t){if(t&4)return Oe;if(t&8)return Ee;return e};var Re=function(e){return(e&2)!==0};var Se=e("s",(function(e){return Me.$nonce$=e}));var _e=new WeakMap;var xe=function(e){return _e.get(e)};var ke=e("r",(function(e,t){return _e.set(t.$lazyInstance$=e,t)}));var Te=function(e,t){var r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{r.$onInstancePromise$=new Promise((function(e){return r.$onInstanceResolve$=e}))}{r.$onReadyPromise$=new Promise((function(e){return r.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}be(e,r,t.$listeners$);return _e.set(e,r)};var Ce=function(e,t){return t in e};var Le=function(e,t){return(0,console.error)(e,t)};var Ae=new Map;var Pe=function(e,r,n){var a=e.$tagName$.replace(/-/g,"_");var i=e.$lazyBundleId$;var s=Ae.get(i);if(s){return s[a]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return t.import("./".concat(i,".entry.js").concat("")).then((function(e){{Ae.set(i,e)}return e[a]}),Le)};var je=new Map;var Ee=typeof window!=="undefined"?window:{};var Oe=Ee.document||{head:{}};var Me={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}};var Ie=e("p",(function(e){return Promise.resolve(e)}));var Be=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var qe=[];var Ue=[];var ze=function(e,t){return function(r){e.push(r);if(!u){u=true;if(t&&Me.$flags$&4){We(Ve)}else{Me.raf(Ve)}}}};var He=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){Le(e)}}e.length=0};var Ve=function(){He(qe);{He(Ue);if(u=qe.length>0){Me.raf(Ve)}}};var We=function(e){return Ie().then(e)};var De=ze(Ue,true)}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-30bf24f8.system.js"],(function(t){"use strict";var e,o,r,n;return{setters:[function(t){e=t.r;o=t.c;r=t.h;n=t.g}],execute:function(){var a=":host{list-style:none;border-bottom:1px solid var(--wmcolor-navigator-item-border);width:100%;display:block;cursor:pointer}:host .navoption{color:var(--wmcolor-navigator-item-text);padding:0.9375rem 1.25rem;background:var(--wmcolor-navigator-item-background);font-size:0.875rem}:host .navoption.selected,:host .navoption:hover{background:var(--wmcolor-navigator-item-background-hover)}:host .navoption.focused:not(.selected){background:var(--wmcolor-navigator-item-background-focus);opacity:1}";var i=t("priv_navigator_item",function(){function t(t){e(this,t);this.keydownOnNavItem=o(this,"keydownOnNavItem",7);this.selected=false;this.focused=false;this.link=""}t.prototype.handleKeyDown=function(t){var e=t.key;var o=this.el;if(e!=="Tab"){t.preventDefault()}this.keydownOnNavItem.emit({navItem:o,key:e})};t.prototype.render=function(){var t=this.selected?"selected":"";var e=this.focused?"focused":"";return r("div",{class:"navoption ".concat(t," ").concat(e)},r("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());i.style=a}}}));
|