@watermarkinsights/ripple 5.12.0-9 → 5.13.0-alpha.1
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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/{esm/chartFunctions-1478f4db.js → components/chartFunctions.js} +31 -11
- package/dist/components/functions.js +17465 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/{collection/global/global.js → components/index.js} +52 -2
- package/dist/{collection/global → components}/interfaces.js +6 -4
- package/dist/{esm/intl-6426ba51.js → components/intl.js} +104 -2
- package/dist/components/priv-calendar.d.ts +11 -0
- package/dist/components/priv-calendar.js +6 -0
- package/dist/{esm/priv-calendar.entry.js → components/priv-calendar2.js} +38 -16
- package/dist/components/priv-chart-popover.d.ts +11 -0
- package/dist/components/priv-chart-popover.js +6 -0
- package/dist/{esm/priv-chart-popover.entry.js → components/priv-chart-popover2.js} +30 -12
- package/dist/components/priv-navigator-button.d.ts +11 -0
- package/dist/components/priv-navigator-button.js +6 -0
- package/dist/{esm/priv-navigator-button.entry.js → components/priv-navigator-button2.js} +26 -9
- package/dist/components/priv-navigator-item.d.ts +11 -0
- package/dist/components/priv-navigator-item.js +6 -0
- package/dist/{esm/priv-navigator-item.entry.js → components/priv-navigator-item2.js} +27 -9
- package/dist/components/priv-option-list.d.ts +11 -0
- package/dist/components/priv-option-list.js +6 -0
- package/dist/{esm/priv-option-list.entry.js → components/priv-option-list2.js} +63 -68
- package/dist/components/wm-action-menu.d.ts +11 -0
- package/dist/components/wm-action-menu.js +6 -0
- package/dist/{cjs/wm-pagination.cjs.entry.js → components/wm-action-menu2.js} +216 -161
- package/dist/components/wm-button.d.ts +11 -0
- package/dist/components/wm-button.js +6 -0
- package/dist/{esm/wm-button.entry.js → components/wm-button2.js} +48 -20
- package/dist/components/wm-chart-slice.d.ts +11 -0
- package/dist/components/wm-chart-slice.js +41 -0
- package/dist/components/wm-chart.d.ts +11 -0
- package/dist/{esm/wm-chart.entry.js → components/wm-chart.js} +70 -25
- package/dist/components/wm-date-range.d.ts +11 -0
- package/dist/{esm/wm-date-range.entry.js → components/wm-date-range.js} +79 -26
- package/dist/components/wm-datepicker.d.ts +11 -0
- package/dist/{esm/wm-datepicker.entry.js → components/wm-datepicker.js} +53 -16
- package/dist/components/wm-file-list.d.ts +11 -0
- package/dist/{esm/wm-file-list.entry.js → components/wm-file-list.js} +28 -9
- package/dist/components/wm-file.d.ts +11 -0
- package/dist/{esm/wm-file.entry.js → components/wm-file.js} +58 -20
- package/dist/components/wm-input.d.ts +11 -0
- package/dist/{esm/wm-input.entry.js → components/wm-input.js} +53 -22
- package/dist/components/wm-line-chart.d.ts +11 -0
- package/dist/{esm/wm-line-chart.entry.js → components/wm-line-chart.js} +77 -36
- package/dist/components/wm-menuitem.d.ts +11 -0
- package/dist/components/wm-menuitem.js +6 -0
- package/dist/{cjs/wm-optgroup.cjs.entry.js → components/wm-menuitem2.js} +130 -58
- package/dist/components/wm-modal-footer.d.ts +11 -0
- package/dist/components/wm-modal-footer.js +73 -0
- package/dist/components/wm-modal-header.d.ts +11 -0
- package/dist/components/wm-modal-header.js +61 -0
- package/dist/components/wm-modal-pss-footer.d.ts +11 -0
- package/dist/{cjs/priv-chart-popover.cjs.entry.js → components/wm-modal-pss-footer.js} +58 -129
- package/dist/components/wm-modal-pss-header.d.ts +11 -0
- package/dist/components/wm-modal-pss-header.js +64 -0
- package/dist/components/wm-modal-pss.d.ts +11 -0
- package/dist/{cjs/wm-textarea.cjs.entry.js → components/wm-modal-pss.js} +141 -67
- package/dist/components/wm-modal.d.ts +11 -0
- package/dist/{cjs/wm-input.cjs.entry.js → components/wm-modal.js} +140 -104
- package/dist/components/wm-navigation-hamburger.d.ts +11 -0
- package/dist/{esm-es5/priv-chart-popover.entry.js → components/wm-navigation-hamburger.js} +70 -1
- package/dist/components/wm-navigation-item.d.ts +11 -0
- package/dist/{ripple/p-713ea307.entry.js → components/wm-navigation-item.js} +40 -1
- package/dist/components/wm-navigation.d.ts +11 -0
- package/dist/{ripple/p-165b5d3d.system.entry.js → components/wm-navigation.js} +144 -1
- package/dist/components/wm-navigator.d.ts +11 -0
- package/dist/{esm/wm-navigator.entry.js → components/wm-navigator.js} +106 -19
- package/dist/components/wm-nested-select.d.ts +11 -0
- package/dist/{esm/wm-nested-select.entry.js → components/wm-nested-select.js} +63 -70
- package/dist/components/wm-optgroup.d.ts +11 -0
- package/dist/{esm/wm-optgroup.entry.js → components/wm-optgroup.js} +48 -11
- package/dist/components/wm-option.d.ts +11 -0
- package/dist/components/wm-option.js +6 -0
- package/dist/{cjs/wm-search.cjs.entry.js → components/wm-option2.js} +168 -166
- package/dist/components/wm-pagination.d.ts +11 -0
- package/dist/{esm/wm-pagination.entry.js → components/wm-pagination.js} +105 -26
- package/dist/components/wm-progress-indicator.d.ts +11 -0
- package/dist/{esm/wm-progress-indicator_3.entry.js → components/wm-progress-indicator.js} +51 -105
- package/dist/components/wm-progress-monitor.d.ts +11 -0
- package/dist/{ripple/p-d530c703.entry.js → components/wm-progress-monitor.js} +93 -1
- package/dist/components/wm-progress-slice.d.ts +11 -0
- package/dist/components/wm-progress-slice.js +37 -0
- package/dist/components/wm-search.d.ts +11 -0
- package/dist/{esm/wm-search.entry.js → components/wm-search.js} +74 -14
- package/dist/components/wm-select.d.ts +11 -0
- package/dist/components/wm-select.js +6 -0
- package/dist/components/wm-select2.js +294 -0
- package/dist/components/wm-snackbar.d.ts +11 -0
- package/dist/{esm/wm-snackbar.entry.js → components/wm-snackbar.js} +46 -17
- package/dist/components/wm-tab-item.d.ts +11 -0
- package/dist/components/wm-tab-item.js +85 -0
- package/dist/components/wm-tab-list.d.ts +11 -0
- package/dist/{cjs/wm-uploader.cjs.entry.js → components/wm-tab-list.js} +174 -282
- package/dist/components/wm-tab-panel.d.ts +11 -0
- package/dist/{cjs/wm-file-list.cjs.entry.js → components/wm-tab-panel.js} +46 -17
- package/dist/components/wm-tag-input.d.ts +11 -0
- package/dist/{esm/wm-tag-input.entry.js → components/wm-tag-input.js} +86 -49
- package/dist/components/wm-tag-option.d.ts +11 -0
- package/dist/components/wm-tag-option.js +63 -0
- package/dist/components/wm-textarea.d.ts +11 -0
- package/dist/{esm/wm-textarea.entry.js → components/wm-textarea.js} +46 -17
- package/dist/components/wm-timepicker.d.ts +11 -0
- package/dist/{esm/wm-timepicker.entry.js → components/wm-timepicker.js} +49 -19
- package/dist/components/wm-toggletip.d.ts +11 -0
- package/dist/{esm/wm-toggletip.entry.js → components/wm-toggletip.js} +37 -16
- package/dist/components/wm-uploader.d.ts +11 -0
- package/dist/{esm/wm-uploader.entry.js → components/wm-uploader.js} +50 -23
- package/dist/components/wm-wrapper.d.ts +11 -0
- package/dist/components/wm-wrapper.js +34 -0
- package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +0 -6
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +6 -0
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +1 -0
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +1 -0
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +2 -1
- package/dist/types/global/intl.d.ts +22 -0
- package/dist/types/stencil-public-runtime.d.ts +28 -0
- package/package.json +5 -9
- package/dist/cjs/app-globals-b8352f28.js +0 -92
- package/dist/cjs/chartFunctions-7314b414.js +0 -712
- package/dist/cjs/functions-5ac8a62f.js +0 -8462
- package/dist/cjs/index-788526f5.js +0 -1859
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/interfaces-85d78ae9.js +0 -37
- package/dist/cjs/intl-07aaf53c.js +0 -180
- package/dist/cjs/loader.cjs.js +0 -15
- package/dist/cjs/priv-calendar.cjs.entry.js +0 -574
- package/dist/cjs/priv-navigator-button.cjs.entry.js +0 -29
- package/dist/cjs/priv-navigator-item.cjs.entry.js +0 -35
- package/dist/cjs/priv-option-list.cjs.entry.js +0 -430
- package/dist/cjs/ripple.cjs.js +0 -25
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +0 -335
- package/dist/cjs/wm-button.cjs.entry.js +0 -207
- package/dist/cjs/wm-chart-slice.cjs.entry.js +0 -27
- package/dist/cjs/wm-chart.cjs.entry.js +0 -156
- package/dist/cjs/wm-date-range.cjs.entry.js +0 -473
- package/dist/cjs/wm-datepicker.cjs.entry.js +0 -254
- package/dist/cjs/wm-file.cjs.entry.js +0 -194
- package/dist/cjs/wm-line-chart.cjs.entry.js +0 -460
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +0 -217
- package/dist/cjs/wm-modal_3.cjs.entry.js +0 -215
- package/dist/cjs/wm-navigation_3.cjs.entry.js +0 -188
- package/dist/cjs/wm-navigator.cjs.entry.js +0 -327
- package/dist/cjs/wm-nested-select.cjs.entry.js +0 -354
- package/dist/cjs/wm-option_2.cjs.entry.js +0 -439
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +0 -204
- package/dist/cjs/wm-snackbar.cjs.entry.js +0 -177
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +0 -258
- package/dist/cjs/wm-tag-input.cjs.entry.js +0 -886
- package/dist/cjs/wm-tag-option.cjs.entry.js +0 -43
- package/dist/cjs/wm-timepicker.cjs.entry.js +0 -307
- package/dist/cjs/wm-toggletip.cjs.entry.js +0 -183
- package/dist/cjs/wm-wrapper.cjs.entry.js +0 -21
- package/dist/collection/collection-manifest.json +0 -191
- package/dist/collection/components/charts/chartFunctions.js +0 -645
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -908
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +0 -257
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +0 -125
- package/dist/collection/components/charts/wm-chart/wm-chart.css +0 -1274
- package/dist/collection/components/charts/wm-chart/wm-chart.js +0 -415
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +0 -1067
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +0 -722
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +0 -1274
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +0 -264
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -909
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +0 -151
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +0 -121
- package/dist/collection/components/datepickers/datepicker.css +0 -1043
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +0 -1279
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +0 -840
- package/dist/collection/components/datepickers/wm-date-range.js +0 -838
- package/dist/collection/components/datepickers/wm-datepicker.js +0 -524
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -918
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -817
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -1181
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -659
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -830
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -258
- package/dist/collection/components/selects/wm-option/wm-option.css +0 -931
- package/dist/collection/components/selects/wm-option/wm-option.js +0 -530
- package/dist/collection/components/selects/wm-select/wm-select.css +0 -1104
- package/dist/collection/components/selects/wm-select/wm-select.js +0 -596
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -891
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +0 -435
- package/dist/collection/components/wm-button/wm-button.css +0 -1261
- package/dist/collection/components/wm-button/wm-button.js +0 -489
- package/dist/collection/components/wm-file/wm-file.css +0 -927
- package/dist/collection/components/wm-file/wm-file.js +0 -412
- package/dist/collection/components/wm-file-list/wm-file-list.css +0 -820
- package/dist/collection/components/wm-file-list/wm-file-list.js +0 -45
- package/dist/collection/components/wm-input/wm-input.css +0 -992
- package/dist/collection/components/wm-input/wm-input.js +0 -471
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -891
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +0 -419
- package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -852
- package/dist/collection/components/wm-modal/wm-modal-footer.js +0 -141
- package/dist/collection/components/wm-modal/wm-modal-header.css +0 -846
- package/dist/collection/components/wm-modal/wm-modal-header.js +0 -78
- package/dist/collection/components/wm-modal/wm-modal.css +0 -890
- package/dist/collection/components/wm-modal/wm-modal.js +0 -350
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +0 -852
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +0 -138
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +0 -846
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +0 -82
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +0 -927
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +0 -362
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -847
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +0 -119
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -856
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +0 -98
- package/dist/collection/components/wm-navigation/wm-navigation.css +0 -898
- package/dist/collection/components/wm-navigation/wm-navigation.js +0 -190
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -849
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +0 -86
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -830
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +0 -124
- package/dist/collection/components/wm-navigator/wm-navigator.css +0 -903
- package/dist/collection/components/wm-navigator/wm-navigator.js +0 -496
- package/dist/collection/components/wm-pagination/wm-pagination.css +0 -971
- package/dist/collection/components/wm-pagination/wm-pagination.js +0 -311
- package/dist/collection/components/wm-search/wm-search.css +0 -895
- package/dist/collection/components/wm-search/wm-search.js +0 -427
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -1077
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +0 -264
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -868
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +0 -175
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -840
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +0 -268
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -825
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +0 -87
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +0 -1275
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +0 -1221
- package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +0 -243
- package/dist/collection/components/wm-textarea/wm-textarea.css +0 -979
- package/dist/collection/components/wm-textarea/wm-textarea.js +0 -313
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +0 -1093
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +0 -547
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -1153
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +0 -289
- package/dist/collection/components/wm-uploader/wm-uploader.css +0 -1563
- package/dist/collection/components/wm-uploader/wm-uploader.js +0 -603
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +0 -28
- package/dist/collection/dev/button.js +0 -0
- package/dist/collection/dev/chart-small.js +0 -56
- package/dist/collection/dev/chart.js +0 -18
- package/dist/collection/dev/date-range.js +0 -6
- package/dist/collection/dev/datepicker.js +0 -46
- package/dist/collection/dev/file-list.js +0 -16
- package/dist/collection/dev/file.js +0 -0
- package/dist/collection/dev/input.js +0 -6
- package/dist/collection/dev/line-chart.js +0 -0
- package/dist/collection/dev/modal.js +0 -48
- package/dist/collection/dev/navigation.js +0 -13
- package/dist/collection/dev/navigator.js +0 -34
- package/dist/collection/dev/nested-select.js +0 -36
- package/dist/collection/dev/pagination.js +0 -7
- package/dist/collection/dev/progress-monitor.js +0 -0
- package/dist/collection/dev/pss-modal.js +0 -8
- package/dist/collection/dev/scripts.js +0 -49
- package/dist/collection/dev/search.js +0 -72
- package/dist/collection/dev/select.js +0 -57
- package/dist/collection/dev/snackbar.js +0 -54
- package/dist/collection/dev/tabs.js +0 -44
- package/dist/collection/dev/tag-input.js +0 -32
- package/dist/collection/dev/textarea.js +0 -28
- package/dist/collection/dev/timepicker.js +0 -32
- package/dist/collection/dev/toggletip.js +0 -9
- package/dist/collection/dev/uploader.js +0 -139
- package/dist/collection/global/__mocks__/functions.js +0 -6
- package/dist/collection/global/functions.js +0 -825
- package/dist/collection/global/intl.js +0 -172
- package/dist/collection/global/services/__mocks__/http-service.js +0 -130
- package/dist/collection/global/services/http-service.js +0 -50
- package/dist/collection/lang/lang.js +0 -5
- package/dist/collection/lang/missing.js +0 -43
- package/dist/collection/lang/piglatin.js +0 -93
- package/dist/esm/app-globals-f3dbaf3e.js +0 -90
- package/dist/esm/functions-f53b3537.js +0 -8422
- package/dist/esm/index-130e07bb.js +0 -1828
- package/dist/esm/index.js +0 -1
- package/dist/esm/interfaces-cc5b177f.js +0 -34
- package/dist/esm/loader.js +0 -11
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/ripple.js +0 -20
- package/dist/esm/wm-action-menu_2.entry.js +0 -330
- package/dist/esm/wm-chart-slice.entry.js +0 -23
- package/dist/esm/wm-modal-pss_3.entry.js +0 -211
- package/dist/esm/wm-modal_3.entry.js +0 -209
- package/dist/esm/wm-navigation_3.entry.js +0 -182
- package/dist/esm/wm-option_2.entry.js +0 -434
- package/dist/esm/wm-tab-item_3.entry.js +0 -252
- package/dist/esm/wm-tag-option.entry.js +0 -39
- package/dist/esm/wm-wrapper.entry.js +0 -17
- package/dist/esm-es5/app-globals-f3dbaf3e.js +0 -1
- package/dist/esm-es5/chartFunctions-1478f4db.js +0 -1
- package/dist/esm-es5/functions-f53b3537.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/interfaces-cc5b177f.js +0 -1
- package/dist/esm-es5/intl-6426ba51.js +0 -1
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/priv-calendar.entry.js +0 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +0 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +0 -1
- package/dist/esm-es5/priv-option-list.entry.js +0 -1
- package/dist/esm-es5/ripple.js +0 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +0 -1
- package/dist/esm-es5/wm-button.entry.js +0 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +0 -1
- package/dist/esm-es5/wm-chart.entry.js +0 -1
- package/dist/esm-es5/wm-date-range.entry.js +0 -1
- package/dist/esm-es5/wm-datepicker.entry.js +0 -1
- package/dist/esm-es5/wm-file-list.entry.js +0 -1
- package/dist/esm-es5/wm-file.entry.js +0 -1
- package/dist/esm-es5/wm-input.entry.js +0 -1
- package/dist/esm-es5/wm-line-chart.entry.js +0 -1
- package/dist/esm-es5/wm-modal-pss_3.entry.js +0 -1
- package/dist/esm-es5/wm-modal_3.entry.js +0 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +0 -1
- package/dist/esm-es5/wm-navigator.entry.js +0 -1
- package/dist/esm-es5/wm-nested-select.entry.js +0 -1
- package/dist/esm-es5/wm-optgroup.entry.js +0 -1
- package/dist/esm-es5/wm-option_2.entry.js +0 -1
- package/dist/esm-es5/wm-pagination.entry.js +0 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +0 -1
- package/dist/esm-es5/wm-search.entry.js +0 -1
- package/dist/esm-es5/wm-snackbar.entry.js +0 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +0 -1
- package/dist/esm-es5/wm-tag-input.entry.js +0 -1
- package/dist/esm-es5/wm-tag-option.entry.js +0 -1
- package/dist/esm-es5/wm-textarea.entry.js +0 -1
- package/dist/esm-es5/wm-timepicker.entry.js +0 -1
- package/dist/esm-es5/wm-toggletip.entry.js +0 -1
- package/dist/esm-es5/wm-uploader.entry.js +0 -1
- package/dist/esm-es5/wm-wrapper.entry.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -2
- package/dist/loader/index.cjs.js +0 -2
- package/dist/loader/index.d.ts +0 -24
- package/dist/loader/index.es2017.js +0 -2
- package/dist/loader/index.js +0 -3
- package/dist/loader/package.json +0 -11
- package/dist/ripple/index.esm.js +0 -0
- package/dist/ripple/p-02bd68af.system.entry.js +0 -1
- package/dist/ripple/p-02e60a11.system.entry.js +0 -1
- package/dist/ripple/p-03fafb82.entry.js +0 -1
- package/dist/ripple/p-043901ab.system.entry.js +0 -1
- package/dist/ripple/p-0d163672.system.entry.js +0 -1
- package/dist/ripple/p-13b1d775.entry.js +0 -1
- package/dist/ripple/p-1f174e18.system.entry.js +0 -1
- package/dist/ripple/p-20b137a3.system.entry.js +0 -1
- package/dist/ripple/p-226217d3.system.entry.js +0 -1
- package/dist/ripple/p-233f14ec.system.entry.js +0 -1
- package/dist/ripple/p-243a7a17.system.entry.js +0 -1
- package/dist/ripple/p-263e42e0.entry.js +0 -1
- package/dist/ripple/p-2732bddd.js +0 -1
- package/dist/ripple/p-27ff3a85.js +0 -1
- package/dist/ripple/p-28f9e202.system.entry.js +0 -1
- package/dist/ripple/p-2c8153c1.entry.js +0 -1
- package/dist/ripple/p-3376581a.system.entry.js +0 -1
- package/dist/ripple/p-368e9ee9.entry.js +0 -1
- package/dist/ripple/p-3a2a3b70.entry.js +0 -1
- package/dist/ripple/p-3b5d106d.entry.js +0 -1
- package/dist/ripple/p-42fa7a77.system.js +0 -1
- package/dist/ripple/p-45b5d2d2.entry.js +0 -1
- package/dist/ripple/p-486b3b56.system.entry.js +0 -1
- package/dist/ripple/p-49e24926.entry.js +0 -1
- package/dist/ripple/p-4fbe205e.system.entry.js +0 -1
- package/dist/ripple/p-50294e3f.entry.js +0 -1
- package/dist/ripple/p-50ea2036.system.js +0 -1
- package/dist/ripple/p-529f179c.system.entry.js +0 -1
- package/dist/ripple/p-53400bc4.system.entry.js +0 -1
- package/dist/ripple/p-55f8aa05.entry.js +0 -1
- package/dist/ripple/p-58734b13.entry.js +0 -1
- package/dist/ripple/p-59cc46a6.entry.js +0 -1
- package/dist/ripple/p-5c62e26d.entry.js +0 -1
- package/dist/ripple/p-6136d0d7.entry.js +0 -1
- package/dist/ripple/p-658f146a.system.entry.js +0 -1
- package/dist/ripple/p-66141f19.entry.js +0 -1
- package/dist/ripple/p-727175e1.system.entry.js +0 -1
- package/dist/ripple/p-73056e10.system.js +0 -1
- package/dist/ripple/p-76f9acec.entry.js +0 -1
- package/dist/ripple/p-791513e7.entry.js +0 -1
- package/dist/ripple/p-7959c4bd.system.entry.js +0 -1
- package/dist/ripple/p-7a1bb29b.js +0 -1
- package/dist/ripple/p-81ac8d49.entry.js +0 -1
- package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
- package/dist/ripple/p-82819500.system.entry.js +0 -1
- package/dist/ripple/p-8634abad.system.entry.js +0 -1
- package/dist/ripple/p-864158de.system.entry.js +0 -1
- package/dist/ripple/p-8c95493c.js +0 -1
- package/dist/ripple/p-94dc80a0.entry.js +0 -1
- package/dist/ripple/p-94fbf6f6.system.entry.js +0 -1
- package/dist/ripple/p-9b739280.entry.js +0 -1
- package/dist/ripple/p-a0edf336.system.entry.js +0 -1
- package/dist/ripple/p-a2544443.system.js +0 -1
- package/dist/ripple/p-a280d710.entry.js +0 -1
- package/dist/ripple/p-a9a7731b.system.entry.js +0 -1
- package/dist/ripple/p-b16f07f1.system.entry.js +0 -1
- package/dist/ripple/p-b78d8ab1.system.js +0 -1
- package/dist/ripple/p-c550716e.js +0 -1
- package/dist/ripple/p-ccae5bec.entry.js +0 -1
- package/dist/ripple/p-cd0cc88d.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d96291e7.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-e2fbed8c.system.entry.js +0 -1
- package/dist/ripple/p-e6e36701.system.entry.js +0 -1
- package/dist/ripple/p-e8cfa832.entry.js +0 -1
- package/dist/ripple/p-e973024a.entry.js +0 -1
- package/dist/ripple/p-ed24dc42.entry.js +0 -1
- package/dist/ripple/p-ee825214.entry.js +0 -1
- package/dist/ripple/p-ef75bf23.system.entry.js +0 -1
- package/dist/ripple/p-f28106ea.entry.js +0 -1
- package/dist/ripple/p-f471ee29.system.js +0 -1
- package/dist/ripple/p-f66480de.entry.js +0 -1
- package/dist/ripple/p-f778baf4.system.entry.js +0 -1
- package/dist/ripple/p-f9a71cf6.entry.js +0 -1
- package/dist/ripple/p-fc7965e4.system.entry.js +0 -1
- package/dist/ripple/p-fdfa3579.system.entry.js +0 -1
- package/dist/ripple/p-ff60375d.system.entry.js +0 -1
- package/dist/ripple/p-ffbb9fc0.system.js +0 -1
- package/dist/ripple/ripple.css +0 -1
- package/dist/ripple/ripple.esm.js +0 -1
- package/dist/ripple/ripple.js +0 -127
- /package/dist/{collection/dev/action-menu.js → types/test-setup.d.ts} +0 -0
|
@@ -1,659 +0,0 @@
|
|
|
1
|
-
import { h, Host, forceUpdate } from "@stencil/core";
|
|
2
|
-
import { getContextMeasurements, getTextDir, intl, isElOrChild, shouldOpenUp, toBool } from "../../../global/functions";
|
|
3
|
-
import { globalMessages } from "../../../global/intl";
|
|
4
|
-
export class NestedSelect {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.openUp = false;
|
|
7
|
-
this.overflowCount = 0;
|
|
8
|
-
this.displayedOptions = [];
|
|
9
|
-
this.clearSelectionMessage = this.multiple
|
|
10
|
-
? intl.formatMessage({
|
|
11
|
-
id: "select.multiClearSelection",
|
|
12
|
-
defaultMessage: "Clear all Selections",
|
|
13
|
-
description: "Button text to clear selection. Use imperative",
|
|
14
|
-
})
|
|
15
|
-
: intl.formatMessage({
|
|
16
|
-
id: "select.singleClearSelection",
|
|
17
|
-
defaultMessage: "Clear Selection",
|
|
18
|
-
description: "Button text to clear selection. Use imperative",
|
|
19
|
-
});
|
|
20
|
-
this.disabled = false;
|
|
21
|
-
this.maxHeight = "200px";
|
|
22
|
-
this.label = undefined;
|
|
23
|
-
this.labelPosition = "top";
|
|
24
|
-
this.requiredField = false;
|
|
25
|
-
this.errorMessage = undefined;
|
|
26
|
-
this.multiple = false;
|
|
27
|
-
this.search = false;
|
|
28
|
-
this.selectAll = false;
|
|
29
|
-
this.placeholder = this.multiple
|
|
30
|
-
? intl.formatMessage({
|
|
31
|
-
id: "select.multiPlaceholder",
|
|
32
|
-
defaultMessage: "Make a selection",
|
|
33
|
-
description: "Placeholder text for multiple select. Use imperative",
|
|
34
|
-
})
|
|
35
|
-
: intl.formatMessage({
|
|
36
|
-
id: "select.singlePlaceholder",
|
|
37
|
-
defaultMessage: "Select an Option",
|
|
38
|
-
description: "Placeholder text for single select. Use imperative",
|
|
39
|
-
});
|
|
40
|
-
this.searchPlaceholder = intl.formatMessage({
|
|
41
|
-
id: "select.searchPlaceholder",
|
|
42
|
-
defaultMessage: "Search",
|
|
43
|
-
description: "Placeholder text. Use imperative",
|
|
44
|
-
});
|
|
45
|
-
this.allSelectedMessage = intl.formatMessage({
|
|
46
|
-
id: "select.allSelected",
|
|
47
|
-
defaultMessage: "All selected",
|
|
48
|
-
description: "Text displayed when all options are selected",
|
|
49
|
-
});
|
|
50
|
-
this.isExpanded = false;
|
|
51
|
-
this.showClearSelectionButton = false;
|
|
52
|
-
this.announcement = "";
|
|
53
|
-
this.constrainedMaxHeight = this.maxHeight;
|
|
54
|
-
}
|
|
55
|
-
get isDisabled() {
|
|
56
|
-
// string "false" needs to be treated as bool False because react wrappers convert bool to string.
|
|
57
|
-
return toBool(this.disabled);
|
|
58
|
-
}
|
|
59
|
-
get childOptions() {
|
|
60
|
-
return Array.from(this.el.querySelectorAll("wm-option"));
|
|
61
|
-
}
|
|
62
|
-
get optgroupEls() {
|
|
63
|
-
return Array.from(this.el.querySelectorAll("wm-optgroup"));
|
|
64
|
-
}
|
|
65
|
-
get menuitemEls() {
|
|
66
|
-
return Array.from(this.el.shadowRoot.querySelectorAll(".menuitem"));
|
|
67
|
-
}
|
|
68
|
-
get allSelected() {
|
|
69
|
-
return this.childOptions.every((option) => option.selected);
|
|
70
|
-
}
|
|
71
|
-
componentWillLoad() {
|
|
72
|
-
const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((_mutationRecord) => this.handleChildChange()));
|
|
73
|
-
mutationObserver.observe(this.el, {
|
|
74
|
-
childList: true,
|
|
75
|
-
attributes: true,
|
|
76
|
-
subtree: true,
|
|
77
|
-
attributeFilter: ["selected"],
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
handleChildChange() {
|
|
81
|
-
// on update of children or children selected state, reset button text and rerender
|
|
82
|
-
this.setButtonText();
|
|
83
|
-
forceUpdate(this.el);
|
|
84
|
-
if (this.multiple) {
|
|
85
|
-
// update state of clone options
|
|
86
|
-
this.optgroupEls.forEach((optgroupEl) => optgroupEl.handleChildChange());
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
setButtonText() {
|
|
90
|
-
this.displayedOptions = this.childOptions.filter((x) => x.selected);
|
|
91
|
-
// handle overflow + counter for multiselect
|
|
92
|
-
if (this.multiple) {
|
|
93
|
-
// this is a fixed measurement accounting for the max width of a 3 character overflow counter
|
|
94
|
-
const overflowCounterWidth = 38;
|
|
95
|
-
const computedStyle = window.getComputedStyle(this.buttonEl);
|
|
96
|
-
// there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
|
|
97
|
-
const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
|
|
98
|
-
const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
|
|
99
|
-
const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
|
|
100
|
-
this.overflowCount = 0;
|
|
101
|
-
this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
|
|
102
|
-
let optionsTotalWidth = this.measurementAreaEl.clientWidth;
|
|
103
|
-
while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
|
|
104
|
-
this.overflowCount++;
|
|
105
|
-
this.displayedOptions.pop();
|
|
106
|
-
this.measurementAreaEl.textContent = this.displayedOptions.map((x) => x.textContent).join(", ");
|
|
107
|
-
optionsTotalWidth = this.measurementAreaEl.clientWidth;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
countOptgroupSelected(optgroupEl) {
|
|
112
|
-
let selectedOptions = Array.from(optgroupEl.querySelectorAll("wm-option")).filter((option) => option.selected);
|
|
113
|
-
return selectedOptions.length;
|
|
114
|
-
}
|
|
115
|
-
handleOptionSelection() {
|
|
116
|
-
if (!this.multiple) {
|
|
117
|
-
this.close();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
handleChildEnter() {
|
|
121
|
-
// only occurs for multiselects. handle the click, then close
|
|
122
|
-
this.close();
|
|
123
|
-
}
|
|
124
|
-
closePopupOnEscape() {
|
|
125
|
-
this.close();
|
|
126
|
-
}
|
|
127
|
-
handleKeyDown(ev) {
|
|
128
|
-
switch (ev.key) {
|
|
129
|
-
case "Tab":
|
|
130
|
-
// if tabbing backwards, close and return focus to button. Otherwise, close but do not redirect focus.
|
|
131
|
-
this.close(ev.shiftKey ? true : false);
|
|
132
|
-
break;
|
|
133
|
-
case "ArrowDown":
|
|
134
|
-
if (this.isExpanded === false) {
|
|
135
|
-
ev.preventDefault();
|
|
136
|
-
this.open();
|
|
137
|
-
}
|
|
138
|
-
break;
|
|
139
|
-
case "ArrowUp":
|
|
140
|
-
if (this.isExpanded === false) {
|
|
141
|
-
ev.preventDefault();
|
|
142
|
-
this.open(true);
|
|
143
|
-
}
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
close(returnFocus = true) {
|
|
148
|
-
if (this.isExpanded) {
|
|
149
|
-
this.isExpanded = false;
|
|
150
|
-
this.dropdownEl.classList.remove("open");
|
|
151
|
-
window.setTimeout(() => {
|
|
152
|
-
this.optgroupEls.forEach((optgroupEl) => (optgroupEl.isExpanded = false));
|
|
153
|
-
if (returnFocus) {
|
|
154
|
-
this.buttonEl.focus();
|
|
155
|
-
}
|
|
156
|
-
}, 150);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
open(focusLast = false) {
|
|
160
|
-
if (!this.isDisabled) {
|
|
161
|
-
this.showClearSelectionButton = this.childOptions.some((o) => o.selected);
|
|
162
|
-
this.dropdownEl.scrollTop = 0;
|
|
163
|
-
this.isExpanded = true;
|
|
164
|
-
this.dropdownEl.classList.add("open");
|
|
165
|
-
const elHeight = this.el.clientHeight;
|
|
166
|
-
this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight, elHeight, 0);
|
|
167
|
-
this.constrainedMaxHeight = this.maxHeight;
|
|
168
|
-
const spaceAbove = getContextMeasurements(this.el).spaceAbove;
|
|
169
|
-
if (this.openUp) {
|
|
170
|
-
if (parseInt(getComputedStyle(this.menuEl).getPropertyValue("--max-height").replace("px", "")) > spaceAbove) {
|
|
171
|
-
this.constrainedMaxHeight = spaceAbove.toString() + "px";
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
// if opening upwards, set an upwards height limit for the optgroup level
|
|
175
|
-
this.optgroupEls.forEach((o) => {
|
|
176
|
-
o.shadowRoot.querySelector("priv-option-list").upwardsHeightLimit = this.openUp
|
|
177
|
-
? spaceAbove
|
|
178
|
-
: null;
|
|
179
|
-
});
|
|
180
|
-
// 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))
|
|
181
|
-
// when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
|
|
182
|
-
// 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
|
|
183
|
-
window.setTimeout(() => {
|
|
184
|
-
if (this.menuitemEls.length > 0) {
|
|
185
|
-
const menuitemToFocus = this.menuitemEls[focusLast ? this.menuitemEls.length - 1 : 0];
|
|
186
|
-
menuitemToFocus.scrollIntoView({ block: "nearest" });
|
|
187
|
-
menuitemToFocus.focus();
|
|
188
|
-
}
|
|
189
|
-
}, 60);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
moveDown(menuitemEl) {
|
|
193
|
-
const currentIndex = this.menuitemEls.indexOf(menuitemEl);
|
|
194
|
-
const menuitemToFocus = this.menuitemEls[currentIndex == this.menuitemEls.length - 1 ? 0 : currentIndex + 1];
|
|
195
|
-
menuitemToFocus.scrollIntoView({ block: "nearest" });
|
|
196
|
-
menuitemToFocus.focus();
|
|
197
|
-
}
|
|
198
|
-
moveUp(menuitemEl) {
|
|
199
|
-
const currentIndex = this.menuitemEls.indexOf(menuitemEl);
|
|
200
|
-
const menuitemToFocus = this.menuitemEls[currentIndex == 0 ? this.menuitemEls.length - 1 : currentIndex - 1];
|
|
201
|
-
menuitemToFocus.scrollIntoView({ block: "nearest" });
|
|
202
|
-
menuitemToFocus.focus();
|
|
203
|
-
}
|
|
204
|
-
handleButtonBlur(ev) {
|
|
205
|
-
if (isElOrChild(this.el, ev.relatedTarget)) {
|
|
206
|
-
// do not emit a blur event when opening the dropdown and focusing the Options
|
|
207
|
-
ev.stopPropagation();
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
handleClick(ev) {
|
|
211
|
-
if (!isElOrChild(this.el, ev.target)) {
|
|
212
|
-
this.close();
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
handleMenuitemKeydown(ev) {
|
|
216
|
-
switch (ev.key) {
|
|
217
|
-
case "ArrowDown":
|
|
218
|
-
ev.preventDefault();
|
|
219
|
-
// focus next
|
|
220
|
-
this.moveDown(ev.target);
|
|
221
|
-
break;
|
|
222
|
-
case "ArrowUp":
|
|
223
|
-
ev.preventDefault();
|
|
224
|
-
this.moveUp(ev.target);
|
|
225
|
-
// focus previous
|
|
226
|
-
break;
|
|
227
|
-
case "ArrowRight":
|
|
228
|
-
if (ev.target.classList.contains("group-btn")) {
|
|
229
|
-
ev.preventDefault();
|
|
230
|
-
ev.target.click();
|
|
231
|
-
}
|
|
232
|
-
break;
|
|
233
|
-
case "Escape":
|
|
234
|
-
ev.preventDefault();
|
|
235
|
-
this.close();
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
handleComponentBlur(ev) {
|
|
240
|
-
// Do not close or emit custom blur event when blurring to an element inside (wm-option)
|
|
241
|
-
if (!this.el.contains(ev.relatedTarget)) {
|
|
242
|
-
this.close(false);
|
|
243
|
-
this.wmNestedSelectBlurred.emit();
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
handleOptgroupExpanded() {
|
|
247
|
-
this.menuEl.classList.add("hidden");
|
|
248
|
-
this.optListWrapperEl.classList.remove("hidden");
|
|
249
|
-
}
|
|
250
|
-
handleOptgroupHidden(ev) {
|
|
251
|
-
this.showClearSelectionButton = this.childOptions.some((o) => o.selected);
|
|
252
|
-
this.menuEl.classList.remove("hidden");
|
|
253
|
-
this.optListWrapperEl.classList.add("hidden");
|
|
254
|
-
// focus back to nested select's optgroup menuitem
|
|
255
|
-
if (this.isExpanded) {
|
|
256
|
-
const elToFocus = this.el.shadowRoot.querySelector(`button[data-label=${ev.detail}]`);
|
|
257
|
-
elToFocus.focus();
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
announce(message) {
|
|
261
|
-
// \u00A0 is a non-breaking space character, which causes the message to be read as a new one
|
|
262
|
-
if (this.liveRegionEl.textContent === message) {
|
|
263
|
-
message += "\u00A0";
|
|
264
|
-
}
|
|
265
|
-
this.announcement = message;
|
|
266
|
-
}
|
|
267
|
-
renderButtonText() {
|
|
268
|
-
if (this.displayedOptions.length < 1) {
|
|
269
|
-
return h("span", null, this.placeholder);
|
|
270
|
-
}
|
|
271
|
-
else if (this.multiple && this.allSelected && this.overflowCount > 0) {
|
|
272
|
-
return this.allSelectedMessage;
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
renderOverflowCount() {
|
|
279
|
-
if (this.overflowCount > 0 && !this.allSelected) {
|
|
280
|
-
return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
handleClearSelection() {
|
|
284
|
-
this.optgroupEls.forEach((optgroupEl) => optgroupEl.emitDeselection());
|
|
285
|
-
const selectionClearedAnnouncement = intl.formatMessage({
|
|
286
|
-
id: "select.selectionCleared",
|
|
287
|
-
defaultMessage: "Selection cleared",
|
|
288
|
-
description: "Screen reader announcement alerting the user they have cleared their selection",
|
|
289
|
-
});
|
|
290
|
-
this.announce(selectionClearedAnnouncement);
|
|
291
|
-
if (!this.multiple) {
|
|
292
|
-
this.close();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
renderClearSelectionButton() {
|
|
296
|
-
if (this.showClearSelectionButton) {
|
|
297
|
-
return (h("button", { class: "menuitem clear-selection", onClick: () => this.handleClearSelection(), tabindex: -1, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, h("div", { class: "svg-icon svg-close" }), this.clearSelectionMessage));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
renderSelectionCount(optgroupEl) {
|
|
301
|
-
const selectionCount = this.countOptgroupSelected(optgroupEl);
|
|
302
|
-
if (selectionCount) {
|
|
303
|
-
const singleSelectionCountMessage = intl.formatMessage({
|
|
304
|
-
id: "select.optgroupSingleSelectionCount",
|
|
305
|
-
defaultMessage: "Item Selected",
|
|
306
|
-
description: "Text indicating number of selected in a group, where only a single selection is possible.",
|
|
307
|
-
}, { numSelected: selectionCount });
|
|
308
|
-
const multipleSelectionCountMessage = intl.formatMessage({
|
|
309
|
-
id: "select.optgroupMultipleSelectionCount",
|
|
310
|
-
defaultMessage: "{numSelected} Selected",
|
|
311
|
-
description: "Text indicating number of selected in a group, where multiple selections are possible.",
|
|
312
|
-
}, { numSelected: selectionCount });
|
|
313
|
-
return (h("div", { class: "selection-count" }, h("span", null, this.multiple ? multipleSelectionCountMessage : singleSelectionCountMessage)));
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
render() {
|
|
317
|
-
const buttonProps = {
|
|
318
|
-
id: "selectbtn",
|
|
319
|
-
["disabled"]: this.isDisabled,
|
|
320
|
-
["aria-controls"]: "list",
|
|
321
|
-
["aria-labelledby"]: "label selectbtn",
|
|
322
|
-
["aria-describedby"]: "error",
|
|
323
|
-
["aria-expanded"]: this.isExpanded ? "true" : "false",
|
|
324
|
-
onClick: () => {
|
|
325
|
-
this.isExpanded ? this.close() : this.open();
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
return (h(Host, { key: '129bfabd72ffc407846c652aa90d1d4a59ba31ce', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'f24e954d1c81f48b1939ed0e86ddf638440d114f', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '044688af81b6a7ef8a854f07dd9a5c303d7458df', class: "label-wrapper" }, h("label", { key: 'de5ba657188d7949016bd5901bc5d51f81cf8eb2', class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
|
|
329
|
-
// we can't use aria-required because the listbox is in a sub-component and it is not announced
|
|
330
|
-
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { key: '53d75b954ddcb150a4c83d869875d1fb9148475d', class: "button-wrapper" }, h("button", Object.assign({ key: '4c1c81d0c19caffbca99a143d09bbec9be3abf75' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { key: 'ee0f2c447a73c2628de40782d0a318abb3a6aade', class: "overflowcontrol" }, h("span", { key: 'd9c0bac44dc766b6cc6246f3921f13e765f99a5a', class: "button-text" }, this.renderButtonText())), h("div", { key: '8e5541f4b6f01ba8c8ff9573e2b3caff50007c64', class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { key: 'eac4a57813a907ec8d786f90830f705e9f45af48', ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { key: '8a48edf4b6dff7980990bf51da320f2cedb5f928', class: `dropdown ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { key: '2df3bde417cb9ebaafeeff47f34ce056db6e0ba7', ref: (el) => (this.menuEl = el), class: "menu", style: { "--max-height": this.constrainedMaxHeight }, tabIndex: -1 }, this.renderClearSelectionButton(), this.optgroupEls.map((optgroupEl) => {
|
|
331
|
-
return (h("button", { class: `menuitem group-btn ${optgroupEl.disabled ? "disabled" : ""}`, role: "menuitem", "data-label": optgroupEl.label, tabindex: -1, "aria-disabled": optgroupEl.disabled, onClick: () => {
|
|
332
|
-
if (!optgroupEl.disabled) {
|
|
333
|
-
optgroupEl.isExpanded = !optgroupEl.isExpanded;
|
|
334
|
-
forceUpdate(this.el);
|
|
335
|
-
}
|
|
336
|
-
}, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, h("span", null, optgroupEl.label), this.renderSelectionCount(optgroupEl), optgroupEl.disabled && h("div", { class: "disabled-indication" }, "Disabled"), h("div", { class: "svg-icon svg-next" })));
|
|
337
|
-
})), h("div", { key: 'a6e4250cfbf9f9c17edec627e74889157c9fce88', ref: (el) => (this.optListWrapperEl = el), class: "option-list-wrapper hidden" }, h("slot", { key: '1c3088473874beb3d093b0fb86623469c9eea7dc' }))), h("div", { key: 'f9757986331dc70934b90697d40d43599645b6e4', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage))), h("div", { key: '5a1dc6e684ffb0e59aaba71d20825836efb480db', id: "nestedselect-announcement", "aria-live": "assertive", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
|
|
338
|
-
}
|
|
339
|
-
static get is() { return "wm-nested-select"; }
|
|
340
|
-
static get encapsulation() { return "shadow"; }
|
|
341
|
-
static get delegatesFocus() { return true; }
|
|
342
|
-
static get originalStyleUrls() {
|
|
343
|
-
return {
|
|
344
|
-
"$": ["wm-nested-select.scss"]
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
static get styleUrls() {
|
|
348
|
-
return {
|
|
349
|
-
"$": ["wm-nested-select.css"]
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
static get properties() {
|
|
353
|
-
return {
|
|
354
|
-
"disabled": {
|
|
355
|
-
"type": "boolean",
|
|
356
|
-
"mutable": false,
|
|
357
|
-
"complexType": {
|
|
358
|
-
"original": "boolean",
|
|
359
|
-
"resolved": "boolean",
|
|
360
|
-
"references": {}
|
|
361
|
-
},
|
|
362
|
-
"required": false,
|
|
363
|
-
"optional": false,
|
|
364
|
-
"docs": {
|
|
365
|
-
"tags": [],
|
|
366
|
-
"text": ""
|
|
367
|
-
},
|
|
368
|
-
"attribute": "disabled",
|
|
369
|
-
"reflect": true,
|
|
370
|
-
"defaultValue": "false"
|
|
371
|
-
},
|
|
372
|
-
"maxHeight": {
|
|
373
|
-
"type": "string",
|
|
374
|
-
"mutable": false,
|
|
375
|
-
"complexType": {
|
|
376
|
-
"original": "string",
|
|
377
|
-
"resolved": "string",
|
|
378
|
-
"references": {}
|
|
379
|
-
},
|
|
380
|
-
"required": false,
|
|
381
|
-
"optional": false,
|
|
382
|
-
"docs": {
|
|
383
|
-
"tags": [],
|
|
384
|
-
"text": ""
|
|
385
|
-
},
|
|
386
|
-
"attribute": "max-height",
|
|
387
|
-
"reflect": false,
|
|
388
|
-
"defaultValue": "\"200px\""
|
|
389
|
-
},
|
|
390
|
-
"label": {
|
|
391
|
-
"type": "string",
|
|
392
|
-
"mutable": true,
|
|
393
|
-
"complexType": {
|
|
394
|
-
"original": "string",
|
|
395
|
-
"resolved": "string | undefined",
|
|
396
|
-
"references": {}
|
|
397
|
-
},
|
|
398
|
-
"required": false,
|
|
399
|
-
"optional": true,
|
|
400
|
-
"docs": {
|
|
401
|
-
"tags": [],
|
|
402
|
-
"text": ""
|
|
403
|
-
},
|
|
404
|
-
"attribute": "label",
|
|
405
|
-
"reflect": false
|
|
406
|
-
},
|
|
407
|
-
"labelPosition": {
|
|
408
|
-
"type": "string",
|
|
409
|
-
"mutable": false,
|
|
410
|
-
"complexType": {
|
|
411
|
-
"original": "\"top\" | \"left\" | \"none\"",
|
|
412
|
-
"resolved": "\"left\" | \"none\" | \"top\"",
|
|
413
|
-
"references": {}
|
|
414
|
-
},
|
|
415
|
-
"required": false,
|
|
416
|
-
"optional": false,
|
|
417
|
-
"docs": {
|
|
418
|
-
"tags": [],
|
|
419
|
-
"text": ""
|
|
420
|
-
},
|
|
421
|
-
"attribute": "label-position",
|
|
422
|
-
"reflect": false,
|
|
423
|
-
"defaultValue": "\"top\""
|
|
424
|
-
},
|
|
425
|
-
"requiredField": {
|
|
426
|
-
"type": "boolean",
|
|
427
|
-
"mutable": false,
|
|
428
|
-
"complexType": {
|
|
429
|
-
"original": "boolean",
|
|
430
|
-
"resolved": "boolean",
|
|
431
|
-
"references": {}
|
|
432
|
-
},
|
|
433
|
-
"required": false,
|
|
434
|
-
"optional": false,
|
|
435
|
-
"docs": {
|
|
436
|
-
"tags": [],
|
|
437
|
-
"text": ""
|
|
438
|
-
},
|
|
439
|
-
"attribute": "required-field",
|
|
440
|
-
"reflect": false,
|
|
441
|
-
"defaultValue": "false"
|
|
442
|
-
},
|
|
443
|
-
"errorMessage": {
|
|
444
|
-
"type": "string",
|
|
445
|
-
"mutable": true,
|
|
446
|
-
"complexType": {
|
|
447
|
-
"original": "string",
|
|
448
|
-
"resolved": "string | undefined",
|
|
449
|
-
"references": {}
|
|
450
|
-
},
|
|
451
|
-
"required": false,
|
|
452
|
-
"optional": true,
|
|
453
|
-
"docs": {
|
|
454
|
-
"tags": [],
|
|
455
|
-
"text": ""
|
|
456
|
-
},
|
|
457
|
-
"attribute": "error-message",
|
|
458
|
-
"reflect": false
|
|
459
|
-
},
|
|
460
|
-
"multiple": {
|
|
461
|
-
"type": "boolean",
|
|
462
|
-
"mutable": false,
|
|
463
|
-
"complexType": {
|
|
464
|
-
"original": "boolean",
|
|
465
|
-
"resolved": "boolean",
|
|
466
|
-
"references": {}
|
|
467
|
-
},
|
|
468
|
-
"required": false,
|
|
469
|
-
"optional": false,
|
|
470
|
-
"docs": {
|
|
471
|
-
"tags": [],
|
|
472
|
-
"text": ""
|
|
473
|
-
},
|
|
474
|
-
"attribute": "multiple",
|
|
475
|
-
"reflect": false,
|
|
476
|
-
"defaultValue": "false"
|
|
477
|
-
},
|
|
478
|
-
"search": {
|
|
479
|
-
"type": "boolean",
|
|
480
|
-
"mutable": false,
|
|
481
|
-
"complexType": {
|
|
482
|
-
"original": "boolean",
|
|
483
|
-
"resolved": "boolean",
|
|
484
|
-
"references": {}
|
|
485
|
-
},
|
|
486
|
-
"required": false,
|
|
487
|
-
"optional": false,
|
|
488
|
-
"docs": {
|
|
489
|
-
"tags": [],
|
|
490
|
-
"text": ""
|
|
491
|
-
},
|
|
492
|
-
"attribute": "search",
|
|
493
|
-
"reflect": false,
|
|
494
|
-
"defaultValue": "false"
|
|
495
|
-
},
|
|
496
|
-
"selectAll": {
|
|
497
|
-
"type": "boolean",
|
|
498
|
-
"mutable": false,
|
|
499
|
-
"complexType": {
|
|
500
|
-
"original": "boolean",
|
|
501
|
-
"resolved": "boolean",
|
|
502
|
-
"references": {}
|
|
503
|
-
},
|
|
504
|
-
"required": false,
|
|
505
|
-
"optional": false,
|
|
506
|
-
"docs": {
|
|
507
|
-
"tags": [],
|
|
508
|
-
"text": ""
|
|
509
|
-
},
|
|
510
|
-
"attribute": "select-all",
|
|
511
|
-
"reflect": false,
|
|
512
|
-
"defaultValue": "false"
|
|
513
|
-
},
|
|
514
|
-
"placeholder": {
|
|
515
|
-
"type": "string",
|
|
516
|
-
"mutable": false,
|
|
517
|
-
"complexType": {
|
|
518
|
-
"original": "string",
|
|
519
|
-
"resolved": "string",
|
|
520
|
-
"references": {}
|
|
521
|
-
},
|
|
522
|
-
"required": false,
|
|
523
|
-
"optional": false,
|
|
524
|
-
"docs": {
|
|
525
|
-
"tags": [],
|
|
526
|
-
"text": ""
|
|
527
|
-
},
|
|
528
|
-
"attribute": "placeholder",
|
|
529
|
-
"reflect": false,
|
|
530
|
-
"defaultValue": "this.multiple\n ? intl.formatMessage({\n id: \"select.multiPlaceholder\",\n defaultMessage: \"Make a selection\",\n description: \"Placeholder text for multiple select. Use imperative\",\n })\n : intl.formatMessage({\n id: \"select.singlePlaceholder\",\n defaultMessage: \"Select an Option\",\n description: \"Placeholder text for single select. Use imperative\",\n })"
|
|
531
|
-
},
|
|
532
|
-
"searchPlaceholder": {
|
|
533
|
-
"type": "string",
|
|
534
|
-
"mutable": false,
|
|
535
|
-
"complexType": {
|
|
536
|
-
"original": "string",
|
|
537
|
-
"resolved": "string",
|
|
538
|
-
"references": {}
|
|
539
|
-
},
|
|
540
|
-
"required": false,
|
|
541
|
-
"optional": false,
|
|
542
|
-
"docs": {
|
|
543
|
-
"tags": [],
|
|
544
|
-
"text": ""
|
|
545
|
-
},
|
|
546
|
-
"attribute": "search-placeholder",
|
|
547
|
-
"reflect": false,
|
|
548
|
-
"defaultValue": "intl.formatMessage({\n id: \"select.searchPlaceholder\",\n defaultMessage: \"Search\",\n description: \"Placeholder text. Use imperative\",\n })"
|
|
549
|
-
},
|
|
550
|
-
"allSelectedMessage": {
|
|
551
|
-
"type": "string",
|
|
552
|
-
"mutable": false,
|
|
553
|
-
"complexType": {
|
|
554
|
-
"original": "string",
|
|
555
|
-
"resolved": "string",
|
|
556
|
-
"references": {}
|
|
557
|
-
},
|
|
558
|
-
"required": false,
|
|
559
|
-
"optional": false,
|
|
560
|
-
"docs": {
|
|
561
|
-
"tags": [],
|
|
562
|
-
"text": ""
|
|
563
|
-
},
|
|
564
|
-
"attribute": "all-selected-message",
|
|
565
|
-
"reflect": false,
|
|
566
|
-
"defaultValue": "intl.formatMessage({\n id: \"select.allSelected\",\n defaultMessage: \"All selected\",\n description: \"Text displayed when all options are selected\",\n })"
|
|
567
|
-
},
|
|
568
|
-
"constrainedMaxHeight": {
|
|
569
|
-
"type": "string",
|
|
570
|
-
"mutable": true,
|
|
571
|
-
"complexType": {
|
|
572
|
-
"original": "string",
|
|
573
|
-
"resolved": "string",
|
|
574
|
-
"references": {}
|
|
575
|
-
},
|
|
576
|
-
"required": false,
|
|
577
|
-
"optional": false,
|
|
578
|
-
"docs": {
|
|
579
|
-
"tags": [],
|
|
580
|
-
"text": ""
|
|
581
|
-
},
|
|
582
|
-
"attribute": "constrained-max-height",
|
|
583
|
-
"reflect": false,
|
|
584
|
-
"defaultValue": "this.maxHeight"
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
static get states() {
|
|
589
|
-
return {
|
|
590
|
-
"isExpanded": {},
|
|
591
|
-
"showClearSelectionButton": {},
|
|
592
|
-
"announcement": {}
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
static get events() {
|
|
596
|
-
return [{
|
|
597
|
-
"method": "wmNestedSelectBlurred",
|
|
598
|
-
"name": "wmNestedSelectBlurred",
|
|
599
|
-
"bubbles": true,
|
|
600
|
-
"cancelable": true,
|
|
601
|
-
"composed": true,
|
|
602
|
-
"docs": {
|
|
603
|
-
"tags": [],
|
|
604
|
-
"text": ""
|
|
605
|
-
},
|
|
606
|
-
"complexType": {
|
|
607
|
-
"original": "void",
|
|
608
|
-
"resolved": "void",
|
|
609
|
-
"references": {}
|
|
610
|
-
}
|
|
611
|
-
}];
|
|
612
|
-
}
|
|
613
|
-
static get elementRef() { return "el"; }
|
|
614
|
-
static get listeners() {
|
|
615
|
-
return [{
|
|
616
|
-
"name": "wmOptionSelected",
|
|
617
|
-
"method": "handleOptionSelection",
|
|
618
|
-
"target": undefined,
|
|
619
|
-
"capture": false,
|
|
620
|
-
"passive": false
|
|
621
|
-
}, {
|
|
622
|
-
"name": "wmEnterKeyPressed",
|
|
623
|
-
"method": "handleChildEnter",
|
|
624
|
-
"target": undefined,
|
|
625
|
-
"capture": false,
|
|
626
|
-
"passive": false
|
|
627
|
-
}, {
|
|
628
|
-
"name": "wmEscKeyPressed",
|
|
629
|
-
"method": "closePopupOnEscape",
|
|
630
|
-
"target": undefined,
|
|
631
|
-
"capture": false,
|
|
632
|
-
"passive": false
|
|
633
|
-
}, {
|
|
634
|
-
"name": "keydown",
|
|
635
|
-
"method": "handleKeyDown",
|
|
636
|
-
"target": undefined,
|
|
637
|
-
"capture": false,
|
|
638
|
-
"passive": false
|
|
639
|
-
}, {
|
|
640
|
-
"name": "click",
|
|
641
|
-
"method": "handleClick",
|
|
642
|
-
"target": "document",
|
|
643
|
-
"capture": true,
|
|
644
|
-
"passive": false
|
|
645
|
-
}, {
|
|
646
|
-
"name": "optgroupExpanded",
|
|
647
|
-
"method": "handleOptgroupExpanded",
|
|
648
|
-
"target": undefined,
|
|
649
|
-
"capture": false,
|
|
650
|
-
"passive": false
|
|
651
|
-
}, {
|
|
652
|
-
"name": "optgroupHidden",
|
|
653
|
-
"method": "handleOptgroupHidden",
|
|
654
|
-
"target": undefined,
|
|
655
|
-
"capture": false,
|
|
656
|
-
"passive": false
|
|
657
|
-
}];
|
|
658
|
-
}
|
|
659
|
-
}
|