@haiilo/catalyst 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +4 -9
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +2 -2
- package/dist/catalyst/{p-85d057f0.js → p-6ae13953.js} +1 -1
- package/dist/catalyst/p-6cd4fa1e.js +3 -0
- package/dist/catalyst/p-6cd4fa1e.js.map +1 -0
- package/dist/catalyst/p-a05fbea3.entry.js +10 -0
- package/dist/catalyst/p-a05fbea3.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_dialog.scss +1 -1
- package/dist/catalyst/scss/core/_form.scss +2 -1
- package/dist/catalyst/scss/core/_typography.scss +1 -7
- package/dist/cjs/cat-alert_26.cjs.entry.js +3899 -3883
- package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +3 -3
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-1e7eef7e.js → index-eb056d5e.js} +51 -13
- package/dist/cjs/index-eb056d5e.js.map +1 -0
- package/dist/cjs/index.cjs.js +73 -73
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{of-395b2f57.js → of-2b7161d2.js} +155 -155
- package/dist/cjs/of-2b7161d2.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cat-alert/cat-alert.e2e.js +7 -7
- package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +1 -1
- package/dist/collection/components/cat-alert/cat-alert.js +98 -98
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-alert/cat-alert.spec.js +7 -7
- package/dist/collection/components/cat-alert/cat-alert.spec.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +6 -6
- package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.js +218 -218
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js +7 -7
- package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.e2e.js +6 -6
- package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.js +117 -117
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.spec.js +7 -7
- package/dist/collection/components/cat-badge/cat-badge.spec.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.css +2 -1
- package/dist/collection/components/cat-button/cat-button.e2e.js +6 -6
- package/dist/collection/components/cat-button/cat-button.e2e.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.js +693 -693
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.spec.js +7 -7
- package/dist/collection/components/cat-button/cat-button.spec.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +6 -6
- package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.js +47 -47
- package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js +7 -7
- package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.e2e.js +6 -6
- package/dist/collection/components/cat-card/cat-card.e2e.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.js +15 -15
- package/dist/collection/components/cat-card/cat-card.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.spec.js +7 -7
- package/dist/collection/components/cat-card/cat-card.spec.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.css +2 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +6 -6
- package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +441 -441
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +7 -7
- package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js +62 -62
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +7 -7
- package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js +20 -20
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +720 -707
- package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js +39 -39
- package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +7 -7
- package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +7 -7
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +244 -244
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +7 -7
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +6 -6
- package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +300 -300
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +7 -7
- package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +6 -6
- package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +107 -107
- package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js +7 -7
- package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js +9 -9
- package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +7 -7
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +71 -71
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +3 -3
- package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js +77 -77
- package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +3 -3
- package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.e2e.js +7 -7
- package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +97 -97
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-icon/cat-icon.spec.js +7 -7
- package/dist/collection/components/cat-icon/cat-icon.spec.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.e2e.js +7 -7
- package/dist/collection/components/cat-input/cat-input.e2e.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +768 -768
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.spec.js +7 -7
- package/dist/collection/components/cat-input/cat-input.spec.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js +59 -59
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.spec.js +3 -3
- package/dist/collection/components/cat-notification/cat-notification.spec.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +10 -10
- package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +274 -274
- package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js +7 -7
- package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.e2e.js +6 -6
- package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +378 -378
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.spec.js +7 -7
- package/dist/collection/components/cat-radio/cat-radio.spec.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +6 -6
- package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +278 -278
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +7 -7
- package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +6 -6
- package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +287 -287
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +7 -7
- package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.e2e.js +10 -10
- package/dist/collection/components/cat-select/cat-select.e2e.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +1143 -1143
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.spec.js +7 -7
- package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
- package/dist/collection/components/cat-select/connectors.js +13 -13
- package/dist/collection/components/cat-select/connectors.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1379 -1379
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +6 -6
- package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +120 -120
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +7 -7
- package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +6 -6
- package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +60 -60
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js +7 -7
- package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.e2e.js +6 -6
- package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +230 -211
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.spec.js +7 -7
- package/dist/collection/components/cat-tab/cat-tab.spec.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.css +3 -0
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +6 -6
- package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +222 -215
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js +7 -7
- package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +7 -7
- package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +586 -586
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js +7 -7
- package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +6 -6
- package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +421 -421
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js +7 -7
- package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +3 -0
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +6 -6
- package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +297 -296
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +12 -8
- package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +1 -1
- package/dist/collection/scss/core/_dialog.scss +1 -1
- package/dist/collection/scss/core/_form.scss +2 -1
- package/dist/collection/scss/core/_typography.scss +1 -7
- package/dist/collection/utils/breakpoints.js +6 -6
- package/dist/collection/utils/breakpoints.js.map +1 -1
- package/dist/collection/utils/coerce.js +3 -3
- package/dist/collection/utils/coerce.js.map +1 -1
- package/dist/collection/utils/find-closest.js +6 -6
- package/dist/collection/utils/find-closest.js.map +1 -1
- package/dist/collection/utils/first-tabbable.js +1 -1
- package/dist/collection/utils/first-tabbable.js.map +1 -1
- package/dist/collection/utils/load-img.js +6 -6
- package/dist/collection/utils/load-img.js.map +1 -1
- package/dist/collection/utils/media-matcher.js +30 -30
- package/dist/collection/utils/media-matcher.js.map +1 -1
- package/dist/collection/utils/media-matcher.spec.js +32 -32
- package/dist/collection/utils/media-matcher.spec.js.map +1 -1
- package/dist/collection/utils/platform.js +34 -34
- package/dist/collection/utils/platform.js.map +1 -1
- package/dist/collection/utils/setDefault.js +4 -4
- package/dist/collection/utils/setDefault.js.map +1 -1
- package/dist/components/cat-alert.d.ts +2 -2
- package/dist/components/cat-alert.js +56 -56
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar.d.ts +2 -2
- package/dist/components/cat-avatar2.js +93 -93
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.d.ts +2 -2
- package/dist/components/cat-badge.js +32 -32
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button-group.d.ts +2 -2
- package/dist/components/cat-button-group.js +31 -31
- package/dist/components/cat-button-group.js.map +1 -1
- package/dist/components/cat-button.d.ts +2 -2
- package/dist/components/cat-button2.js +277 -277
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-card.d.ts +2 -2
- package/dist/components/cat-card.js +20 -20
- package/dist/components/cat-card.js.map +1 -1
- package/dist/components/cat-checkbox.d.ts +2 -2
- package/dist/components/cat-checkbox2.js +108 -108
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-datepicker-inline.d.ts +2 -2
- package/dist/components/cat-datepicker-inline.js +89 -89
- package/dist/components/cat-datepicker-inline.js.map +1 -1
- package/dist/components/cat-datepicker.d.ts +2 -2
- package/dist/components/cat-datepicker.js +203 -194
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-datepicker.locale.js +121 -121
- package/dist/components/cat-datepicker.locale.js.map +1 -1
- package/dist/components/cat-dropdown.d.ts +2 -2
- package/dist/components/cat-dropdown2.js +177 -177
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.d.ts +2 -2
- package/dist/components/cat-form-group.js +55 -55
- package/dist/components/cat-form-group.js.map +1 -1
- package/dist/components/cat-form-hint.js +9 -9
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-i18n-registry.js +71 -71
- package/dist/components/cat-i18n-registry.js.map +1 -1
- package/dist/components/cat-icon-registry.js +77 -77
- package/dist/components/cat-icon-registry.js.map +1 -1
- package/dist/components/cat-icon.d.ts +2 -2
- package/dist/components/cat-icon2.js +32 -32
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.d.ts +2 -2
- package/dist/components/cat-input2.js +219 -219
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.d.ts +2 -2
- package/dist/components/cat-pagination.js +103 -103
- package/dist/components/cat-pagination.js.map +1 -1
- package/dist/components/cat-radio-group.d.ts +2 -2
- package/dist/components/cat-radio-group.js +113 -113
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.d.ts +2 -2
- package/dist/components/cat-radio.js +93 -93
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable.d.ts +2 -2
- package/dist/components/cat-scrollable2.js +118 -118
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/cat-select-demo.d.ts +2 -2
- package/dist/components/cat-select-demo.js +1438 -1438
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select.d.ts +2 -2
- package/dist/components/cat-select2.js +666 -666
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton.d.ts +2 -2
- package/dist/components/cat-skeleton2.js +53 -53
- package/dist/components/cat-skeleton2.js.map +1 -1
- package/dist/components/cat-spinner.d.ts +2 -2
- package/dist/components/cat-spinner2.js +27 -27
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.d.ts +2 -2
- package/dist/components/cat-tab.js +48 -46
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.d.ts +2 -2
- package/dist/components/cat-tabs.js +120 -113
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.d.ts +2 -2
- package/dist/components/cat-textarea.js +178 -178
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toggle.d.ts +2 -2
- package/dist/components/cat-toggle.js +104 -104
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.d.ts +2 -2
- package/dist/components/cat-tooltip.js +144 -143
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/components/coerce.js +3 -3
- package/dist/components/coerce.js.map +1 -1
- package/dist/components/index.js +72 -72
- package/dist/components/index.js.map +1 -1
- package/dist/esm/cat-alert_26.entry.js +3899 -3883
- package/dist/esm/cat-alert_26.entry.js.map +1 -1
- package/dist/esm/catalyst.js +4 -4
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-30a221a3.js → index-acddba36.js} +51 -13
- package/dist/esm/index-acddba36.js.map +1 -0
- package/dist/esm/index.js +74 -74
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{of-04d3d9e1.js → of-4f92b30b.js} +155 -155
- package/dist/esm/of-4f92b30b.js.map +1 -0
- package/dist/types/components/cat-alert/cat-alert.d.ts +17 -17
- package/dist/types/components/cat-avatar/cat-avatar.d.ts +41 -41
- package/dist/types/components/cat-badge/cat-badge.d.ts +22 -22
- package/dist/types/components/cat-button/cat-button.d.ts +151 -151
- package/dist/types/components/cat-button-group/cat-button-group.d.ts +9 -9
- package/dist/types/components/cat-card/cat-card.d.ts +1 -1
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +97 -97
- package/dist/types/components/cat-datepicker/cat-datepicker.config.d.ts +12 -12
- package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +153 -149
- package/dist/types/components/cat-datepicker-inline/cat-datepicker-inline.d.ts +45 -45
- package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +49 -49
- package/dist/types/components/cat-form-group/cat-form-group.d.ts +23 -23
- package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +6 -6
- package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +17 -17
- package/dist/types/components/cat-icon/cat-icon-registry.d.ts +12 -12
- package/dist/types/components/cat-icon/cat-icon.d.ts +18 -18
- package/dist/types/components/cat-input/cat-input.d.ts +167 -167
- package/dist/types/components/cat-notification/cat-notification.d.ts +31 -31
- package/dist/types/components/cat-pagination/cat-pagination.d.ts +52 -52
- package/dist/types/components/cat-radio/cat-radio.d.ts +83 -83
- package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +49 -49
- package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +49 -49
- package/dist/types/components/cat-select/cat-select.d.ts +221 -221
- package/dist/types/components/cat-select/connectors.d.ts +5 -5
- package/dist/types/components/cat-select-demo/cat-select-demo.d.ts +11 -11
- package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +23 -23
- package/dist/types/components/cat-spinner/cat-spinner.d.ts +10 -10
- package/dist/types/components/cat-tab/cat-tab.d.ts +48 -42
- package/dist/types/components/cat-tabs/cat-tabs.d.ts +40 -39
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +131 -131
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +93 -93
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +64 -64
- package/dist/types/components.d.ts +10 -2
- package/dist/types/stencil-public-runtime.d.ts +8 -0
- package/dist/types/utils/breakpoints.d.ts +1 -1
- package/dist/types/utils/media-matcher.d.ts +10 -10
- package/dist/types/utils/platform.d.ts +16 -16
- package/dist/types/utils/setDefault.d.ts +2 -2
- package/package.json +18 -18
- package/dist/catalyst/p-1bd44896.js +0 -3
- package/dist/catalyst/p-1bd44896.js.map +0 -1
- package/dist/catalyst/p-dc953306.entry.js +0 -10
- package/dist/catalyst/p-dc953306.entry.js.map +0 -1
- package/dist/cjs/index-1e7eef7e.js.map +0 -1
- package/dist/cjs/of-395b2f57.js.map +0 -1
- package/dist/esm/index-30a221a3.js.map +0 -1
- package/dist/esm/of-04d3d9e1.js.map +0 -1
- /package/dist/catalyst/{p-85d057f0.js.map → p-6ae13953.js.map} +0 -0
|
@@ -7,15 +7,15 @@ import { coerceBoolean, coerceNumber } from "../../utils/coerce";
|
|
|
7
7
|
import { CatFormHint } from "../cat-form-hint/cat-form-hint";
|
|
8
8
|
import { catI18nRegistry as i18n } from "../cat-i18n/cat-i18n-registry";
|
|
9
9
|
const INIT_STATE = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
term: '',
|
|
11
|
+
isOpen: false,
|
|
12
|
+
isLoading: false,
|
|
13
|
+
isResolving: false,
|
|
14
|
+
options: [],
|
|
15
|
+
selection: [],
|
|
16
|
+
tempSelection: [],
|
|
17
|
+
activeOptionIndex: -1,
|
|
18
|
+
activeSelectionIndex: -1
|
|
19
19
|
};
|
|
20
20
|
let nextUniqueId = 0;
|
|
21
21
|
let nextTagUniqueId = 0;
|
|
@@ -30,1208 +30,1208 @@ let nextTagUniqueId = 0;
|
|
|
30
30
|
* @part input - The native input element.
|
|
31
31
|
*/
|
|
32
32
|
export class CatSelect {
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
get id() {
|
|
66
|
-
return this.identifier || this._id;
|
|
67
|
-
}
|
|
68
|
-
onConnectorChanged(connector) {
|
|
69
|
-
this.reset(connector);
|
|
70
|
-
this.resolve();
|
|
71
|
-
}
|
|
72
|
-
onValueChanged() {
|
|
73
|
-
!this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);
|
|
74
|
-
}
|
|
75
|
-
onErrorsChanged(value) {
|
|
76
|
-
if (!coerceBoolean(this.errorUpdate)) {
|
|
77
|
-
this.errorMap = undefined;
|
|
33
|
+
constructor() {
|
|
34
|
+
this._id = `cat-input-${nextUniqueId++}`;
|
|
35
|
+
this.term$ = new Subject();
|
|
36
|
+
this.more$ = new Subject();
|
|
37
|
+
this.valueChangedBySelection = false;
|
|
38
|
+
this.connector = undefined;
|
|
39
|
+
this.state = INIT_STATE;
|
|
40
|
+
this.hasSlottedLabel = false;
|
|
41
|
+
this.hasSlottedHint = false;
|
|
42
|
+
this.errorMap = undefined;
|
|
43
|
+
this.requiredMarker = 'optional';
|
|
44
|
+
this.horizontal = false;
|
|
45
|
+
this.multiple = false;
|
|
46
|
+
this.debounce = 250;
|
|
47
|
+
this.placement = 'bottom-start';
|
|
48
|
+
this.value = undefined;
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
this.placeholder = undefined;
|
|
51
|
+
this.hint = undefined;
|
|
52
|
+
this.identifier = undefined;
|
|
53
|
+
this.label = '';
|
|
54
|
+
this.name = undefined;
|
|
55
|
+
this.labelHidden = false;
|
|
56
|
+
this.required = false;
|
|
57
|
+
this.clearable = false;
|
|
58
|
+
this.tags = false;
|
|
59
|
+
this.tagHint = undefined;
|
|
60
|
+
this.noItems = undefined;
|
|
61
|
+
this.errors = undefined;
|
|
62
|
+
this.errorUpdate = 0;
|
|
63
|
+
this.nativeAttributes = undefined;
|
|
78
64
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
82
|
-
: value === true
|
|
83
|
-
? {}
|
|
84
|
-
: value || undefined;
|
|
85
|
-
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
65
|
+
get id() {
|
|
66
|
+
return this.identifier || this._id;
|
|
86
67
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (changed('isOpen')) {
|
|
91
|
-
this.update();
|
|
68
|
+
onConnectorChanged(connector) {
|
|
69
|
+
this.reset(connector);
|
|
70
|
+
this.resolve();
|
|
92
71
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)
|
|
96
|
-
?.scrollIntoView({ block: 'nearest' });
|
|
72
|
+
onValueChanged() {
|
|
73
|
+
!this.valueChangedBySelection ? this.resolve() : (this.valueChangedBySelection = false);
|
|
97
74
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this.hide();
|
|
102
|
-
}
|
|
103
|
-
const idsSelected = this.state.selection.map(item => item.item.id);
|
|
104
|
-
if (!this.tags) {
|
|
105
|
-
if (this.multiple) {
|
|
106
|
-
newValue = idsSelected;
|
|
75
|
+
onErrorsChanged(value) {
|
|
76
|
+
if (!coerceBoolean(this.errorUpdate)) {
|
|
77
|
+
this.errorMap = undefined;
|
|
107
78
|
}
|
|
108
79
|
else {
|
|
109
|
-
|
|
80
|
+
this.errorMapSrc = Array.isArray(value)
|
|
81
|
+
? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
|
|
82
|
+
: value === true
|
|
83
|
+
? {}
|
|
84
|
+
: value || undefined;
|
|
85
|
+
this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
|
|
110
86
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
.map(item => item.render.label);
|
|
117
|
-
if (this.multiple) {
|
|
118
|
-
newValue = { ids, tags };
|
|
87
|
+
}
|
|
88
|
+
onStateChanged(newState, oldState) {
|
|
89
|
+
const changed = (key) => newState[key] !== oldState[key];
|
|
90
|
+
if (changed('isOpen')) {
|
|
91
|
+
this.update();
|
|
119
92
|
}
|
|
120
|
-
|
|
121
|
-
|
|
93
|
+
if (changed('activeOptionIndex') && this.state.activeOptionIndex >= 0) {
|
|
94
|
+
this.dropdown
|
|
95
|
+
?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)
|
|
96
|
+
?.scrollIntoView({ block: 'nearest' });
|
|
97
|
+
}
|
|
98
|
+
if (changed('selection')) {
|
|
99
|
+
let newValue;
|
|
100
|
+
if (!this.multiple && this.state.selection.length) {
|
|
101
|
+
this.hide();
|
|
102
|
+
}
|
|
103
|
+
const idsSelected = this.state.selection.map(item => item.item.id);
|
|
104
|
+
if (!this.tags) {
|
|
105
|
+
if (this.multiple) {
|
|
106
|
+
newValue = idsSelected;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
newValue = idsSelected.length ? idsSelected[0] : '';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const ids = idsSelected.filter(id => !id.startsWith(`select-${this.id}-tag`));
|
|
114
|
+
const tags = this.state.selection
|
|
115
|
+
.filter(item => item.item.id.startsWith(`select-${this.id}-tag`))
|
|
116
|
+
.map(item => item.render.label);
|
|
117
|
+
if (this.multiple) {
|
|
118
|
+
newValue = { ids, tags };
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
newValue = { id: ids.length ? ids[0] : '', tag: tags.length ? tags[0] : '' };
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (!oldState.isResolving) {
|
|
125
|
+
this.valueChangedBySelection = true;
|
|
126
|
+
this.value = newValue;
|
|
127
|
+
}
|
|
128
|
+
this.catChange.emit();
|
|
129
|
+
this.showErrorsIfTimeout();
|
|
122
130
|
}
|
|
123
|
-
}
|
|
124
|
-
if (!oldState.isResolving) {
|
|
125
|
-
this.valueChangedBySelection = true;
|
|
126
|
-
this.value = newValue;
|
|
127
|
-
}
|
|
128
|
-
this.catChange.emit();
|
|
129
|
-
this.showErrorsIfTimeout();
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
componentDidLoad() {
|
|
133
|
-
if (this.input) {
|
|
134
|
-
autosizeInput(this.input);
|
|
135
|
-
}
|
|
136
|
-
if (this.trigger && this.dropdown) {
|
|
137
|
-
autoUpdate(this.trigger, this.dropdown, () => this.update());
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
componentWillRender() {
|
|
141
|
-
this.onErrorsChanged(this.errors);
|
|
142
|
-
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
143
|
-
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
144
|
-
if (!this.label && !this.hasSlottedLabel) {
|
|
145
|
-
log.warn('[A11y] Missing ARIA label on select', this);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
onBlur(event) {
|
|
149
|
-
if (!this.multiple && this.state.activeOptionIndex >= 0) {
|
|
150
|
-
if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {
|
|
151
|
-
this.createTag(this.state.term);
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
this.select(this.state.options[this.state.activeOptionIndex]);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
this.hide();
|
|
158
|
-
// Conditionally remove selection if the option was not manually selected through click or enter key press
|
|
159
|
-
if (!this.multiple && (!this.tags || !this.state.selection?.length)) {
|
|
160
|
-
if (this.state.tempSelection?.length) {
|
|
161
|
-
this.patchState({
|
|
162
|
-
activeSelectionIndex: -1,
|
|
163
|
-
selection: this.state.tempSelection,
|
|
164
|
-
tempSelection: [],
|
|
165
|
-
options: [],
|
|
166
|
-
term: this.state.tempSelection[0].render.label
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
else if (!this.state.selection?.length) {
|
|
170
|
-
this.patchState({
|
|
171
|
-
activeSelectionIndex: -1,
|
|
172
|
-
selection: [],
|
|
173
|
-
tempSelection: [],
|
|
174
|
-
options: [],
|
|
175
|
-
term: ''
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
this.patchState({ activeSelectionIndex: -1 });
|
|
181
|
-
}
|
|
182
|
-
this.catBlur.emit(event);
|
|
183
|
-
if (coerceBoolean(this.errorUpdate)) {
|
|
184
|
-
this.showErrors();
|
|
185
131
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
132
|
+
componentDidLoad() {
|
|
133
|
+
if (this.input) {
|
|
134
|
+
autosizeInput(this.input);
|
|
135
|
+
}
|
|
136
|
+
if (this.trigger && this.dropdown) {
|
|
137
|
+
autoUpdate(this.trigger, this.dropdown, () => this.update());
|
|
138
|
+
}
|
|
191
139
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
this.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.toggleTag(this.state.options[0]);
|
|
140
|
+
componentWillRender() {
|
|
141
|
+
this.onErrorsChanged(this.errors);
|
|
142
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
143
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
144
|
+
if (!this.label && !this.hasSlottedLabel) {
|
|
145
|
+
log.warn('[A11y] Missing ARIA label on select', this);
|
|
199
146
|
}
|
|
200
|
-
|
|
201
|
-
|
|
147
|
+
}
|
|
148
|
+
onBlur(event) {
|
|
149
|
+
if (!this.multiple && this.state.activeOptionIndex >= 0) {
|
|
150
|
+
if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {
|
|
151
|
+
this.createTag(this.state.term);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
this.select(this.state.options[this.state.activeOptionIndex]);
|
|
155
|
+
}
|
|
202
156
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
157
|
+
this.hide();
|
|
158
|
+
// Conditionally remove selection if the option was not manually selected through click or enter key press
|
|
159
|
+
if (!this.multiple && (!this.tags || !this.state.selection?.length)) {
|
|
160
|
+
if (this.state.tempSelection?.length) {
|
|
161
|
+
this.patchState({
|
|
162
|
+
activeSelectionIndex: -1,
|
|
163
|
+
selection: this.state.tempSelection,
|
|
164
|
+
tempSelection: [],
|
|
165
|
+
options: [],
|
|
166
|
+
term: this.state.tempSelection[0].render.label
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
else if (!this.state.selection?.length) {
|
|
170
|
+
this.patchState({
|
|
171
|
+
activeSelectionIndex: -1,
|
|
172
|
+
selection: [],
|
|
173
|
+
tempSelection: [],
|
|
174
|
+
options: [],
|
|
175
|
+
term: ''
|
|
176
|
+
});
|
|
177
|
+
}
|
|
208
178
|
}
|
|
209
179
|
else {
|
|
210
|
-
|
|
180
|
+
this.patchState({ activeSelectionIndex: -1 });
|
|
181
|
+
}
|
|
182
|
+
this.catBlur.emit(event);
|
|
183
|
+
if (coerceBoolean(this.errorUpdate)) {
|
|
184
|
+
this.showErrors();
|
|
211
185
|
}
|
|
212
|
-
}
|
|
213
|
-
else if (this.tags && event.key === 'Enter' && this.state.activeOptionIndex < 0) {
|
|
214
|
-
this.createTag(this.state.term);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
else if (event.key === 'Escape') {
|
|
218
|
-
if (this.hide()) {
|
|
219
|
-
event.stopPropagation();
|
|
220
|
-
}
|
|
221
186
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
187
|
+
onKeyDown(event) {
|
|
188
|
+
const isInputFocused = this.hostElement.shadowRoot?.activeElement === this.input;
|
|
189
|
+
if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
|
|
190
|
+
this.onArrowKeyDown(event);
|
|
191
|
+
}
|
|
192
|
+
else if (['Enter', ' '].includes(event.key) && isInputFocused) {
|
|
193
|
+
if (this.tags &&
|
|
194
|
+
this.state.activeOptionIndex === 0 &&
|
|
195
|
+
this.state.options[0].item.id === `select-${this.id}-option-tag`) {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
if (this.multiple) {
|
|
198
|
+
this.toggleTag(this.state.options[0]);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this.createTag(this.state.options[0].render.label);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else if (this.state.activeOptionIndex >= 0) {
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
if (this.multiple) {
|
|
207
|
+
this.toggle(this.state.options[this.state.activeOptionIndex]);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
this.select(this.state.options[this.state.activeOptionIndex]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else if (this.tags && event.key === 'Enter' && this.state.activeOptionIndex < 0) {
|
|
214
|
+
this.createTag(this.state.term);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
else if (event.key === 'Escape') {
|
|
218
|
+
if (this.hide()) {
|
|
219
|
+
event.stopPropagation();
|
|
220
|
+
}
|
|
227
221
|
}
|
|
228
|
-
else if (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
222
|
+
else if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
223
|
+
this.input?.focus();
|
|
224
|
+
if (!this.multiple || !this.state.term || (this.input?.selectionStart === 0 && event.key === 'Backspace')) {
|
|
225
|
+
if (this.state.activeSelectionIndex >= 0) {
|
|
226
|
+
this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id);
|
|
227
|
+
}
|
|
228
|
+
else if (this.state.selection.length) {
|
|
229
|
+
const selectionClone = [...this.state.selection];
|
|
230
|
+
selectionClone.pop();
|
|
231
|
+
this.patchState({
|
|
232
|
+
selection: selectionClone,
|
|
233
|
+
tempSelection: this.state.term ? [...this.state.selection] : []
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else if (event.key === 'Tab') {
|
|
239
|
+
this.trigger?.setAttribute('tabindex', '-1');
|
|
240
|
+
if (this.multiple) {
|
|
241
|
+
this.patchState({ activeSelectionIndex: -1, activeOptionIndex: -1 });
|
|
242
|
+
}
|
|
243
|
+
else if (this.state.activeOptionIndex >= 0) {
|
|
244
|
+
if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {
|
|
245
|
+
this.createTag(this.state.term);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.select(this.state.options[this.state.activeOptionIndex]);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
else if (event.key.length === 1) {
|
|
253
|
+
this.input?.focus();
|
|
235
254
|
}
|
|
236
|
-
}
|
|
237
255
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
if (this.tags && this.state.options[this.state.activeOptionIndex].item.id === `select-${this.id}-option-tag`) {
|
|
245
|
-
this.createTag(this.state.term);
|
|
256
|
+
onKeyUp(event) {
|
|
257
|
+
if (event.key === 'Tab' && !event.shiftKey) {
|
|
258
|
+
this.hostElement.shadowRoot?.activeElement === this.trigger && this.input?.focus();
|
|
259
|
+
if (this.hostElement.shadowRoot?.activeElement === this.input) {
|
|
260
|
+
this.show();
|
|
261
|
+
}
|
|
246
262
|
}
|
|
247
|
-
else {
|
|
248
|
-
|
|
263
|
+
else if (event.key === 'Tab' && event.shiftKey) {
|
|
264
|
+
const clearButton = this.trigger?.querySelector(`#select-clear-btn-${this.id}`);
|
|
265
|
+
if (clearButton) {
|
|
266
|
+
this.hostElement.shadowRoot?.activeElement === clearButton && this.show();
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
this.show();
|
|
270
|
+
}
|
|
249
271
|
}
|
|
250
|
-
}
|
|
251
272
|
}
|
|
252
|
-
|
|
253
|
-
|
|
273
|
+
/**
|
|
274
|
+
* Connect the functions of the select
|
|
275
|
+
*
|
|
276
|
+
* @param connector - The {@link CatSelectConnector} of the select.
|
|
277
|
+
*/
|
|
278
|
+
async connect(connector) {
|
|
279
|
+
this.connector = connector;
|
|
280
|
+
let number$;
|
|
281
|
+
this.subscription?.unsubscribe();
|
|
282
|
+
this.subscription = this.term$
|
|
283
|
+
.asObservable()
|
|
284
|
+
.pipe(debounce(term => (term ? timer(this.debounce) : of(0))), distinctUntilChanged(), tap(() => (number$ = this.more$.pipe(filter(() => !this.state.isLoading), scan(n => n + 1, 0), startWith(0)))), tap(() => this.patchState({ options: [] })), switchMap(term => number$.pipe(tap(() => this.patchState({ isLoading: true })), switchMap(number => connector.retrieve(term, number)), tap(page => this.patchState({ isLoading: false, totalElements: page.totalElements })), takeWhile(page => !page.last, true), scan((items, page) => [...items, ...page.content], []))))
|
|
285
|
+
.subscribe(items => {
|
|
286
|
+
const options = this.toSelectItems(connector, items);
|
|
287
|
+
if (this.tags &&
|
|
288
|
+
this.state.term.trim().length &&
|
|
289
|
+
!options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())) {
|
|
290
|
+
let label;
|
|
291
|
+
if (this.isTagSelected(this.state.term)) {
|
|
292
|
+
label = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())
|
|
293
|
+
?.render.label;
|
|
294
|
+
}
|
|
295
|
+
options.unshift({
|
|
296
|
+
item: { id: `select-${this.id}-option-tag` },
|
|
297
|
+
render: { label: label ? label : this.state.term }
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
this.patchState({
|
|
301
|
+
options
|
|
302
|
+
});
|
|
303
|
+
});
|
|
254
304
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
305
|
+
render() {
|
|
306
|
+
return (h(Host, null, h("div", { class: {
|
|
307
|
+
'select-field': true,
|
|
308
|
+
'select-horizontal': this.horizontal
|
|
309
|
+
} }, h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, part: "label" }, h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { class: "select-container" }, h("div", { class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, h("div", { class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
|
|
310
|
+
pill: true,
|
|
311
|
+
'select-no-open': true,
|
|
312
|
+
'select-option-active': this.state.activeSelectionIndex === i
|
|
313
|
+
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { ...this.nativeAttributes, part: "input", class: "select-input", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && h("cat-spinner", null), this.invalid && (h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
314
|
+
!this.disabled &&
|
|
315
|
+
!this.state.isResolving &&
|
|
316
|
+
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: i18n.t('input.clear'), onCatClick: () => this.clear(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? i18n.t('select.close') : i18n.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isLoading
|
|
317
|
+
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (h("li", { class: "select-option-loading" }, h("cat-skeleton", { variant: "body", lines: 1 }), h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
318
|
+
: !this.state.options.length &&
|
|
319
|
+
!this.tags && (h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : i18n.t('select.empty')))))))));
|
|
262
320
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (clearButton) {
|
|
266
|
-
this.hostElement.shadowRoot?.activeElement === clearButton && this.show();
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
this.show();
|
|
270
|
-
}
|
|
321
|
+
get hasHint() {
|
|
322
|
+
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
271
323
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
* Connect the functions of the select
|
|
275
|
-
*
|
|
276
|
-
* @param connector - The {@link CatSelectConnector} of the select.
|
|
277
|
-
*/
|
|
278
|
-
async connect(connector) {
|
|
279
|
-
this.connector = connector;
|
|
280
|
-
let number$;
|
|
281
|
-
this.subscription?.unsubscribe();
|
|
282
|
-
this.subscription = this.term$
|
|
283
|
-
.asObservable()
|
|
284
|
-
.pipe(debounce(term => (term ? timer(this.debounce) : of(0))), distinctUntilChanged(), tap(() => (number$ = this.more$.pipe(filter(() => !this.state.isLoading), scan(n => n + 1, 0), startWith(0)))), tap(() => this.patchState({ options: [] })), switchMap(term => number$.pipe(tap(() => this.patchState({ isLoading: true })), switchMap(number => connector.retrieve(term, number)), tap(page => this.patchState({ isLoading: false, totalElements: page.totalElements })), takeWhile(page => !page.last, true), scan((items, page) => [...items, ...page.content], []))))
|
|
285
|
-
.subscribe(items => {
|
|
286
|
-
const options = this.toSelectItems(connector, items);
|
|
287
|
-
if (this.tags &&
|
|
288
|
-
this.state.term.trim().length &&
|
|
289
|
-
!options.find(value1 => value1.render.label.toLowerCase() === this.state.term.toLowerCase())) {
|
|
290
|
-
let label;
|
|
291
|
-
if (this.isTagSelected(this.state.term)) {
|
|
292
|
-
label = this.state.selection.find(item => item.render.label.toLowerCase() === this.state.term.toLowerCase())
|
|
293
|
-
?.render.label;
|
|
294
|
-
}
|
|
295
|
-
options.unshift({
|
|
296
|
-
item: { id: `select-${this.id}-option-tag` },
|
|
297
|
-
render: { label: label ? label : this.state.term }
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
this.patchState({
|
|
301
|
-
options
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
render() {
|
|
306
|
-
return (h(Host, null, h("div", { class: {
|
|
307
|
-
'select-field': true,
|
|
308
|
-
'select-horizontal': this.horizontal
|
|
309
|
-
} }, h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, part: "label" }, h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")"))))))), h("div", { class: "select-container" }, h("div", { class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, h("div", { class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (h("span", { class: {
|
|
310
|
-
pill: true,
|
|
311
|
-
'select-no-open': true,
|
|
312
|
-
'select-option-active': this.state.activeSelectionIndex === i
|
|
313
|
-
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", null, item.render.label), !this.disabled && (h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: i18n.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, h("input", { ...this.nativeAttributes, part: "input", class: "select-input", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && h("cat-spinner", null), this.invalid && (h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
314
|
-
!this.disabled &&
|
|
315
|
-
!this.state.isResolving &&
|
|
316
|
-
this.clearable ? (h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: i18n.t('input.clear'), onCatClick: () => this.clear(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? i18n.t('select.close') : i18n.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))), h("div", { class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (h("cat-scrollable", { class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, h("ul", { class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isLoading
|
|
317
|
-
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (h("li", { class: "select-option-loading" }, h("cat-skeleton", { variant: "body", lines: 1 }), h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
318
|
-
: !this.state.options.length &&
|
|
319
|
-
!this.tags && (h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : i18n.t('select.empty')))))))));
|
|
320
|
-
}
|
|
321
|
-
get hasHint() {
|
|
322
|
-
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
323
|
-
}
|
|
324
|
-
get invalid() {
|
|
325
|
-
return !!Object.keys(this.errorMap || {}).length;
|
|
326
|
-
}
|
|
327
|
-
get optionsList() {
|
|
328
|
-
return this.state.options.map((item, i) => {
|
|
329
|
-
const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;
|
|
330
|
-
const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));
|
|
331
|
-
const getLabel = () => {
|
|
332
|
-
if (isTagOption) {
|
|
333
|
-
return item.render.label + this.tagTextHelp;
|
|
334
|
-
}
|
|
335
|
-
return item.render.label;
|
|
336
|
-
};
|
|
337
|
-
return (h("li", { role: "option", class: "select-option", id: `select-${this.id}-option-${i}`, "aria-selected": isOptionSelected ? 'true' : 'false' }, this.multiple ? (h("cat-checkbox", { class: { 'select-option-active': this.state.activeOptionIndex === i }, checked: isOptionSelected, tabIndex: -1, labelLeft: true, onFocus: () => this.input?.focus(), onCatChange: e => {
|
|
338
|
-
!isTagOption ? this.toggle(item) : this.toggleTag(item);
|
|
339
|
-
e.stopPropagation();
|
|
340
|
-
} }, h("span", { slot: "label", class: "select-option-inner" }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", { class: "select-option-text" }, h("span", { class: "select-option-label" }, getLabel()), h("span", { class: "select-option-description" }, item.render.description))))) : (h("div", { class: {
|
|
341
|
-
'select-option-inner': true,
|
|
342
|
-
'select-option-single': true,
|
|
343
|
-
'select-option-active': this.state.activeOptionIndex === i
|
|
344
|
-
}, onFocus: () => this.input?.focus(), onClick: () => (isTagOption ? this.createTag(item.render.label) : this.select(item)), tabIndex: -1 }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", { class: "select-option-text" }, h("span", { class: "select-option-label" }, getLabel()), h("span", { class: "select-option-description" }, item.render.description))))));
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
resolve() {
|
|
348
|
-
const connector = this.connector;
|
|
349
|
-
if (!connector) {
|
|
350
|
-
return;
|
|
324
|
+
get invalid() {
|
|
325
|
+
return !!Object.keys(this.errorMap || {}).length;
|
|
351
326
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
327
|
+
get optionsList() {
|
|
328
|
+
return this.state.options.map((item, i) => {
|
|
329
|
+
const isTagOption = this.tags && item.item.id === `select-${this.id}-option-tag`;
|
|
330
|
+
const isOptionSelected = this.isSelected(item.item.id) || (this.tags && this.isTagSelected(item.render.label));
|
|
331
|
+
const getLabel = () => {
|
|
332
|
+
if (isTagOption) {
|
|
333
|
+
return item.render.label + this.tagTextHelp;
|
|
334
|
+
}
|
|
335
|
+
return item.render.label;
|
|
336
|
+
};
|
|
337
|
+
return (h("li", { role: "option", class: "select-option", id: `select-${this.id}-option-${i}`, "aria-selected": isOptionSelected ? 'true' : 'false' }, this.multiple ? (h("cat-checkbox", { class: { 'select-option-active': this.state.activeOptionIndex === i }, checked: isOptionSelected, tabIndex: -1, labelLeft: true, onFocus: () => this.input?.focus(), onCatChange: e => {
|
|
338
|
+
!isTagOption ? this.toggle(item) : this.toggleTag(item);
|
|
339
|
+
e.stopPropagation();
|
|
340
|
+
} }, h("span", { slot: "label", class: "select-option-inner" }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", { class: "select-option-text" }, h("span", { class: "select-option-label" }, getLabel()), h("span", { class: "select-option-description" }, item.render.description))))) : (h("div", { class: {
|
|
341
|
+
'select-option-inner': true,
|
|
342
|
+
'select-option-single': true,
|
|
343
|
+
'select-option-active': this.state.activeOptionIndex === i
|
|
344
|
+
}, onFocus: () => this.input?.focus(), onClick: () => (isTagOption ? this.createTag(item.render.label) : this.select(item)), tabIndex: -1 }, item.render.avatar ? (h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, h("span", { class: "select-option-text" }, h("span", { class: "select-option-label" }, getLabel()), h("span", { class: "select-option-description" }, item.render.description))))));
|
|
345
|
+
});
|
|
357
346
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
347
|
+
resolve() {
|
|
348
|
+
const connector = this.connector;
|
|
349
|
+
if (!connector) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
this.patchState({ isResolving: true });
|
|
353
|
+
const ids = this.initIds();
|
|
354
|
+
let tags;
|
|
355
|
+
if (this.tags) {
|
|
356
|
+
tags = this.initTags();
|
|
357
|
+
}
|
|
358
|
+
const data$ = ids.length ? connector.resolve(ids).pipe(first()) : of([]);
|
|
359
|
+
data$.pipe(catchError(() => of([]))).subscribe(items => {
|
|
360
|
+
const selection = this.toSelectItems(connector, items);
|
|
361
|
+
if (this.tags) {
|
|
362
|
+
tags
|
|
363
|
+
.filter(tag => !this.isTagSelected(tag, selection))
|
|
364
|
+
.forEach((tag, index) => {
|
|
365
|
+
const item = { id: `select-${this.id}-tag-${index}`, name: tag };
|
|
366
|
+
selection.push({ item, render: { label: item.name } });
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
this.patchState({
|
|
370
|
+
isResolving: false,
|
|
371
|
+
selection,
|
|
372
|
+
term: !this.multiple && selection.length ? selection[0].render.label : ''
|
|
373
|
+
});
|
|
367
374
|
});
|
|
368
|
-
}
|
|
369
|
-
this.patchState({
|
|
370
|
-
isResolving: false,
|
|
371
|
-
selection,
|
|
372
|
-
term: !this.multiple && selection.length ? selection[0].render.label : ''
|
|
373
|
-
});
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
toSelectItems(connector, items) {
|
|
377
|
-
return items.map(item => ({
|
|
378
|
-
item: { ...item, id: connector.customId ? connector.customId(item) : item.id },
|
|
379
|
-
render: connector.render(item)
|
|
380
|
-
}));
|
|
381
|
-
}
|
|
382
|
-
show() {
|
|
383
|
-
if (!this.state.isOpen && this.connector) {
|
|
384
|
-
// reconnect to reset the connection, i.e. the pagination
|
|
385
|
-
this.connect(this.connector);
|
|
386
|
-
this.patchState({ isOpen: true });
|
|
387
|
-
this.catOpen.emit();
|
|
388
|
-
this.term$.next('');
|
|
389
|
-
this.input?.classList.remove('select-input-transparent-caret');
|
|
390
375
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return true;
|
|
376
|
+
toSelectItems(connector, items) {
|
|
377
|
+
return items.map(item => ({
|
|
378
|
+
item: { ...item, id: connector.customId ? connector.customId(item) : item.id },
|
|
379
|
+
render: connector.render(item)
|
|
380
|
+
}));
|
|
397
381
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
select(item) {
|
|
408
|
-
if (!this.isSelected(item.item.id)) {
|
|
409
|
-
let newSelection;
|
|
410
|
-
if (this.multiple) {
|
|
411
|
-
newSelection = [...this.state.selection, item];
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
newSelection = [item];
|
|
415
|
-
this.search(item.render.label);
|
|
416
|
-
}
|
|
417
|
-
this.patchState({ selection: newSelection, tempSelection: [] });
|
|
418
|
-
if (this.multiple && this.state.term.trim() && this.input) {
|
|
419
|
-
this.patchState({ term: '', activeOptionIndex: -1 });
|
|
420
|
-
this.term$.next('');
|
|
421
|
-
this.input.value = '';
|
|
422
|
-
}
|
|
382
|
+
show() {
|
|
383
|
+
if (!this.state.isOpen && this.connector) {
|
|
384
|
+
// reconnect to reset the connection, i.e. the pagination
|
|
385
|
+
this.connect(this.connector);
|
|
386
|
+
this.patchState({ isOpen: true });
|
|
387
|
+
this.catOpen.emit();
|
|
388
|
+
this.term$.next('');
|
|
389
|
+
this.input?.classList.remove('select-input-transparent-caret');
|
|
390
|
+
}
|
|
423
391
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
});
|
|
392
|
+
hide() {
|
|
393
|
+
if (this.state.isOpen) {
|
|
394
|
+
this.patchState({ isOpen: false, activeOptionIndex: -1 });
|
|
395
|
+
this.catClose.emit();
|
|
396
|
+
return true;
|
|
397
|
+
}
|
|
398
|
+
return false;
|
|
432
399
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
? this.deselect(item.item.id)
|
|
437
|
-
: this.tags && this.isTagSelected(item.render.label)
|
|
438
|
-
? this.removeTag(item.render.label)
|
|
439
|
-
: this.select(item);
|
|
440
|
-
}
|
|
441
|
-
clear() {
|
|
442
|
-
if (this.input && this.state.term) {
|
|
443
|
-
this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });
|
|
444
|
-
this.term$.next('');
|
|
445
|
-
this.input.value = '';
|
|
400
|
+
search(term) {
|
|
401
|
+
this.patchState({ term, activeOptionIndex: -1, activeSelectionIndex: -1 });
|
|
402
|
+
this.term$.next(term);
|
|
446
403
|
}
|
|
447
|
-
|
|
448
|
-
|
|
404
|
+
isSelected(id) {
|
|
405
|
+
return this.state.selection.findIndex(s => s.item.id === id) >= 0;
|
|
449
406
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
407
|
+
select(item) {
|
|
408
|
+
if (!this.isSelected(item.item.id)) {
|
|
409
|
+
let newSelection;
|
|
410
|
+
if (this.multiple) {
|
|
411
|
+
newSelection = [...this.state.selection, item];
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
newSelection = [item];
|
|
415
|
+
this.search(item.render.label);
|
|
416
|
+
}
|
|
417
|
+
this.patchState({ selection: newSelection, tempSelection: [] });
|
|
418
|
+
if (this.multiple && this.state.term.trim() && this.input) {
|
|
419
|
+
this.patchState({ term: '', activeOptionIndex: -1 });
|
|
420
|
+
this.term$.next('');
|
|
421
|
+
this.input.value = '';
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
this.setTransparentCaret();
|
|
460
425
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
this.state.isOpen ? this.hide() : this.show();
|
|
426
|
+
deselect(id) {
|
|
427
|
+
if (this.isSelected(id)) {
|
|
428
|
+
this.patchState({
|
|
429
|
+
selection: this.state.selection.filter(item => item.item.id !== id),
|
|
430
|
+
activeSelectionIndex: -1
|
|
431
|
+
});
|
|
432
|
+
}
|
|
469
433
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
selectionClone.pop();
|
|
477
|
-
this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });
|
|
478
|
-
}
|
|
479
|
-
if (!this.input?.value.trim()) {
|
|
480
|
-
this.patchState({ tempSelection: [] });
|
|
481
|
-
}
|
|
434
|
+
toggle(item) {
|
|
435
|
+
this.isSelected(item.item.id)
|
|
436
|
+
? this.deselect(item.item.id)
|
|
437
|
+
: this.tags && this.isTagSelected(item.render.label)
|
|
438
|
+
? this.removeTag(item.render.label)
|
|
439
|
+
: this.select(item);
|
|
482
440
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}).then(({ x, y, placement }) => {
|
|
492
|
-
if (this.dropdown) {
|
|
493
|
-
this.dropdown.dataset.placement = placement;
|
|
494
|
-
Object.assign(this.dropdown.style, {
|
|
495
|
-
width: `${this.trigger?.clientWidth}px`,
|
|
496
|
-
left: `${x}px`,
|
|
497
|
-
top: `${y}px`
|
|
498
|
-
});
|
|
441
|
+
clear() {
|
|
442
|
+
if (this.input && this.state.term) {
|
|
443
|
+
this.patchState({ selection: [], term: '', activeOptionIndex: -1, tempSelection: [] });
|
|
444
|
+
this.term$.next('');
|
|
445
|
+
this.input.value = '';
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
this.patchState({ selection: [], tempSelection: [] });
|
|
499
449
|
}
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
patchState(update) {
|
|
504
|
-
this.state = { ...this.state, ...update };
|
|
505
|
-
}
|
|
506
|
-
isPillboxActive() {
|
|
507
|
-
return this.state.activeSelectionIndex >= 0;
|
|
508
|
-
}
|
|
509
|
-
get activeDescendant() {
|
|
510
|
-
let activeDescendant = undefined;
|
|
511
|
-
if (this.state.activeOptionIndex >= 0) {
|
|
512
|
-
activeDescendant = `select-${this.id}-option-${this.state.activeOptionIndex}`;
|
|
513
450
|
}
|
|
514
|
-
|
|
515
|
-
|
|
451
|
+
reset(connector) {
|
|
452
|
+
this.connector = connector ?? this.connector;
|
|
453
|
+
this.subscription?.unsubscribe();
|
|
454
|
+
this.subscription = undefined;
|
|
455
|
+
this.state = INIT_STATE;
|
|
516
456
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
let preventDefault = false;
|
|
521
|
-
this.input?.focus();
|
|
522
|
-
switch (event.key) {
|
|
523
|
-
case 'ArrowDown':
|
|
524
|
-
preventDefault = true;
|
|
525
|
-
this.state.isOpen
|
|
526
|
-
? this.patchState({
|
|
527
|
-
activeOptionIndex: Math.min(this.state.activeOptionIndex + 1, this.state.options.length - 1),
|
|
528
|
-
activeSelectionIndex: -1
|
|
529
|
-
})
|
|
530
|
-
: this.show();
|
|
531
|
-
break;
|
|
532
|
-
case 'ArrowUp':
|
|
533
|
-
preventDefault = true;
|
|
534
|
-
this.state.activeOptionIndex >= 0
|
|
535
|
-
? this.patchState({
|
|
536
|
-
activeOptionIndex: Math.max(this.state.activeOptionIndex - 1, -1),
|
|
537
|
-
activeSelectionIndex: -1
|
|
538
|
-
})
|
|
539
|
-
: this.hide();
|
|
540
|
-
break;
|
|
541
|
-
case 'ArrowLeft':
|
|
542
|
-
if (this.input?.selectionStart === 0) {
|
|
543
|
-
preventDefault = true;
|
|
544
|
-
let index;
|
|
545
|
-
this.state.activeSelectionIndex > 0
|
|
546
|
-
? (index = Math.max(this.state.activeSelectionIndex - 1, -1))
|
|
547
|
-
: (index = this.state.selection.length - 1);
|
|
548
|
-
this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });
|
|
457
|
+
onClick(event) {
|
|
458
|
+
if (this.disabled) {
|
|
459
|
+
return;
|
|
549
460
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
else if (!this.state.term) {
|
|
559
|
-
index = 0;
|
|
560
|
-
}
|
|
561
|
-
this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });
|
|
461
|
+
const elem = event.target;
|
|
462
|
+
this.trigger?.setAttribute('tabindex', '0');
|
|
463
|
+
this.input?.focus();
|
|
464
|
+
if (elem === this.trigger ||
|
|
465
|
+
elem === this.input ||
|
|
466
|
+
elem.classList.contains('select-btn') ||
|
|
467
|
+
elem.nodeName === 'SPAN') {
|
|
468
|
+
this.state.isOpen ? this.hide() : this.show();
|
|
562
469
|
}
|
|
563
470
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
471
|
+
onInput() {
|
|
472
|
+
this.search(this.input?.value.trim() || '');
|
|
473
|
+
if (!this.multiple) {
|
|
474
|
+
if (this.state.selection.length) {
|
|
475
|
+
const selectionClone = [...this.state.selection];
|
|
476
|
+
selectionClone.pop();
|
|
477
|
+
this.patchState({ selection: selectionClone, tempSelection: [...this.state.selection] });
|
|
478
|
+
}
|
|
479
|
+
if (!this.input?.value.trim()) {
|
|
480
|
+
this.patchState({ tempSelection: [] });
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
this.show();
|
|
484
|
+
}
|
|
485
|
+
update() {
|
|
486
|
+
if (this.trigger && this.dropdown) {
|
|
487
|
+
computePosition(this.trigger, this.dropdown, {
|
|
488
|
+
strategy: 'fixed',
|
|
489
|
+
placement: this.placement,
|
|
490
|
+
middleware: [offset(CatSelect.DROPDOWN_OFFSET), flip()]
|
|
491
|
+
}).then(({ x, y, placement }) => {
|
|
492
|
+
if (this.dropdown) {
|
|
493
|
+
this.dropdown.dataset.placement = placement;
|
|
494
|
+
Object.assign(this.dropdown.style, {
|
|
495
|
+
width: `${this.trigger?.clientWidth}px`,
|
|
496
|
+
left: `${x}px`,
|
|
497
|
+
top: `${y}px`
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
567
502
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';
|
|
571
|
-
}
|
|
572
|
-
isTagSelected(term, selection = this.state.selection) {
|
|
573
|
-
return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;
|
|
574
|
-
}
|
|
575
|
-
createTag(term) {
|
|
576
|
-
if (term.trim().length && !this.isTagSelected(term)) {
|
|
577
|
-
const value = this.value;
|
|
578
|
-
const tags = value?.tags;
|
|
579
|
-
const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };
|
|
580
|
-
this.select({ item: tag, render: { label: tag.name } });
|
|
503
|
+
patchState(update) {
|
|
504
|
+
this.state = { ...this.state, ...update };
|
|
581
505
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
removeTag(label) {
|
|
585
|
-
if (this.isTagSelected(label)) {
|
|
586
|
-
const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());
|
|
587
|
-
item && this.deselect(item.item.id);
|
|
506
|
+
isPillboxActive() {
|
|
507
|
+
return this.state.activeSelectionIndex >= 0;
|
|
588
508
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
initIds() {
|
|
594
|
-
let ids = [];
|
|
595
|
-
if (this.value) {
|
|
596
|
-
if (!this.tags) {
|
|
597
|
-
if (this.multiple) {
|
|
598
|
-
ids = this.value;
|
|
509
|
+
get activeDescendant() {
|
|
510
|
+
let activeDescendant = undefined;
|
|
511
|
+
if (this.state.activeOptionIndex >= 0) {
|
|
512
|
+
activeDescendant = `select-${this.id}-option-${this.state.activeOptionIndex}`;
|
|
599
513
|
}
|
|
600
|
-
else {
|
|
601
|
-
|
|
514
|
+
else if (this.state.activeSelectionIndex >= 0) {
|
|
515
|
+
activeDescendant = `select-${this.id}-selection-${this.state.activeSelectionIndex}`;
|
|
602
516
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
517
|
+
return activeDescendant;
|
|
518
|
+
}
|
|
519
|
+
onArrowKeyDown(event) {
|
|
520
|
+
let preventDefault = false;
|
|
521
|
+
this.input?.focus();
|
|
522
|
+
switch (event.key) {
|
|
523
|
+
case 'ArrowDown':
|
|
524
|
+
preventDefault = true;
|
|
525
|
+
this.state.isOpen
|
|
526
|
+
? this.patchState({
|
|
527
|
+
activeOptionIndex: Math.min(this.state.activeOptionIndex + 1, this.state.options.length - 1),
|
|
528
|
+
activeSelectionIndex: -1
|
|
529
|
+
})
|
|
530
|
+
: this.show();
|
|
531
|
+
break;
|
|
532
|
+
case 'ArrowUp':
|
|
533
|
+
preventDefault = true;
|
|
534
|
+
this.state.activeOptionIndex >= 0
|
|
535
|
+
? this.patchState({
|
|
536
|
+
activeOptionIndex: Math.max(this.state.activeOptionIndex - 1, -1),
|
|
537
|
+
activeSelectionIndex: -1
|
|
538
|
+
})
|
|
539
|
+
: this.hide();
|
|
540
|
+
break;
|
|
541
|
+
case 'ArrowLeft':
|
|
542
|
+
if (this.input?.selectionStart === 0) {
|
|
543
|
+
preventDefault = true;
|
|
544
|
+
let index;
|
|
545
|
+
this.state.activeSelectionIndex > 0
|
|
546
|
+
? (index = Math.max(this.state.activeSelectionIndex - 1, -1))
|
|
547
|
+
: (index = this.state.selection.length - 1);
|
|
548
|
+
this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });
|
|
549
|
+
}
|
|
550
|
+
break;
|
|
551
|
+
case 'ArrowRight':
|
|
552
|
+
if (this.state.activeSelectionIndex >= 0) {
|
|
553
|
+
preventDefault = true;
|
|
554
|
+
let index = -1;
|
|
555
|
+
if (this.state.activeSelectionIndex < this.state.selection.length - 1) {
|
|
556
|
+
index = Math.min(this.state.activeSelectionIndex + 1, this.state.selection.length - 1);
|
|
557
|
+
}
|
|
558
|
+
else if (!this.state.term) {
|
|
559
|
+
index = 0;
|
|
560
|
+
}
|
|
561
|
+
this.patchState({ activeSelectionIndex: index, activeOptionIndex: -1 });
|
|
562
|
+
}
|
|
608
563
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
564
|
+
if (preventDefault) {
|
|
565
|
+
event.preventDefault();
|
|
566
|
+
event.stopPropagation();
|
|
612
567
|
}
|
|
613
|
-
}
|
|
614
568
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
initTags() {
|
|
618
|
-
let tags = [];
|
|
619
|
-
if (this.value) {
|
|
620
|
-
if (this.multiple) {
|
|
621
|
-
const value = this.value;
|
|
622
|
-
tags = value.tags ? value.tags : [];
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
const value = this.value;
|
|
626
|
-
tags = value.tag ? [value.tag] : [];
|
|
627
|
-
}
|
|
569
|
+
get tagTextHelp() {
|
|
570
|
+
return this.tagHint && !this.isTagSelected(this.state.term) ? ' (' + this.tagHint + ')' : '';
|
|
628
571
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
setTransparentCaret() {
|
|
632
|
-
if (!this.multiple) {
|
|
633
|
-
this.hide();
|
|
634
|
-
this.input?.classList.add('select-input-transparent-caret');
|
|
572
|
+
isTagSelected(term, selection = this.state.selection) {
|
|
573
|
+
return selection.findIndex(item => item.render.label.toLowerCase() === term.toLowerCase()) >= 0;
|
|
635
574
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
|
|
645
|
-
return true;
|
|
575
|
+
createTag(term) {
|
|
576
|
+
if (term.trim().length && !this.isTagSelected(term)) {
|
|
577
|
+
const value = this.value;
|
|
578
|
+
const tags = value?.tags;
|
|
579
|
+
const tag = { id: `select-${this.id}-tag-${tags?.length ? tags?.length + nextTagUniqueId++ : 0}`, name: term };
|
|
580
|
+
this.select({ item: tag, render: { label: tag.name } });
|
|
581
|
+
}
|
|
582
|
+
this.setTransparentCaret();
|
|
646
583
|
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
this.showErrors();
|
|
584
|
+
removeTag(label) {
|
|
585
|
+
if (this.isTagSelected(label)) {
|
|
586
|
+
const item = this.state.selection.find(item => item.render.label.toLowerCase() === label.toLowerCase());
|
|
587
|
+
item && this.deselect(item.item.id);
|
|
588
|
+
}
|
|
653
589
|
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
static get properties() {
|
|
668
|
-
return {
|
|
669
|
-
"requiredMarker": {
|
|
670
|
-
"type": "string",
|
|
671
|
-
"mutable": false,
|
|
672
|
-
"complexType": {
|
|
673
|
-
"original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
|
|
674
|
-
"resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
|
|
675
|
-
"references": {}
|
|
676
|
-
},
|
|
677
|
-
"required": false,
|
|
678
|
-
"optional": true,
|
|
679
|
-
"docs": {
|
|
680
|
-
"tags": [],
|
|
681
|
-
"text": "Whether the label need a marker to shown if the select is required or optional."
|
|
682
|
-
},
|
|
683
|
-
"attribute": "required-marker",
|
|
684
|
-
"reflect": false,
|
|
685
|
-
"defaultValue": "'optional'"
|
|
686
|
-
},
|
|
687
|
-
"horizontal": {
|
|
688
|
-
"type": "boolean",
|
|
689
|
-
"mutable": false,
|
|
690
|
-
"complexType": {
|
|
691
|
-
"original": "boolean",
|
|
692
|
-
"resolved": "boolean",
|
|
693
|
-
"references": {}
|
|
694
|
-
},
|
|
695
|
-
"required": false,
|
|
696
|
-
"optional": false,
|
|
697
|
-
"docs": {
|
|
698
|
-
"tags": [],
|
|
699
|
-
"text": "Whether the label is on top or left."
|
|
700
|
-
},
|
|
701
|
-
"attribute": "horizontal",
|
|
702
|
-
"reflect": false,
|
|
703
|
-
"defaultValue": "false"
|
|
704
|
-
},
|
|
705
|
-
"multiple": {
|
|
706
|
-
"type": "boolean",
|
|
707
|
-
"mutable": false,
|
|
708
|
-
"complexType": {
|
|
709
|
-
"original": "boolean",
|
|
710
|
-
"resolved": "boolean",
|
|
711
|
-
"references": {}
|
|
712
|
-
},
|
|
713
|
-
"required": false,
|
|
714
|
-
"optional": false,
|
|
715
|
-
"docs": {
|
|
716
|
-
"tags": [],
|
|
717
|
-
"text": "Enable multiple selection."
|
|
718
|
-
},
|
|
719
|
-
"attribute": "multiple",
|
|
720
|
-
"reflect": false,
|
|
721
|
-
"defaultValue": "false"
|
|
722
|
-
},
|
|
723
|
-
"debounce": {
|
|
724
|
-
"type": "number",
|
|
725
|
-
"mutable": false,
|
|
726
|
-
"complexType": {
|
|
727
|
-
"original": "number",
|
|
728
|
-
"resolved": "number",
|
|
729
|
-
"references": {}
|
|
730
|
-
},
|
|
731
|
-
"required": false,
|
|
732
|
-
"optional": false,
|
|
733
|
-
"docs": {
|
|
734
|
-
"tags": [],
|
|
735
|
-
"text": "The debounce time for the search."
|
|
736
|
-
},
|
|
737
|
-
"attribute": "debounce",
|
|
738
|
-
"reflect": false,
|
|
739
|
-
"defaultValue": "250"
|
|
740
|
-
},
|
|
741
|
-
"placement": {
|
|
742
|
-
"type": "string",
|
|
743
|
-
"mutable": false,
|
|
744
|
-
"complexType": {
|
|
745
|
-
"original": "Placement",
|
|
746
|
-
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
747
|
-
"references": {
|
|
748
|
-
"Placement": {
|
|
749
|
-
"location": "import",
|
|
750
|
-
"path": "@floating-ui/dom",
|
|
751
|
-
"id": "../node_modules/.pnpm/@floating-ui+dom@1.5.3/node_modules/@floating-ui/dom/src/types.d.ts::Placement"
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
"required": false,
|
|
756
|
-
"optional": false,
|
|
757
|
-
"docs": {
|
|
758
|
-
"tags": [],
|
|
759
|
-
"text": "The placement of the select."
|
|
760
|
-
},
|
|
761
|
-
"attribute": "placement",
|
|
762
|
-
"reflect": false,
|
|
763
|
-
"defaultValue": "'bottom-start'"
|
|
764
|
-
},
|
|
765
|
-
"value": {
|
|
766
|
-
"type": "string",
|
|
767
|
-
"mutable": true,
|
|
768
|
-
"complexType": {
|
|
769
|
-
"original": "string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue",
|
|
770
|
-
"resolved": "CatSelectMultipleTaggingValue | CatSelectTaggingValue | string | string[] | undefined",
|
|
771
|
-
"references": {
|
|
772
|
-
"CatSelectTaggingValue": {
|
|
773
|
-
"location": "local",
|
|
774
|
-
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
775
|
-
"id": "src/components/cat-select/cat-select.tsx::CatSelectTaggingValue"
|
|
776
|
-
},
|
|
777
|
-
"CatSelectMultipleTaggingValue": {
|
|
778
|
-
"location": "local",
|
|
779
|
-
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
780
|
-
"id": "src/components/cat-select/cat-select.tsx::CatSelectMultipleTaggingValue"
|
|
590
|
+
toggleTag(item) {
|
|
591
|
+
this.isTagSelected(item.render.label) ? this.removeTag(item.render.label) : this.createTag(item.render.label);
|
|
592
|
+
}
|
|
593
|
+
initIds() {
|
|
594
|
+
let ids = [];
|
|
595
|
+
if (this.value) {
|
|
596
|
+
if (!this.tags) {
|
|
597
|
+
if (this.multiple) {
|
|
598
|
+
ids = this.value;
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
ids = [this.value];
|
|
602
|
+
}
|
|
781
603
|
}
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
"reflect": false
|
|
792
|
-
},
|
|
793
|
-
"disabled": {
|
|
794
|
-
"type": "boolean",
|
|
795
|
-
"mutable": false,
|
|
796
|
-
"complexType": {
|
|
797
|
-
"original": "boolean",
|
|
798
|
-
"resolved": "boolean",
|
|
799
|
-
"references": {}
|
|
800
|
-
},
|
|
801
|
-
"required": false,
|
|
802
|
-
"optional": false,
|
|
803
|
-
"docs": {
|
|
804
|
-
"tags": [],
|
|
805
|
-
"text": "Whether the select is disabled."
|
|
806
|
-
},
|
|
807
|
-
"attribute": "disabled",
|
|
808
|
-
"reflect": false,
|
|
809
|
-
"defaultValue": "false"
|
|
810
|
-
},
|
|
811
|
-
"placeholder": {
|
|
812
|
-
"type": "string",
|
|
813
|
-
"mutable": false,
|
|
814
|
-
"complexType": {
|
|
815
|
-
"original": "string",
|
|
816
|
-
"resolved": "string | undefined",
|
|
817
|
-
"references": {}
|
|
818
|
-
},
|
|
819
|
-
"required": false,
|
|
820
|
-
"optional": true,
|
|
821
|
-
"docs": {
|
|
822
|
-
"tags": [],
|
|
823
|
-
"text": "The placeholder text to display within the select."
|
|
824
|
-
},
|
|
825
|
-
"attribute": "placeholder",
|
|
826
|
-
"reflect": false
|
|
827
|
-
},
|
|
828
|
-
"hint": {
|
|
829
|
-
"type": "string",
|
|
830
|
-
"mutable": false,
|
|
831
|
-
"complexType": {
|
|
832
|
-
"original": "string | string[]",
|
|
833
|
-
"resolved": "string | string[] | undefined",
|
|
834
|
-
"references": {}
|
|
835
|
-
},
|
|
836
|
-
"required": false,
|
|
837
|
-
"optional": true,
|
|
838
|
-
"docs": {
|
|
839
|
-
"tags": [],
|
|
840
|
-
"text": "Optional hint text(s) to be displayed with the select."
|
|
841
|
-
},
|
|
842
|
-
"attribute": "hint",
|
|
843
|
-
"reflect": false
|
|
844
|
-
},
|
|
845
|
-
"identifier": {
|
|
846
|
-
"type": "string",
|
|
847
|
-
"mutable": false,
|
|
848
|
-
"complexType": {
|
|
849
|
-
"original": "string",
|
|
850
|
-
"resolved": "string | undefined",
|
|
851
|
-
"references": {}
|
|
852
|
-
},
|
|
853
|
-
"required": false,
|
|
854
|
-
"optional": true,
|
|
855
|
-
"docs": {
|
|
856
|
-
"tags": [],
|
|
857
|
-
"text": "A unique identifier for the input."
|
|
858
|
-
},
|
|
859
|
-
"attribute": "identifier",
|
|
860
|
-
"reflect": false
|
|
861
|
-
},
|
|
862
|
-
"label": {
|
|
863
|
-
"type": "string",
|
|
864
|
-
"mutable": false,
|
|
865
|
-
"complexType": {
|
|
866
|
-
"original": "string",
|
|
867
|
-
"resolved": "string",
|
|
868
|
-
"references": {}
|
|
869
|
-
},
|
|
870
|
-
"required": false,
|
|
871
|
-
"optional": false,
|
|
872
|
-
"docs": {
|
|
873
|
-
"tags": [],
|
|
874
|
-
"text": "The label for the select."
|
|
875
|
-
},
|
|
876
|
-
"attribute": "label",
|
|
877
|
-
"reflect": false,
|
|
878
|
-
"defaultValue": "''"
|
|
879
|
-
},
|
|
880
|
-
"name": {
|
|
881
|
-
"type": "string",
|
|
882
|
-
"mutable": false,
|
|
883
|
-
"complexType": {
|
|
884
|
-
"original": "string",
|
|
885
|
-
"resolved": "string | undefined",
|
|
886
|
-
"references": {}
|
|
887
|
-
},
|
|
888
|
-
"required": false,
|
|
889
|
-
"optional": true,
|
|
890
|
-
"docs": {
|
|
891
|
-
"tags": [],
|
|
892
|
-
"text": "The name of the form control. Submitted with the form as part of a name/value pair."
|
|
893
|
-
},
|
|
894
|
-
"attribute": "name",
|
|
895
|
-
"reflect": false
|
|
896
|
-
},
|
|
897
|
-
"labelHidden": {
|
|
898
|
-
"type": "boolean",
|
|
899
|
-
"mutable": false,
|
|
900
|
-
"complexType": {
|
|
901
|
-
"original": "boolean",
|
|
902
|
-
"resolved": "boolean",
|
|
903
|
-
"references": {}
|
|
904
|
-
},
|
|
905
|
-
"required": false,
|
|
906
|
-
"optional": false,
|
|
907
|
-
"docs": {
|
|
908
|
-
"tags": [],
|
|
909
|
-
"text": "Visually hide the label, but still show it to assistive technologies like screen readers."
|
|
910
|
-
},
|
|
911
|
-
"attribute": "label-hidden",
|
|
912
|
-
"reflect": false,
|
|
913
|
-
"defaultValue": "false"
|
|
914
|
-
},
|
|
915
|
-
"required": {
|
|
916
|
-
"type": "boolean",
|
|
917
|
-
"mutable": false,
|
|
918
|
-
"complexType": {
|
|
919
|
-
"original": "boolean",
|
|
920
|
-
"resolved": "boolean",
|
|
921
|
-
"references": {}
|
|
922
|
-
},
|
|
923
|
-
"required": false,
|
|
924
|
-
"optional": false,
|
|
925
|
-
"docs": {
|
|
926
|
-
"tags": [],
|
|
927
|
-
"text": "A value is required or must be checked for the form to be submittable."
|
|
928
|
-
},
|
|
929
|
-
"attribute": "required",
|
|
930
|
-
"reflect": false,
|
|
931
|
-
"defaultValue": "false"
|
|
932
|
-
},
|
|
933
|
-
"clearable": {
|
|
934
|
-
"type": "boolean",
|
|
935
|
-
"mutable": false,
|
|
936
|
-
"complexType": {
|
|
937
|
-
"original": "boolean",
|
|
938
|
-
"resolved": "boolean",
|
|
939
|
-
"references": {}
|
|
940
|
-
},
|
|
941
|
-
"required": false,
|
|
942
|
-
"optional": false,
|
|
943
|
-
"docs": {
|
|
944
|
-
"tags": [],
|
|
945
|
-
"text": "Whether the select should show a clear button."
|
|
946
|
-
},
|
|
947
|
-
"attribute": "clearable",
|
|
948
|
-
"reflect": false,
|
|
949
|
-
"defaultValue": "false"
|
|
950
|
-
},
|
|
951
|
-
"tags": {
|
|
952
|
-
"type": "boolean",
|
|
953
|
-
"mutable": false,
|
|
954
|
-
"complexType": {
|
|
955
|
-
"original": "boolean",
|
|
956
|
-
"resolved": "boolean",
|
|
957
|
-
"references": {}
|
|
958
|
-
},
|
|
959
|
-
"required": false,
|
|
960
|
-
"optional": false,
|
|
961
|
-
"docs": {
|
|
962
|
-
"tags": [],
|
|
963
|
-
"text": "Whether the select should add new items."
|
|
964
|
-
},
|
|
965
|
-
"attribute": "tags",
|
|
966
|
-
"reflect": false,
|
|
967
|
-
"defaultValue": "false"
|
|
968
|
-
},
|
|
969
|
-
"tagHint": {
|
|
970
|
-
"type": "string",
|
|
971
|
-
"mutable": false,
|
|
972
|
-
"complexType": {
|
|
973
|
-
"original": "string",
|
|
974
|
-
"resolved": "string | undefined",
|
|
975
|
-
"references": {}
|
|
976
|
-
},
|
|
977
|
-
"required": false,
|
|
978
|
-
"optional": true,
|
|
979
|
-
"docs": {
|
|
980
|
-
"tags": [],
|
|
981
|
-
"text": "Optional hint text to be displayed on the new item to be added."
|
|
982
|
-
},
|
|
983
|
-
"attribute": "tag-hint",
|
|
984
|
-
"reflect": false
|
|
985
|
-
},
|
|
986
|
-
"noItems": {
|
|
987
|
-
"type": "string",
|
|
988
|
-
"mutable": false,
|
|
989
|
-
"complexType": {
|
|
990
|
-
"original": "string",
|
|
991
|
-
"resolved": "string | undefined",
|
|
992
|
-
"references": {}
|
|
993
|
-
},
|
|
994
|
-
"required": false,
|
|
995
|
-
"optional": true,
|
|
996
|
-
"docs": {
|
|
997
|
-
"tags": [],
|
|
998
|
-
"text": "The text to display in the dropdown if no results are found."
|
|
999
|
-
},
|
|
1000
|
-
"attribute": "no-items",
|
|
1001
|
-
"reflect": false
|
|
1002
|
-
},
|
|
1003
|
-
"errors": {
|
|
1004
|
-
"type": "boolean",
|
|
1005
|
-
"mutable": false,
|
|
1006
|
-
"complexType": {
|
|
1007
|
-
"original": "boolean | string[] | ErrorMap",
|
|
1008
|
-
"resolved": "boolean | string[] | undefined | { [key: string]: any; }",
|
|
1009
|
-
"references": {
|
|
1010
|
-
"ErrorMap": {
|
|
1011
|
-
"location": "import",
|
|
1012
|
-
"path": "../cat-form-hint/cat-form-hint",
|
|
1013
|
-
"id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
|
|
604
|
+
else {
|
|
605
|
+
if (this.multiple) {
|
|
606
|
+
const value = this.value;
|
|
607
|
+
ids = value.ids ? value.ids : [];
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
const value = this.value;
|
|
611
|
+
ids = value.id ? [value.id] : [];
|
|
612
|
+
}
|
|
1014
613
|
}
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
"required": false,
|
|
1018
|
-
"optional": true,
|
|
1019
|
-
"docs": {
|
|
1020
|
-
"tags": [],
|
|
1021
|
-
"text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
|
|
1022
|
-
},
|
|
1023
|
-
"attribute": "errors",
|
|
1024
|
-
"reflect": false
|
|
1025
|
-
},
|
|
1026
|
-
"errorUpdate": {
|
|
1027
|
-
"type": "any",
|
|
1028
|
-
"mutable": false,
|
|
1029
|
-
"complexType": {
|
|
1030
|
-
"original": "boolean | number",
|
|
1031
|
-
"resolved": "boolean | number",
|
|
1032
|
-
"references": {}
|
|
1033
|
-
},
|
|
1034
|
-
"required": false,
|
|
1035
|
-
"optional": false,
|
|
1036
|
-
"docs": {
|
|
1037
|
-
"tags": [],
|
|
1038
|
-
"text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors on change with the given delay in milliseconds."
|
|
1039
|
-
},
|
|
1040
|
-
"attribute": "error-update",
|
|
1041
|
-
"reflect": false,
|
|
1042
|
-
"defaultValue": "0"
|
|
1043
|
-
},
|
|
1044
|
-
"nativeAttributes": {
|
|
1045
|
-
"type": "unknown",
|
|
1046
|
-
"mutable": false,
|
|
1047
|
-
"complexType": {
|
|
1048
|
-
"original": "{ [key: string]: string }",
|
|
1049
|
-
"resolved": "undefined | { [key: string]: string; }",
|
|
1050
|
-
"references": {}
|
|
1051
|
-
},
|
|
1052
|
-
"required": false,
|
|
1053
|
-
"optional": true,
|
|
1054
|
-
"docs": {
|
|
1055
|
-
"tags": [],
|
|
1056
|
-
"text": "Attributes that will be added to the native HTML input element."
|
|
1057
614
|
}
|
|
1058
|
-
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
"hasSlottedHint": {},
|
|
1067
|
-
"errorMap": {}
|
|
1068
|
-
};
|
|
1069
|
-
}
|
|
1070
|
-
static get events() {
|
|
1071
|
-
return [{
|
|
1072
|
-
"method": "catOpen",
|
|
1073
|
-
"name": "catOpen",
|
|
1074
|
-
"bubbles": true,
|
|
1075
|
-
"cancelable": true,
|
|
1076
|
-
"composed": true,
|
|
1077
|
-
"docs": {
|
|
1078
|
-
"tags": [],
|
|
1079
|
-
"text": "Emitted when the select dropdown is opened."
|
|
1080
|
-
},
|
|
1081
|
-
"complexType": {
|
|
1082
|
-
"original": "FocusEvent",
|
|
1083
|
-
"resolved": "FocusEvent",
|
|
1084
|
-
"references": {
|
|
1085
|
-
"FocusEvent": {
|
|
1086
|
-
"location": "global",
|
|
1087
|
-
"id": "global::FocusEvent"
|
|
615
|
+
return ids;
|
|
616
|
+
}
|
|
617
|
+
initTags() {
|
|
618
|
+
let tags = [];
|
|
619
|
+
if (this.value) {
|
|
620
|
+
if (this.multiple) {
|
|
621
|
+
const value = this.value;
|
|
622
|
+
tags = value.tags ? value.tags : [];
|
|
1088
623
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
"method": "catClose",
|
|
1093
|
-
"name": "catClose",
|
|
1094
|
-
"bubbles": true,
|
|
1095
|
-
"cancelable": true,
|
|
1096
|
-
"composed": true,
|
|
1097
|
-
"docs": {
|
|
1098
|
-
"tags": [],
|
|
1099
|
-
"text": "Emitted when the select dropdown is closed."
|
|
1100
|
-
},
|
|
1101
|
-
"complexType": {
|
|
1102
|
-
"original": "FocusEvent",
|
|
1103
|
-
"resolved": "FocusEvent",
|
|
1104
|
-
"references": {
|
|
1105
|
-
"FocusEvent": {
|
|
1106
|
-
"location": "global",
|
|
1107
|
-
"id": "global::FocusEvent"
|
|
624
|
+
else {
|
|
625
|
+
const value = this.value;
|
|
626
|
+
tags = value.tag ? [value.tag] : [];
|
|
1108
627
|
}
|
|
1109
|
-
}
|
|
1110
628
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
"docs": {
|
|
1118
|
-
"tags": [],
|
|
1119
|
-
"text": "Emitted when the value is changed."
|
|
1120
|
-
},
|
|
1121
|
-
"complexType": {
|
|
1122
|
-
"original": "InputEvent",
|
|
1123
|
-
"resolved": "InputEvent",
|
|
1124
|
-
"references": {
|
|
1125
|
-
"InputEvent": {
|
|
1126
|
-
"location": "global",
|
|
1127
|
-
"id": "global::InputEvent"
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
629
|
+
return tags;
|
|
630
|
+
}
|
|
631
|
+
setTransparentCaret() {
|
|
632
|
+
if (!this.multiple) {
|
|
633
|
+
this.hide();
|
|
634
|
+
this.input?.classList.add('select-input-transparent-caret');
|
|
1130
635
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
}
|
|
1149
|
-
}
|
|
636
|
+
}
|
|
637
|
+
showErrors() {
|
|
638
|
+
this.errorMap = this.errorMapSrc;
|
|
639
|
+
}
|
|
640
|
+
showErrorsIfTimeout() {
|
|
641
|
+
const errorUpdate = coerceNumber(this.errorUpdate, null);
|
|
642
|
+
if (errorUpdate !== null) {
|
|
643
|
+
typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
|
|
644
|
+
this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
|
|
645
|
+
return true;
|
|
646
|
+
}
|
|
647
|
+
return false;
|
|
648
|
+
}
|
|
649
|
+
showErrorsIfNoFocus() {
|
|
650
|
+
const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;
|
|
651
|
+
if (!hasFocus) {
|
|
652
|
+
this.showErrors();
|
|
1150
653
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
"
|
|
1167
|
-
|
|
1168
|
-
|
|
654
|
+
}
|
|
655
|
+
static get is() { return "cat-select"; }
|
|
656
|
+
static get encapsulation() { return "shadow"; }
|
|
657
|
+
static get originalStyleUrls() {
|
|
658
|
+
return {
|
|
659
|
+
"$": ["cat-select.scss"]
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
static get styleUrls() {
|
|
663
|
+
return {
|
|
664
|
+
"$": ["cat-select.css"]
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
static get properties() {
|
|
668
|
+
return {
|
|
669
|
+
"requiredMarker": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"mutable": false,
|
|
672
|
+
"complexType": {
|
|
673
|
+
"original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
|
|
674
|
+
"resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
|
|
675
|
+
"references": {}
|
|
676
|
+
},
|
|
677
|
+
"required": false,
|
|
678
|
+
"optional": true,
|
|
679
|
+
"docs": {
|
|
680
|
+
"tags": [],
|
|
681
|
+
"text": "Whether the label need a marker to shown if the select is required or optional."
|
|
682
|
+
},
|
|
683
|
+
"attribute": "required-marker",
|
|
684
|
+
"reflect": false,
|
|
685
|
+
"defaultValue": "'optional'"
|
|
686
|
+
},
|
|
687
|
+
"horizontal": {
|
|
688
|
+
"type": "boolean",
|
|
689
|
+
"mutable": false,
|
|
690
|
+
"complexType": {
|
|
691
|
+
"original": "boolean",
|
|
692
|
+
"resolved": "boolean",
|
|
693
|
+
"references": {}
|
|
694
|
+
},
|
|
695
|
+
"required": false,
|
|
696
|
+
"optional": false,
|
|
697
|
+
"docs": {
|
|
698
|
+
"tags": [],
|
|
699
|
+
"text": "Whether the label is on top or left."
|
|
700
|
+
},
|
|
701
|
+
"attribute": "horizontal",
|
|
702
|
+
"reflect": false,
|
|
703
|
+
"defaultValue": "false"
|
|
704
|
+
},
|
|
705
|
+
"multiple": {
|
|
706
|
+
"type": "boolean",
|
|
707
|
+
"mutable": false,
|
|
708
|
+
"complexType": {
|
|
709
|
+
"original": "boolean",
|
|
710
|
+
"resolved": "boolean",
|
|
711
|
+
"references": {}
|
|
712
|
+
},
|
|
713
|
+
"required": false,
|
|
714
|
+
"optional": false,
|
|
715
|
+
"docs": {
|
|
716
|
+
"tags": [],
|
|
717
|
+
"text": "Enable multiple selection."
|
|
718
|
+
},
|
|
719
|
+
"attribute": "multiple",
|
|
720
|
+
"reflect": false,
|
|
721
|
+
"defaultValue": "false"
|
|
722
|
+
},
|
|
723
|
+
"debounce": {
|
|
724
|
+
"type": "number",
|
|
725
|
+
"mutable": false,
|
|
726
|
+
"complexType": {
|
|
727
|
+
"original": "number",
|
|
728
|
+
"resolved": "number",
|
|
729
|
+
"references": {}
|
|
730
|
+
},
|
|
731
|
+
"required": false,
|
|
732
|
+
"optional": false,
|
|
733
|
+
"docs": {
|
|
734
|
+
"tags": [],
|
|
735
|
+
"text": "The debounce time for the search."
|
|
736
|
+
},
|
|
737
|
+
"attribute": "debounce",
|
|
738
|
+
"reflect": false,
|
|
739
|
+
"defaultValue": "250"
|
|
740
|
+
},
|
|
741
|
+
"placement": {
|
|
742
|
+
"type": "string",
|
|
743
|
+
"mutable": false,
|
|
744
|
+
"complexType": {
|
|
745
|
+
"original": "Placement",
|
|
746
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
747
|
+
"references": {
|
|
748
|
+
"Placement": {
|
|
749
|
+
"location": "import",
|
|
750
|
+
"path": "@floating-ui/dom",
|
|
751
|
+
"id": "../node_modules/.pnpm/@floating-ui+dom@1.5.3/node_modules/@floating-ui/dom/src/types.d.ts::Placement"
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"required": false,
|
|
756
|
+
"optional": false,
|
|
757
|
+
"docs": {
|
|
758
|
+
"tags": [],
|
|
759
|
+
"text": "The placement of the select."
|
|
760
|
+
},
|
|
761
|
+
"attribute": "placement",
|
|
762
|
+
"reflect": false,
|
|
763
|
+
"defaultValue": "'bottom-start'"
|
|
764
|
+
},
|
|
765
|
+
"value": {
|
|
766
|
+
"type": "string",
|
|
767
|
+
"mutable": true,
|
|
768
|
+
"complexType": {
|
|
769
|
+
"original": "string | string[] | CatSelectTaggingValue | CatSelectMultipleTaggingValue",
|
|
770
|
+
"resolved": "CatSelectMultipleTaggingValue | CatSelectTaggingValue | string | string[] | undefined",
|
|
771
|
+
"references": {
|
|
772
|
+
"CatSelectTaggingValue": {
|
|
773
|
+
"location": "local",
|
|
774
|
+
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
775
|
+
"id": "src/components/cat-select/cat-select.tsx::CatSelectTaggingValue"
|
|
776
|
+
},
|
|
777
|
+
"CatSelectMultipleTaggingValue": {
|
|
778
|
+
"location": "local",
|
|
779
|
+
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
780
|
+
"id": "src/components/cat-select/cat-select.tsx::CatSelectMultipleTaggingValue"
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"required": false,
|
|
785
|
+
"optional": true,
|
|
786
|
+
"docs": {
|
|
787
|
+
"tags": [],
|
|
788
|
+
"text": "The value of the select. <br />\n<br />\nThe value of the select depends on whether it is allowed to choose a single item or several items. <br />\nWhen only one item can be selected, the value is the id of the item, in case several items can be selected, the value is an array of ids of the selected items. <br />\n<br />\nIn case the user can add new items to the select (tags activated), the value in the single select is an object (CatSelectTaggingValue) with the id of the item or the name of the created item,\nin the case of multiple select, it is an object (CatSelectMultipleTaggingValue) with the array of the ids of the items selected and the array of the names of the items created"
|
|
789
|
+
},
|
|
790
|
+
"attribute": "value",
|
|
791
|
+
"reflect": false
|
|
792
|
+
},
|
|
793
|
+
"disabled": {
|
|
794
|
+
"type": "boolean",
|
|
795
|
+
"mutable": false,
|
|
796
|
+
"complexType": {
|
|
797
|
+
"original": "boolean",
|
|
798
|
+
"resolved": "boolean",
|
|
799
|
+
"references": {}
|
|
800
|
+
},
|
|
801
|
+
"required": false,
|
|
802
|
+
"optional": false,
|
|
803
|
+
"docs": {
|
|
804
|
+
"tags": [],
|
|
805
|
+
"text": "Whether the select is disabled."
|
|
806
|
+
},
|
|
807
|
+
"attribute": "disabled",
|
|
808
|
+
"reflect": false,
|
|
809
|
+
"defaultValue": "false"
|
|
810
|
+
},
|
|
811
|
+
"placeholder": {
|
|
812
|
+
"type": "string",
|
|
813
|
+
"mutable": false,
|
|
814
|
+
"complexType": {
|
|
815
|
+
"original": "string",
|
|
816
|
+
"resolved": "string | undefined",
|
|
817
|
+
"references": {}
|
|
818
|
+
},
|
|
819
|
+
"required": false,
|
|
820
|
+
"optional": true,
|
|
821
|
+
"docs": {
|
|
822
|
+
"tags": [],
|
|
823
|
+
"text": "The placeholder text to display within the select."
|
|
824
|
+
},
|
|
825
|
+
"attribute": "placeholder",
|
|
826
|
+
"reflect": false
|
|
827
|
+
},
|
|
828
|
+
"hint": {
|
|
829
|
+
"type": "string",
|
|
830
|
+
"mutable": false,
|
|
831
|
+
"complexType": {
|
|
832
|
+
"original": "string | string[]",
|
|
833
|
+
"resolved": "string | string[] | undefined",
|
|
834
|
+
"references": {}
|
|
835
|
+
},
|
|
836
|
+
"required": false,
|
|
837
|
+
"optional": true,
|
|
838
|
+
"docs": {
|
|
839
|
+
"tags": [],
|
|
840
|
+
"text": "Optional hint text(s) to be displayed with the select."
|
|
841
|
+
},
|
|
842
|
+
"attribute": "hint",
|
|
843
|
+
"reflect": false
|
|
844
|
+
},
|
|
845
|
+
"identifier": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"mutable": false,
|
|
848
|
+
"complexType": {
|
|
849
|
+
"original": "string",
|
|
850
|
+
"resolved": "string | undefined",
|
|
851
|
+
"references": {}
|
|
852
|
+
},
|
|
853
|
+
"required": false,
|
|
854
|
+
"optional": true,
|
|
855
|
+
"docs": {
|
|
856
|
+
"tags": [],
|
|
857
|
+
"text": "A unique identifier for the input."
|
|
858
|
+
},
|
|
859
|
+
"attribute": "identifier",
|
|
860
|
+
"reflect": false
|
|
861
|
+
},
|
|
862
|
+
"label": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"mutable": false,
|
|
865
|
+
"complexType": {
|
|
866
|
+
"original": "string",
|
|
867
|
+
"resolved": "string",
|
|
868
|
+
"references": {}
|
|
869
|
+
},
|
|
870
|
+
"required": false,
|
|
871
|
+
"optional": false,
|
|
872
|
+
"docs": {
|
|
873
|
+
"tags": [],
|
|
874
|
+
"text": "The label for the select."
|
|
875
|
+
},
|
|
876
|
+
"attribute": "label",
|
|
877
|
+
"reflect": false,
|
|
878
|
+
"defaultValue": "''"
|
|
879
|
+
},
|
|
880
|
+
"name": {
|
|
881
|
+
"type": "string",
|
|
882
|
+
"mutable": false,
|
|
883
|
+
"complexType": {
|
|
884
|
+
"original": "string",
|
|
885
|
+
"resolved": "string | undefined",
|
|
886
|
+
"references": {}
|
|
887
|
+
},
|
|
888
|
+
"required": false,
|
|
889
|
+
"optional": true,
|
|
890
|
+
"docs": {
|
|
891
|
+
"tags": [],
|
|
892
|
+
"text": "The name of the form control. Submitted with the form as part of a name/value pair."
|
|
893
|
+
},
|
|
894
|
+
"attribute": "name",
|
|
895
|
+
"reflect": false
|
|
1169
896
|
},
|
|
1170
|
-
"
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
897
|
+
"labelHidden": {
|
|
898
|
+
"type": "boolean",
|
|
899
|
+
"mutable": false,
|
|
900
|
+
"complexType": {
|
|
901
|
+
"original": "boolean",
|
|
902
|
+
"resolved": "boolean",
|
|
903
|
+
"references": {}
|
|
904
|
+
},
|
|
905
|
+
"required": false,
|
|
906
|
+
"optional": false,
|
|
907
|
+
"docs": {
|
|
908
|
+
"tags": [],
|
|
909
|
+
"text": "Visually hide the label, but still show it to assistive technologies like screen readers."
|
|
910
|
+
},
|
|
911
|
+
"attribute": "label-hidden",
|
|
912
|
+
"reflect": false,
|
|
913
|
+
"defaultValue": "false"
|
|
1174
914
|
},
|
|
1175
|
-
"
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
915
|
+
"required": {
|
|
916
|
+
"type": "boolean",
|
|
917
|
+
"mutable": false,
|
|
918
|
+
"complexType": {
|
|
919
|
+
"original": "boolean",
|
|
920
|
+
"resolved": "boolean",
|
|
921
|
+
"references": {}
|
|
922
|
+
},
|
|
923
|
+
"required": false,
|
|
924
|
+
"optional": false,
|
|
925
|
+
"docs": {
|
|
926
|
+
"tags": [],
|
|
927
|
+
"text": "A value is required or must be checked for the form to be submittable."
|
|
928
|
+
},
|
|
929
|
+
"attribute": "required",
|
|
930
|
+
"reflect": false,
|
|
931
|
+
"defaultValue": "false"
|
|
1179
932
|
},
|
|
1180
|
-
"
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
933
|
+
"clearable": {
|
|
934
|
+
"type": "boolean",
|
|
935
|
+
"mutable": false,
|
|
936
|
+
"complexType": {
|
|
937
|
+
"original": "boolean",
|
|
938
|
+
"resolved": "boolean",
|
|
939
|
+
"references": {}
|
|
940
|
+
},
|
|
941
|
+
"required": false,
|
|
942
|
+
"optional": false,
|
|
943
|
+
"docs": {
|
|
944
|
+
"tags": [],
|
|
945
|
+
"text": "Whether the select should show a clear button."
|
|
946
|
+
},
|
|
947
|
+
"attribute": "clearable",
|
|
948
|
+
"reflect": false,
|
|
949
|
+
"defaultValue": "false"
|
|
950
|
+
},
|
|
951
|
+
"tags": {
|
|
952
|
+
"type": "boolean",
|
|
953
|
+
"mutable": false,
|
|
954
|
+
"complexType": {
|
|
955
|
+
"original": "boolean",
|
|
956
|
+
"resolved": "boolean",
|
|
957
|
+
"references": {}
|
|
958
|
+
},
|
|
959
|
+
"required": false,
|
|
960
|
+
"optional": false,
|
|
961
|
+
"docs": {
|
|
962
|
+
"tags": [],
|
|
963
|
+
"text": "Whether the select should add new items."
|
|
964
|
+
},
|
|
965
|
+
"attribute": "tags",
|
|
966
|
+
"reflect": false,
|
|
967
|
+
"defaultValue": "false"
|
|
968
|
+
},
|
|
969
|
+
"tagHint": {
|
|
970
|
+
"type": "string",
|
|
971
|
+
"mutable": false,
|
|
972
|
+
"complexType": {
|
|
973
|
+
"original": "string",
|
|
974
|
+
"resolved": "string | undefined",
|
|
975
|
+
"references": {}
|
|
976
|
+
},
|
|
977
|
+
"required": false,
|
|
978
|
+
"optional": true,
|
|
979
|
+
"docs": {
|
|
980
|
+
"tags": [],
|
|
981
|
+
"text": "Optional hint text to be displayed on the new item to be added."
|
|
982
|
+
},
|
|
983
|
+
"attribute": "tag-hint",
|
|
984
|
+
"reflect": false
|
|
985
|
+
},
|
|
986
|
+
"noItems": {
|
|
987
|
+
"type": "string",
|
|
988
|
+
"mutable": false,
|
|
989
|
+
"complexType": {
|
|
990
|
+
"original": "string",
|
|
991
|
+
"resolved": "string | undefined",
|
|
992
|
+
"references": {}
|
|
993
|
+
},
|
|
994
|
+
"required": false,
|
|
995
|
+
"optional": true,
|
|
996
|
+
"docs": {
|
|
997
|
+
"tags": [],
|
|
998
|
+
"text": "The text to display in the dropdown if no results are found."
|
|
999
|
+
},
|
|
1000
|
+
"attribute": "no-items",
|
|
1001
|
+
"reflect": false
|
|
1002
|
+
},
|
|
1003
|
+
"errors": {
|
|
1004
|
+
"type": "boolean",
|
|
1005
|
+
"mutable": false,
|
|
1006
|
+
"complexType": {
|
|
1007
|
+
"original": "boolean | string[] | ErrorMap",
|
|
1008
|
+
"resolved": "boolean | string[] | undefined | { [key: string]: any; }",
|
|
1009
|
+
"references": {
|
|
1010
|
+
"ErrorMap": {
|
|
1011
|
+
"location": "import",
|
|
1012
|
+
"path": "../cat-form-hint/cat-form-hint",
|
|
1013
|
+
"id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"required": false,
|
|
1018
|
+
"optional": true,
|
|
1019
|
+
"docs": {
|
|
1020
|
+
"tags": [],
|
|
1021
|
+
"text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
|
|
1022
|
+
},
|
|
1023
|
+
"attribute": "errors",
|
|
1024
|
+
"reflect": false
|
|
1025
|
+
},
|
|
1026
|
+
"errorUpdate": {
|
|
1027
|
+
"type": "any",
|
|
1028
|
+
"mutable": false,
|
|
1029
|
+
"complexType": {
|
|
1030
|
+
"original": "boolean | number",
|
|
1031
|
+
"resolved": "boolean | number",
|
|
1032
|
+
"references": {}
|
|
1033
|
+
},
|
|
1034
|
+
"required": false,
|
|
1035
|
+
"optional": false,
|
|
1036
|
+
"docs": {
|
|
1037
|
+
"tags": [],
|
|
1038
|
+
"text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors on change with the given delay in milliseconds."
|
|
1039
|
+
},
|
|
1040
|
+
"attribute": "error-update",
|
|
1041
|
+
"reflect": false,
|
|
1042
|
+
"defaultValue": "0"
|
|
1043
|
+
},
|
|
1044
|
+
"nativeAttributes": {
|
|
1045
|
+
"type": "unknown",
|
|
1046
|
+
"mutable": false,
|
|
1047
|
+
"complexType": {
|
|
1048
|
+
"original": "{ [key: string]: string }",
|
|
1049
|
+
"resolved": "undefined | { [key: string]: string; }",
|
|
1050
|
+
"references": {}
|
|
1051
|
+
},
|
|
1052
|
+
"required": false,
|
|
1053
|
+
"optional": true,
|
|
1054
|
+
"docs": {
|
|
1055
|
+
"tags": [],
|
|
1056
|
+
"text": "Attributes that will be added to the native HTML input element."
|
|
1057
|
+
}
|
|
1184
1058
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
static get states() {
|
|
1062
|
+
return {
|
|
1063
|
+
"connector": {},
|
|
1064
|
+
"state": {},
|
|
1065
|
+
"hasSlottedLabel": {},
|
|
1066
|
+
"hasSlottedHint": {},
|
|
1067
|
+
"errorMap": {}
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
static get events() {
|
|
1071
|
+
return [{
|
|
1072
|
+
"method": "catOpen",
|
|
1073
|
+
"name": "catOpen",
|
|
1074
|
+
"bubbles": true,
|
|
1075
|
+
"cancelable": true,
|
|
1076
|
+
"composed": true,
|
|
1077
|
+
"docs": {
|
|
1078
|
+
"tags": [],
|
|
1079
|
+
"text": "Emitted when the select dropdown is opened."
|
|
1080
|
+
},
|
|
1081
|
+
"complexType": {
|
|
1082
|
+
"original": "FocusEvent",
|
|
1083
|
+
"resolved": "FocusEvent",
|
|
1084
|
+
"references": {
|
|
1085
|
+
"FocusEvent": {
|
|
1086
|
+
"location": "global",
|
|
1087
|
+
"id": "global::FocusEvent"
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}, {
|
|
1092
|
+
"method": "catClose",
|
|
1093
|
+
"name": "catClose",
|
|
1094
|
+
"bubbles": true,
|
|
1095
|
+
"cancelable": true,
|
|
1096
|
+
"composed": true,
|
|
1097
|
+
"docs": {
|
|
1098
|
+
"tags": [],
|
|
1099
|
+
"text": "Emitted when the select dropdown is closed."
|
|
1100
|
+
},
|
|
1101
|
+
"complexType": {
|
|
1102
|
+
"original": "FocusEvent",
|
|
1103
|
+
"resolved": "FocusEvent",
|
|
1104
|
+
"references": {
|
|
1105
|
+
"FocusEvent": {
|
|
1106
|
+
"location": "global",
|
|
1107
|
+
"id": "global::FocusEvent"
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}, {
|
|
1112
|
+
"method": "catChange",
|
|
1113
|
+
"name": "catChange",
|
|
1114
|
+
"bubbles": true,
|
|
1115
|
+
"cancelable": true,
|
|
1116
|
+
"composed": true,
|
|
1117
|
+
"docs": {
|
|
1118
|
+
"tags": [],
|
|
1119
|
+
"text": "Emitted when the value is changed."
|
|
1120
|
+
},
|
|
1121
|
+
"complexType": {
|
|
1122
|
+
"original": "InputEvent",
|
|
1123
|
+
"resolved": "InputEvent",
|
|
1124
|
+
"references": {
|
|
1125
|
+
"InputEvent": {
|
|
1126
|
+
"location": "global",
|
|
1127
|
+
"id": "global::InputEvent"
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}, {
|
|
1132
|
+
"method": "catBlur",
|
|
1133
|
+
"name": "catBlur",
|
|
1134
|
+
"bubbles": true,
|
|
1135
|
+
"cancelable": true,
|
|
1136
|
+
"composed": true,
|
|
1137
|
+
"docs": {
|
|
1138
|
+
"tags": [],
|
|
1139
|
+
"text": "Emitted when the select loses the focus."
|
|
1140
|
+
},
|
|
1141
|
+
"complexType": {
|
|
1142
|
+
"original": "FocusEvent",
|
|
1143
|
+
"resolved": "FocusEvent",
|
|
1144
|
+
"references": {
|
|
1145
|
+
"FocusEvent": {
|
|
1146
|
+
"location": "global",
|
|
1147
|
+
"id": "global::FocusEvent"
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}];
|
|
1152
|
+
}
|
|
1153
|
+
static get methods() {
|
|
1154
|
+
return {
|
|
1155
|
+
"connect": {
|
|
1156
|
+
"complexType": {
|
|
1157
|
+
"signature": "(connector: CatSelectConnector) => Promise<void>",
|
|
1158
|
+
"parameters": [{
|
|
1159
|
+
"tags": [{
|
|
1160
|
+
"name": "param",
|
|
1161
|
+
"text": "connector - The {@link CatSelectConnector } of the select."
|
|
1162
|
+
}],
|
|
1163
|
+
"text": "- The {@link CatSelectConnector} of the select."
|
|
1164
|
+
}],
|
|
1165
|
+
"references": {
|
|
1166
|
+
"Promise": {
|
|
1167
|
+
"location": "global",
|
|
1168
|
+
"id": "global::Promise"
|
|
1169
|
+
},
|
|
1170
|
+
"CatSelectConnector": {
|
|
1171
|
+
"location": "local",
|
|
1172
|
+
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
1173
|
+
"id": "src/components/cat-select/cat-select.tsx::CatSelectConnector"
|
|
1174
|
+
},
|
|
1175
|
+
"Observable": {
|
|
1176
|
+
"location": "import",
|
|
1177
|
+
"path": "rxjs",
|
|
1178
|
+
"id": "../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/types/index.d.ts::Observable"
|
|
1179
|
+
},
|
|
1180
|
+
"Item": {
|
|
1181
|
+
"location": "local",
|
|
1182
|
+
"path": "/home/runner/work/catalyst/catalyst/core/src/components/cat-select/cat-select.tsx",
|
|
1183
|
+
"id": "src/components/cat-select/cat-select.tsx::Item"
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
"return": "Promise<void>"
|
|
1187
|
+
},
|
|
1188
|
+
"docs": {
|
|
1189
|
+
"text": "Connect the functions of the select",
|
|
1190
|
+
"tags": [{
|
|
1191
|
+
"name": "param",
|
|
1192
|
+
"text": "connector - The {@link CatSelectConnector} of the select."
|
|
1193
|
+
}]
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
static get elementRef() { return "hostElement"; }
|
|
1199
|
+
static get watchers() {
|
|
1200
|
+
return [{
|
|
1201
|
+
"propName": "connector",
|
|
1202
|
+
"methodName": "onConnectorChanged"
|
|
1203
|
+
}, {
|
|
1204
|
+
"propName": "value",
|
|
1205
|
+
"methodName": "onValueChanged"
|
|
1206
|
+
}, {
|
|
1207
|
+
"propName": "errors",
|
|
1208
|
+
"methodName": "onErrorsChanged"
|
|
1209
|
+
}, {
|
|
1210
|
+
"propName": "state",
|
|
1211
|
+
"methodName": "onStateChanged"
|
|
1212
|
+
}];
|
|
1213
|
+
}
|
|
1214
|
+
static get listeners() {
|
|
1215
|
+
return [{
|
|
1216
|
+
"name": "blur",
|
|
1217
|
+
"method": "onBlur",
|
|
1218
|
+
"target": undefined,
|
|
1219
|
+
"capture": false,
|
|
1220
|
+
"passive": false
|
|
1221
|
+
}, {
|
|
1222
|
+
"name": "keydown",
|
|
1223
|
+
"method": "onKeyDown",
|
|
1224
|
+
"target": undefined,
|
|
1225
|
+
"capture": false,
|
|
1226
|
+
"passive": false
|
|
1227
|
+
}, {
|
|
1228
|
+
"name": "keyup",
|
|
1229
|
+
"method": "onKeyUp",
|
|
1230
|
+
"target": undefined,
|
|
1231
|
+
"capture": false,
|
|
1232
|
+
"passive": false
|
|
1233
|
+
}];
|
|
1234
|
+
}
|
|
1235
1235
|
}
|
|
1236
1236
|
CatSelect.SKELETON_COUNT = 4;
|
|
1237
1237
|
CatSelect.DROPDOWN_OFFSET = 4;
|