@watermarkinsights/ripple 4.3.0 → 4.4.0-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-cecf8134.js +600 -0
- package/dist/cjs/{functions-91da05e9.js → functions-4208c444.js} +362 -362
- package/dist/cjs/{global-20d48c6c.js → global-bd289a67.js} +24 -24
- package/dist/cjs/{index-fae02cd7.js → index-f8ef86de.js} +436 -150
- package/dist/cjs/interfaces-ad9e80a6.js +38 -0
- package/dist/cjs/intl-3fafc6d1.js +179 -0
- package/dist/cjs/loader.cjs.js +4 -13
- 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 +4 -7
- 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 +462 -462
- 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 +255 -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 +257 -254
- 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 +382 -381
- 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 +1 -2
- 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 +731 -731
- 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 +454 -452
- package/dist/collection/components/wm-button/wm-button.spec.js +63 -63
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +943 -939
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +71 -71
- package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -2
- package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +359 -359
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +415 -413
- 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 +446 -436
- 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 +299 -296
- package/dist/collection/components/wm-modal/wm-modal.spec.js +22 -22
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -1
- 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 +0 -2
- 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 +119 -118
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +180 -180
- package/dist/collection/components/wm-navigator/wm-navigator.js +458 -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 +474 -463
- 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 +415 -414
- 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 +967 -966
- 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 +209 -207
- 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 +190 -188
- 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 +2 -4
- 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 +236 -234
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +1 -2
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +147 -147
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +531 -527
- 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 +209 -208
- 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 +423 -422
- 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-23173fce.js +584 -0
- package/dist/esm/{functions-5afd09f4.js → functions-d0e70094.js} +362 -362
- package/dist/esm/{global-d4a9e80e.js → global-4569c7b8.js} +24 -24
- package/dist/esm/{index-7e11ea42.js → index-f164fbca.js} +436 -150
- package/dist/esm/interfaces-9b75fb61.js +35 -0
- package/dist/esm/intl-05c9e0c9.js +174 -0
- package/dist/esm/loader.js +5 -14
- 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 +5 -8
- 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 +462 -462
- 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 +255 -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-23173fce.js +1 -0
- package/dist/esm-es5/functions-d0e70094.js +1 -0
- package/dist/esm-es5/global-4569c7b8.js +1 -0
- package/dist/esm-es5/index-f164fbca.js +2 -0
- package/dist/esm-es5/{intl-e2da750a.js → intl-05c9e0c9.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-028ef6db.system.entry.js +1 -0
- package/dist/ripple/{p-863e737a.js → p-05d4e49b.js} +1 -1
- package/dist/ripple/{p-a1e95b05.system.entry.js → p-06776596.system.entry.js} +1 -1
- package/dist/ripple/{p-622a7791.system.entry.js → p-067d7922.system.entry.js} +1 -1
- package/dist/ripple/p-09d62ddd.entry.js +1 -0
- package/dist/ripple/{p-f30839a1.system.entry.js → p-0ecbf569.system.entry.js} +1 -1
- package/dist/ripple/p-0fe97e85.system.js +2 -0
- package/dist/ripple/{p-24b08e1f.js → p-13ca30d8.js} +1 -1
- package/dist/ripple/{p-8f3f903f.system.js → p-1402cfa2.system.js} +1 -1
- package/dist/ripple/p-1453ea51.system.entry.js +1 -0
- package/dist/ripple/{p-6abb903c.entry.js → p-153701f9.entry.js} +1 -1
- package/dist/ripple/p-1cc91907.system.js +1 -0
- package/dist/ripple/{p-ad37cdfd.entry.js → p-1d8b0039.entry.js} +1 -1
- package/dist/ripple/{p-d0f1b8c4.system.entry.js → p-1fa2a756.system.entry.js} +1 -1
- package/dist/ripple/{p-a52c5a1c.entry.js → p-25446670.entry.js} +1 -1
- package/dist/ripple/{p-1283e85d.entry.js → p-27f47edc.entry.js} +1 -1
- package/dist/ripple/{p-32b1126c.system.entry.js → p-28e4583c.system.entry.js} +1 -1
- package/dist/ripple/{p-a5b23781.system.entry.js → p-2c4f312d.system.entry.js} +1 -1
- package/dist/ripple/p-30b17818.system.entry.js +1 -0
- package/dist/ripple/{p-0631be01.system.entry.js → p-3446852f.system.entry.js} +1 -1
- package/dist/ripple/{p-ae674a54.entry.js → p-350fe5da.entry.js} +1 -1
- package/dist/ripple/{p-d04ba5f8.system.entry.js → p-3583d113.system.entry.js} +1 -1
- package/dist/ripple/{p-cbd8a60b.system.entry.js → p-361cc8fc.system.entry.js} +1 -1
- package/dist/ripple/{p-7529706d.entry.js → p-372faf33.entry.js} +1 -1
- package/dist/ripple/{p-19773c40.entry.js → p-3a070f35.entry.js} +1 -1
- package/dist/ripple/{p-c7b5ac39.js → p-3af72848.js} +1 -1
- package/dist/ripple/{p-c41603e6.entry.js → p-42ebfcfa.entry.js} +1 -1
- package/dist/ripple/{p-13594c2e.entry.js → p-43e2a49a.entry.js} +1 -1
- package/dist/ripple/{p-ed942b42.entry.js → p-49118468.entry.js} +1 -1
- package/dist/ripple/p-49c85d1a.system.js +1 -0
- package/dist/ripple/p-4de51706.js +2 -0
- package/dist/ripple/{p-3c80bf67.entry.js → p-58174f4e.entry.js} +1 -1
- package/dist/ripple/{p-c5e8f8a5.system.entry.js → p-5a4d9897.system.entry.js} +1 -1
- package/dist/ripple/{p-e3f0b57f.system.entry.js → p-5ac980e2.system.entry.js} +1 -1
- package/dist/ripple/{p-3becce62.system.entry.js → p-633cd89a.system.entry.js} +1 -1
- package/dist/ripple/{p-1205fdc1.entry.js → p-63f75d43.entry.js} +1 -1
- package/dist/ripple/{p-90ea7e3a.system.entry.js → p-67d48c33.system.entry.js} +1 -1
- package/dist/ripple/{p-8ef87907.entry.js → p-6caaf85f.entry.js} +1 -1
- package/dist/ripple/{p-935513f8.entry.js → p-6cf7a34a.entry.js} +1 -1
- package/dist/ripple/p-73289c2c.system.js +1 -0
- package/dist/ripple/{p-c76bbedf.system.entry.js → p-7a8816d9.system.entry.js} +1 -1
- package/dist/ripple/{p-8ea68cb3.system.entry.js → p-7e56da2e.system.entry.js} +1 -1
- package/dist/ripple/{p-deb4f5a2.entry.js → p-7e8daaac.entry.js} +1 -1
- package/dist/ripple/p-88406560.system.entry.js +1 -0
- package/dist/ripple/{p-84a7e757.entry.js → p-8cace32f.entry.js} +1 -1
- package/dist/ripple/{p-80aef387.entry.js → p-8d4734ad.entry.js} +1 -1
- package/dist/ripple/p-8f76a838.system.entry.js +1 -0
- package/dist/ripple/p-934c1b6b.js +1 -0
- package/dist/ripple/{p-85f744ed.system.js → p-9fecbc8a.system.js} +1 -1
- package/dist/ripple/{p-b71a83e3.entry.js → p-a69c37e0.entry.js} +1 -1
- package/dist/ripple/{p-9288659b.entry.js → p-a82a8931.entry.js} +1 -1
- package/dist/ripple/p-a99b05de.system.entry.js +1 -0
- package/dist/ripple/{p-36049d2f.entry.js → p-aadf8c59.entry.js} +1 -1
- package/dist/ripple/{p-676c1089.system.entry.js → p-aba5a00e.system.entry.js} +1 -1
- package/dist/ripple/{p-0aecac86.entry.js → p-ad6dc751.entry.js} +1 -1
- package/dist/ripple/{p-0f1ff645.entry.js → p-b253d2fc.entry.js} +1 -1
- package/dist/ripple/p-b2ff4723.system.entry.js +1 -0
- package/dist/ripple/{p-a0bf5eef.entry.js → p-b452d1d7.entry.js} +1 -1
- package/dist/ripple/{p-1cde16a7.system.entry.js → p-b4d862e1.system.entry.js} +1 -1
- package/dist/ripple/{p-d496bc44.system.entry.js → p-bdd4f919.system.entry.js} +1 -1
- package/dist/ripple/p-c18b398c.system.js +1 -0
- package/dist/ripple/{p-8f8c3705.entry.js → p-c249063c.entry.js} +1 -1
- package/dist/ripple/p-c344a69c.entry.js +1 -0
- package/dist/ripple/{p-0d9f70ab.entry.js → p-c717d895.entry.js} +1 -1
- package/dist/ripple/{p-2e773564.system.entry.js → p-c96a5c94.system.entry.js} +1 -1
- package/dist/ripple/{p-15497721.system.entry.js → p-ceced3d9.system.entry.js} +1 -1
- package/dist/ripple/{p-d428e9bb.system.entry.js → p-d16f91e9.system.entry.js} +1 -1
- package/dist/ripple/{p-ff14e4ec.system.entry.js → p-d3f9d028.system.entry.js} +1 -1
- package/dist/ripple/{p-7962f562.entry.js → p-de349bee.entry.js} +1 -1
- package/dist/ripple/{p-b3c73bc9.entry.js → p-e24ddae1.entry.js} +1 -1
- package/dist/ripple/{p-b3e08b14.system.entry.js → p-e8b58666.system.entry.js} +1 -1
- package/dist/ripple/{p-a9c096b5.entry.js → p-fa87bce3.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +16 -20
- 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 +74 -74
- 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-tag-input/wm-tag-input.d.ts +114 -114
- package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +15 -15
- 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 +382 -0
- 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 +46 -5
- package/package.json +1 -1
- package/dist/cjs/chartFunctions-2c3e010e.js +0 -600
- package/dist/cjs/interfaces-245d7bff.js +0 -38
- package/dist/cjs/intl-fa3bb4ae.js +0 -179
- package/dist/esm/chartFunctions-36634c04.js +0 -584
- package/dist/esm/interfaces-89cad2fc.js +0 -35
- package/dist/esm/intl-e2da750a.js +0 -174
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm-es5/chartFunctions-36634c04.js +0 -1
- package/dist/esm-es5/functions-5afd09f4.js +0 -1
- package/dist/esm-es5/global-d4a9e80e.js +0 -1
- package/dist/esm-es5/index-7e11ea42.js +0 -2
- package/dist/ripple/p-00acacbe.system.entry.js +0 -1
- package/dist/ripple/p-0f889b84.system.js +0 -1
- package/dist/ripple/p-13af8346.entry.js +0 -1
- package/dist/ripple/p-16363e1c.system.entry.js +0 -1
- package/dist/ripple/p-2a95b63f.system.entry.js +0 -1
- package/dist/ripple/p-30bf24f8.system.js +0 -2
- package/dist/ripple/p-3248c0fa.system.entry.js +0 -1
- package/dist/ripple/p-47c20b05.entry.js +0 -1
- package/dist/ripple/p-56d64283.system.entry.js +0 -1
- package/dist/ripple/p-5e85967a.system.js +0 -1
- package/dist/ripple/p-9b2034f6.js +0 -1
- package/dist/ripple/p-a3d07be5.system.js +0 -1
- package/dist/ripple/p-a6be3cca.system.entry.js +0 -1
- package/dist/ripple/p-aafa111a.system.js +0 -1
- package/dist/ripple/p-b5bedd63.js +0 -2
- package/dist/ripple/p-bd537299.system.entry.js +0 -1
- /package/dist/esm-es5/{interfaces-89cad2fc.js → interfaces-9b75fb61.js} +0 -0
- /package/dist/ripple/{p-c0c111fd.js → p-196eb2f3.js} +0 -0
|
@@ -2,741 +2,741 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const functions = require('./functions-
|
|
7
|
-
const intl = require('./intl-
|
|
5
|
+
const index = require('./index-f8ef86de.js');
|
|
6
|
+
const functions = require('./functions-4208c444.js');
|
|
7
|
+
const intl = require('./intl-3fafc6d1.js');
|
|
8
8
|
|
|
9
9
|
const wmOptionCss = ":host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}: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}.checkbox: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:\"\\f131\";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:\"\\f132\"}:host([aria-disabled=true]){font-style:italic;color:var(--wmcolor-select-option-text-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo{-ms-flex:none;flex:none}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):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;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}";
|
|
10
10
|
|
|
11
11
|
const Option = class {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.wmOptionSelected = index.createEvent(this, "wmOptionSelected", 7);
|
|
15
|
+
this.wmOptionDeselected = index.createEvent(this, "wmOptionDeselected", 7);
|
|
16
|
+
this.intCloneClicked = index.createEvent(this, "intCloneClicked", 7);
|
|
17
|
+
this.wmKeyUpPressed = index.createEvent(this, "wmKeyUpPressed", 7);
|
|
18
|
+
this.wmKeyDownPressed = index.createEvent(this, "wmKeyDownPressed", 7);
|
|
19
|
+
this.wmEscKeyPressed = index.createEvent(this, "wmEscKeyPressed", 7);
|
|
20
|
+
this.wmHomeKeyPressed = index.createEvent(this, "wmHomeKeyPressed", 7);
|
|
21
|
+
this.wmEndKeyPressed = index.createEvent(this, "wmEndKeyPressed", 7);
|
|
22
|
+
this.wmEnterKeyPressed = index.createEvent(this, "wmEnterKeyPressed", 7);
|
|
23
|
+
this.wmLetterPressed = index.createEvent(this, "wmLetterPressed", 7);
|
|
24
|
+
this.wmOptionBlurred = index.createEvent(this, "wmOptionBlurred", 7);
|
|
25
|
+
this.value = undefined;
|
|
26
|
+
this.subinfo = undefined;
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
this.selected = false;
|
|
29
|
+
this.focused = false;
|
|
30
|
+
this.searchTerm = "";
|
|
31
|
+
}
|
|
32
|
+
get hostClasses() {
|
|
33
|
+
let classes = [];
|
|
34
|
+
if (this.subinfo) {
|
|
35
|
+
classes.push("hassubinfo");
|
|
36
|
+
}
|
|
37
|
+
if (this.parentSelectEl.multiple) {
|
|
38
|
+
classes.push("multi-option");
|
|
39
|
+
}
|
|
40
|
+
if (!this.el.textContent.toLowerCase().includes(this.searchTerm)) {
|
|
41
|
+
classes.push("filtered-out");
|
|
42
|
+
}
|
|
43
|
+
return classes.join(" ");
|
|
44
|
+
}
|
|
45
|
+
get parentSelectEl() {
|
|
46
|
+
var _a;
|
|
47
|
+
return ((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.nodeName) !== "WM-SELECT"
|
|
48
|
+
? this.el.getRootNode().host
|
|
49
|
+
: this.el.parentElement;
|
|
50
|
+
}
|
|
51
|
+
handleKeydown(ev) {
|
|
52
|
+
switch (ev.key) {
|
|
53
|
+
case "ArrowUp":
|
|
54
|
+
ev.preventDefault();
|
|
55
|
+
this.wmKeyUpPressed.emit(this.el);
|
|
56
|
+
break;
|
|
57
|
+
case "ArrowDown":
|
|
58
|
+
ev.preventDefault();
|
|
59
|
+
this.wmKeyDownPressed.emit(this.el);
|
|
60
|
+
break;
|
|
61
|
+
case "Enter":
|
|
62
|
+
ev.preventDefault();
|
|
63
|
+
if (!this.disabled) {
|
|
64
|
+
this.el.click();
|
|
65
|
+
this.wmEnterKeyPressed.emit(this.el);
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
case "Escape":
|
|
69
|
+
ev.preventDefault();
|
|
70
|
+
ev.stopPropagation(); // for instance if select is in a modal, esc should close the select but not the modal
|
|
71
|
+
this.wmEscKeyPressed.emit();
|
|
72
|
+
break;
|
|
73
|
+
case "Home":
|
|
74
|
+
ev.preventDefault();
|
|
75
|
+
this.wmHomeKeyPressed.emit();
|
|
76
|
+
break;
|
|
77
|
+
case "End":
|
|
78
|
+
ev.preventDefault();
|
|
79
|
+
this.wmEndKeyPressed.emit();
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
if (ev.key.length === 1) {
|
|
83
|
+
ev.preventDefault();
|
|
84
|
+
// emit for single characters ("a","l","5", etc), avoid others ("shift", "control", etc)
|
|
85
|
+
this.wmLetterPressed.emit({ letter: ev.key, optionEl: this.el });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
handleSelection() {
|
|
90
|
+
// using ev.detail because ev.target returns the wm-select for clone options
|
|
63
91
|
if (!this.disabled) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
handleSearch(ev) {
|
|
123
|
-
// filter is case-insensitive, so
|
|
124
|
-
this.searchTerm = ev.detail.searchTerm.toLowerCase();
|
|
125
|
-
if (this.searchTerm) {
|
|
126
|
-
const regexp = new RegExp(`${this.searchTerm}`, "gi");
|
|
127
|
-
const boldedText = this.el.textContent.replace(regexp, (match) => `<strong>${match}</strong>`);
|
|
128
|
-
// for voiceover, text splitting is read as separate phrases. i.e. hel<b>lo</b> will be read as "hel lo"
|
|
129
|
-
// aria-hidden and sr-only is used to circumvent this
|
|
130
|
-
this.textEl.innerHTML = boldedText;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this.textEl.innerHTML = this.el.textContent;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
componentWillLoad() {
|
|
137
|
-
this.syncAriaSelected();
|
|
138
|
-
this.syncAriaDisabled();
|
|
139
|
-
this.updateDisabledOnClick();
|
|
140
|
-
this.parentSelectEl.addEventListener("wmSelectSearchChanged", (ev) => this.handleSearch(ev));
|
|
141
|
-
}
|
|
142
|
-
render() {
|
|
143
|
-
return (index.h(index.Host, { role: "option", tabindex: this.focused ? 0 : -1, class: this.hostClasses }, index.h("div", { class: `option-wrapper ${this.parentSelectEl.multiple ? "checkbox" : ""}` }, index.h("span", { "aria-hidden": "true", ref: (el) => (this.textEl = el) }, this.el.textContent), index.h("span", { class: "sr-only" }, this.el.textContent)), index.h("div", { class: "subinfo" }, this.subinfo)));
|
|
144
|
-
}
|
|
145
|
-
get el() { return index.getElement(this); }
|
|
146
|
-
static get watchers() { return {
|
|
147
|
-
"selected": ["syncAriaSelected"],
|
|
148
|
-
"disabled": ["syncAriaDisabled", "updateDisabledOnClick"]
|
|
149
|
-
}; }
|
|
92
|
+
if (this.el.classList.contains("clone")) {
|
|
93
|
+
this.intCloneClicked.emit(this.el); // used to then emit wmOptionSelected from the "real" wm-option
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.selected
|
|
97
|
+
? this.wmOptionDeselected.emit(this.el)
|
|
98
|
+
: this.wmOptionSelected.emit(this.el);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
handleBlur(ev) {
|
|
103
|
+
this.wmOptionBlurred.emit({ relatedTarget: ev.relatedTarget });
|
|
104
|
+
}
|
|
105
|
+
syncAriaSelected() {
|
|
106
|
+
// this function only keeps the aria-selected attr in sync with the selected prop
|
|
107
|
+
// all the logic for selecting / deselecting happens in the parent wm-select
|
|
108
|
+
this.selected ? this.el.setAttribute("aria-selected", "true") : this.el.setAttribute("aria-selected", "false");
|
|
109
|
+
}
|
|
110
|
+
syncAriaDisabled() {
|
|
111
|
+
this.disabled ? this.el.setAttribute("aria-disabled", "true") : this.el.removeAttribute("aria-disabled");
|
|
112
|
+
}
|
|
113
|
+
updateDisabledOnClick() {
|
|
114
|
+
if (this.disabled && this.el.onclick) {
|
|
115
|
+
this.onClickFunc = this.el.onclick;
|
|
116
|
+
this.el.onclick = null;
|
|
117
|
+
}
|
|
118
|
+
else if (!this.disabled && this.onClickFunc) {
|
|
119
|
+
this.el.onclick = this.onClickFunc;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
handleSearch(ev) {
|
|
123
|
+
// filter is case-insensitive, so
|
|
124
|
+
this.searchTerm = ev.detail.searchTerm.toLowerCase();
|
|
125
|
+
if (this.searchTerm) {
|
|
126
|
+
const regexp = new RegExp(`${this.searchTerm}`, "gi");
|
|
127
|
+
const boldedText = this.el.textContent.replace(regexp, (match) => `<strong>${match}</strong>`);
|
|
128
|
+
// for voiceover, text splitting is read as separate phrases. i.e. hel<b>lo</b> will be read as "hel lo"
|
|
129
|
+
// aria-hidden and sr-only is used to circumvent this
|
|
130
|
+
this.textEl.innerHTML = boldedText;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.textEl.innerHTML = this.el.textContent;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
componentWillLoad() {
|
|
137
|
+
this.syncAriaSelected();
|
|
138
|
+
this.syncAriaDisabled();
|
|
139
|
+
this.updateDisabledOnClick();
|
|
140
|
+
this.parentSelectEl.addEventListener("wmSelectSearchChanged", (ev) => this.handleSearch(ev));
|
|
141
|
+
}
|
|
142
|
+
render() {
|
|
143
|
+
return (index.h(index.Host, { role: "option", tabindex: this.focused ? 0 : -1, class: this.hostClasses }, index.h("div", { class: `option-wrapper ${this.parentSelectEl.multiple ? "checkbox" : ""}` }, index.h("span", { "aria-hidden": "true", ref: (el) => (this.textEl = el) }, this.el.textContent), index.h("span", { class: "sr-only" }, this.el.textContent)), index.h("div", { class: "subinfo" }, this.subinfo)));
|
|
144
|
+
}
|
|
145
|
+
get el() { return index.getElement(this); }
|
|
146
|
+
static get watchers() { return {
|
|
147
|
+
"selected": ["syncAriaSelected"],
|
|
148
|
+
"disabled": ["syncAriaDisabled", "updateDisabledOnClick"]
|
|
149
|
+
}; }
|
|
150
150
|
};
|
|
151
151
|
Option.style = wmOptionCss;
|
|
152
152
|
|
|
153
153
|
const wmSelectCss = ":host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}: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}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.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}.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}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.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] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption: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:\"\\f140\";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption.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)}.wrapper .button-wrapper .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-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:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-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)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;top:100%;left:0}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{-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)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .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:\"\\f349\";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}";
|
|
154
154
|
|
|
155
155
|
const Select = class {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
156
|
+
constructor(hostRef) {
|
|
157
|
+
index.registerInstance(this, hostRef);
|
|
158
|
+
this.wmSelectDidLoad = index.createEvent(this, "wmSelectDidLoad", 7);
|
|
159
|
+
this.wmSelectBlurred = index.createEvent(this, "wmSelectBlurred", 7);
|
|
160
|
+
this.wmSelectSearchChanged = index.createEvent(this, "wmSelectSearchChanged", 7);
|
|
161
|
+
this.wmSelectAllSelected = index.createEvent(this, "wmSelectAllSelected", 7);
|
|
162
|
+
this.wmSelectAllDeselected = index.createEvent(this, "wmSelectAllDeselected", 7);
|
|
163
|
+
this.selectAllMessage = functions.intl.formatMessage({
|
|
164
|
+
id: "select.selectAll",
|
|
165
|
+
defaultMessage: "Select All",
|
|
166
|
+
});
|
|
167
|
+
this.deselectAllMessage = functions.intl.formatMessage({
|
|
168
|
+
id: "select.deselectAll",
|
|
169
|
+
defaultMessage: "Deselect All",
|
|
170
|
+
});
|
|
171
|
+
this.allOptionsSelectedMessage = functions.intl.formatMessage({
|
|
172
|
+
id: "select.allOptionsSelected",
|
|
173
|
+
defaultMessage: "All options selected",
|
|
174
|
+
});
|
|
175
|
+
this.allOptionsDeselectedMessage = functions.intl.formatMessage({
|
|
176
|
+
id: "select.allOptionsDeselected",
|
|
177
|
+
defaultMessage: "All options deselected",
|
|
178
|
+
});
|
|
179
|
+
this.keysSoFar = "";
|
|
180
|
+
this.searchIndex = 0;
|
|
181
|
+
this.openUp = false;
|
|
182
|
+
//////////////////////////////////////
|
|
183
|
+
//////////////////////////////////////
|
|
184
|
+
// for multiselect button text
|
|
185
|
+
this.overflowCount = 0;
|
|
186
|
+
this.displayedOptions = [];
|
|
187
|
+
this.debouncedClearKeysSoFar = functions.debounce(() => {
|
|
188
|
+
this.keysSoFar = "";
|
|
189
|
+
}, 500);
|
|
190
|
+
this.debouncedSearch = functions.debounce(() => {
|
|
191
|
+
this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
|
|
192
|
+
if (this.filteredOptions.length) {
|
|
193
|
+
this.announce(this.resultsFoundMessage);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
this.announce(this.noResultsFoundMessage);
|
|
197
|
+
}
|
|
198
|
+
}, 150);
|
|
199
|
+
this.disabled = false;
|
|
200
|
+
this.maxHeight = undefined;
|
|
201
|
+
this.label = undefined;
|
|
202
|
+
this.labelPosition = "top";
|
|
203
|
+
this.requiredField = false;
|
|
204
|
+
this.errorMessage = "";
|
|
205
|
+
this.multiple = false;
|
|
206
|
+
this.search = false;
|
|
207
|
+
this.selectAll = false;
|
|
208
|
+
this.placeholder = functions.intl.formatMessage({
|
|
209
|
+
id: "select.multiPlaceholder",
|
|
210
|
+
defaultMessage: "Make a selection",
|
|
211
|
+
description: "Placeholder text. Use imperative",
|
|
212
|
+
});
|
|
213
|
+
this.searchPlaceholder = functions.intl.formatMessage({
|
|
214
|
+
id: "select.searchPlaceholder",
|
|
215
|
+
defaultMessage: "Search",
|
|
216
|
+
description: "Placeholder text. Use imperative",
|
|
217
|
+
});
|
|
218
|
+
this.allSelectedMessage = functions.intl.formatMessage({
|
|
219
|
+
id: "select.allSelected",
|
|
220
|
+
defaultMessage: "All selected",
|
|
221
|
+
description: "Text displayed when all options are selected",
|
|
222
|
+
});
|
|
223
|
+
this.isTabbing = false;
|
|
224
|
+
this.isExpanded = false;
|
|
225
|
+
this.announcement = "";
|
|
226
|
+
}
|
|
227
|
+
get childOptions() {
|
|
228
|
+
return Array.from(this.el.querySelectorAll("wm-option"));
|
|
229
|
+
}
|
|
230
|
+
get cloneOptions() {
|
|
231
|
+
return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
|
|
232
|
+
}
|
|
233
|
+
get allOptionEls() {
|
|
234
|
+
// this includes both slotted wm-options and internally created wm-options
|
|
235
|
+
return this.cloneOptions.concat(this.childOptions);
|
|
236
|
+
}
|
|
237
|
+
get visibleOptionEls() {
|
|
238
|
+
return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
|
|
239
|
+
}
|
|
240
|
+
get isDisabled() {
|
|
241
|
+
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
242
|
+
return functions.toBool(this.disabled);
|
|
243
|
+
}
|
|
182
244
|
//////////////////////////////////////
|
|
245
|
+
// for search variants
|
|
246
|
+
get searchTerm() {
|
|
247
|
+
return this.searchFieldEl ? this.searchFieldEl.value : "";
|
|
248
|
+
}
|
|
249
|
+
get filteredOptions() {
|
|
250
|
+
return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
|
|
251
|
+
}
|
|
252
|
+
get selectedOptions() {
|
|
253
|
+
return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
|
|
254
|
+
}
|
|
255
|
+
get allSelected() {
|
|
256
|
+
return this.childOptions.every((option) => option.selected);
|
|
257
|
+
}
|
|
258
|
+
get visibleSelectAllButton() {
|
|
259
|
+
return this.selectAll && this.multiple && this.searchTerm === "";
|
|
260
|
+
}
|
|
183
261
|
//////////////////////////////////////
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.placeholder = functions.intl.formatMessage({
|
|
209
|
-
id: "select.multiPlaceholder",
|
|
210
|
-
defaultMessage: "Make a selection",
|
|
211
|
-
description: "Placeholder text. Use imperative",
|
|
212
|
-
});
|
|
213
|
-
this.searchPlaceholder = functions.intl.formatMessage({
|
|
214
|
-
id: "select.searchPlaceholder",
|
|
215
|
-
defaultMessage: "Search",
|
|
216
|
-
description: "Placeholder text. Use imperative",
|
|
217
|
-
});
|
|
218
|
-
this.allSelectedMessage = functions.intl.formatMessage({
|
|
219
|
-
id: "select.allSelected",
|
|
220
|
-
defaultMessage: "All selected",
|
|
221
|
-
description: "Text displayed when all options are selected",
|
|
222
|
-
});
|
|
223
|
-
this.isTabbing = false;
|
|
224
|
-
this.isExpanded = false;
|
|
225
|
-
this.announcement = "";
|
|
226
|
-
}
|
|
227
|
-
get childOptions() {
|
|
228
|
-
return Array.from(this.el.querySelectorAll("wm-option"));
|
|
229
|
-
}
|
|
230
|
-
get cloneOptions() {
|
|
231
|
-
return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
|
|
232
|
-
}
|
|
233
|
-
get allOptionEls() {
|
|
234
|
-
// this includes both slotted wm-options and internally created wm-options
|
|
235
|
-
return this.cloneOptions.concat(this.childOptions);
|
|
236
|
-
}
|
|
237
|
-
get visibleOptionEls() {
|
|
238
|
-
return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
|
|
239
|
-
}
|
|
240
|
-
get isDisabled() {
|
|
241
|
-
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
242
|
-
return functions.toBool(this.disabled);
|
|
243
|
-
}
|
|
244
|
-
//////////////////////////////////////
|
|
245
|
-
// for search variants
|
|
246
|
-
get searchTerm() {
|
|
247
|
-
return this.searchFieldEl ? this.searchFieldEl.value : "";
|
|
248
|
-
}
|
|
249
|
-
get filteredOptions() {
|
|
250
|
-
return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
|
|
251
|
-
}
|
|
252
|
-
get selectedOptions() {
|
|
253
|
-
return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
|
|
254
|
-
}
|
|
255
|
-
get allSelected() {
|
|
256
|
-
return this.childOptions.every((option) => option.selected);
|
|
257
|
-
}
|
|
258
|
-
get visibleSelectAllButton() {
|
|
259
|
-
return this.selectAll && this.multiple && this.searchTerm === "";
|
|
260
|
-
}
|
|
261
|
-
//////////////////////////////////////
|
|
262
|
-
get resultsFoundMessage() {
|
|
263
|
-
return functions.intl.formatMessage({
|
|
264
|
-
id: "select.searchResultsFound",
|
|
265
|
-
defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
|
|
266
|
-
description: "The message read by the screen reader, indicating how many results a search returned",
|
|
267
|
-
}, { numResults: this.filteredOptions.length });
|
|
268
|
-
}
|
|
269
|
-
get noResultsFoundMessage() {
|
|
270
|
-
return functions.intl.formatMessage({
|
|
271
|
-
id: "select.noSearchResults",
|
|
272
|
-
defaultMessage: "No results found. Please try your search again.",
|
|
273
|
-
description: "The message displayed when no options pass the search filter",
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
toggleTabbingOn() {
|
|
277
|
-
this.isTabbing = true;
|
|
278
|
-
}
|
|
279
|
-
toggleTabbingOff() {
|
|
280
|
-
this.isTabbing = false;
|
|
281
|
-
}
|
|
282
|
-
handleOptionSelection(ev) {
|
|
283
|
-
this.focusOption(ev.detail);
|
|
284
|
-
if (!this.multiple) {
|
|
285
|
-
this.close();
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
handleOptionCloneSelection(ev) {
|
|
289
|
-
const correspondingOption = this.findCorrespondingOption(ev.detail);
|
|
290
|
-
correspondingOption.click();
|
|
291
|
-
}
|
|
292
|
-
handleChildEnter() {
|
|
293
|
-
// only occurs for multiselects. handle the click, then close
|
|
294
|
-
this.close();
|
|
295
|
-
}
|
|
296
|
-
handleChildUp(ev) {
|
|
297
|
-
this.moveUp(ev.detail);
|
|
298
|
-
}
|
|
299
|
-
handleChildDown(ev) {
|
|
300
|
-
this.moveDown(ev.detail);
|
|
301
|
-
}
|
|
302
|
-
moveToFirstOption() {
|
|
303
|
-
this.focusOption(this.visibleOptionEls[0]);
|
|
304
|
-
}
|
|
305
|
-
moveToLastOption() {
|
|
306
|
-
this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
|
|
307
|
-
}
|
|
308
|
-
closePopupOnEscape() {
|
|
309
|
-
this.close();
|
|
310
|
-
}
|
|
311
|
-
handleOptionBlur(ev) {
|
|
312
|
-
// if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
|
|
313
|
-
// keeps our component's blur events accurate, and closes when focusing browser address bar
|
|
314
|
-
if (!this.isElOrChild(ev.detail.relatedTarget)) {
|
|
315
|
-
const event = new CustomEvent("blur");
|
|
316
|
-
// @ts-ignore
|
|
317
|
-
event.relatedTarget = ev.detail.relatedTarget;
|
|
318
|
-
this.el.dispatchEvent(event);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
handleClick(ev) {
|
|
322
|
-
if (!this.isElOrChild(ev.target)) {
|
|
323
|
-
this.close();
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
handleSelectAllClick() {
|
|
327
|
-
this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
|
|
328
|
-
}
|
|
329
|
-
selectAllOptions() {
|
|
330
|
-
this.announce(this.allOptionsSelectedMessage);
|
|
331
|
-
this.wmSelectAllSelected.emit();
|
|
332
|
-
}
|
|
333
|
-
deselectAllOptions() {
|
|
334
|
-
this.announce(this.allOptionsDeselectedMessage);
|
|
335
|
-
this.wmSelectAllDeselected.emit();
|
|
336
|
-
}
|
|
337
|
-
handleButtonBlur(ev) {
|
|
338
|
-
if (this.isElOrChild(ev.relatedTarget)) {
|
|
339
|
-
// do not emit a blur event when opening the dropdown and focusing the Options
|
|
340
|
-
ev.stopPropagation();
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
handleSearchFieldBlur(ev) {
|
|
344
|
-
this.searchFieldWrapperEl.classList.remove("focus");
|
|
345
|
-
if (this.isElOrChild(ev.relatedTarget)) {
|
|
346
|
-
// do not emit a blur event when moving from searchfield to options
|
|
347
|
-
ev.stopPropagation();
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
handleKey(ev) {
|
|
351
|
-
switch (ev.key) {
|
|
352
|
-
case "ArrowDown":
|
|
353
|
-
if (this.isExpanded === false) {
|
|
354
|
-
ev.preventDefault();
|
|
355
|
-
this.open("next");
|
|
356
|
-
}
|
|
357
|
-
break;
|
|
358
|
-
case "ArrowUp":
|
|
359
|
-
if (this.isExpanded === false) {
|
|
360
|
-
ev.preventDefault();
|
|
361
|
-
this.open("previous");
|
|
362
|
-
}
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
componentWillLoad() {
|
|
367
|
-
if (!this.label) {
|
|
368
|
-
console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
|
|
369
|
-
}
|
|
370
|
-
if (!this.multiple && this.selectedOptions.length === 0) {
|
|
371
|
-
console.error("wm-select should have one initial option selected");
|
|
372
|
-
}
|
|
373
|
-
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
374
|
-
this.toggleTabbingOn();
|
|
375
|
-
}
|
|
376
|
-
functions.handleDisabledAttribute(this.el, this.isDisabled);
|
|
377
|
-
const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
|
|
378
|
-
mutationObserver.observe(this.el, {
|
|
379
|
-
childList: true,
|
|
380
|
-
attributes: true,
|
|
381
|
-
subtree: true,
|
|
382
|
-
attributeFilter: ["selected"],
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
handleChildChange(_) {
|
|
386
|
-
// on update of children or children selected state, reset button text and rerender
|
|
387
|
-
this.setButtonText();
|
|
388
|
-
index.forceUpdate(this.el);
|
|
389
|
-
}
|
|
390
|
-
componentDidLoad() {
|
|
391
|
-
this.wmSelectDidLoad.emit();
|
|
392
|
-
this.dropdownEl.classList.add("hidden");
|
|
393
|
-
index.forceUpdate(this.el);
|
|
394
|
-
// Dev can overwrite the max-height rule set in the Sass file
|
|
395
|
-
if (this.maxHeight) {
|
|
396
|
-
this.listboxEl.style.maxHeight = this.maxHeight;
|
|
397
|
-
}
|
|
398
|
-
if (this.multiple) {
|
|
399
|
-
this.updateOptionVisibility();
|
|
400
|
-
}
|
|
401
|
-
this.setButtonText();
|
|
402
|
-
}
|
|
403
|
-
componentWillUpdate() {
|
|
404
|
-
if (this.multiple) {
|
|
405
|
-
// find last visible clone option and apply .last class
|
|
406
|
-
const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
|
|
407
|
-
visibleCloneOptions.forEach((option, idx) => {
|
|
408
|
-
if (idx === visibleCloneOptions.length - 1) {
|
|
409
|
-
option.classList.add("last");
|
|
262
|
+
get resultsFoundMessage() {
|
|
263
|
+
return functions.intl.formatMessage({
|
|
264
|
+
id: "select.searchResultsFound",
|
|
265
|
+
defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
|
|
266
|
+
description: "The message read by the screen reader, indicating how many results a search returned",
|
|
267
|
+
}, { numResults: this.filteredOptions.length });
|
|
268
|
+
}
|
|
269
|
+
get noResultsFoundMessage() {
|
|
270
|
+
return functions.intl.formatMessage({
|
|
271
|
+
id: "select.noSearchResults",
|
|
272
|
+
defaultMessage: "No results found. Please try your search again.",
|
|
273
|
+
description: "The message displayed when no options pass the search filter",
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
toggleTabbingOn() {
|
|
277
|
+
this.isTabbing = true;
|
|
278
|
+
}
|
|
279
|
+
toggleTabbingOff() {
|
|
280
|
+
this.isTabbing = false;
|
|
281
|
+
}
|
|
282
|
+
handleOptionSelection(ev) {
|
|
283
|
+
this.focusOption(ev.detail);
|
|
284
|
+
if (!this.multiple) {
|
|
285
|
+
this.close();
|
|
410
286
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
287
|
+
}
|
|
288
|
+
handleOptionCloneSelection(ev) {
|
|
289
|
+
const correspondingOption = this.findCorrespondingOption(ev.detail);
|
|
290
|
+
correspondingOption.click();
|
|
291
|
+
}
|
|
292
|
+
handleChildEnter() {
|
|
293
|
+
// only occurs for multiselects. handle the click, then close
|
|
294
|
+
this.close();
|
|
295
|
+
}
|
|
296
|
+
handleChildUp(ev) {
|
|
297
|
+
this.moveUp(ev.detail);
|
|
298
|
+
}
|
|
299
|
+
handleChildDown(ev) {
|
|
300
|
+
this.moveDown(ev.detail);
|
|
301
|
+
}
|
|
302
|
+
moveToFirstOption() {
|
|
303
|
+
this.focusOption(this.visibleOptionEls[0]);
|
|
304
|
+
}
|
|
305
|
+
moveToLastOption() {
|
|
306
|
+
this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
|
|
307
|
+
}
|
|
308
|
+
closePopupOnEscape() {
|
|
309
|
+
this.close();
|
|
310
|
+
}
|
|
311
|
+
handleOptionBlur(ev) {
|
|
312
|
+
// if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
|
|
313
|
+
// keeps our component's blur events accurate, and closes when focusing browser address bar
|
|
314
|
+
if (!this.isElOrChild(ev.detail.relatedTarget)) {
|
|
315
|
+
const event = new CustomEvent("blur");
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
event.relatedTarget = ev.detail.relatedTarget;
|
|
318
|
+
this.el.dispatchEvent(event);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
handleClick(ev) {
|
|
322
|
+
if (!this.isElOrChild(ev.target)) {
|
|
323
|
+
this.close();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
handleSelectAllClick() {
|
|
327
|
+
this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
|
|
328
|
+
}
|
|
329
|
+
selectAllOptions() {
|
|
330
|
+
this.announce(this.allOptionsSelectedMessage);
|
|
331
|
+
this.wmSelectAllSelected.emit();
|
|
332
|
+
}
|
|
333
|
+
deselectAllOptions() {
|
|
334
|
+
this.announce(this.allOptionsDeselectedMessage);
|
|
335
|
+
this.wmSelectAllDeselected.emit();
|
|
336
|
+
}
|
|
337
|
+
handleButtonBlur(ev) {
|
|
338
|
+
if (this.isElOrChild(ev.relatedTarget)) {
|
|
339
|
+
// do not emit a blur event when opening the dropdown and focusing the Options
|
|
340
|
+
ev.stopPropagation();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
handleSearchFieldBlur(ev) {
|
|
344
|
+
this.searchFieldWrapperEl.classList.remove("focus");
|
|
345
|
+
if (this.isElOrChild(ev.relatedTarget)) {
|
|
346
|
+
// do not emit a blur event when moving from searchfield to options
|
|
347
|
+
ev.stopPropagation();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
handleKey(ev) {
|
|
351
|
+
switch (ev.key) {
|
|
352
|
+
case "ArrowDown":
|
|
353
|
+
if (this.isExpanded === false) {
|
|
354
|
+
ev.preventDefault();
|
|
355
|
+
this.open("next");
|
|
356
|
+
}
|
|
357
|
+
break;
|
|
358
|
+
case "ArrowUp":
|
|
359
|
+
if (this.isExpanded === false) {
|
|
360
|
+
ev.preventDefault();
|
|
361
|
+
this.open("previous");
|
|
362
|
+
}
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
componentWillLoad() {
|
|
367
|
+
if (!this.label) {
|
|
368
|
+
console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
|
|
369
|
+
}
|
|
370
|
+
if (!this.multiple && this.selectedOptions.length === 0) {
|
|
371
|
+
console.error("wm-select should have one initial option selected");
|
|
372
|
+
}
|
|
373
|
+
if (document.body.classList.contains("wmcl-user-is-tabbing")) {
|
|
374
|
+
this.toggleTabbingOn();
|
|
375
|
+
}
|
|
376
|
+
functions.handleDisabledAttribute(this.el, this.isDisabled);
|
|
377
|
+
const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
|
|
378
|
+
mutationObserver.observe(this.el, {
|
|
379
|
+
childList: true,
|
|
380
|
+
attributes: true,
|
|
381
|
+
subtree: true,
|
|
382
|
+
attributeFilter: ["selected"],
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
handleChildChange(_) {
|
|
386
|
+
// on update of children or children selected state, reset button text and rerender
|
|
387
|
+
this.setButtonText();
|
|
388
|
+
index.forceUpdate(this.el);
|
|
389
|
+
}
|
|
390
|
+
componentDidLoad() {
|
|
391
|
+
this.wmSelectDidLoad.emit();
|
|
392
|
+
this.dropdownEl.classList.add("hidden");
|
|
393
|
+
index.forceUpdate(this.el);
|
|
394
|
+
// Dev can overwrite the max-height rule set in the Sass file
|
|
395
|
+
if (this.maxHeight) {
|
|
396
|
+
this.listboxEl.style.maxHeight = this.maxHeight;
|
|
397
|
+
}
|
|
398
|
+
if (this.multiple) {
|
|
399
|
+
this.updateOptionVisibility();
|
|
400
|
+
}
|
|
401
|
+
this.setButtonText();
|
|
402
|
+
}
|
|
403
|
+
componentWillUpdate() {
|
|
404
|
+
if (this.multiple) {
|
|
405
|
+
// find last visible clone option and apply .last class
|
|
406
|
+
const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
|
|
407
|
+
visibleCloneOptions.forEach((option, idx) => {
|
|
408
|
+
if (idx === visibleCloneOptions.length - 1) {
|
|
409
|
+
option.classList.add("last");
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
option.classList.remove("last");
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
moveUp(el) {
|
|
418
|
+
const focusableEls = this.visibleOptionEls;
|
|
419
|
+
if (this.selectAllEl) {
|
|
420
|
+
focusableEls.unshift(this.selectAllEl);
|
|
421
|
+
}
|
|
422
|
+
if (this.searchFieldEl) {
|
|
423
|
+
focusableEls.unshift(this.searchFieldEl);
|
|
424
|
+
}
|
|
425
|
+
const prevEl = focusableEls[focusableEls.indexOf(el) - 1] || focusableEls[focusableEls.length - 1];
|
|
426
|
+
if (prevEl) {
|
|
427
|
+
this.focusOption(prevEl);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
moveDown(el) {
|
|
431
|
+
const focusableEls = this.visibleOptionEls;
|
|
432
|
+
if (this.selectAllEl) {
|
|
433
|
+
focusableEls.unshift(this.selectAllEl);
|
|
434
|
+
}
|
|
435
|
+
if (this.searchFieldEl) {
|
|
436
|
+
focusableEls.unshift(this.searchFieldEl);
|
|
437
|
+
}
|
|
438
|
+
const nextEl = focusableEls[focusableEls.indexOf(el) + 1] || focusableEls[0];
|
|
439
|
+
if (nextEl) {
|
|
440
|
+
this.focusOption(nextEl);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
open(optionToSelect) {
|
|
444
|
+
if (!this.isDisabled) {
|
|
445
|
+
const elHeight = this.el.clientHeight;
|
|
446
|
+
const buttonHeight = this.buttonEl.clientHeight;
|
|
447
|
+
this.openUp = functions.shouldOpenUp(this.el, this.dropdownEl.clientHeight,
|
|
448
|
+
// when opening up, dropdown covers both label and button
|
|
449
|
+
elHeight,
|
|
450
|
+
// when opening down, dropdown covers only the button
|
|
451
|
+
buttonHeight);
|
|
452
|
+
this.isExpanded = true;
|
|
453
|
+
this.dropdownEl.classList.remove("hidden");
|
|
454
|
+
window.requestAnimationFrame(() => {
|
|
455
|
+
switch (optionToSelect) {
|
|
456
|
+
case "next":
|
|
457
|
+
// search variant focuses search field
|
|
458
|
+
// all others focus option "after" last selected option (this can be the first option)
|
|
459
|
+
if (this.search) {
|
|
460
|
+
this.searchFieldEl.focus();
|
|
461
|
+
this.listboxEl.scrollTop = 0;
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
this.moveDown(this.visibleOptionEls.filter((x) => x.selected).slice(-1)[0]);
|
|
465
|
+
}
|
|
466
|
+
break;
|
|
467
|
+
case "previous":
|
|
468
|
+
// search variant focuses last option
|
|
469
|
+
// all others focus option "above" first selected option (this can be the last option)
|
|
470
|
+
if (this.search) {
|
|
471
|
+
this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
this.moveUp(this.visibleOptionEls.filter((x) => x.selected)[0]);
|
|
475
|
+
}
|
|
476
|
+
break;
|
|
477
|
+
default:
|
|
478
|
+
// search variant focuses search field
|
|
479
|
+
// all others focus the selected option
|
|
480
|
+
// if no option is selected (empty multiselect), focuses first option
|
|
481
|
+
if (this.search) {
|
|
482
|
+
this.searchFieldEl.focus();
|
|
483
|
+
this.listboxEl.scrollTop = 0;
|
|
484
|
+
}
|
|
485
|
+
else if (this.selectedOptions.length > 0) {
|
|
486
|
+
this.focusOption(this.visibleOptionEls.filter((x) => x.selected)[0]);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
this.focusOption(this.visibleOptionEls[0]);
|
|
490
|
+
}
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
close(returnFocus = true) {
|
|
497
|
+
if (this.isExpanded) {
|
|
498
|
+
this.isExpanded = false;
|
|
499
|
+
this.allOptionEls.map((i) => (i.focused = false));
|
|
500
|
+
window.setTimeout(() => {
|
|
501
|
+
this.dropdownEl.classList.add("hidden");
|
|
502
|
+
if (this.multiple) {
|
|
503
|
+
this.updateOptionVisibility();
|
|
504
|
+
}
|
|
505
|
+
// clear search field, reset filtered / bolded state of wm-options
|
|
506
|
+
if (this.search) {
|
|
507
|
+
this.searchFieldEl.value = "";
|
|
508
|
+
this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
|
|
509
|
+
}
|
|
510
|
+
// Returns focus to button after popup closes (no need if user is tabbing)
|
|
511
|
+
// Delay is necessary for screenreader to get new expanded state before focus
|
|
512
|
+
// window.requestAnimationFrame is probably enough, but since we are already using setTimeout it may as well be here
|
|
513
|
+
// also UX wise, it makes sense for the button to only be focused after the animation is complete
|
|
514
|
+
if (returnFocus) {
|
|
515
|
+
this.buttonEl.focus();
|
|
516
|
+
}
|
|
517
|
+
}, 150);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
updateOptionVisibility() {
|
|
521
|
+
// this runs for search multiselects, where selected options are rendered at the top of the dropdown list
|
|
522
|
+
// slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
|
|
523
|
+
this.childOptions.forEach((option, idx) => {
|
|
524
|
+
const cloneOption = this.cloneOptions[idx];
|
|
525
|
+
if (option.selected) {
|
|
526
|
+
option.classList.add("hidden");
|
|
527
|
+
cloneOption.classList.remove("hidden");
|
|
462
528
|
}
|
|
463
529
|
else {
|
|
464
|
-
|
|
530
|
+
option.classList.remove("hidden");
|
|
531
|
+
cloneOption.classList.add("hidden");
|
|
465
532
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
focusOption(option) {
|
|
536
|
+
this.allOptionEls.forEach((i) => (i.focused = i === option));
|
|
537
|
+
// option must be scrolledIntoView before focused
|
|
538
|
+
// if focus is called first the option might be positioned incorrectly (in the center of the dropdown) and scrollIntoView will do nothing as the option will already be in view
|
|
539
|
+
option.scrollIntoView({ block: "nearest" });
|
|
540
|
+
// scrollIntoView does not work when the container of the element it's called on is not rendered to the page (in our case the dropdown is still closed and has transform: scaleY(0))
|
|
541
|
+
// when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
|
|
542
|
+
// in Safari in particular, the soonest this seems to happen is 20ms. The longest we can wait before any jumping in the open dropdown is noticeable is 60ms
|
|
543
|
+
window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
|
|
544
|
+
option.focus();
|
|
545
|
+
}
|
|
546
|
+
findAndFocusOption(ev) {
|
|
547
|
+
const letterPressed = ev.detail.letter.toLowerCase();
|
|
548
|
+
const optionPressed = ev.detail.optionEl;
|
|
549
|
+
if (!this.keysSoFar && letterPressed == " ") {
|
|
550
|
+
// if the first key entered is space, treat as a click. Otherwise include in
|
|
551
|
+
optionPressed.click();
|
|
552
|
+
}
|
|
553
|
+
else {
|
|
554
|
+
if (!this.keysSoFar) {
|
|
555
|
+
// if first character entered, set currently focused option as the starting index for the search
|
|
556
|
+
this.visibleOptionEls.forEach((option, idx) => {
|
|
557
|
+
if (option.focused) {
|
|
558
|
+
this.searchIndex = idx;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
475
561
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
if (this.search) {
|
|
482
|
-
this.searchFieldEl.focus();
|
|
483
|
-
this.listboxEl.scrollTop = 0;
|
|
562
|
+
this.keysSoFar += letterPressed;
|
|
563
|
+
let nextMatch = this.findMatchInRange(this.visibleOptionEls, this.searchIndex + 1, this.visibleOptionEls.length);
|
|
564
|
+
if (!nextMatch) {
|
|
565
|
+
// if match can't be found from starting option downwards, search from top
|
|
566
|
+
nextMatch = this.findMatchInRange(this.visibleOptionEls, 0, this.searchIndex);
|
|
484
567
|
}
|
|
485
|
-
|
|
486
|
-
|
|
568
|
+
if (nextMatch) {
|
|
569
|
+
// findMatchInRange still might have returned null, only focus if match found
|
|
570
|
+
this.focusOption(nextMatch);
|
|
487
571
|
}
|
|
488
|
-
|
|
489
|
-
|
|
572
|
+
this.debouncedClearKeysSoFar();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
findMatchInRange(list, startIndex, endIndex) {
|
|
576
|
+
let match = null;
|
|
577
|
+
let optionsInRange = list.slice(startIndex, endIndex);
|
|
578
|
+
// Find the first option starting with the keysSoFar substring, searching in
|
|
579
|
+
// the specified range of options
|
|
580
|
+
optionsInRange.forEach((option) => {
|
|
581
|
+
const label = option.textContent;
|
|
582
|
+
if (!match && label && label.toLowerCase().startsWith(this.keysSoFar)) {
|
|
583
|
+
match = option;
|
|
490
584
|
}
|
|
491
|
-
|
|
585
|
+
});
|
|
586
|
+
return match;
|
|
587
|
+
}
|
|
588
|
+
findCorrespondingOption(el) {
|
|
589
|
+
// if clone, returns the child wm-option
|
|
590
|
+
// if child wm-option, returns clone
|
|
591
|
+
const isClone = el.classList.contains("clone");
|
|
592
|
+
return isClone
|
|
593
|
+
? this.childOptions[this.cloneOptions.indexOf(el)]
|
|
594
|
+
: this.cloneOptions[this.childOptions.indexOf(el)];
|
|
595
|
+
}
|
|
596
|
+
isElOrChild(el) {
|
|
597
|
+
var _a;
|
|
598
|
+
// determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
|
|
599
|
+
return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
|
|
600
|
+
}
|
|
601
|
+
exposeErrors() {
|
|
602
|
+
// When the error changes, a new id is set for the error container and the button's aria-describedby attribute is updated accordingly. This is to make sure the screen reader announces teh updated errors in Firefox. See this longstanding bug: https://bugzilla.mozilla.org/show_bug.cgi?id=493683
|
|
603
|
+
const newId = functions.generateId();
|
|
604
|
+
this.errorContainer.id = `wm-errors-${newId}`;
|
|
605
|
+
this.buttonEl.setAttribute("aria-describedby", `wm-errors-${newId}`);
|
|
606
|
+
}
|
|
607
|
+
handleDisabledChange() {
|
|
608
|
+
functions.handleDisabledAttribute(this.el, this.isDisabled);
|
|
609
|
+
}
|
|
610
|
+
renderErrorContainer() {
|
|
611
|
+
return (index.h("div", { id: "wm-errors", class: this.errorMessage ? "error-message" : "", ref: (el) => (this.errorContainer = el), "aria-live": "assertive", "aria-atomic": "true" }, this.errorMessage));
|
|
612
|
+
}
|
|
613
|
+
handleComponentBlur(ev) {
|
|
614
|
+
// Do not close or emit custom blur event when blurring to an element inside (wm-option)
|
|
615
|
+
if (!this.el.contains(ev.relatedTarget)) {
|
|
616
|
+
this.close(false);
|
|
617
|
+
this.wmSelectBlurred.emit();
|
|
492
618
|
}
|
|
493
|
-
});
|
|
494
619
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
620
|
+
// on search field or select all. keydown on options is handled via events.
|
|
621
|
+
handleKeyDown(ev) {
|
|
622
|
+
const el = ev.target;
|
|
623
|
+
switch (ev.key) {
|
|
624
|
+
case "ArrowDown":
|
|
625
|
+
ev.preventDefault();
|
|
626
|
+
this.moveDown(ev.target);
|
|
627
|
+
break;
|
|
628
|
+
case "ArrowUp":
|
|
629
|
+
ev.preventDefault();
|
|
630
|
+
this.moveUp(ev.target);
|
|
631
|
+
break;
|
|
632
|
+
case "Escape":
|
|
633
|
+
ev.preventDefault();
|
|
634
|
+
this.close();
|
|
635
|
+
break;
|
|
636
|
+
case "Enter":
|
|
637
|
+
if (el === this.selectAllEl) {
|
|
638
|
+
ev.preventDefault();
|
|
639
|
+
this.handleSelectAllClick();
|
|
640
|
+
this.close();
|
|
641
|
+
}
|
|
642
|
+
break;
|
|
643
|
+
case " ":
|
|
644
|
+
if (el === this.selectAllEl) {
|
|
645
|
+
ev.preventDefault();
|
|
646
|
+
this.handleSelectAllClick();
|
|
647
|
+
}
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
setButtonText() {
|
|
652
|
+
this.displayedOptions = this.childOptions
|
|
653
|
+
.filter((x) => x.selected)
|
|
654
|
+
.map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
|
|
655
|
+
// handle overflow + counter for multiselect
|
|
502
656
|
if (this.multiple) {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
657
|
+
// this is a fixed measurement accounting for the max width of a 3 character overflow counter
|
|
658
|
+
const overflowCounterWidth = 38;
|
|
659
|
+
const computedStyle = window.getComputedStyle(this.buttonEl);
|
|
660
|
+
// there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
|
|
661
|
+
const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
|
|
662
|
+
const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
|
|
663
|
+
const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
|
|
664
|
+
let optionsWidths = this.displayedOptions.map((x) => x.shadowRoot.querySelector(".option-wrapper").clientWidth);
|
|
665
|
+
let optionsTotalWidth = optionsWidths.reduce((acc, x) => acc + x, 0);
|
|
666
|
+
this.overflowCount = 0;
|
|
667
|
+
while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
|
|
668
|
+
this.overflowCount++;
|
|
669
|
+
optionsTotalWidth -= optionsWidths[optionsWidths.length - 1];
|
|
670
|
+
optionsWidths.pop();
|
|
671
|
+
this.displayedOptions.pop();
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
announce(message) {
|
|
676
|
+
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
677
|
+
if (this.liveRegionEl.textContent === message) {
|
|
678
|
+
message += "\u00A0";
|
|
679
|
+
}
|
|
680
|
+
this.announcement = message;
|
|
681
|
+
}
|
|
682
|
+
renderButtonText() {
|
|
683
|
+
if (this.multiple && this.displayedOptions.length < 1) {
|
|
684
|
+
return index.h("span", null, this.placeholder);
|
|
685
|
+
}
|
|
686
|
+
else if (this.multiple && this.allSelected && this.overflowCount > 0) {
|
|
687
|
+
return this.allSelectedMessage;
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
return this.displayedOptions.map((x, idx) => (index.h("span", null, idx > 0 ? ", " : "", x.textContent)));
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
renderSubinfo() {
|
|
694
|
+
// multiselects cannot have subinfo for options
|
|
695
|
+
if (!this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo) {
|
|
696
|
+
return index.h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
renderOverflowCount() {
|
|
700
|
+
if (this.overflowCount > 0 && !this.allSelected) {
|
|
701
|
+
return (index.h("span", null, index.h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
renderSearchField() {
|
|
705
|
+
return (index.h("div", { class: "search" }, index.h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, index.h("div", { class: "icon" }), index.h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
|
|
706
|
+
}
|
|
707
|
+
renderSearchFailedMessage() {
|
|
708
|
+
return index.h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
|
|
709
|
+
}
|
|
710
|
+
renderSelectAllButton() {
|
|
711
|
+
return (index.h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
|
|
712
|
+
}
|
|
713
|
+
renderCloneOptions() {
|
|
714
|
+
return Array.from(this.el.children).map((option) => {
|
|
715
|
+
return (index.h("wm-option", { class: "clone", selected: option.selected }, option.textContent));
|
|
560
716
|
});
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
});
|
|
586
|
-
return match;
|
|
587
|
-
}
|
|
588
|
-
findCorrespondingOption(el) {
|
|
589
|
-
// if clone, returns the child wm-option
|
|
590
|
-
// if child wm-option, returns clone
|
|
591
|
-
const isClone = el.classList.contains("clone");
|
|
592
|
-
return isClone
|
|
593
|
-
? this.childOptions[this.cloneOptions.indexOf(el)]
|
|
594
|
-
: this.cloneOptions[this.childOptions.indexOf(el)];
|
|
595
|
-
}
|
|
596
|
-
isElOrChild(el) {
|
|
597
|
-
var _a;
|
|
598
|
-
// determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
|
|
599
|
-
return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
|
|
600
|
-
}
|
|
601
|
-
exposeErrors() {
|
|
602
|
-
// When the error changes, a new id is set for the error container and the button's aria-describedby attribute is updated accordingly. This is to make sure the screen reader announces teh updated errors in Firefox. See this longstanding bug: https://bugzilla.mozilla.org/show_bug.cgi?id=493683
|
|
603
|
-
const newId = functions.generateId();
|
|
604
|
-
this.errorContainer.id = `wm-errors-${newId}`;
|
|
605
|
-
this.buttonEl.setAttribute("aria-describedby", `wm-errors-${newId}`);
|
|
606
|
-
}
|
|
607
|
-
handleDisabledChange() {
|
|
608
|
-
functions.handleDisabledAttribute(this.el, this.isDisabled);
|
|
609
|
-
}
|
|
610
|
-
renderErrorContainer() {
|
|
611
|
-
return (index.h("div", { id: "wm-errors", class: this.errorMessage ? "error-message" : "", ref: (el) => (this.errorContainer = el), "aria-live": "assertive", "aria-atomic": "true" }, this.errorMessage));
|
|
612
|
-
}
|
|
613
|
-
handleComponentBlur(ev) {
|
|
614
|
-
// Do not close or emit custom blur event when blurring to an element inside (wm-option)
|
|
615
|
-
if (!this.el.contains(ev.relatedTarget)) {
|
|
616
|
-
this.close(false);
|
|
617
|
-
this.wmSelectBlurred.emit();
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
// on search field or select all. keydown on options is handled via events.
|
|
621
|
-
handleKeyDown(ev) {
|
|
622
|
-
const el = ev.target;
|
|
623
|
-
switch (ev.key) {
|
|
624
|
-
case "ArrowDown":
|
|
625
|
-
ev.preventDefault();
|
|
626
|
-
this.moveDown(ev.target);
|
|
627
|
-
break;
|
|
628
|
-
case "ArrowUp":
|
|
629
|
-
ev.preventDefault();
|
|
630
|
-
this.moveUp(ev.target);
|
|
631
|
-
break;
|
|
632
|
-
case "Escape":
|
|
633
|
-
ev.preventDefault();
|
|
634
|
-
this.close();
|
|
635
|
-
break;
|
|
636
|
-
case "Enter":
|
|
637
|
-
if (el === this.selectAllEl) {
|
|
638
|
-
ev.preventDefault();
|
|
639
|
-
this.handleSelectAllClick();
|
|
640
|
-
this.close();
|
|
641
|
-
}
|
|
642
|
-
break;
|
|
643
|
-
case " ":
|
|
644
|
-
if (el === this.selectAllEl) {
|
|
645
|
-
ev.preventDefault();
|
|
646
|
-
this.handleSelectAllClick();
|
|
647
|
-
}
|
|
648
|
-
break;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
setButtonText() {
|
|
652
|
-
this.displayedOptions = this.childOptions
|
|
653
|
-
.filter((x) => x.selected)
|
|
654
|
-
.map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
|
|
655
|
-
// handle overflow + counter for multiselect
|
|
656
|
-
if (this.multiple) {
|
|
657
|
-
// this is a fixed measurement accounting for the max width of a 3 character overflow counter
|
|
658
|
-
const overflowCounterWidth = 38;
|
|
659
|
-
const computedStyle = window.getComputedStyle(this.buttonEl);
|
|
660
|
-
// there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
|
|
661
|
-
const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
|
|
662
|
-
const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
|
|
663
|
-
const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
|
|
664
|
-
let optionsWidths = this.displayedOptions.map((x) => x.shadowRoot.querySelector(".option-wrapper").clientWidth);
|
|
665
|
-
let optionsTotalWidth = optionsWidths.reduce((acc, x) => acc + x, 0);
|
|
666
|
-
this.overflowCount = 0;
|
|
667
|
-
while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
|
|
668
|
-
this.overflowCount++;
|
|
669
|
-
optionsTotalWidth -= optionsWidths[optionsWidths.length - 1];
|
|
670
|
-
optionsWidths.pop();
|
|
671
|
-
this.displayedOptions.pop();
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
announce(message) {
|
|
676
|
-
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
677
|
-
if (this.liveRegionEl.textContent === message) {
|
|
678
|
-
message += "\u00A0";
|
|
679
|
-
}
|
|
680
|
-
this.announcement = message;
|
|
681
|
-
}
|
|
682
|
-
renderButtonText() {
|
|
683
|
-
if (this.multiple && this.displayedOptions.length < 1) {
|
|
684
|
-
return index.h("span", null, this.placeholder);
|
|
685
|
-
}
|
|
686
|
-
else if (this.multiple && this.allSelected && this.overflowCount > 0) {
|
|
687
|
-
return this.allSelectedMessage;
|
|
688
|
-
}
|
|
689
|
-
else {
|
|
690
|
-
return this.displayedOptions.map((x, idx) => (index.h("span", null, idx > 0 ? ", " : "", x.textContent)));
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
renderSubinfo() {
|
|
694
|
-
// multiselects cannot have subinfo for options
|
|
695
|
-
if (!this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo) {
|
|
696
|
-
return index.h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
renderOverflowCount() {
|
|
700
|
-
if (this.overflowCount > 0 && !this.allSelected) {
|
|
701
|
-
return (index.h("span", null, index.h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
renderSearchField() {
|
|
705
|
-
return (index.h("div", { class: "search" }, index.h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, index.h("div", { class: "icon" }), index.h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
|
|
706
|
-
}
|
|
707
|
-
renderSearchFailedMessage() {
|
|
708
|
-
return index.h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
|
|
709
|
-
}
|
|
710
|
-
renderSelectAllButton() {
|
|
711
|
-
return (index.h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
|
|
712
|
-
}
|
|
713
|
-
renderCloneOptions() {
|
|
714
|
-
return Array.from(this.el.children).map((option) => {
|
|
715
|
-
return (index.h("wm-option", { class: "clone", selected: option.selected }, option.textContent));
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
render() {
|
|
719
|
-
const buttonProps = {
|
|
720
|
-
id: "selectbtn",
|
|
721
|
-
["disabled"]: this.isDisabled,
|
|
722
|
-
["aria-controls"]: "list",
|
|
723
|
-
["aria-labelledby"]: "label selectbtn",
|
|
724
|
-
["aria-describedby"]: "wm-errors",
|
|
725
|
-
["aria-expanded"]: this.isExpanded ? "true" : "false",
|
|
726
|
-
onClick: () => (this.isExpanded ? this.close() : this.open()),
|
|
727
|
-
};
|
|
728
|
-
return (index.h(index.Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, index.h("div", { class: `wrapper ${functions.getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { class: "label-wrapper" }, index.h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
|
|
729
|
-
// we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
|
|
730
|
-
this.requiredField ? (index.h("span", { class: "required" }, index.h("span", { class: "sr-only" }, intl.globalMessages.requiredField), index.h("span", { "aria-hidden": "true" }, "*"))) : (""))), index.h("div", { class: "button-wrapper" }, index.h("button", Object.assign({}, buttonProps, { class: `displayedoption ${this.isTabbing ? "user-is-tabbing" : ""}`, ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), index.h("span", { class: this.selectedOptions.length > 0 && this.selectedOptions.filter((x) => x.subinfo).length > 0
|
|
731
|
-
? "overflowcontrol hassubinfo"
|
|
732
|
-
: "overflowcontrol" }, index.h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), index.h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), index.h("div", { id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), index.h("slot", null))), this.renderErrorContainer(), index.h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
|
|
733
|
-
}
|
|
734
|
-
static get delegatesFocus() { return true; }
|
|
735
|
-
get el() { return index.getElement(this); }
|
|
736
|
-
static get watchers() { return {
|
|
737
|
-
"errorMessage": ["exposeErrors"],
|
|
738
|
-
"disabled": ["handleDisabledChange"]
|
|
739
|
-
}; }
|
|
717
|
+
}
|
|
718
|
+
render() {
|
|
719
|
+
const buttonProps = {
|
|
720
|
+
id: "selectbtn",
|
|
721
|
+
["disabled"]: this.isDisabled,
|
|
722
|
+
["aria-controls"]: "list",
|
|
723
|
+
["aria-labelledby"]: "label selectbtn",
|
|
724
|
+
["aria-describedby"]: "wm-errors",
|
|
725
|
+
["aria-expanded"]: this.isExpanded ? "true" : "false",
|
|
726
|
+
onClick: () => (this.isExpanded ? this.close() : this.open()),
|
|
727
|
+
};
|
|
728
|
+
return (index.h(index.Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, index.h("div", { class: `wrapper ${functions.getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, index.h("div", { class: "label-wrapper" }, index.h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
|
|
729
|
+
// we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
|
|
730
|
+
this.requiredField ? (index.h("span", { class: "required" }, index.h("span", { class: "sr-only" }, intl.globalMessages.requiredField), index.h("span", { "aria-hidden": "true" }, "*"))) : (""))), index.h("div", { class: "button-wrapper" }, index.h("button", Object.assign({}, buttonProps, { class: `displayedoption ${this.isTabbing ? "user-is-tabbing" : ""}`, ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), index.h("span", { class: this.selectedOptions.length > 0 && this.selectedOptions.filter((x) => x.subinfo).length > 0
|
|
731
|
+
? "overflowcontrol hassubinfo"
|
|
732
|
+
: "overflowcontrol" }, index.h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), index.h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), index.h("div", { id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), index.h("slot", null))), this.renderErrorContainer(), index.h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
|
|
733
|
+
}
|
|
734
|
+
static get delegatesFocus() { return true; }
|
|
735
|
+
get el() { return index.getElement(this); }
|
|
736
|
+
static get watchers() { return {
|
|
737
|
+
"errorMessage": ["exposeErrors"],
|
|
738
|
+
"disabled": ["handleDisabledChange"]
|
|
739
|
+
}; }
|
|
740
740
|
};
|
|
741
741
|
Select.style = wmSelectCss;
|
|
742
742
|
|