@koobiq/components 20.4.2 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion-trigger.scss +3 -10
- package/accordion/accordion.scss +4 -6
- package/actions-panel/actions-panel-container.scss +45 -1
- package/alert/alert.component.scss +3 -2
- package/app-switcher/_app-switcher-theme.scss +0 -4
- package/app-switcher/app-switcher-dropdown-app.scss +3 -2
- package/app-switcher/app-switcher-dropdown-site.scss +2 -1
- package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
- package/app-switcher/app-switcher-tokens.scss +15 -0
- package/app-switcher/app-switcher.scss +14 -4
- package/autocomplete/autocomplete.scss +7 -6
- package/badge/badge.component.scss +5 -8
- package/breadcrumbs/breadcrumbs.scss +25 -10
- package/button/_button-base.scss +30 -7
- package/button/_button-theme.scss +16 -0
- package/button/button-group.scss +7 -0
- package/button/button-tokens.scss +0 -2
- package/button/button.scss +34 -2
- package/button-toggle/_button-toggle-theme.scss +7 -2
- package/button-toggle/button-toggle.scss +65 -15
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/checkbox.scss +3 -6
- package/clamped-text/clamped-text.scss +6 -2
- package/code-block/code-block-tokens.scss +0 -224
- package/code-block/code-block.scss +20 -9
- package/content-panel/content-panel-aside.scss +3 -2
- package/content-panel/content-panel-container.scss +37 -0
- package/content-panel/content-panel.scss +4 -3
- package/core/highlight/_highlight-theme.scss +3 -1
- package/core/option/action-container.scss +2 -2
- package/core/option/action.scss +2 -1
- package/core/option/option.scss +2 -1
- package/core/pop-up/_pop-up.scss +0 -37
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
- package/core/styles/_core.scss +3 -0
- package/core/styles/_koobiq-theme.scss +5 -6
- package/core/styles/common/_animation.scss +44 -16
- package/core/styles/common/_groups-mixins.scss +21 -19
- package/core/styles/common/_groups.scss +4 -32
- package/core/styles/common/_index.scss +0 -2
- package/core/styles/common/_link.scss +117 -0
- package/core/styles/common/_list.scss +0 -26
- package/core/styles/common/_overlay.scss +8 -10
- package/core/styles/common/_rtl.scss +0 -14
- package/core/styles/common/_select.scss +33 -15
- package/core/styles/common/_squircle.scss +63 -0
- package/core/styles/common/_tokens.scss +0 -11
- package/core/styles/common/_vendor-prefixes.scss +0 -20
- package/core/styles/functions/_timing.scss +0 -22
- package/core/styles/theming/_scrollbar-theme.scss +6 -1
- package/core/styles/theming/_theming.scss +13 -65
- package/core/styles/typography/_index.scss +0 -1
- package/core/styles/typography/_typography.scss +0 -143
- package/core/styles/visual/_body.scss +1 -6
- package/core/styles/visual/_layout.scss +0 -12
- package/datepicker/calendar-body.scss +3 -1
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/datepicker-content.scss +33 -1
- package/datepicker/datepicker-toggle.scss +0 -38
- package/dl/dl-tokens.scss +10 -0
- package/dl/dl.scss +113 -13
- package/dropdown/_dropdown-theme.scss +4 -16
- package/dropdown/dropdown-item.scss +4 -10
- package/dropdown/dropdown.scss +2 -1
- package/empty-state/_empty-state-theme.scss +10 -4
- package/empty-state/empty-state-tokens.scss +4 -4
- package/empty-state/empty-state.scss +4 -0
- package/fesm2022/koobiq-components-accordion.mjs +347 -229
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +39 -39
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +46 -48
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +332 -116
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +172 -132
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +791 -609
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +260 -143
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +4342 -1595
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +73 -36
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +447 -89
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +703 -599
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +116 -60
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +550 -290
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +2871 -2595
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +79 -24
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +389 -525
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +400 -149
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +601 -459
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
- package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-link.mjs +328 -125
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +583 -433
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +55 -78
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +853 -475
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +895 -556
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +680 -310
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +684 -285
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +450 -231
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +127 -21
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +883 -693
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +207 -88
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +815 -41
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +109 -88
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
- package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +890 -501
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +63 -49
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +1062 -603
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +886 -733
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +213 -185
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +299 -147
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +233 -245
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +344 -142
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +229 -145
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +463 -143
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +177 -130
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +657 -214
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +61 -32
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +734 -488
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1700 -617
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +290 -135
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/dropzone.scss +31 -3
- package/file-upload/file-upload-tokens.scss +2 -22
- package/file-upload/file-upload.scss +6 -0
- package/file-upload/multiple-file-upload.component.scss +14 -12
- package/file-upload/single-file-upload.component.scss +3 -2
- package/filter-bar/filters.scss +7 -0
- package/filter-bar/pipes/base-pipe.scss +3 -3
- package/filter-bar/pipes/pipe-date.scss +8 -1
- package/flag/flag-tokens.scss +22 -0
- package/flag/flag.scss +34 -21
- package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
- package/form-field/_form-field-theme.scss +4 -9
- package/form-field/cleaner.scss +3 -1
- package/form-field/fieldset.scss +3 -4
- package/form-field/form-field.scss +26 -21
- package/form-field/password-toggle.scss +3 -1
- package/icon/_icon-button-theme.scss +7 -0
- package/icon/_icon-theme.scss +10 -7
- package/icon/icon-button.scss +0 -2
- package/icon/icon-tokens.scss +12 -9
- package/inline-edit/inline-edit.scss +40 -54
- package/input/input.scss +4 -0
- package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
- package/link/deprecated/link-tokens.scss +27 -0
- package/link/link-tokens.scss +6 -25
- package/link/link.scss +137 -0
- package/list/list.scss +3 -2
- package/loader-overlay/_loader-overlay-theme.scss +19 -10
- package/loader-overlay/loader-overlay-tokens.scss +0 -2
- package/loader-overlay/loader-overlay.scss +7 -1
- package/markdown/_markdown-theme.scss +16 -0
- package/markdown/markdown-tokens.scss +5 -0
- package/markdown/markdown.scss +2 -1
- package/modal/_modal-animation.scss +23 -14
- package/modal/modal-tokens.scss +2 -1
- package/modal/modal.scss +35 -31
- package/navbar/_navbar-item_horizontal.scss +8 -6
- package/navbar/_navbar-item_vertical.scss +18 -6
- package/navbar/_navbar-theme.scss +9 -1
- package/navbar/navbar-brand.scss +8 -6
- package/navbar/navbar-divider.scss +1 -1
- package/navbar/navbar-item.scss +8 -9
- package/navbar/navbar-toggle.scss +3 -3
- package/navbar/navbar-tokens.scss +14 -0
- package/navbar/navbar.scss +1 -2
- package/navbar/vertical-navbar.scss +2 -2
- package/notification-center/_notification-center-theme.scss +11 -6
- package/notification-center/notification-center-tokens.scss +33 -0
- package/notification-center/notification-center.scss +58 -20
- package/notification-center/notification-item.scss +15 -6
- package/package.json +112 -81
- package/popover/popover-tokens.scss +0 -2
- package/popover/popover.scss +41 -19
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -3
- package/progress-bar/progress-bar-tokens.scss +3 -0
- package/progress-bar/progress-bar.scss +36 -8
- package/progress-spinner/progress-spinner.scss +4 -3
- package/radio/_radio-theme.scss +21 -4
- package/radio/radio-tokens.scss +7 -3
- package/radio/radio.scss +55 -8
- package/schematics/collection.json +415 -18
- package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
- package/schematics/migrations/accordion-state-saving-default/data.cjs +75 -0
- package/schematics/migrations/accordion-state-saving-default/index.cjs +61 -0
- package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
- package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
- package/schematics/migrations/actions-panel-overlay-container/data.cjs +47 -0
- package/schematics/migrations/actions-panel-overlay-container/index.cjs +55 -0
- package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
- package/schematics/migrations/alert-signals/README.md +13 -7
- package/schematics/migrations/alert-signals/{data.js → data.cjs} +3 -0
- package/schematics/migrations/alert-signals/index.cjs +221 -0
- package/schematics/migrations/angular-animations-removal/README.md +46 -0
- package/schematics/migrations/angular-animations-removal/data.cjs +150 -0
- package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
- package/schematics/migrations/angular-animations-removal/schema.json +15 -0
- package/schematics/migrations/app-switcher-signals/README.md +88 -0
- package/schematics/migrations/app-switcher-signals/data.cjs +136 -0
- package/schematics/migrations/app-switcher-signals/index.cjs +366 -0
- package/schematics/migrations/app-switcher-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
- package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
- package/schematics/migrations/autocomplete-signals/README.md +92 -0
- package/schematics/migrations/autocomplete-signals/data.cjs +149 -0
- package/schematics/migrations/autocomplete-signals/index.cjs +707 -0
- package/schematics/migrations/autocomplete-signals/schema.json +20 -0
- package/schematics/migrations/badge-signals/README.md +77 -0
- package/schematics/migrations/badge-signals/data.cjs +109 -0
- package/schematics/migrations/badge-signals/index.cjs +694 -0
- package/schematics/migrations/badge-signals/schema.json +20 -0
- package/schematics/migrations/button-state-and-styles/README.md +129 -0
- package/schematics/migrations/button-state-and-styles/data.cjs +136 -0
- package/schematics/migrations/button-state-and-styles/index.cjs +221 -0
- package/schematics/migrations/button-state-and-styles/schema.json +20 -0
- package/schematics/migrations/button-supported-colors/README.md +73 -0
- package/schematics/migrations/button-supported-colors/data.cjs +106 -0
- package/schematics/migrations/button-supported-colors/index.cjs +261 -0
- package/schematics/migrations/button-supported-colors/schema.json +20 -0
- package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
- package/schematics/migrations/button-toggle-signals-and-aria/data.cjs +200 -0
- package/schematics/migrations/button-toggle-signals-and-aria/index.cjs +497 -0
- package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/button-truncation/README.md +110 -0
- package/schematics/migrations/button-truncation/data.cjs +88 -0
- package/schematics/migrations/button-truncation/index.cjs +270 -0
- package/schematics/migrations/button-truncation/schema.json +20 -0
- package/schematics/migrations/checkbox-signals/README.md +76 -0
- package/schematics/migrations/checkbox-signals/data.cjs +114 -0
- package/schematics/migrations/checkbox-signals/index.cjs +635 -0
- package/schematics/migrations/checkbox-signals/schema.json +20 -0
- package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
- package/schematics/migrations/clamped-text-disclosure/data.cjs +101 -0
- package/schematics/migrations/clamped-text-disclosure/index.cjs +60 -0
- package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
- package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
- package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
- package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
- package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
- package/schematics/migrations/code-block-signals/README.md +84 -0
- package/schematics/migrations/code-block-signals/data.cjs +121 -0
- package/schematics/migrations/code-block-signals/index.cjs +701 -0
- package/schematics/migrations/code-block-signals/schema.json +20 -0
- package/schematics/migrations/color-signals/README.md +46 -0
- package/schematics/migrations/color-signals/data.cjs +131 -0
- package/schematics/migrations/color-signals/index.cjs +20 -0
- package/schematics/migrations/color-signals/schema.json +20 -0
- package/schematics/migrations/core-mixins-removal/README.md +20 -0
- package/schematics/migrations/core-mixins-removal/data.cjs +27 -0
- package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
- package/schematics/migrations/core-mixins-removal/schema.json +15 -0
- package/schematics/migrations/css-selectors/README.md +2 -2
- package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
- package/schematics/migrations/datepicker-signals/README.md +24 -0
- package/schematics/migrations/datepicker-signals/data.cjs +49 -0
- package/schematics/migrations/datepicker-signals/index.cjs +18 -0
- package/schematics/migrations/datepicker-signals/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +2 -2
- package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +8 -7
- package/schematics/migrations/design-tokens-v4/README.md +75 -0
- package/schematics/migrations/design-tokens-v4/index.cjs +60 -0
- package/schematics/migrations/design-tokens-v4/schema.json +15 -0
- package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
- package/schematics/migrations/divider-signals-and-aria/data.cjs +62 -0
- package/schematics/migrations/divider-signals-and-aria/index.cjs +212 -0
- package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
- package/schematics/migrations/dl-attribute-coercion/data.cjs +85 -0
- package/schematics/migrations/dl-attribute-coercion/index.cjs +162 -0
- package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
- package/schematics/migrations/dl-standalone-names/README.md +49 -0
- package/schematics/migrations/dl-standalone-names/data.cjs +44 -0
- package/schematics/migrations/dl-standalone-names/index.cjs +322 -0
- package/schematics/migrations/dl-standalone-names/schema.json +20 -0
- package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
- package/schematics/migrations/dropdown-demote-overlay/data.cjs +84 -0
- package/schematics/migrations/dropdown-demote-overlay/index.cjs +289 -0
- package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
- package/schematics/migrations/dropdown-signals/README.md +83 -0
- package/schematics/migrations/dropdown-signals/data.cjs +152 -0
- package/schematics/migrations/dropdown-signals/index.cjs +20 -0
- package/schematics/migrations/dropdown-signals/schema.json +20 -0
- package/schematics/migrations/empty-state-error-color/README.md +84 -0
- package/schematics/migrations/empty-state-error-color/data.cjs +85 -0
- package/schematics/migrations/empty-state-error-color/index.cjs +72 -0
- package/schematics/migrations/empty-state-error-color/schema.json +15 -0
- package/schematics/migrations/empty-state-size-attr/README.md +2 -2
- package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
- package/schematics/migrations/file-upload-cva-and-primitives/data.cjs +97 -0
- package/schematics/migrations/file-upload-cva-and-primitives/index.cjs +61 -0
- package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
- package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
- package/schematics/migrations/file-upload-deprecated-outputs/data.cjs +20 -0
- package/schematics/migrations/file-upload-deprecated-outputs/index.cjs +71 -0
- package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
- package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
- package/schematics/migrations/filter-bar-rename-action/data.cjs +151 -0
- package/schematics/migrations/filter-bar-rename-action/index.cjs +178 -0
- package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
- package/schematics/migrations/filter-bar-signals/README.md +27 -16
- package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +1 -2
- package/schematics/migrations/filter-bar-signals/index.cjs +225 -0
- package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
- package/schematics/migrations/filter-bar-state-saving-default/data.cjs +87 -0
- package/schematics/migrations/filter-bar-state-saving-default/index.cjs +62 -0
- package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
- package/schematics/migrations/flag-inner-html/README.md +67 -0
- package/schematics/migrations/flag-inner-html/data.cjs +58 -0
- package/schematics/migrations/flag-inner-html/index.cjs +62 -0
- package/schematics/migrations/flag-inner-html/schema.json +15 -0
- package/schematics/migrations/form-field-signals/README.md +125 -0
- package/schematics/migrations/form-field-signals/data.cjs +288 -0
- package/schematics/migrations/form-field-signals/index.cjs +383 -0
- package/schematics/migrations/form-field-signals/schema.json +20 -0
- package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
- package/schematics/migrations/icon-semantics-and-api/data.cjs +97 -0
- package/schematics/migrations/icon-semantics-and-api/index.cjs +65 -0
- package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
- package/schematics/migrations/icons-replacement/README.md +5 -5
- package/schematics/migrations/icons-replacement/{index.js → index.cjs} +4 -3
- package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
- package/schematics/migrations/inline-edit-a11y-and-types/data.cjs +117 -0
- package/schematics/migrations/inline-edit-a11y-and-types/index.cjs +98 -0
- package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
- package/schematics/migrations/input-number-surface/README.md +140 -0
- package/schematics/migrations/input-number-surface/data.cjs +135 -0
- package/schematics/migrations/input-number-surface/index.cjs +293 -0
- package/schematics/migrations/input-number-surface/schema.json +20 -0
- package/schematics/migrations/input-signals/README.md +20 -0
- package/schematics/migrations/input-signals/data.cjs +30 -0
- package/schematics/migrations/input-signals/index.cjs +18 -0
- package/schematics/migrations/input-signals/schema.json +15 -0
- package/schematics/migrations/link-deprecated-path/README.md +144 -0
- package/schematics/migrations/link-deprecated-path/index.cjs +20 -0
- package/schematics/migrations/link-deprecated-path/schema.json +20 -0
- package/schematics/migrations/link-signals/README.md +71 -0
- package/schematics/migrations/link-signals/data.cjs +116 -0
- package/schematics/migrations/link-signals/index.cjs +416 -0
- package/schematics/migrations/link-signals/schema.json +20 -0
- package/schematics/migrations/list-signals/README.md +22 -0
- package/schematics/migrations/list-signals/data.cjs +35 -0
- package/schematics/migrations/list-signals/index.cjs +18 -0
- package/schematics/migrations/list-signals/schema.json +15 -0
- package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
- package/schematics/migrations/list-tree-multiple-input/data.cjs +74 -0
- package/schematics/migrations/list-tree-multiple-input/index.cjs +222 -0
- package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
- package/schematics/migrations/loader-overlay-signals/README.md +62 -0
- package/schematics/migrations/loader-overlay-signals/data.cjs +101 -0
- package/schematics/migrations/loader-overlay-signals/index.cjs +698 -0
- package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
- package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
- package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/locale-configuration-providers/README.md +163 -0
- package/schematics/migrations/locale-configuration-providers/data.cjs +257 -0
- package/schematics/migrations/locale-configuration-providers/index.cjs +295 -0
- package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
- package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
- package/schematics/migrations/mandatory-peer-dependencies/index.cjs +43 -0
- package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
- package/schematics/migrations/markdown-signals/README.md +58 -0
- package/schematics/migrations/markdown-signals/data.cjs +79 -0
- package/schematics/migrations/markdown-signals/index.cjs +640 -0
- package/schematics/migrations/markdown-signals/schema.json +20 -0
- package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
- package/schematics/migrations/modal-dialog-semantics/data.cjs +110 -0
- package/schematics/migrations/modal-dialog-semantics/index.cjs +59 -0
- package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
- package/schematics/migrations/modal-signals/README.md +88 -0
- package/schematics/migrations/modal-signals/data.cjs +132 -0
- package/schematics/migrations/modal-signals/index.cjs +20 -0
- package/schematics/migrations/modal-signals/schema.json +20 -0
- package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
- package/schematics/migrations/navbar-signals-and-aria/data.cjs +198 -0
- package/schematics/migrations/navbar-signals-and-aria/index.cjs +569 -0
- package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/new-icons-pack/README.md +10 -10
- package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +8 -7
- package/schematics/migrations/notification-center-signals/README.md +67 -0
- package/schematics/migrations/notification-center-signals/data.cjs +66 -0
- package/schematics/migrations/notification-center-signals/index.cjs +62 -0
- package/schematics/migrations/notification-center-signals/schema.json +15 -0
- package/schematics/migrations/option-signals/README.md +37 -0
- package/schematics/migrations/option-signals/data.cjs +86 -0
- package/schematics/migrations/option-signals/index.cjs +20 -0
- package/schematics/migrations/option-signals/schema.json +20 -0
- package/schematics/migrations/popover-leave-delay/README.md +51 -0
- package/schematics/migrations/popover-leave-delay/data.cjs +61 -0
- package/schematics/migrations/popover-leave-delay/index.cjs +55 -0
- package/schematics/migrations/popover-leave-delay/schema.json +15 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/data.cjs +76 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/index.cjs +59 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
- package/schematics/migrations/progress-spinner-signals/README.md +72 -0
- package/schematics/migrations/progress-spinner-signals/data.cjs +83 -0
- package/schematics/migrations/progress-spinner-signals/index.cjs +695 -0
- package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
- package/schematics/migrations/query-list-signals/README.md +32 -0
- package/schematics/migrations/query-list-signals/data.cjs +70 -0
- package/schematics/migrations/query-list-signals/index.cjs +18 -0
- package/schematics/migrations/query-list-signals/schema.json +15 -0
- package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
- package/schematics/migrations/radio-signals-and-aria/data.cjs +163 -0
- package/schematics/migrations/radio-signals-and-aria/index.cjs +40 -0
- package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
- package/schematics/migrations/read-state-dwell-handlers/data.cjs +45 -0
- package/schematics/migrations/read-state-dwell-handlers/index.cjs +216 -0
- package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
- package/schematics/migrations/scrollbar-deprecated-path/index.cjs +21 -0
- package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
- package/schematics/migrations/select-signal-inputs/README.md +61 -0
- package/schematics/migrations/select-signal-inputs/data.cjs +99 -0
- package/schematics/migrations/select-signal-inputs/index.cjs +58 -0
- package/schematics/migrations/select-signal-inputs/schema.json +15 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/data.cjs +111 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/index.cjs +58 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
- package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
- package/schematics/migrations/signal-inputs-subclasses/data.cjs +69 -0
- package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
- package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
- package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
- package/schematics/migrations/split-button-optional-disabled/data.cjs +53 -0
- package/schematics/migrations/split-button-optional-disabled/index.cjs +58 -0
- package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
- package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
- package/schematics/migrations/splitter-deprecated-path/index.cjs +21 -0
- package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
- package/schematics/migrations/state-saving-default/README.md +67 -0
- package/schematics/migrations/state-saving-default/data.cjs +88 -0
- package/schematics/migrations/state-saving-default/index.cjs +63 -0
- package/schematics/migrations/state-saving-default/schema.json +15 -0
- package/schematics/migrations/table-cell-content/README.md +55 -0
- package/schematics/migrations/table-cell-content/data.cjs +66 -0
- package/schematics/migrations/table-cell-content/index.cjs +67 -0
- package/schematics/migrations/table-cell-content/schema.json +15 -0
- package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
- package/schematics/migrations/tabs-signals-and-aria/data.cjs +139 -0
- package/schematics/migrations/tabs-signals-and-aria/index.cjs +66 -0
- package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/tag-list-cleaner/README.md +58 -0
- package/schematics/migrations/tag-list-cleaner/data.cjs +42 -0
- package/schematics/migrations/tag-list-cleaner/index.cjs +197 -0
- package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
- package/schematics/migrations/tag-slots/README.md +41 -0
- package/schematics/migrations/tag-slots/index.cjs +191 -0
- package/schematics/migrations/tag-slots/schema.json +20 -0
- package/schematics/migrations/tags-signals/README.md +85 -0
- package/schematics/migrations/tags-signals/data.cjs +103 -0
- package/schematics/migrations/tags-signals/index.cjs +674 -0
- package/schematics/migrations/tags-signals/schema.json +20 -0
- package/schematics/migrations/textarea-signals/README.md +72 -0
- package/schematics/migrations/textarea-signals/data.cjs +121 -0
- package/schematics/migrations/textarea-signals/index.cjs +380 -0
- package/schematics/migrations/textarea-signals/schema.json +20 -0
- package/schematics/migrations/time-range-title-for/README.md +164 -0
- package/schematics/migrations/time-range-title-for/data.cjs +139 -0
- package/schematics/migrations/time-range-title-for/index.cjs +164 -0
- package/schematics/migrations/time-range-title-for/schema.json +20 -0
- package/schematics/migrations/timepicker-signals/README.md +78 -0
- package/schematics/migrations/timepicker-signals/data.cjs +82 -0
- package/schematics/migrations/timepicker-signals/index.cjs +710 -0
- package/schematics/migrations/timepicker-signals/schema.json +20 -0
- package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
- package/schematics/migrations/timezone-grouping-utils/data.cjs +101 -0
- package/schematics/migrations/timezone-grouping-utils/index.cjs +65 -0
- package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
- package/schematics/migrations/title-encapsulation/README.md +49 -0
- package/schematics/migrations/title-encapsulation/data.cjs +69 -0
- package/schematics/migrations/title-encapsulation/index.cjs +58 -0
- package/schematics/migrations/title-encapsulation/schema.json +15 -0
- package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
- package/schematics/migrations/toast-stack-and-defaults/data.cjs +79 -0
- package/schematics/migrations/toast-stack-and-defaults/index.cjs +54 -0
- package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/data.cjs +89 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/index.cjs +61 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
- package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
- package/schematics/migrations/top-bar-container-selectors/data.cjs +56 -0
- package/schematics/migrations/top-bar-container-selectors/index.cjs +85 -0
- package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
- package/schematics/migrations/tree-select-signals/README.md +61 -0
- package/schematics/migrations/tree-select-signals/data.cjs +106 -0
- package/schematics/migrations/tree-select-signals/index.cjs +59 -0
- package/schematics/migrations/tree-select-signals/schema.json +15 -0
- package/schematics/migrations/tree-signals/README.md +82 -0
- package/schematics/migrations/tree-signals/data.cjs +123 -0
- package/schematics/migrations/tree-signals/index.cjs +55 -0
- package/schematics/migrations/tree-signals/schema.json +15 -0
- package/schematics/migrations/tree-state-saving-default/README.md +66 -0
- package/schematics/migrations/tree-state-saving-default/data.cjs +78 -0
- package/schematics/migrations/tree-state-saving-default/index.cjs +61 -0
- package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
- package/schematics/migrations/username-pipe-injection/README.md +59 -0
- package/schematics/migrations/username-pipe-injection/data.cjs +78 -0
- package/schematics/migrations/username-pipe-injection/index.cjs +59 -0
- package/schematics/migrations/username-pipe-injection/schema.json +15 -0
- package/schematics/migrations/v20-upgrade/README.md +36 -16
- package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +124 -77
- package/schematics/migrations/v20-upgrade/index.cjs +19 -0
- package/schematics/migrations/v21-upgrade/README.md +271 -0
- package/schematics/migrations/v21-upgrade/data.cjs +1371 -0
- package/schematics/migrations/v21-upgrade/index.cjs +95 -0
- package/schematics/migrations/v21-upgrade/schema.json +20 -0
- package/schematics/migrations/zoneless-change-detection/README.md +30 -0
- package/schematics/migrations/zoneless-change-detection/data.cjs +29 -0
- package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
- package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
- package/schematics/migrations.json +401 -6
- package/schematics/ng-add/index.cjs +266 -0
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
- package/schematics/utils/deprecated-path-migration.cjs +62 -0
- package/schematics/utils/html-config.cjs +148 -0
- package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
- package/schematics/utils/list-item-pattern.cjs +16 -0
- package/schematics/utils/{package-config.js → package-config.cjs} +3 -32
- package/schematics/utils/project-files.cjs +25 -0
- package/schematics/utils/replacement-driver.cjs +337 -0
- package/schematics/utils/safe-rule.cjs +23 -0
- package/schematics/utils/signal-members-migration.cjs +779 -0
- package/schematics/utils/tag-patterns.cjs +21 -0
- package/schematics/utils/template-ref-access.cjs +155 -0
- package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
- package/schematics/utils/warn-only-migration.cjs +52 -0
- package/schematics/utils/workspace-styles.cjs +123 -0
- package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
- package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
- package/scrollbar/native-scrollbar.scss +68 -0
- package/scrollbar/scrollbar-tokens.scss +13 -22
- package/scrollbar/scrollbar-track.scss +94 -0
- package/scrollbar/scrollbar-viewport.scss +33 -0
- package/scrollbar/scrollbar.scss +24 -0
- package/search-expandable/search-expandable-tokens.scss +4 -0
- package/search-expandable/search-expandable.scss +4 -2
- package/select/_select-theme.scss +3 -16
- package/select/select.scss +0 -6
- package/sidebar/sidebar.scss +20 -0
- package/sidepanel/_sidepanel-theme.scss +1 -1
- package/sidepanel/sidepanel-tokens.scss +7 -1
- package/sidepanel/sidepanel.scss +41 -5
- package/skeleton/skeleton-presets.scss +350 -0
- package/skeleton/skeleton-tokens.scss +127 -0
- package/skeleton/skeleton.scss +53 -45
- package/split-button/_split-button-theme.scss +4 -4
- package/split-button/split-button.scss +2 -6
- package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
- package/splitter/deprecated/splitter.scss +51 -0
- package/splitter/splitter-tokens.scss +19 -0
- package/splitter/splitter.scss +148 -28
- package/table/_table-theme.scss +13 -12
- package/table/table-tokens.scss +8 -0
- package/table/table.scss +47 -22
- package/tabs/_tabs-common.scss +14 -14
- package/tabs/_tabs-theme.scss +4 -5
- package/tabs/tab-body.scss +49 -1
- package/tabs/tab-header.scss +2 -1
- package/tags/tag-list.scss +4 -0
- package/tags/tag.scss +19 -1
- package/time-range/time-range.scss +9 -0
- package/timezone/timezone-option.component.scss +4 -7
- package/timezone/timezone-select.component.scss +3 -0
- package/toast/_toast-theme.scss +1 -4
- package/toast/toast-container.component.scss +19 -13
- package/toast/toast-tokens.scss +12 -6
- package/toast/toast.component.scss +42 -19
- package/toggle/_toggle-theme.scss +4 -10
- package/toggle/toggle.scss +67 -26
- package/tooltip/_tooltip-theme.scss +7 -1
- package/tooltip/tooltip-tokens.scss +1 -2
- package/tooltip/tooltip.scss +55 -9
- package/top-bar/top-bar-tokens.scss +13 -2
- package/top-bar/top-bar.scss +24 -19
- package/tree/_tree-theme.scss +0 -1
- package/tree/toggle.scss +5 -9
- package/tree/tree-option.scss +2 -4
- package/tree/tree-tokens.scss +2 -1
- package/tree/tree.scss +3 -5
- package/tree-select/_tree-select-theme.scss +4 -15
- package/tree-select/tree-select-tokens.scss +16 -0
- package/tree-select/tree-select.scss +0 -6
- package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
- package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
- package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
- package/types/koobiq-components-app-switcher.d.ts +406 -0
- package/types/koobiq-components-autocomplete.d.ts +443 -0
- package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
- package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
- package/types/koobiq-components-button-toggle.d.ts +340 -0
- package/types/koobiq-components-button.d.ts +296 -0
- package/types/koobiq-components-checkbox.d.ts +172 -0
- package/types/koobiq-components-clamped-text.d.ts +184 -0
- package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +150 -88
- package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
- package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
- package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
- package/types/koobiq-components-divider.d.ts +43 -0
- package/types/koobiq-components-dl.d.ts +235 -0
- package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
- package/types/koobiq-components-ellipsis-center.d.ts +85 -0
- package/types/koobiq-components-empty-state.d.ts +106 -0
- package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
- package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
- package/types/koobiq-components-flag.d.ts +68 -0
- package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
- package/types/koobiq-components-icon.d.ts +333 -0
- package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
- package/types/koobiq-components-input.d.ts +477 -0
- package/types/koobiq-components-link-deprecated.d.ts +101 -0
- package/types/koobiq-components-link.d.ts +176 -0
- package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
- package/types/koobiq-components-loader-overlay.d.ts +101 -0
- package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
- package/types/koobiq-components-modal.d.ts +666 -0
- package/types/koobiq-components-navbar.d.ts +569 -0
- package/types/koobiq-components-notification-center.d.ts +500 -0
- package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
- package/types/koobiq-components-popover.d.ts +468 -0
- package/types/koobiq-components-progress-bar.d.ts +67 -0
- package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
- package/types/koobiq-components-radio.d.ts +294 -0
- package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
- package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
- package/types/koobiq-components-scrollbar.d.ts +154 -0
- package/types/koobiq-components-search-expandable.d.ts +164 -0
- package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
- package/types/koobiq-components-sidebar.d.ts +152 -0
- package/types/koobiq-components-sidepanel.d.ts +436 -0
- package/types/koobiq-components-skeleton.d.ts +234 -0
- package/types/koobiq-components-split-button.d.ts +65 -0
- package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
- package/types/koobiq-components-splitter.d.ts +406 -0
- package/types/koobiq-components-table.d.ts +44 -0
- package/types/koobiq-components-tabs.d.ts +888 -0
- package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
- package/types/koobiq-components-textarea.d.ts +178 -0
- package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
- package/types/koobiq-components-timepicker.d.ts +223 -0
- package/types/koobiq-components-timezone.d.ts +266 -0
- package/types/koobiq-components-title.d.ts +184 -0
- package/types/koobiq-components-toast.d.ts +289 -0
- package/types/koobiq-components-toggle.d.ts +121 -0
- package/types/koobiq-components-tooltip.d.ts +610 -0
- package/types/koobiq-components-top-bar.d.ts +61 -0
- package/types/koobiq-components-tree-select.d.ts +670 -0
- package/types/koobiq-components-tree.d.ts +1339 -0
- package/types/koobiq-components-username.d.ts +340 -0
- package/username/_username-theme.scss +35 -0
- package/username/username.scss +10 -34
- package/app-switcher/index.d.ts +0 -276
- package/autocomplete/index.d.ts +0 -286
- package/button/index.d.ts +0 -153
- package/button-toggle/index.d.ts +0 -162
- package/checkbox/index.d.ts +0 -163
- package/clamped-text/index.d.ts +0 -146
- package/core/styles/_tokens.scss +0 -7
- package/core/styles/common/_clearfix.scss +0 -13
- package/core/styles/common/_popup.scss +0 -6
- package/core/styles/functions/_index.scss +0 -3
- package/core/styles/functions/_number.scss +0 -60
- package/core/styles/functions/_string.scss +0 -18
- package/core/styles/theming/scrollbar-tokens.scss +0 -25
- package/core/styles/typography/_typography-utils.scss +0 -84
- package/divider/index.d.ts +0 -20
- package/dl/index.d.ts +0 -45
- package/ellipsis-center/index.d.ts +0 -71
- package/empty-state/index.d.ts +0 -45
- package/flag/index.d.ts +0 -44
- package/icon/index.d.ts +0 -200
- package/input/index.d.ts +0 -354
- package/link/index.d.ts +0 -56
- package/loader-overlay/index.d.ts +0 -57
- package/modal/index.d.ts +0 -339
- package/navbar/index.d.ts +0 -372
- package/notification-center/index.d.ts +0 -323
- package/popover/index.d.ts +0 -182
- package/prebuilt-themes/dark-theme.css +0 -1
- package/prebuilt-themes/light-theme.css +0 -1
- package/progress-bar/index.d.ts +0 -31
- package/radio/index.d.ts +0 -203
- package/schematics/migrations/alert-signals/index.js +0 -353
- package/schematics/migrations/filter-bar-signals/index.js +0 -319
- package/schematics/migrations/v20-upgrade/index.js +0 -225
- package/schematics/ng-add/index.js +0 -39
- package/search-expandable/index.d.ts +0 -101
- package/sidebar/index.d.ts +0 -94
- package/sidepanel/index.d.ts +0 -272
- package/skeleton/index.d.ts +0 -26
- package/split-button/index.d.ts +0 -46
- package/table/index.d.ts +0 -25
- package/tabs/index.d.ts +0 -677
- package/textarea/index.d.ts +0 -138
- package/timepicker/index.d.ts +0 -197
- package/timezone/index.d.ts +0 -125
- package/title/index.d.ts +0 -139
- package/toast/index.d.ts +0 -178
- package/toggle/index.d.ts +0 -104
- package/tooltip/index.d.ts +0 -335
- package/top-bar/index.d.ts +0 -33
- package/tree/index.d.ts +0 -802
- package/tree-select/index.d.ts +0 -475
- package/username/index.d.ts +0 -194
- /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
- /package/schematics/utils/{ast.js → ast.cjs} +0 -0
- /package/schematics/utils/{messages.js → messages.cjs} +0 -0
- /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
- /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
|
@@ -1,22 +1,299 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _IdGenerator, FocusMonitor } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
3
|
+
import { InjectionToken, inject, ElementRef, signal, input, computed, output, booleanAttribute, untracked, Directive, ChangeDetectorRef, DestroyRef, Injector, contentChild, viewChild, contentChildren, forwardRef, afterNextRender, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, numberAttribute, linkedSignal, NgModule } from '@angular/core';
|
|
5
4
|
import { KbqAutocompleteTrigger } from '@koobiq/components/autocomplete';
|
|
6
5
|
import * as i1 from '@koobiq/components/core';
|
|
7
|
-
import {
|
|
8
|
-
import { KbqCleaner, KbqFormFieldControl,
|
|
9
|
-
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
6
|
+
import { ENTER, TAB, SPACE, COMMA, SEMICOLON, kbqInjectAutofilled, ESCAPE, hasModifierKey, KbqFieldSizingContent, KbqColorDirective, kbqAnimationsDisabled, KbqComponentColors, isNull, KBQ_TITLE_TEXT_REF, KbqLocaleOverridesDirective, kbqInjectA11yLocaleConfiguration, runClearPredicate, ErrorStateMatcher, KbqErrorStateTracker, kbqQueryListFrom, FocusKeyManager, kbqLeaveTabOrderOnTabOut, isSelectAll } from '@koobiq/components/core';
|
|
7
|
+
import { KbqTrim, KbqCleaner, KbqFormFieldControl, kbqCleanerFactoryProvider } from '@koobiq/components/form-field';
|
|
10
8
|
import { Directionality } from '@angular/cdk/bidi';
|
|
11
9
|
import * as i2 from '@angular/cdk/drag-drop';
|
|
12
10
|
import { CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
|
|
13
|
-
import { DELETE, SPACE, BACKSPACE, ENTER, ESCAPE, F2, LEFT_ARROW, RIGHT_ARROW, TAB, HOME, END } from '@angular/cdk/keycodes';
|
|
11
|
+
import { DELETE, SPACE as SPACE$1, BACKSPACE, ENTER as ENTER$1, ESCAPE as ESCAPE$1, F2, LEFT_ARROW, RIGHT_ARROW, TAB as TAB$1, HOME, END } from '@angular/cdk/keycodes';
|
|
14
12
|
import { takeUntilDestroyed, outputToObservable } from '@angular/core/rxjs-interop';
|
|
13
|
+
import { NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
15
14
|
import { Subject, merge } from 'rxjs';
|
|
16
15
|
import { startWith, takeUntil, filter } from 'rxjs/operators';
|
|
17
16
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
18
17
|
import { PlatformModule } from '@angular/cdk/platform';
|
|
19
18
|
|
|
19
|
+
const KBQ_TAG_INPUT_DEFAULT_SEPARATORS = [
|
|
20
|
+
{ symbol: /\r?\n/, key: 'Enter', keyCode: ENTER },
|
|
21
|
+
{ symbol: /\t/, key: 'Tab', keyCode: TAB },
|
|
22
|
+
{ symbol: / /, key: ' ', keyCode: SPACE },
|
|
23
|
+
{ symbol: /,/, key: ',', keyCode: COMMA },
|
|
24
|
+
{ symbol: /;/, key: ';', keyCode: SEMICOLON }
|
|
25
|
+
];
|
|
26
|
+
const KBQ_TAGS_DEFAULT_OPTIONS_CONFIG = { separatorKeyCodes: [ENTER] };
|
|
27
|
+
/** Injection token to be used to override the default options. */
|
|
28
|
+
const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken('kbq-tags-default-options', {
|
|
29
|
+
providedIn: 'root',
|
|
30
|
+
factory: () => KBQ_TAGS_DEFAULT_OPTIONS_CONFIG
|
|
31
|
+
});
|
|
32
|
+
/** Utility provider for `KBQ_TAGS_DEFAULT_OPTIONS`. */
|
|
33
|
+
const kbqTagsDefaultOptionsProvider = (options) => ({
|
|
34
|
+
provide: KBQ_TAGS_DEFAULT_OPTIONS,
|
|
35
|
+
useValue: { ...KBQ_TAGS_DEFAULT_OPTIONS_CONFIG, ...options }
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Directive that adds tag-specific behaviors to an input element inside `<kbq-form-field>`.
|
|
39
|
+
* May be placed inside or outside of an `<kbq-tag-list>`.
|
|
40
|
+
*/
|
|
41
|
+
class KbqTagInput {
|
|
42
|
+
/** Whether the input is disabled. */
|
|
43
|
+
get disabled() {
|
|
44
|
+
return this._disabled() || (this._tagList && this._tagList.disabled());
|
|
45
|
+
}
|
|
46
|
+
set disabled(value) {
|
|
47
|
+
this._disabled.set(value);
|
|
48
|
+
}
|
|
49
|
+
constructor() {
|
|
50
|
+
this.elementRef = inject(ElementRef);
|
|
51
|
+
this.defaultOptions = inject(KBQ_TAGS_DEFAULT_OPTIONS);
|
|
52
|
+
this.trimDirective = inject(KbqTrim, { optional: true, self: true });
|
|
53
|
+
/**
|
|
54
|
+
* The autocomplete trigger attached to the input, if any.
|
|
55
|
+
*
|
|
56
|
+
* @docs-private
|
|
57
|
+
*/
|
|
58
|
+
this.autocompleteTrigger = inject(KbqAutocompleteTrigger, { optional: true, self: true });
|
|
59
|
+
this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
|
|
60
|
+
/**
|
|
61
|
+
* Whether the control is focused.
|
|
62
|
+
*
|
|
63
|
+
* @docs-private
|
|
64
|
+
*/
|
|
65
|
+
this.focused = this.focusedValue.asReadonly();
|
|
66
|
+
/** Whether the control's value was filled in by the browser. */
|
|
67
|
+
this.autofilled = kbqInjectAutofilled();
|
|
68
|
+
/**
|
|
69
|
+
* The list of key codes that will trigger a tagEnd event.
|
|
70
|
+
*
|
|
71
|
+
* Defaults to `[ENTER]`.
|
|
72
|
+
*/
|
|
73
|
+
this.separatorKeyCodes = input(this.defaultOptions.separatorKeyCodes, { ...(ngDevMode ? { debugName: "separatorKeyCodes" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputSeparatorKeyCodes',
|
|
74
|
+
transform: (value) => value ?? [] });
|
|
75
|
+
this.allSeparators = this.defaultOptions.separators || KBQ_TAG_INPUT_DEFAULT_SEPARATORS;
|
|
76
|
+
/**
|
|
77
|
+
* The effective set of separators: entries gated by `keyCode` are included only when that
|
|
78
|
+
* code is present in `separatorKeyCodes`; entries without a `keyCode` (no single-keystroke
|
|
79
|
+
* equivalent, e.g. a run of whitespace) are always included.
|
|
80
|
+
*
|
|
81
|
+
* @docs-private
|
|
82
|
+
*/
|
|
83
|
+
this.separators = computed(() => this.allSeparators.filter((separator) => separator.keyCode === undefined || this.separatorKeyCodes().includes(separator.keyCode)), ...(ngDevMode ? [{ debugName: "separators" }] : /* istanbul ignore next */ []));
|
|
84
|
+
/** Emitted when a tag is to be added. */
|
|
85
|
+
this.tagEnd = output({ alias: 'kbqTagInputTokenEnd' });
|
|
86
|
+
/** A value indicating whether allow/prevent tags duplication */
|
|
87
|
+
this.distinct = input(false, { ...(ngDevMode ? { debugName: "distinct" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
88
|
+
/** The input's placeholder text. */
|
|
89
|
+
this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
90
|
+
/** Unique id for the input. */
|
|
91
|
+
this.id = input(inject(_IdGenerator).getId('kbq-tag-list-input-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
92
|
+
/** Register input for tag list. */
|
|
93
|
+
this.tagList = input(undefined, { ...(ngDevMode ? { debugName: "tagList" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputFor' });
|
|
94
|
+
/**
|
|
95
|
+
* Whether or not the tagEnd event will be emitted when the input is blurred.
|
|
96
|
+
*/
|
|
97
|
+
this.addOnBlur = input(true, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputAddOnBlur', transform: booleanAttribute });
|
|
98
|
+
/**
|
|
99
|
+
* Whether the tagEnd event will be emitted when the text pasted. Defaults to `addOnPaste` of
|
|
100
|
+
* `KBQ_TAGS_DEFAULT_OPTIONS`, or `true`.
|
|
101
|
+
*/
|
|
102
|
+
this.addOnPaste = input(this.defaultOptions.addOnPaste ?? true, { ...(ngDevMode ? { debugName: "addOnPaste" } : /* istanbul ignore next */ {}), alias: 'kbqTagInputAddOnPaste',
|
|
103
|
+
transform: booleanAttribute });
|
|
104
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
105
|
+
this.emptyValue = signal(true, ...(ngDevMode ? [{ debugName: "emptyValue" }] : /* istanbul ignore next */ []));
|
|
106
|
+
/** Whether the input is empty. */
|
|
107
|
+
this.empty = this.emptyValue.asReadonly();
|
|
108
|
+
/** @docs-private */
|
|
109
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
110
|
+
transform: booleanAttribute });
|
|
111
|
+
this.inputElement = this.elementRef.nativeElement;
|
|
112
|
+
}
|
|
113
|
+
ngOnChanges(changes) {
|
|
114
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
115
|
+
if (changes['disabledInput']) {
|
|
116
|
+
const disabled = this.disabledInput();
|
|
117
|
+
if (disabled !== undefined)
|
|
118
|
+
this.disabled = disabled;
|
|
119
|
+
}
|
|
120
|
+
const tagList = this.tagList();
|
|
121
|
+
// Registered here rather than in an effect or a computed. The tag list has no content query for its
|
|
122
|
+
// input and learns of it only through `registerInput()`, which has to land before the list's host
|
|
123
|
+
// bindings read the input on the first pass, and an effect runs after this hook. And
|
|
124
|
+
// `registerInput()` writes a signal, which a computed rejects with NG0600.
|
|
125
|
+
if (tagList && tagList !== this._tagList) {
|
|
126
|
+
this._tagList = tagList;
|
|
127
|
+
tagList.registerInput(this);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
ngDoCheck() {
|
|
131
|
+
// The value changes without notice: the consumer clears the input once a tag is added.
|
|
132
|
+
this.emptyValue.set(!this.inputElement.value);
|
|
133
|
+
}
|
|
134
|
+
/** @docs-private */
|
|
135
|
+
onKeydown(event) {
|
|
136
|
+
const isSeparatorKey = this.matchesInputSeparator(event);
|
|
137
|
+
if (!this.inputElement.value) {
|
|
138
|
+
if (isSeparatorKey && event.keyCode !== TAB) {
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
}
|
|
141
|
+
this._tagList.keydown(event);
|
|
142
|
+
// The tag list ignores Escape, and an autocomplete panel, which hears the key on `body`, or a dialog
|
|
143
|
+
// around the field still has to get it.
|
|
144
|
+
if (event.keyCode !== ESCAPE) {
|
|
145
|
+
event.stopPropagation();
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (isSeparatorKey) {
|
|
150
|
+
if (event.keyCode === ENTER &&
|
|
151
|
+
this.autocompleteTrigger?.panelOpen &&
|
|
152
|
+
this.autocompleteTrigger?.activeOption) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this.emitTagEnd();
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Checks to see if the blur should emit the (tagEnd) event.
|
|
161
|
+
*
|
|
162
|
+
* @docs-private
|
|
163
|
+
*/
|
|
164
|
+
blur(event) {
|
|
165
|
+
this.focusedValue.set(false);
|
|
166
|
+
// Blur the tag list if it is not focused
|
|
167
|
+
if (!this._tagList.focused()) {
|
|
168
|
+
this._tagList.blur();
|
|
169
|
+
}
|
|
170
|
+
// Chromium fires `blur` synchronously when the input becomes disabled, so without this
|
|
171
|
+
// guard disabling a focused tag input would append whatever was typed.
|
|
172
|
+
if (!this.disabled && this.addOnBlur() && (this.autocompleteTrigger?.onInputBlur()(event) ?? true)) {
|
|
173
|
+
this.emitTagEnd();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Checks to see if the (tagEnd) event needs to be emitted.
|
|
178
|
+
*
|
|
179
|
+
* @docs-private
|
|
180
|
+
*/
|
|
181
|
+
emitTagEnd() {
|
|
182
|
+
// Untracked: called from a consumer's `effect()`, the tags read here would make it run again on every change.
|
|
183
|
+
untracked(() => this.addTag(this.trimValue(this.inputElement.value), this.existingTagValues()));
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Whether the current input value duplicates an existing tag.
|
|
187
|
+
*
|
|
188
|
+
* @docs-private
|
|
189
|
+
*/
|
|
190
|
+
get hasDuplicates() {
|
|
191
|
+
return this.tagValues().has(this.trimValue(this.inputElement.value));
|
|
192
|
+
}
|
|
193
|
+
/** @docs-private */
|
|
194
|
+
onInput() {
|
|
195
|
+
this.emptyValue.set(!this.inputElement.value);
|
|
196
|
+
}
|
|
197
|
+
/** @docs-private */
|
|
198
|
+
onPaste($event) {
|
|
199
|
+
if (!$event.clipboardData) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const data = $event.clipboardData.getData('text');
|
|
203
|
+
if (!data || !this.addOnPaste()) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const separatorsInString = this.getPasteSeparatorPatterns(data);
|
|
207
|
+
// prettier-ignore
|
|
208
|
+
const dividedString = separatorsInString.length > 0 ?
|
|
209
|
+
[...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
|
|
210
|
+
[data];
|
|
211
|
+
// Built once per paste, then updated as items are accepted, so a batch also dedupes
|
|
212
|
+
// against itself — `tags` is a QueryList that cannot refresh between iterations.
|
|
213
|
+
const existingValues = this.existingTagValues();
|
|
214
|
+
dividedString.forEach((item) => this.addTag(this.trimValue(item), existingValues));
|
|
215
|
+
$event.preventDefault();
|
|
216
|
+
$event.stopPropagation();
|
|
217
|
+
}
|
|
218
|
+
/** @docs-private */
|
|
219
|
+
onFocus() {
|
|
220
|
+
this.focusedValue.set(true);
|
|
221
|
+
this._tagList.unselectAll();
|
|
222
|
+
}
|
|
223
|
+
/** Focuses the input. */
|
|
224
|
+
focus() {
|
|
225
|
+
this.inputElement.focus();
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Implemented as part of KbqTagTextControl.
|
|
229
|
+
*
|
|
230
|
+
* @docs-private
|
|
231
|
+
*/
|
|
232
|
+
suppressAutocompleteOnNextFocus() {
|
|
233
|
+
this.autocompleteTrigger?.suppressOpenOnNextFocus();
|
|
234
|
+
}
|
|
235
|
+
getPasteSeparatorPatterns(value) {
|
|
236
|
+
return this.separators()
|
|
237
|
+
.filter((separator) => (!separator.appliesTo || separator.appliesTo.includes('paste')) &&
|
|
238
|
+
value.search(separator.symbol) > -1)
|
|
239
|
+
.map((separator) => separator.symbol.source);
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Single path for adding a tag, shared by typed input, blur and paste.
|
|
243
|
+
* `existingValues` is `null` unless `distinct` is on, and is mutated as values are accepted.
|
|
244
|
+
*/
|
|
245
|
+
addTag(value, existingValues) {
|
|
246
|
+
if (existingValues) {
|
|
247
|
+
if (existingValues.has(value))
|
|
248
|
+
return;
|
|
249
|
+
existingValues.add(value);
|
|
250
|
+
}
|
|
251
|
+
// An empty value adds nothing, so latching the flag here would make the next
|
|
252
|
+
// programmatic tags update look UI-initiated.
|
|
253
|
+
if (value) {
|
|
254
|
+
this._tagList?.notifyPendingTagChange();
|
|
255
|
+
}
|
|
256
|
+
this.tagEnd.emit({ input: this.inputElement, value });
|
|
257
|
+
}
|
|
258
|
+
/** Values to dedupe against, or `null` when duplicates are allowed. */
|
|
259
|
+
existingTagValues() {
|
|
260
|
+
return this.distinct() ? this.tagValues() : null;
|
|
261
|
+
}
|
|
262
|
+
tagValues() {
|
|
263
|
+
return new Set(this._tagList.tags.map(({ value }) => value));
|
|
264
|
+
}
|
|
265
|
+
trimValue(value) {
|
|
266
|
+
return (this.trimDirective ? this.trimDirective.trim(value) : value);
|
|
267
|
+
}
|
|
268
|
+
/** Checks whether a keydown event matches a separator that applies to typed input. */
|
|
269
|
+
matchesInputSeparator(event) {
|
|
270
|
+
return this.separators().some((separator) => separator.key === event.key &&
|
|
271
|
+
!hasModifierKey(event) &&
|
|
272
|
+
(!separator.appliesTo || separator.appliesTo.includes('input')));
|
|
273
|
+
}
|
|
274
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
275
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTagInput, isStandalone: true, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: { classPropertyName: "separatorKeyCodes", publicName: "kbqTagInputSeparatorKeyCodes", isSignal: true, isRequired: false, transformFunction: null }, distinct: { classPropertyName: "distinct", publicName: "distinct", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tagList: { classPropertyName: "tagList", publicName: "kbqTagInputFor", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "kbqTagInputAddOnBlur", isSignal: true, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "kbqTagInputAddOnPaste", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tagEnd: "kbqTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur($event)", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id()", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder() || null" }, classAttribute: "kbq-tag-input" }, exportAs: ["kbqTagInput", "kbqTagInputFor"], usesOnChanges: true, hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
276
|
+
}
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagInput, decorators: [{
|
|
278
|
+
type: Directive,
|
|
279
|
+
args: [{
|
|
280
|
+
selector: 'input[kbqTagInputFor]',
|
|
281
|
+
host: {
|
|
282
|
+
class: 'kbq-tag-input',
|
|
283
|
+
'[id]': 'id()',
|
|
284
|
+
'[attr.disabled]': 'disabled || null',
|
|
285
|
+
'[attr.placeholder]': 'placeholder() || null',
|
|
286
|
+
'(keydown)': 'onKeydown($event)',
|
|
287
|
+
'(blur)': 'blur($event)',
|
|
288
|
+
'(focus)': 'onFocus()',
|
|
289
|
+
'(input)': 'onInput()',
|
|
290
|
+
'(paste)': 'onPaste($event)'
|
|
291
|
+
},
|
|
292
|
+
hostDirectives: [KbqFieldSizingContent],
|
|
293
|
+
exportAs: 'kbqTagInput, kbqTagInputFor'
|
|
294
|
+
}]
|
|
295
|
+
}], ctorParameters: () => [], propDecorators: { separatorKeyCodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputSeparatorKeyCodes", required: false }] }], tagEnd: [{ type: i0.Output, args: ["kbqTagInputTokenEnd"] }], distinct: [{ type: i0.Input, args: [{ isSignal: true, alias: "distinct", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tagList: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputFor", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnBlur", required: false }] }], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnPaste", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
296
|
+
|
|
20
297
|
/**
|
|
21
298
|
* Event object emitted by KbqTag when the tag is edited.
|
|
22
299
|
*/
|
|
@@ -41,13 +318,14 @@ const getTagEditInputMissingError = () => {
|
|
|
41
318
|
};
|
|
42
319
|
/**
|
|
43
320
|
* Dummy directive to add CSS class to tag avatar.
|
|
321
|
+
*
|
|
44
322
|
* @docs-private
|
|
45
323
|
*/
|
|
46
324
|
class KbqTagAvatar {
|
|
47
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
325
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
326
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagAvatar, isStandalone: true, selector: "kbq-tag-avatar, [kbqTagAvatar]", host: { classAttribute: "kbq-tag-avatar" }, ngImport: i0 }); }
|
|
49
327
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagAvatar, decorators: [{
|
|
51
329
|
type: Directive,
|
|
52
330
|
args: [{
|
|
53
331
|
selector: 'kbq-tag-avatar, [kbqTagAvatar]',
|
|
@@ -56,19 +334,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
56
334
|
}] });
|
|
57
335
|
/**
|
|
58
336
|
* Dummy directive to add CSS class to tag trailing icon.
|
|
337
|
+
*
|
|
59
338
|
* @docs-private
|
|
60
339
|
*/
|
|
61
340
|
class KbqTagTrailingIcon {
|
|
62
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
63
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
341
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
342
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagTrailingIcon, isStandalone: true, selector: "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", host: { classAttribute: "kbq-tag-trailing-icon" }, ngImport: i0 }); }
|
|
64
343
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagTrailingIcon, decorators: [{
|
|
66
345
|
type: Directive,
|
|
67
346
|
args: [{
|
|
68
347
|
selector: 'kbq-tag-trailing-icon, [kbqTagTrailingIcon]',
|
|
69
348
|
host: { class: 'kbq-tag-trailing-icon' }
|
|
70
349
|
}]
|
|
71
350
|
}] });
|
|
351
|
+
/** Marks content to be projected into the prefix (leading) slot of a tag. */
|
|
352
|
+
class KbqTagPrefix {
|
|
353
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
354
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagPrefix, isStandalone: true, selector: "[kbqTagPrefix]", host: { classAttribute: "kbq-tag-prefix" }, ngImport: i0 }); }
|
|
355
|
+
}
|
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagPrefix, decorators: [{
|
|
357
|
+
type: Directive,
|
|
358
|
+
args: [{
|
|
359
|
+
selector: '[kbqTagPrefix]',
|
|
360
|
+
host: {
|
|
361
|
+
class: 'kbq-tag-prefix'
|
|
362
|
+
}
|
|
363
|
+
}]
|
|
364
|
+
}] });
|
|
365
|
+
/** Marks content to be projected into the suffix (trailing) slot of a tag. */
|
|
366
|
+
class KbqTagSuffix {
|
|
367
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
368
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagSuffix, isStandalone: true, selector: "[kbqTagSuffix]", host: { classAttribute: "kbq-tag-suffix" }, ngImport: i0 }); }
|
|
369
|
+
}
|
|
370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagSuffix, decorators: [{
|
|
371
|
+
type: Directive,
|
|
372
|
+
args: [{
|
|
373
|
+
selector: '[kbqTagSuffix]',
|
|
374
|
+
host: {
|
|
375
|
+
class: 'kbq-tag-suffix'
|
|
376
|
+
}
|
|
377
|
+
}]
|
|
378
|
+
}] });
|
|
72
379
|
/**
|
|
73
380
|
* Directive to add submit behavior for the editable tag.
|
|
74
381
|
*/
|
|
@@ -77,10 +384,10 @@ class KbqTagEditSubmit {
|
|
|
77
384
|
/** @docs-private */
|
|
78
385
|
this.tag = inject(KbqTag);
|
|
79
386
|
}
|
|
80
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
81
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
387
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
388
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagEditSubmit, isStandalone: true, selector: "[kbqTagEditSubmit]", host: { listeners: { "click": "tag.submitEditing(\"click\")" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-edit-submit" }, exportAs: ["kbqTagEditSubmit"], hostDirectives: [{ directive: KbqTagSuffix }], ngImport: i0 }); }
|
|
82
389
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditSubmit, decorators: [{
|
|
84
391
|
type: Directive,
|
|
85
392
|
args: [{
|
|
86
393
|
selector: '[kbqTagEditSubmit]',
|
|
@@ -89,6 +396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
89
396
|
'[attr.tabindex]': '-1',
|
|
90
397
|
'(click)': 'tag.submitEditing("click")'
|
|
91
398
|
},
|
|
399
|
+
hostDirectives: [KbqTagSuffix],
|
|
92
400
|
exportAs: 'kbqTagEditSubmit'
|
|
93
401
|
}]
|
|
94
402
|
}] });
|
|
@@ -106,19 +414,19 @@ class KbqTagEditInput {
|
|
|
106
414
|
/** @docs-private */
|
|
107
415
|
handleKeydown(event) {
|
|
108
416
|
switch (event.keyCode) {
|
|
109
|
-
case ESCAPE: {
|
|
417
|
+
case ESCAPE$1: {
|
|
110
418
|
event.stopPropagation();
|
|
111
419
|
this.tag.cancelEditing('escape');
|
|
112
420
|
break;
|
|
113
421
|
}
|
|
114
|
-
case ENTER: {
|
|
422
|
+
case ENTER$1: {
|
|
115
423
|
event.stopPropagation();
|
|
116
424
|
this.tag.submitEditing('enter');
|
|
117
425
|
break;
|
|
118
426
|
}
|
|
119
427
|
// We should prevent KbqTag from receiving these keydown events
|
|
120
428
|
case BACKSPACE:
|
|
121
|
-
case SPACE:
|
|
429
|
+
case SPACE$1:
|
|
122
430
|
case DELETE: {
|
|
123
431
|
event.stopPropagation();
|
|
124
432
|
break;
|
|
@@ -126,10 +434,10 @@ class KbqTagEditInput {
|
|
|
126
434
|
default:
|
|
127
435
|
}
|
|
128
436
|
}
|
|
129
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
130
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
437
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
438
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
131
439
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagEditInput, decorators: [{
|
|
133
441
|
type: Directive,
|
|
134
442
|
args: [{
|
|
135
443
|
selector: '[kbqTagEditInput]',
|
|
@@ -143,27 +451,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
143
451
|
}]
|
|
144
452
|
}] });
|
|
145
453
|
class KbqTag extends KbqColorDirective {
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this._editable = value;
|
|
154
|
-
}
|
|
155
|
-
/** Whether the tag is selected. */
|
|
156
|
-
// TODO: Skipped for migration because:
|
|
157
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
158
|
-
get selected() {
|
|
159
|
-
return this._selected;
|
|
454
|
+
/**
|
|
455
|
+
* Whether the tag has focus.
|
|
456
|
+
*
|
|
457
|
+
* @docs-private
|
|
458
|
+
*/
|
|
459
|
+
get hasFocus() {
|
|
460
|
+
return this._hasFocus();
|
|
160
461
|
}
|
|
161
|
-
|
|
162
|
-
|
|
462
|
+
/** @docs-private */
|
|
463
|
+
set hasFocus(value) {
|
|
464
|
+
this._hasFocus.set(value);
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* @docs-private
|
|
468
|
+
*/
|
|
469
|
+
get textElement() {
|
|
470
|
+
return this.textElementQuery();
|
|
163
471
|
}
|
|
164
472
|
/** The value of the tag. Defaults to the content inside `<kbq-tag>` tags. */
|
|
165
|
-
//
|
|
166
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
473
|
+
// Stays an accessor: it falls back to the projected text content, which is DOM state.
|
|
167
474
|
get value() {
|
|
168
475
|
return this._value ?? this.elementRef.nativeElement.textContent?.trim();
|
|
169
476
|
}
|
|
@@ -171,50 +478,30 @@ class KbqTag extends KbqColorDirective {
|
|
|
171
478
|
this._value = value;
|
|
172
479
|
}
|
|
173
480
|
/**
|
|
174
|
-
* Whether the tag
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return this._selectable || !!this.tagList?.selectable();
|
|
180
|
-
}
|
|
181
|
-
set selectable(value) {
|
|
182
|
-
this._selectable = value;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Determines whether the tag is removable.
|
|
481
|
+
* Whether the user may remove this tag through the controls the tag itself offers — the remove
|
|
482
|
+
* control and the `Delete` key. A disabled tag offers neither.
|
|
483
|
+
*
|
|
484
|
+
* This is the affordance, not the channel: `remove()` stays open so the list can still clear a
|
|
485
|
+
* disabled tag when `clearPredicate` asks for it.
|
|
186
486
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
get removable() {
|
|
190
|
-
return this._removable && (this.tagList?.removable ?? true);
|
|
191
|
-
}
|
|
192
|
-
set removable(value) {
|
|
193
|
-
this._removable = value;
|
|
487
|
+
get canRemove() {
|
|
488
|
+
return this.removable() && !this.disabled;
|
|
194
489
|
}
|
|
195
|
-
|
|
196
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
490
|
+
/** Tab order of the tag. */
|
|
197
491
|
get tabindex() {
|
|
198
|
-
|
|
199
|
-
return null;
|
|
200
|
-
if (this._tabindex === -1 && this.selectable && !this.tagList)
|
|
201
|
-
return 0;
|
|
202
|
-
return this._tabindex;
|
|
492
|
+
return this.tabindexState();
|
|
203
493
|
}
|
|
204
494
|
set tabindex(value) {
|
|
205
|
-
this._tabindex
|
|
495
|
+
this._tabindex.set(value);
|
|
206
496
|
}
|
|
207
|
-
/**
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
// TODO: Skipped for migration because:
|
|
211
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
497
|
+
/** Whether the tag is disabled. */
|
|
498
|
+
// Stays a plain boolean: the focus key manager skips items by reading `item.disabled` as a value, so a
|
|
499
|
+
// signal - a function, always truthy - would skip every tag. It also folds in the tag list's form control.
|
|
212
500
|
get disabled() {
|
|
213
|
-
return this.
|
|
501
|
+
return this.disabledState();
|
|
214
502
|
}
|
|
215
503
|
set disabled(value) {
|
|
216
|
-
this._disabled
|
|
217
|
-
this.syncDragDisabledState();
|
|
504
|
+
this._disabled.set(value);
|
|
218
505
|
}
|
|
219
506
|
/**
|
|
220
507
|
* Whether the tag is draggable.
|
|
@@ -222,7 +509,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
222
509
|
* @docs-private
|
|
223
510
|
*/
|
|
224
511
|
get draggable() {
|
|
225
|
-
return
|
|
512
|
+
return this.draggableState();
|
|
226
513
|
}
|
|
227
514
|
constructor() {
|
|
228
515
|
super();
|
|
@@ -231,6 +518,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
231
518
|
this.tagList = inject(KbqTagList, { optional: true });
|
|
232
519
|
this.drag = inject(CdkDrag, { host: true });
|
|
233
520
|
this.destroyRef = inject(DestroyRef);
|
|
521
|
+
this.injector = inject(Injector);
|
|
234
522
|
/** @docs-private */
|
|
235
523
|
this.elementRef = inject(ElementRef);
|
|
236
524
|
/**
|
|
@@ -247,15 +535,21 @@ class KbqTag extends KbqColorDirective {
|
|
|
247
535
|
this.onBlur = new Subject();
|
|
248
536
|
/** @docs-private */
|
|
249
537
|
this.nativeElement = this.elementRef.nativeElement;
|
|
538
|
+
this._hasFocus = signal(false, ...(ngDevMode ? [{ debugName: "_hasFocus" }] : /* istanbul ignore next */ []));
|
|
250
539
|
/**
|
|
251
|
-
*
|
|
540
|
+
* Backing input of `editable`. Bind through the `editable` attribute; read `editable`, which falls
|
|
541
|
+
* back to the tag list's `editable` while this is unbound.
|
|
542
|
+
* `undefined` only as the default: the transform never runs on it, so a bound value is always a boolean.
|
|
252
543
|
*
|
|
253
544
|
* @docs-private
|
|
254
545
|
*/
|
|
255
|
-
this.
|
|
546
|
+
this.editableInput = input(undefined, { ...(ngDevMode ? { debugName: "editableInput" } : /* istanbul ignore next */ {}), alias: 'editable',
|
|
547
|
+
transform: booleanAttribute });
|
|
548
|
+
/** Whether the tag is editable. */
|
|
549
|
+
this.editable = computed(() => this.editableInput() ?? !!this.tagList?.editable(), ...(ngDevMode ? [{ debugName: "editable" }] : /* istanbul ignore next */ []));
|
|
256
550
|
/** Whether the tag edits can't be submitted. */
|
|
257
|
-
this.preventEditSubmit = input(false, ...(ngDevMode ?
|
|
258
|
-
this.editInputElementRef = contentChild(KbqTagEditInput, ...(ngDevMode ?
|
|
551
|
+
this.preventEditSubmit = input(false, { ...(ngDevMode ? { debugName: "preventEditSubmit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
552
|
+
this.editInputElementRef = contentChild(KbqTagEditInput, { ...(ngDevMode ? { debugName: "editInputElementRef" } : /* istanbul ignore next */ {}), read: ElementRef });
|
|
259
553
|
/**
|
|
260
554
|
* Emits event when the tag is edited.
|
|
261
555
|
*/
|
|
@@ -263,14 +557,15 @@ class KbqTag extends KbqColorDirective {
|
|
|
263
557
|
/**
|
|
264
558
|
* @docs-private
|
|
265
559
|
*/
|
|
266
|
-
this.editing = signal(false, ...(ngDevMode ? [{ debugName: "editing" }] : []));
|
|
560
|
+
this.editing = signal(false, ...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
|
|
561
|
+
this.textElementQuery = viewChild('kbqTitleText', ...(ngDevMode ? [{ debugName: "textElementQuery" }] : /* istanbul ignore next */ []));
|
|
267
562
|
this.contentChildren = contentChildren(KbqIcon);
|
|
268
563
|
/** The tag avatar */
|
|
269
|
-
this.avatar = contentChild(KbqTagAvatar, ...(ngDevMode ? [{ debugName: "avatar" }] : []));
|
|
564
|
+
this.avatar = contentChild(KbqTagAvatar, ...(ngDevMode ? [{ debugName: "avatar" }] : /* istanbul ignore next */ []));
|
|
270
565
|
/** The tag's trailing icon. */
|
|
271
|
-
this.trailingIcon = contentChild(KbqTagTrailingIcon, ...(ngDevMode ? [{ debugName: "trailingIcon" }] : []));
|
|
566
|
+
this.trailingIcon = contentChild(KbqTagTrailingIcon, ...(ngDevMode ? [{ debugName: "trailingIcon" }] : /* istanbul ignore next */ []));
|
|
272
567
|
/** The tag's remove toggler. */
|
|
273
|
-
this.removeIcon = contentChild(forwardRef(() => KbqTagRemove), ...(ngDevMode ? [{ debugName: "removeIcon" }] : []));
|
|
568
|
+
this.removeIcon = contentChild(forwardRef(() => KbqTagRemove), ...(ngDevMode ? [{ debugName: "removeIcon" }] : /* istanbul ignore next */ []));
|
|
274
569
|
/** Emitted when the tag is selected or deselected. */
|
|
275
570
|
this.selectionChange = output();
|
|
276
571
|
/** Emitted when the tag is destroyed and leaving the DOM. */
|
|
@@ -280,18 +575,94 @@ class KbqTag extends KbqColorDirective {
|
|
|
280
575
|
* Fires on programmatic and UI removal (click or keyboard).
|
|
281
576
|
*/
|
|
282
577
|
this.removed = output();
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
578
|
+
/**
|
|
579
|
+
* Backing input of `selected`. Bind through the `selected` attribute; read `selected`, which also
|
|
580
|
+
* reflects `select()`, `deselect()` and user interaction.
|
|
581
|
+
* A change of the binding is applied in `ngOnChanges` through `setSelectedState()`, so it emits
|
|
582
|
+
* `selectionChange` the way the old setter did - the tag list listens to it.
|
|
583
|
+
*
|
|
584
|
+
* @docs-private
|
|
585
|
+
*/
|
|
586
|
+
this.selectedInput = input(false, { ...(ngDevMode ? { debugName: "selectedInput" } : /* istanbul ignore next */ {}), alias: 'selected', transform: booleanAttribute });
|
|
587
|
+
this._selected = signal(false, ...(ngDevMode ? [{ debugName: "_selected" }] : /* istanbul ignore next */ []));
|
|
588
|
+
/** Whether the tag is selected. */
|
|
589
|
+
// Read-only rather than a `linkedSignal`: a binding change reset through a `linkedSignal` would skip
|
|
590
|
+
// `setSelectedState()` and never emit the `selectionChange` the tag list listens to.
|
|
591
|
+
this.selected = this._selected.asReadonly();
|
|
592
|
+
/**
|
|
593
|
+
* Backing input of `selectable`. Bind through the `selectable` attribute; read `selectable`, which is
|
|
594
|
+
* also true while the tag list is selectable.
|
|
595
|
+
*
|
|
596
|
+
* @docs-private
|
|
597
|
+
*/
|
|
598
|
+
this.selectableInput = input(false, { ...(ngDevMode ? { debugName: "selectableInput" } : /* istanbul ignore next */ {}), alias: 'selectable', transform: booleanAttribute });
|
|
599
|
+
/** Whether the tag is selectable. */
|
|
600
|
+
this.selectable = computed(() => this.selectableInput() || !!this.tagList?.selectable(), ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
|
|
601
|
+
/**
|
|
602
|
+
* Backing input of `removable`. Bind through the `removable` attribute; read `removable`, which also
|
|
603
|
+
* requires the tag list to be removable.
|
|
604
|
+
*
|
|
605
|
+
* @docs-private
|
|
606
|
+
*/
|
|
607
|
+
this.removableInput = input(true, { ...(ngDevMode ? { debugName: "removableInput" } : /* istanbul ignore next */ {}), alias: 'removable', transform: booleanAttribute });
|
|
608
|
+
/** Determines whether the tag is removable. */
|
|
609
|
+
this.removable = computed(() => this.removableInput() && (this.tagList?.removable() ?? true), ...(ngDevMode ? [{ debugName: "removable" }] : /* istanbul ignore next */ []));
|
|
610
|
+
this._tabindex = signal(-1, ...(ngDevMode ? [{ debugName: "_tabindex" }] : /* istanbul ignore next */ []));
|
|
611
|
+
this.tabindexState = computed(() => {
|
|
612
|
+
if (this.disabled)
|
|
613
|
+
return null;
|
|
614
|
+
if (this._tabindex() === -1 && this.selectable() && !this.tagList)
|
|
615
|
+
return 0;
|
|
616
|
+
return this._tabindex();
|
|
617
|
+
}, ...(ngDevMode ? [{ debugName: "tabindexState" }] : /* istanbul ignore next */ []));
|
|
618
|
+
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
619
|
+
this.disabledState = computed(() => this._disabled() || (this.tagList?.disabled() ?? false), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
620
|
+
/**
|
|
621
|
+
* Value of the `disabled` attribute.
|
|
622
|
+
*
|
|
623
|
+
* @internal
|
|
624
|
+
*/
|
|
625
|
+
this.disabledAttribute = computed(() => this.disabled || null, ...(ngDevMode ? [{ debugName: "disabledAttribute" }] : /* istanbul ignore next */ []));
|
|
626
|
+
this.draggableState = computed(() => (this.tagList?.draggable ?? false) && !this.disabled, ...(ngDevMode ? [{ debugName: "draggableState" }] : /* istanbul ignore next */ []));
|
|
627
|
+
/**
|
|
628
|
+
* Whether the tag moves into place without motion while the list is reordered.
|
|
629
|
+
*
|
|
630
|
+
* @docs-private
|
|
631
|
+
*/
|
|
632
|
+
this.animationsDisabled = kbqAnimationsDisabled();
|
|
633
|
+
/** @docs-private */
|
|
634
|
+
this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
|
|
635
|
+
/** @docs-private */
|
|
636
|
+
this.tabindexInput = input(undefined, { ...(ngDevMode ? { debugName: "tabindexInput" } : /* istanbul ignore next */ {}), alias: 'tabindex' });
|
|
637
|
+
/** @docs-private */
|
|
638
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
639
|
+
transform: booleanAttribute });
|
|
289
640
|
this.setDefaultColor(KbqComponentColors.ContrastFade);
|
|
290
641
|
this.addHostClassName();
|
|
291
642
|
this.setupDragInitialProperties();
|
|
292
643
|
}
|
|
293
|
-
|
|
294
|
-
|
|
644
|
+
ngOnChanges(changes) {
|
|
645
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
646
|
+
if (changes['valueInput']) {
|
|
647
|
+
const value = this.valueInput();
|
|
648
|
+
if (value !== undefined)
|
|
649
|
+
this.value = value;
|
|
650
|
+
}
|
|
651
|
+
if (changes['tabindexInput']) {
|
|
652
|
+
const tabindex = this.tabindexInput();
|
|
653
|
+
if (tabindex !== undefined)
|
|
654
|
+
this.tabindex = tabindex;
|
|
655
|
+
}
|
|
656
|
+
if (changes['disabledInput']) {
|
|
657
|
+
const disabled = this.disabledInput();
|
|
658
|
+
if (disabled !== undefined)
|
|
659
|
+
this.disabled = disabled;
|
|
660
|
+
}
|
|
661
|
+
// Only a change of this binding: `ngOnChanges` also fires for every other input, and re-applying the
|
|
662
|
+
// bound value then would undo a selection the user made by clicking.
|
|
663
|
+
if (changes['selectedInput']) {
|
|
664
|
+
this.setSelectedState(this.selectedInput(), { emitEvent: true });
|
|
665
|
+
}
|
|
295
666
|
}
|
|
296
667
|
ngAfterViewInit() {
|
|
297
668
|
this.setupFocusMonitor();
|
|
@@ -301,7 +672,14 @@ class KbqTag extends KbqColorDirective {
|
|
|
301
672
|
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
302
673
|
this.destroyed.emit({ tag: this });
|
|
303
674
|
}
|
|
304
|
-
/**
|
|
675
|
+
/**
|
|
676
|
+
* Adds the legacy positional classes inferred from projected icons.
|
|
677
|
+
*
|
|
678
|
+
* @deprecated Use `KbqTagPrefix` and `KbqTagSuffix` to declare the position explicitly.
|
|
679
|
+
* Will be removed in 22.0.0.
|
|
680
|
+
*
|
|
681
|
+
* @docs-private
|
|
682
|
+
*/
|
|
305
683
|
addClassModificatorForIcons() {
|
|
306
684
|
const icons = this.contentChildren().map((item) => item.elementRef.nativeElement);
|
|
307
685
|
if (icons.length === 1) {
|
|
@@ -338,17 +716,23 @@ class KbqTag extends KbqColorDirective {
|
|
|
338
716
|
* Selects the tag.
|
|
339
717
|
*/
|
|
340
718
|
select() {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
719
|
+
// Untracked, like the other imperative methods: called from a consumer's `effect()`, the state read on the
|
|
720
|
+
// way — `selected`, `disabled`, focus, the inputs — would make the effect run again whenever it changes.
|
|
721
|
+
untracked(() => {
|
|
722
|
+
if (this.disabled || !this.selectable())
|
|
723
|
+
return;
|
|
724
|
+
this.setSelectedState(true, { emitEvent: true });
|
|
725
|
+
});
|
|
344
726
|
}
|
|
345
727
|
/**
|
|
346
728
|
* Deselects the tag.
|
|
347
729
|
*/
|
|
348
730
|
deselect() {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
731
|
+
untracked(() => {
|
|
732
|
+
if (this.disabled || !this.selectable())
|
|
733
|
+
return;
|
|
734
|
+
this.setSelectedState(false, { emitEvent: true });
|
|
735
|
+
});
|
|
352
736
|
}
|
|
353
737
|
/**
|
|
354
738
|
* Selects the tag and emits event with isUserInput flag.
|
|
@@ -356,24 +740,31 @@ class KbqTag extends KbqColorDirective {
|
|
|
356
740
|
* @docs-private
|
|
357
741
|
*/
|
|
358
742
|
selectViaInteraction() {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
743
|
+
untracked(() => {
|
|
744
|
+
if (this.disabled || !this.selectable())
|
|
745
|
+
return;
|
|
746
|
+
this.setSelectedState(true, { isUserInput: true, emitEvent: true });
|
|
747
|
+
});
|
|
362
748
|
}
|
|
363
749
|
/**
|
|
364
750
|
* Toggles the current selected state of the tag.
|
|
365
751
|
*/
|
|
366
752
|
toggleSelected(isUserInput = false) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
753
|
+
return untracked(() => {
|
|
754
|
+
if (this.disabled || !this.selectable())
|
|
755
|
+
return this.selected();
|
|
756
|
+
this.setSelectedState(!this.selected(), { isUserInput, emitEvent: true });
|
|
757
|
+
return this.selected();
|
|
758
|
+
});
|
|
371
759
|
}
|
|
372
760
|
/** Focuses the tag. */
|
|
373
761
|
focus() {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
762
|
+
// The focus monitor reports the focus synchronously, and its handler reads the focus state.
|
|
763
|
+
untracked(() => {
|
|
764
|
+
if (this.disabled)
|
|
765
|
+
return;
|
|
766
|
+
this.elementRef.nativeElement.focus();
|
|
767
|
+
});
|
|
377
768
|
}
|
|
378
769
|
/**
|
|
379
770
|
* Allows for programmatic removal of the tag. Called by the KbqTagList when the DELETE or
|
|
@@ -382,7 +773,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
382
773
|
* Informs any listeners of the removal request. Does not remove the tag from the DOM.
|
|
383
774
|
*/
|
|
384
775
|
remove() {
|
|
385
|
-
if (this.removable) {
|
|
776
|
+
if (untracked(this.removable)) {
|
|
386
777
|
this.removed.emit({ tag: this });
|
|
387
778
|
}
|
|
388
779
|
}
|
|
@@ -396,7 +787,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
396
787
|
// We should handle modifier-based selection only if tag is inside of a tag list.
|
|
397
788
|
// Single tag can only be toggled on focus or blur.
|
|
398
789
|
this.tagList &&
|
|
399
|
-
this.selectable &&
|
|
790
|
+
this.selectable() &&
|
|
400
791
|
hasModifierKey(event, 'metaKey', 'ctrlKey', 'shiftKey')) {
|
|
401
792
|
if (!event.shiftKey)
|
|
402
793
|
this.toggleSelected(true);
|
|
@@ -405,10 +796,10 @@ class KbqTag extends KbqColorDirective {
|
|
|
405
796
|
event.stopPropagation();
|
|
406
797
|
return;
|
|
407
798
|
}
|
|
408
|
-
if (this.tagList && this.selectable) {
|
|
799
|
+
if (this.tagList && this.selectable()) {
|
|
409
800
|
this.tagList.handleSelectionInteraction(this, false);
|
|
410
801
|
}
|
|
411
|
-
if (!this.tagList && this.selectable) {
|
|
802
|
+
if (!this.tagList && this.selectable()) {
|
|
412
803
|
this.toggleSelected(true);
|
|
413
804
|
}
|
|
414
805
|
}
|
|
@@ -430,7 +821,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
430
821
|
event.preventDefault();
|
|
431
822
|
break;
|
|
432
823
|
}
|
|
433
|
-
case SPACE: {
|
|
824
|
+
case SPACE$1: {
|
|
434
825
|
if (this.tagList) {
|
|
435
826
|
this.toggleSelected(true);
|
|
436
827
|
this.tagList.handleSelectionInteraction(this, false);
|
|
@@ -444,7 +835,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
444
835
|
break;
|
|
445
836
|
}
|
|
446
837
|
case F2:
|
|
447
|
-
case ENTER:
|
|
838
|
+
case ENTER$1:
|
|
448
839
|
this.startEditing(event.key);
|
|
449
840
|
break;
|
|
450
841
|
default:
|
|
@@ -452,43 +843,48 @@ class KbqTag extends KbqColorDirective {
|
|
|
452
843
|
}
|
|
453
844
|
/** @docs-private */
|
|
454
845
|
blur() {
|
|
455
|
-
this.elementRef.nativeElement.blur();
|
|
846
|
+
untracked(() => this.elementRef.nativeElement.blur());
|
|
456
847
|
}
|
|
457
848
|
/** @docs-private */
|
|
458
849
|
handleDblClick(event) {
|
|
459
|
-
if (this.disabled || !this.editable)
|
|
850
|
+
if (this.disabled || !this.editable())
|
|
460
851
|
return;
|
|
461
852
|
event.stopPropagation();
|
|
462
853
|
this.startEditing('dblclick');
|
|
463
854
|
}
|
|
464
855
|
startEditing(reason) {
|
|
465
|
-
if (!this.editable || this.editing())
|
|
856
|
+
if (!this.editable() || this.editing())
|
|
466
857
|
return;
|
|
467
858
|
this.editing.set(true);
|
|
468
859
|
this.editChange.emit({ tag: this, type: 'start', reason });
|
|
469
|
-
|
|
860
|
+
// The edit input exists once the editing state is rendered.
|
|
861
|
+
afterNextRender(() => {
|
|
470
862
|
const input = this.editInputElementRef()?.nativeElement;
|
|
471
863
|
if (!input)
|
|
472
864
|
throw getTagEditInputMissingError();
|
|
473
865
|
this.focusMonitor.focusVia(this.elementRef.nativeElement, 'keyboard');
|
|
474
866
|
input.select();
|
|
475
|
-
});
|
|
867
|
+
}, { injector: this.injector });
|
|
476
868
|
}
|
|
477
869
|
/** @docs-private */
|
|
478
870
|
cancelEditing(reason) {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
871
|
+
untracked(() => {
|
|
872
|
+
if (!this.editing())
|
|
873
|
+
return;
|
|
874
|
+
this.editing.set(false);
|
|
875
|
+
this.editChange.emit({ tag: this, type: 'cancel', reason });
|
|
876
|
+
this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
|
|
877
|
+
});
|
|
484
878
|
}
|
|
485
879
|
/** @docs-private */
|
|
486
880
|
submitEditing(reason) {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
881
|
+
untracked(() => {
|
|
882
|
+
if (!this.editing() || this.preventEditSubmit())
|
|
883
|
+
return;
|
|
884
|
+
this.editing.set(false);
|
|
885
|
+
this.editChange.emit({ tag: this, type: 'submit', reason });
|
|
886
|
+
this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
|
|
887
|
+
});
|
|
492
888
|
}
|
|
493
889
|
/**
|
|
494
890
|
* Sets the selected state of the tag.
|
|
@@ -497,27 +893,30 @@ class KbqTag extends KbqColorDirective {
|
|
|
497
893
|
*/
|
|
498
894
|
setSelectedState(selected, options = {}) {
|
|
499
895
|
const { isUserInput = false, emitEvent = false } = options;
|
|
500
|
-
|
|
501
|
-
this.
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
896
|
+
untracked(() => {
|
|
897
|
+
if (selected !== this.selected()) {
|
|
898
|
+
this._selected.set(selected);
|
|
899
|
+
if (emitEvent) {
|
|
900
|
+
this.selectionChange.emit({
|
|
901
|
+
source: this,
|
|
902
|
+
isUserInput,
|
|
903
|
+
selected: this.selected()
|
|
904
|
+
});
|
|
905
|
+
}
|
|
508
906
|
}
|
|
509
|
-
|
|
510
|
-
}
|
|
907
|
+
});
|
|
511
908
|
}
|
|
512
909
|
setupDragInitialProperties() {
|
|
513
|
-
|
|
910
|
+
// Derived rather than pushed: `draggable` folds in the tag list's `draggable` and `disabled`, so a
|
|
911
|
+
// push from this tag's own setter never saw the list's `draggable` flip, and `CdkDrag` keeps an
|
|
912
|
+
// explicit `disabled = true` regardless of what its container says.
|
|
913
|
+
effect(() => {
|
|
914
|
+
this.drag.disabled = !this.draggable;
|
|
915
|
+
});
|
|
514
916
|
this.drag.started.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
515
917
|
this.drag.data = { tag: this };
|
|
516
918
|
});
|
|
517
919
|
}
|
|
518
|
-
syncDragDisabledState() {
|
|
519
|
-
this.drag.disabled = !this.draggable;
|
|
520
|
-
}
|
|
521
920
|
setupFocusMonitor() {
|
|
522
921
|
this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {
|
|
523
922
|
if (this.disabled)
|
|
@@ -536,14 +935,13 @@ class KbqTag extends KbqColorDirective {
|
|
|
536
935
|
if (!this.tagList)
|
|
537
936
|
this.deselect();
|
|
538
937
|
}
|
|
539
|
-
this.changeDetectorRef.markForCheck();
|
|
540
938
|
}
|
|
541
939
|
});
|
|
542
940
|
}
|
|
543
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
544
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
941
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTag, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
942
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTag, isStandalone: true, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: { editableInput: { classPropertyName: "editableInput", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, preventEditSubmit: { classPropertyName: "preventEditSubmit", publicName: "preventEditSubmit", isSignal: true, isRequired: false, transformFunction: null }, selectedInput: { classPropertyName: "selectedInput", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectableInput: { classPropertyName: "selectableInput", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, removableInput: { classPropertyName: "removableInput", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, tabindexInput: { classPropertyName: "tabindexInput", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { editChange: "editChange", selectionChange: "selectionChange", destroyed: "destroyed", removed: "removed" }, host: { listeners: { "dblclick": "handleDblClick($event)", "click": "handleClick($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabindex", "attr.disabled": "disabledAttribute()", "class.kbq-selected": "selected()", "class.kbq-tag-with-avatar": "avatar()", "class.kbq-tag-with-icon": "contentChildren()", "class.kbq-tag-with-trailing-icon": "trailingIcon() || removeIcon()", "class.kbq-disabled": "disabled", "class.kbq-tag_editable": "editable()", "class.kbq-tag_editing": "editing()", "class.kbq-tag_removable": "removable()", "class.kbq-tag_selectable": "selectable()", "class.kbq-tag_draggable": "draggable", "class.kbq-animations-disabled": "animationsDisabled" }, classAttribute: "kbq-tag" }, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], queries: [{ propertyName: "editInputElementRef", first: true, predicate: KbqTagEditInput, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "contentChildren", predicate: KbqIcon, isSignal: true }, { propertyName: "avatar", first: true, predicate: KbqTagAvatar, descendants: true, isSignal: true }, { propertyName: "trailingIcon", first: true, predicate: KbqTagTrailingIcon, descendants: true, isSignal: true }, { propertyName: "removeIcon", first: true, predicate: i0.forwardRef(() => KbqTagRemove), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "textElementQuery", first: true, predicate: ["kbqTitleText"], descendants: true, isSignal: true }], exportAs: ["kbqTag"], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i2.CdkDrag }, { directive: i1.KbqLocaleOverridesDirective, inputs: ["kbqLocaleOverrides", "localeOverrides"] }], ngImport: i0, template: `
|
|
545
943
|
<div class="kbq-tag__wrapper">
|
|
546
|
-
<ng-content select="[
|
|
944
|
+
<ng-content select="[kbqTagPrefix]" />
|
|
547
945
|
<span #kbqTitleText class="kbq-tag__text">
|
|
548
946
|
@if (editing()) {
|
|
549
947
|
<ng-content select="[kbqTagEditInput]" />
|
|
@@ -554,18 +952,19 @@ class KbqTag extends KbqColorDirective {
|
|
|
554
952
|
@if (editing()) {
|
|
555
953
|
<ng-content select="[kbqTagEditSubmit]" />
|
|
556
954
|
} @else {
|
|
557
|
-
@if (
|
|
955
|
+
@if (canRemove) {
|
|
558
956
|
<ng-content select="[kbqTagRemove]" />
|
|
559
957
|
}
|
|
560
958
|
}
|
|
959
|
+
<ng-content select="[kbqTagSuffix]" />
|
|
561
960
|
</div>
|
|
562
|
-
`, isInline: true, styles: ["
|
|
961
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-tag{-webkit-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px}@supports (corner-shape: squircle){.kbq-tag{corner-shape:squircle;border-radius:7.4px}}.kbq-tag{cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-tag-prefix{flex-shrink:0;margin-inline-start:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-suffix{flex-shrink:0}.kbq-tag .kbq-tag-suffix:not(.kbq-tag-remove,.kbq-tag-edit-submit){margin-inline-end:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag.cdk-drag-animating.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag.cdk-drag-animating{animation:none;transition:none}}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
563
962
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTag, decorators: [{
|
|
565
964
|
type: Component,
|
|
566
965
|
args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', template: `
|
|
567
966
|
<div class="kbq-tag__wrapper">
|
|
568
|
-
<ng-content select="[
|
|
967
|
+
<ng-content select="[kbqTagPrefix]" />
|
|
569
968
|
<span #kbqTitleText class="kbq-tag__text">
|
|
570
969
|
@if (editing()) {
|
|
571
970
|
<ng-content select="[kbqTagEditInput]" />
|
|
@@ -576,52 +975,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
576
975
|
@if (editing()) {
|
|
577
976
|
<ng-content select="[kbqTagEditSubmit]" />
|
|
578
977
|
} @else {
|
|
579
|
-
@if (
|
|
978
|
+
@if (canRemove) {
|
|
580
979
|
<ng-content select="[kbqTagRemove]" />
|
|
581
980
|
}
|
|
582
981
|
}
|
|
982
|
+
<ng-content select="[kbqTagSuffix]" />
|
|
583
983
|
</div>
|
|
584
984
|
`, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
585
985
|
class: 'kbq-tag',
|
|
986
|
+
// No signal is read by two of these bindings, and none of the tag list's: the host bindings of every tag in a
|
|
987
|
+
// view run in that view's reactive consumer, where a signal read again after others costs a scan of all it has
|
|
988
|
+
// read so far, O(N²) per check across N tags. Each value that folds in `disabled` has a signal of its own.
|
|
586
989
|
'[attr.tabindex]': 'tabindex',
|
|
587
|
-
'[attr.disabled]': '
|
|
588
|
-
'[class.kbq-selected]': 'selected',
|
|
990
|
+
'[attr.disabled]': 'disabledAttribute()',
|
|
991
|
+
'[class.kbq-selected]': 'selected()',
|
|
589
992
|
'[class.kbq-tag-with-avatar]': 'avatar()',
|
|
590
993
|
'[class.kbq-tag-with-icon]': 'contentChildren()',
|
|
591
994
|
'[class.kbq-tag-with-trailing-icon]': 'trailingIcon() || removeIcon()',
|
|
592
995
|
'[class.kbq-disabled]': 'disabled',
|
|
593
|
-
'[class.kbq-tag_editable]': 'editable',
|
|
996
|
+
'[class.kbq-tag_editable]': 'editable()',
|
|
594
997
|
'[class.kbq-tag_editing]': 'editing()',
|
|
595
|
-
'[class.kbq-tag_removable]': 'removable',
|
|
596
|
-
'[class.kbq-tag_selectable]': 'selectable',
|
|
998
|
+
'[class.kbq-tag_removable]': 'removable()',
|
|
999
|
+
'[class.kbq-tag_selectable]': 'selectable()',
|
|
597
1000
|
'[class.kbq-tag_draggable]': 'draggable',
|
|
1001
|
+
'[class.kbq-animations-disabled]': 'animationsDisabled',
|
|
598
1002
|
'(dblclick)': 'handleDblClick($event)',
|
|
599
1003
|
'(click)': 'handleClick($event)',
|
|
600
1004
|
'(keydown)': 'handleKeydown($event)'
|
|
601
|
-
}, hostDirectives: [
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
type: ViewChild,
|
|
607
|
-
args: ['kbqTitleText']
|
|
608
|
-
}], contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqIcon), { isSignal: true }] }], avatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagAvatar), { isSignal: true }] }], trailingIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagTrailingIcon), { isSignal: true }] }], removeIcon: [{ type: i0.ContentChild, args: [forwardRef(() => KbqTagRemove), { isSignal: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], destroyed: [{ type: i0.Output, args: ["destroyed"] }], removed: [{ type: i0.Output, args: ["removed"] }], selected: [{
|
|
609
|
-
type: Input,
|
|
610
|
-
args: [{ transform: booleanAttribute }]
|
|
611
|
-
}], value: [{
|
|
612
|
-
type: Input
|
|
613
|
-
}], selectable: [{
|
|
614
|
-
type: Input,
|
|
615
|
-
args: [{ transform: booleanAttribute }]
|
|
616
|
-
}], removable: [{
|
|
617
|
-
type: Input,
|
|
618
|
-
args: [{ transform: booleanAttribute }]
|
|
619
|
-
}], tabindex: [{
|
|
620
|
-
type: Input
|
|
621
|
-
}], disabled: [{
|
|
622
|
-
type: Input,
|
|
623
|
-
args: [{ transform: booleanAttribute }]
|
|
624
|
-
}] } });
|
|
1005
|
+
}, hostDirectives: [
|
|
1006
|
+
CdkDrag,
|
|
1007
|
+
{ directive: KbqLocaleOverridesDirective, inputs: ['kbqLocaleOverrides: localeOverrides'] }
|
|
1008
|
+
], exportAs: 'kbqTag', styles: ["@charset \"UTF-8\";.kbq-tag{-webkit-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;height:var(--kbq-size-xxl);padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px}@supports (corner-shape: squircle){.kbq-tag{corner-shape:squircle;border-radius:7.4px}}.kbq-tag{cursor:default;outline:none;box-sizing:border-box}.kbq-tag .kbq-icon.kbq-tag-remove{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-right:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon.kbq-tag-remove:hover{cursor:pointer}.kbq-tag.kbq-disabled .kbq-icon.kbq-tag-remove:hover{cursor:default}.kbq-tag .kbq-tag__text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;margin:0 var(--kbq-tag-size-content-gap-horizontal)}.kbq-tag .kbq-tag-prefix{flex-shrink:0;margin-inline-start:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-suffix{flex-shrink:0}.kbq-tag .kbq-tag-suffix:not(.kbq-tag-remove,.kbq-tag-edit-submit){margin-inline-end:var(--kbq-tag-size-close-button-margin-right)}.kbq-tag .kbq-icon_left{margin-left:var(--kbq-tag-size-icon-margin-left)}.kbq-tag .kbq-tag-edit-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag .kbq-tag-edit-input::-ms-clear{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag .kbq-tag-edit-input::-webkit-search-decoration,.kbq-tag .kbq-tag-edit-input::-webkit-search-cancel-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-button,.kbq-tag .kbq-tag-edit-input::-webkit-search-results-decoration{display:none}.kbq-tag .kbq-tag-edit-input{min-width:var(--kbq-size-xs);max-width:100%}.kbq-tag .kbq-tag-edit-input.kbq-input{min-height:unset!important;border-radius:unset!important;padding:unset!important}.kbq-tag .kbq-tag-edit-submit{margin-right:var(--kbq-size-3xs)}.kbq-tag.cdk-drag-placeholder{opacity:var(--kbq-opacity-disabled)}.kbq-tag.cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}.kbq-tag.cdk-drag-animating.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag.cdk-drag-animating{animation:none;transition:none}}.kbq-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"] }]
|
|
1009
|
+
}], ctorParameters: () => [], propDecorators: { editableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], preventEditSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventEditSubmit", required: false }] }], editInputElementRef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagEditInput), { ...{ read: ElementRef }, isSignal: true }] }], editChange: [{ type: i0.Output, args: ["editChange"] }], textElementQuery: [{ type: i0.ViewChild, args: ['kbqTitleText', { isSignal: true }] }], contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqIcon), { isSignal: true }] }], avatar: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagAvatar), { isSignal: true }] }], trailingIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTagTrailingIcon), { isSignal: true }] }], removeIcon: [{ type: i0.ContentChild, args: [forwardRef(() => KbqTagRemove), { isSignal: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], destroyed: [{ type: i0.Output, args: ["destroyed"] }], removed: [{ type: i0.Output, args: ["removed"] }], selectedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], selectableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], removableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], tabindexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
625
1010
|
/**
|
|
626
1011
|
*
|
|
627
1012
|
* Example:
|
|
@@ -636,6 +1021,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
636
1021
|
class KbqTagRemove {
|
|
637
1022
|
constructor() {
|
|
638
1023
|
this.parentTag = inject(KbqTag);
|
|
1024
|
+
this.elementRef = inject(ElementRef);
|
|
1025
|
+
this.a11yLocaleConfiguration = kbqInjectA11yLocaleConfiguration();
|
|
1026
|
+
/** Accessible name of the button. Defaults to the localized "Remove". */
|
|
1027
|
+
this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
1028
|
+
/** @docs-private */
|
|
1029
|
+
this.accessibleName = computed(() => this.ariaLabel() || this.a11yLocaleConfiguration().remove, ...(ngDevMode ? [{ debugName: "accessibleName" }] : /* istanbul ignore next */ []));
|
|
1030
|
+
/**
|
|
1031
|
+
* Position of the control in the tab order.
|
|
1032
|
+
*
|
|
1033
|
+
* Defaults to `-1`, because in a tag list the tag itself is the tab stop and removal is reached from
|
|
1034
|
+
* there. A tag rendered outside such a list — inside a select's trigger, for one — has to opt into a
|
|
1035
|
+
* tab stop of its own, or the control is left mouse-only.
|
|
1036
|
+
*/
|
|
1037
|
+
this.tabIndex = input(-1, { ...(ngDevMode ? { debugName: "tabIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
639
1038
|
}
|
|
640
1039
|
/** @docs-private */
|
|
641
1040
|
focus(event) {
|
|
@@ -647,7 +1046,7 @@ class KbqTagRemove {
|
|
|
647
1046
|
* @docs-private
|
|
648
1047
|
*/
|
|
649
1048
|
handleClick(event) {
|
|
650
|
-
if (this.parentTag.
|
|
1049
|
+
if (this.parentTag.canRemove) {
|
|
651
1050
|
this.parentTag.hasFocus = true;
|
|
652
1051
|
this.parentTag.remove();
|
|
653
1052
|
}
|
|
@@ -658,24 +1057,41 @@ class KbqTagRemove {
|
|
|
658
1057
|
// that the tag is being removed before the event bubbles up.
|
|
659
1058
|
event.stopPropagation();
|
|
660
1059
|
}
|
|
661
|
-
/**
|
|
662
|
-
|
|
1060
|
+
/**
|
|
1061
|
+
* Activates the button from the keyboard by synthesizing a click, so that a `(click)` listener the
|
|
1062
|
+
* host template put on this very element — the way `KbqSelect` and `KbqTreeSelect` deselect the
|
|
1063
|
+
* option behind the tag — runs as well, and not only `handleClick` below.
|
|
1064
|
+
*/
|
|
1065
|
+
handleKeydown(event) {
|
|
1066
|
+
// Space scrolls the page, and both keys are acted on by the tag list and by the select the tag
|
|
1067
|
+
// may be rendered in.
|
|
1068
|
+
event.preventDefault();
|
|
1069
|
+
event.stopPropagation();
|
|
1070
|
+
this.elementRef.nativeElement.click();
|
|
1071
|
+
}
|
|
1072
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagRemove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1073
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTagRemove, isStandalone: true, selector: "[kbqTagRemove]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "button" }, listeners: { "click": "handleClick($event)", "focus": "focus($event)", "keydown.enter": "handleKeydown($any($event))", "keydown.space": "handleKeydown($any($event))" }, properties: { "attr.aria-label": "accessibleName()", "attr.tabindex": "tabIndex()" }, classAttribute: "kbq-tag-remove kbq-tag-trailing-icon" }, hostDirectives: [{ directive: KbqTagSuffix }], ngImport: i0 }); }
|
|
663
1074
|
}
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1075
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagRemove, decorators: [{
|
|
665
1076
|
type: Directive,
|
|
666
1077
|
args: [{
|
|
667
1078
|
selector: '[kbqTagRemove]',
|
|
668
1079
|
host: {
|
|
669
1080
|
class: 'kbq-tag-remove kbq-tag-trailing-icon',
|
|
670
|
-
|
|
1081
|
+
// The trailing icon is an icon-only control: without a role and an accessible name it is announced
|
|
1082
|
+
// as an unlabeled graphic, and with no keys bound it can only ever be operated with a pointer.
|
|
1083
|
+
role: 'button',
|
|
1084
|
+
'[attr.aria-label]': 'accessibleName()',
|
|
1085
|
+
'[attr.tabindex]': 'tabIndex()',
|
|
671
1086
|
'(click)': 'handleClick($event)',
|
|
672
|
-
'(focus)': 'focus($event)'
|
|
673
|
-
|
|
1087
|
+
'(focus)': 'focus($event)',
|
|
1088
|
+
'(keydown.enter)': 'handleKeydown($any($event))',
|
|
1089
|
+
'(keydown.space)': 'handleKeydown($any($event))'
|
|
1090
|
+
},
|
|
1091
|
+
hostDirectives: [KbqTagSuffix]
|
|
674
1092
|
}]
|
|
675
|
-
}] });
|
|
1093
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
|
|
676
1094
|
|
|
677
|
-
// Increasing integer for generating unique ids for tag-list components.
|
|
678
|
-
let nextUniqueId$1 = 0;
|
|
679
1095
|
/** Change event object that is emitted when the tag list value has changed. */
|
|
680
1096
|
class KbqTagListChange {
|
|
681
1097
|
constructor(source, value) {
|
|
@@ -684,14 +1100,6 @@ class KbqTagListChange {
|
|
|
684
1100
|
}
|
|
685
1101
|
}
|
|
686
1102
|
class KbqTagList {
|
|
687
|
-
/**
|
|
688
|
-
* Combined stream of all of the child tags' selection change events.
|
|
689
|
-
*
|
|
690
|
-
* @docs-private
|
|
691
|
-
*/
|
|
692
|
-
get tagSelectionChanges() {
|
|
693
|
-
return merge(...this.tags.map((tag) => outputToObservable(tag.selectionChange)));
|
|
694
|
-
}
|
|
695
1103
|
/**
|
|
696
1104
|
* Combined stream of all of the child tags' focus change events.
|
|
697
1105
|
*
|
|
@@ -738,120 +1146,83 @@ class KbqTagList {
|
|
|
738
1146
|
* @docs-private
|
|
739
1147
|
*/
|
|
740
1148
|
get selected() {
|
|
741
|
-
return this.tags.filter((
|
|
1149
|
+
return this.tags.filter((tag) => tag.selected());
|
|
742
1150
|
}
|
|
743
1151
|
/** @docs-private */
|
|
744
1152
|
get canShowCleaner() {
|
|
745
|
-
return !!this.cleaner()
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* Implemented as part of KbqFormFieldControl.
|
|
749
|
-
* @docs-private
|
|
750
|
-
*/
|
|
751
|
-
// TODO: Skipped for migration because:
|
|
752
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
753
|
-
get value() {
|
|
754
|
-
return this._value;
|
|
755
|
-
}
|
|
756
|
-
set value(value) {
|
|
757
|
-
this._value = value;
|
|
758
|
-
}
|
|
759
|
-
/**
|
|
760
|
-
* Implemented as part of KbqFormFieldControl.
|
|
761
|
-
* @docs-private
|
|
762
|
-
*/
|
|
763
|
-
get id() {
|
|
764
|
-
return this.tagInput ? this.tagInput.id : this.uid;
|
|
1153
|
+
return !!this.cleaner()?.canShow;
|
|
765
1154
|
}
|
|
766
1155
|
/**
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
return this._required;
|
|
774
|
-
}
|
|
775
|
-
set required(value) {
|
|
776
|
-
this._required = coerceBooleanProperty(value);
|
|
777
|
-
this.stateChanges.next();
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Implemented as part of KbqFormFieldControl.
|
|
1156
|
+
* Marks the list for a change-detection check.
|
|
1157
|
+
*
|
|
1158
|
+
* Kept for back-compatibility. The cleaner's visibility is derived from signals of the list and its
|
|
1159
|
+
* tags, so the list re-renders on its own and nothing in the library calls this any more.
|
|
1160
|
+
* Kept at the DS-2196 review, like `KbqButtonToggle.markForCheck()`, which the migration guide promises stays.
|
|
1161
|
+
*
|
|
781
1162
|
* @docs-private
|
|
782
1163
|
*/
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
get placeholder() {
|
|
786
|
-
return this.tagInput ? this.tagInput.placeholder : this._placeholder;
|
|
787
|
-
}
|
|
788
|
-
set placeholder(value) {
|
|
789
|
-
this._placeholder = value;
|
|
790
|
-
this.stateChanges.next();
|
|
791
|
-
}
|
|
792
|
-
/** Whether any tags or the kbqTagInput inside of this tag-list has focus. */
|
|
793
|
-
get focused() {
|
|
794
|
-
return (this.tagInput && this.tagInput.focused) || this.hasFocusedTag();
|
|
1164
|
+
markForCheck() {
|
|
1165
|
+
this.changeDetectorRef.markForCheck();
|
|
795
1166
|
}
|
|
796
1167
|
/**
|
|
797
|
-
*
|
|
1168
|
+
* Whether the cleaner still has a tag to remove, and so is worth showing at all.
|
|
1169
|
+
*
|
|
798
1170
|
* @docs-private
|
|
799
1171
|
*/
|
|
800
|
-
get
|
|
801
|
-
|
|
1172
|
+
get canClear() {
|
|
1173
|
+
const predicate = this.clearPredicate();
|
|
1174
|
+
// Read on every check, so it stops at the first accepted tag rather than building the whole list.
|
|
1175
|
+
return !!this.tags?.some((tag) => this.isClearTarget(tag, predicate));
|
|
802
1176
|
}
|
|
803
|
-
/**
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
get shouldLabelFloat() {
|
|
808
|
-
return !this.empty || this.focused;
|
|
1177
|
+
/** Tags the cleaner removes, in render order. */
|
|
1178
|
+
get clearTargets() {
|
|
1179
|
+
const predicate = this.clearPredicate();
|
|
1180
|
+
return this.tags?.filter((tag) => this.isClearTarget(tag, predicate)) ?? [];
|
|
809
1181
|
}
|
|
810
|
-
/**
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
*/
|
|
814
|
-
// TODO: Skipped for migration because:
|
|
815
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
816
|
-
get disabled() {
|
|
817
|
-
return this.ngControl ? !!this.ngControl.disabled : this._disabled;
|
|
1182
|
+
/** Whether the cleaner removes this tag: the list must allow removal and the predicate must accept it. */
|
|
1183
|
+
isClearTarget(tag, predicate) {
|
|
1184
|
+
return tag.removable() && runClearPredicate(predicate, tag);
|
|
818
1185
|
}
|
|
819
|
-
|
|
820
|
-
this._disabled = value;
|
|
821
|
-
this.syncDropListDisabledState();
|
|
822
|
-
}
|
|
823
|
-
// TODO: Skipped for migration because:
|
|
824
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1186
|
+
/** Whether the tags in the list can be reordered by dragging. */
|
|
825
1187
|
get draggable() {
|
|
826
|
-
return this.
|
|
1188
|
+
return this.draggableState();
|
|
827
1189
|
}
|
|
828
1190
|
set draggable(value) {
|
|
829
|
-
this._draggable
|
|
1191
|
+
this._draggable.set(value);
|
|
830
1192
|
this.syncDropListDisabledState();
|
|
831
1193
|
}
|
|
832
|
-
/** Whether the tags in the list are removable. */
|
|
833
|
-
// TODO: Skipped for migration because:
|
|
834
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
835
|
-
get removable() {
|
|
836
|
-
return this._removable;
|
|
837
|
-
}
|
|
838
|
-
set removable(value) {
|
|
839
|
-
this._removable = value;
|
|
840
|
-
this.syncTagsRemovableState();
|
|
841
|
-
}
|
|
842
1194
|
/**
|
|
843
1195
|
* Tab index of the tag list. This property is ignored when the tag list contains a tag input or is disabled.
|
|
844
1196
|
*
|
|
845
1197
|
* @docs-private
|
|
846
1198
|
*/
|
|
847
|
-
// TODO: Skipped for migration because:
|
|
848
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
849
1199
|
get tabIndex() {
|
|
850
|
-
return this.
|
|
1200
|
+
return this.resolvedTabIndex();
|
|
851
1201
|
}
|
|
852
1202
|
set tabIndex(value) {
|
|
853
1203
|
this.userTabIndex = value;
|
|
854
|
-
this._tabIndex
|
|
1204
|
+
this._tabIndex.set(value);
|
|
1205
|
+
}
|
|
1206
|
+
/**
|
|
1207
|
+
* The tag components contained within this tag list.
|
|
1208
|
+
*
|
|
1209
|
+
* @docs-private
|
|
1210
|
+
*/
|
|
1211
|
+
get tags() {
|
|
1212
|
+
return this.tagsList();
|
|
1213
|
+
}
|
|
1214
|
+
ngOnChanges(changes) {
|
|
1215
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
1216
|
+
if (changes['draggableInput']) {
|
|
1217
|
+
const draggable = this.draggableInput();
|
|
1218
|
+
if (draggable !== undefined)
|
|
1219
|
+
this.draggable = draggable;
|
|
1220
|
+
}
|
|
1221
|
+
if (changes['tabIndexInput']) {
|
|
1222
|
+
const tabIndex = this.tabIndexInput();
|
|
1223
|
+
if (tabIndex !== undefined)
|
|
1224
|
+
this.tabIndex = tabIndex;
|
|
1225
|
+
}
|
|
855
1226
|
}
|
|
856
1227
|
constructor() {
|
|
857
1228
|
this.elementRef = inject(ElementRef);
|
|
@@ -869,23 +1240,74 @@ class KbqTagList {
|
|
|
869
1240
|
*
|
|
870
1241
|
* @docs-private
|
|
871
1242
|
*/
|
|
872
|
-
this.controlType = 'tag-list';
|
|
1243
|
+
this.controlType = 'tag-list';
|
|
1244
|
+
this.errorStateTracker = new KbqErrorStateTracker(this.defaultErrorStateMatcher, this.ngControl, this.parentFormGroup, this.parentForm);
|
|
1245
|
+
/** @docs-private */
|
|
1246
|
+
this.valueInput = input(undefined, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
|
|
1247
|
+
/**
|
|
1248
|
+
* Implemented as part of KbqFormFieldControl. Set with `[value]`, by the form control and by the rendered
|
|
1249
|
+
* tags.
|
|
1250
|
+
*
|
|
1251
|
+
* @docs-private
|
|
1252
|
+
*/
|
|
1253
|
+
this.value = linkedSignal(() => this.valueInput(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1254
|
+
/**
|
|
1255
|
+
* Implemented as part of KbqFormFieldControl.
|
|
1256
|
+
*
|
|
1257
|
+
* @docs-private
|
|
1258
|
+
*/
|
|
1259
|
+
this.id = computed(() => this.registeredInput()?.id() ?? this.uid, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1260
|
+
/**
|
|
1261
|
+
* Implemented as part of KbqFormFieldControl.
|
|
1262
|
+
*
|
|
1263
|
+
* @docs-private
|
|
1264
|
+
*/
|
|
1265
|
+
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1266
|
+
/** @docs-private */
|
|
1267
|
+
this.placeholderInput = input(undefined, { ...(ngDevMode ? { debugName: "placeholderInput" } : /* istanbul ignore next */ {}), alias: 'placeholder' });
|
|
873
1268
|
/**
|
|
874
|
-
*
|
|
875
|
-
*
|
|
1269
|
+
* Implemented as part of KbqFormFieldControl. Taken from the `kbqTagInput` when there is one.
|
|
1270
|
+
*
|
|
876
1271
|
* @docs-private
|
|
877
1272
|
*/
|
|
878
|
-
this.
|
|
879
|
-
|
|
1273
|
+
this.placeholder = computed(() => {
|
|
1274
|
+
const tagInput = this.registeredInput();
|
|
1275
|
+
return tagInput ? tagInput.placeholder() : this.placeholderInput();
|
|
1276
|
+
}, ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
1277
|
+
/** Whether any tags or the kbqTagInput inside of this tag-list has focus. */
|
|
1278
|
+
// Derived from the current tags: one removed while focused fires no blur. Read from the query, as syncing
|
|
1279
|
+
// `tags` emits `changes`, whose subscribers must not run inside a computed.
|
|
1280
|
+
this.focused = computed(() => !!this.registeredInput()?.focused() || this.tagsQuery().some((tag) => tag.hasFocus), ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
880
1281
|
/**
|
|
881
1282
|
* Implemented as part of KbqFormFieldControl. Forwarded from the registered `kbqTagInput`, which
|
|
882
1283
|
* is the element the browser actually autofills — the tag list itself is not an input.
|
|
883
1284
|
*
|
|
884
1285
|
* @docs-private
|
|
885
1286
|
*/
|
|
886
|
-
this.autofilled = computed(() => this.registeredInput()?.autofilled?.() ?? false, ...(ngDevMode ? [{ debugName: "autofilled" }] : []));
|
|
887
|
-
|
|
888
|
-
|
|
1287
|
+
this.autofilled = computed(() => this.registeredInput()?.autofilled?.() ?? false, ...(ngDevMode ? [{ debugName: "autofilled" }] : /* istanbul ignore next */ []));
|
|
1288
|
+
/**
|
|
1289
|
+
* Implemented as part of KbqFormFieldControl.
|
|
1290
|
+
*
|
|
1291
|
+
* @docs-private
|
|
1292
|
+
*/
|
|
1293
|
+
this.empty = computed(() => {
|
|
1294
|
+
const tagInput = this.registeredInput();
|
|
1295
|
+
return (!tagInput || tagInput.empty()) && this.tagsQuery().length === 0;
|
|
1296
|
+
}, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
|
|
1297
|
+
/** @docs-private */
|
|
1298
|
+
this.disabledInput = input(false, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
1299
|
+
transform: booleanAttribute });
|
|
1300
|
+
/**
|
|
1301
|
+
* Implemented as part of KbqFormFieldControl. Also set by the bound form control.
|
|
1302
|
+
*
|
|
1303
|
+
* @docs-private
|
|
1304
|
+
*/
|
|
1305
|
+
this.disabled = linkedSignal(() => this.disabledInput(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1306
|
+
this._draggable = signal(false, ...(ngDevMode ? [{ debugName: "_draggable" }] : /* istanbul ignore next */ []));
|
|
1307
|
+
// One signal per host value. The host bindings of every tag list in a view run in that view's reactive consumer,
|
|
1308
|
+
// where a signal read again by another binding costs a scan of everything the view has read.
|
|
1309
|
+
this.draggableState = computed(() => this._draggable() && !this.disabled(), ...(ngDevMode ? [{ debugName: "draggableState" }] : /* istanbul ignore next */ []));
|
|
1310
|
+
this.resolvedTabIndex = computed(() => this.disabled() || this.registeredInput() ? null : this._tabIndex(), ...(ngDevMode ? [{ debugName: "resolvedTabIndex" }] : /* istanbul ignore next */ []));
|
|
889
1311
|
/**
|
|
890
1312
|
* Emits when the user drops tag inside tag list container.
|
|
891
1313
|
*/
|
|
@@ -894,19 +1316,36 @@ class KbqTagList {
|
|
|
894
1316
|
* Whether or not this tag list is selectable. When a tag list is not selectable,
|
|
895
1317
|
* the selected states for all the tags inside the tag list are always ignored.
|
|
896
1318
|
*/
|
|
897
|
-
this.selectable = input(true, ...(ngDevMode ?
|
|
1319
|
+
this.selectable = input(true, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
898
1320
|
/** Whether the tags in the list are editable. */
|
|
899
|
-
this.editable = input(false, ...(ngDevMode ?
|
|
900
|
-
|
|
901
|
-
|
|
1321
|
+
this.editable = input(false, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1322
|
+
/**
|
|
1323
|
+
* Decides which tags the projected `KbqCleaner` removes: return `true` to clear the tag, `false` to
|
|
1324
|
+
* keep it. Disabled tags are kept by default. Bind a stable reference — a new function on every change
|
|
1325
|
+
* detection re-runs the predicate over every tag.
|
|
1326
|
+
*
|
|
1327
|
+
* A tag the list does not allow to be removed is never offered, whatever the predicate answers.
|
|
1328
|
+
*/
|
|
1329
|
+
this.clearPredicate = input((tag) => !tag.disabled, { ...(ngDevMode ? { debugName: "clearPredicate" } : /* istanbul ignore next */ {}), transform: (fn) => {
|
|
1330
|
+
if (typeof fn !== 'function') {
|
|
1331
|
+
throw Error('`clearPredicate` must be a function.');
|
|
1332
|
+
}
|
|
1333
|
+
return fn;
|
|
1334
|
+
} });
|
|
1335
|
+
/** Whether the tags in the list are removable. */
|
|
1336
|
+
// Nothing is pushed onto the tags: each folds this into its own `removable` computed, and a push would
|
|
1337
|
+
// overwrite a tag's own `[removable]="false"`, which Angular never re-writes.
|
|
1338
|
+
this.removable = input(true, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1339
|
+
this._tabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_tabIndex" }] : /* istanbul ignore next */ []));
|
|
902
1340
|
/**
|
|
903
1341
|
* Event that emits whenever the raw value of the tag-list changes. This is here primarily
|
|
904
1342
|
* to facilitate the two-way binding for the `value` input.
|
|
1343
|
+
*
|
|
905
1344
|
* @docs-private
|
|
906
1345
|
*/
|
|
907
1346
|
this.valueChange = output();
|
|
908
1347
|
/** @docs-private */
|
|
909
|
-
this.uid =
|
|
1348
|
+
this.uid = inject(_IdGenerator).getId('kbq-tag-list-');
|
|
910
1349
|
/**
|
|
911
1350
|
* User defined tab index.
|
|
912
1351
|
* When it is not null, use user defined tab index. Otherwise use tabIndex
|
|
@@ -914,21 +1353,25 @@ class KbqTagList {
|
|
|
914
1353
|
* @docs-private
|
|
915
1354
|
*/
|
|
916
1355
|
this.userTabIndex = null;
|
|
1356
|
+
/** An object used to control when error messages are shown. */
|
|
1357
|
+
this.errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : /* istanbul ignore next */ []));
|
|
917
1358
|
/** Event emitted when the selected tag list value has been changed by the user. */
|
|
918
1359
|
this.change = output();
|
|
919
1360
|
/** @docs-private */
|
|
920
|
-
this.cleaner = contentChild(KbqCleaner, ...(ngDevMode ?
|
|
1361
|
+
this.cleaner = contentChild(KbqCleaner, { ...(ngDevMode ? { debugName: "cleaner" } : /* istanbul ignore next */ {}), descendants: false });
|
|
1362
|
+
this.tagsQuery = contentChildren(forwardRef(() => KbqTag), { ...(ngDevMode ? { debugName: "tagsQuery" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1363
|
+
this.tagsList = kbqQueryListFrom(this.tagsQuery);
|
|
921
1364
|
/**
|
|
922
1365
|
* Whether the component is in an error state.
|
|
923
1366
|
*
|
|
924
1367
|
* @docs-private
|
|
925
1368
|
*/
|
|
926
|
-
this.errorState =
|
|
1369
|
+
this.errorState = this.errorStateTracker.errorState;
|
|
927
1370
|
/**
|
|
928
1371
|
* The same control as `tagInput`, kept in a signal so `autofilled` can track it reactively —
|
|
929
1372
|
* `registerInput()` runs after the first read.
|
|
930
1373
|
*/
|
|
931
|
-
this.registeredInput = signal(undefined, ...(ngDevMode ? [{ debugName: "registeredInput" }] : []));
|
|
1374
|
+
this.registeredInput = signal(undefined, ...(ngDevMode ? [{ debugName: "registeredInput" }] : /* istanbul ignore next */ []));
|
|
932
1375
|
/** True when the next `tags.changes` emission is triggered by a UI action, not programmatic update. */
|
|
933
1376
|
this.pendingUIChange = false;
|
|
934
1377
|
/** Shared range selection state used by pointer and keyboard interactions. */
|
|
@@ -939,9 +1382,19 @@ class KbqTagList {
|
|
|
939
1382
|
* appropriate tag that should receive focus until the array of tags updated completely.
|
|
940
1383
|
*/
|
|
941
1384
|
this.lastDestroyedTagIndex = null;
|
|
1385
|
+
/**
|
|
1386
|
+
* Tags the list has asked the consumer to drop. They stay rendered, and stay in `tags`, until the
|
|
1387
|
+
* consumer's own view is re-checked, so until then they cannot be given focus.
|
|
1388
|
+
*/
|
|
1389
|
+
this.pendingRemoval = new Set();
|
|
942
1390
|
/** Triggers unsubscription from all per-tags streams when tags are reset. */
|
|
943
1391
|
this.tagsSubscriptions$ = new Subject();
|
|
944
1392
|
/** @docs-private */
|
|
1393
|
+
this.draggableInput = input(undefined, { ...(ngDevMode ? { debugName: "draggableInput" } : /* istanbul ignore next */ {}), alias: 'draggable',
|
|
1394
|
+
transform: booleanAttribute });
|
|
1395
|
+
/** @docs-private */
|
|
1396
|
+
this.tabIndexInput = input(undefined, { ...(ngDevMode ? { debugName: "tabIndexInput" } : /* istanbul ignore next */ {}), alias: 'tabIndex' });
|
|
1397
|
+
/** @docs-private */
|
|
945
1398
|
this.onTouched = () => { };
|
|
946
1399
|
/** @docs-private */
|
|
947
1400
|
this.onChange = () => { };
|
|
@@ -949,6 +1402,11 @@ class KbqTagList {
|
|
|
949
1402
|
this.ngControl.valueAccessor = this;
|
|
950
1403
|
}
|
|
951
1404
|
this.setupDropListInitialProperties();
|
|
1405
|
+
// A disabled list cannot be reordered.
|
|
1406
|
+
effect(() => {
|
|
1407
|
+
this.disabled();
|
|
1408
|
+
untracked(() => this.syncDropListDisabledState());
|
|
1409
|
+
});
|
|
952
1410
|
}
|
|
953
1411
|
ngDoCheck() {
|
|
954
1412
|
if (this.ngControl) {
|
|
@@ -968,22 +1426,13 @@ class KbqTagList {
|
|
|
968
1426
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
969
1427
|
.subscribe((dir) => this.keyManager.withHorizontalOrientation(dir));
|
|
970
1428
|
}
|
|
971
|
-
|
|
972
|
-
// it back to the first tag when the user tabs out.
|
|
973
|
-
this.keyManager.tabOut.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
974
|
-
this._tabIndex = -1;
|
|
975
|
-
// Direct DOM write since the binding update is deferred with eventCoalescing.
|
|
976
|
-
this.elementRef.nativeElement.tabIndex = -1;
|
|
977
|
-
setTimeout(() => {
|
|
978
|
-
this._tabIndex = this.userTabIndex || 0;
|
|
979
|
-
this.changeDetectorRef.markForCheck();
|
|
980
|
-
});
|
|
981
|
-
});
|
|
1429
|
+
kbqLeaveTabOrderOnTabOut(this.keyManager.tabOut, this.elementRef.nativeElement, () => this.tabIndex, this.destroyRef);
|
|
982
1430
|
// When the list changes, re-subscribe
|
|
983
1431
|
this.tags.changes
|
|
984
1432
|
.pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
|
|
985
1433
|
.subscribe((currentTags) => {
|
|
986
1434
|
this.resetTags();
|
|
1435
|
+
this.pendingRemoval.clear();
|
|
987
1436
|
if (this.rangeSelection) {
|
|
988
1437
|
const tags = this.tags.toArray();
|
|
989
1438
|
if (!tags.includes(this.rangeSelection.anchor) || !tags.includes(this.rangeSelection.activeEnd)) {
|
|
@@ -997,7 +1446,6 @@ class KbqTagList {
|
|
|
997
1446
|
// Defer setting the value in order to avoid the "Expression
|
|
998
1447
|
// has changed after it was checked" errors from Angular.
|
|
999
1448
|
Promise.resolve().then(() => {
|
|
1000
|
-
this.stateChanges.next();
|
|
1001
1449
|
if (currentTags && this.pendingUIChange) {
|
|
1002
1450
|
this.pendingUIChange = false;
|
|
1003
1451
|
// The latch can survive a UI action the consumer rejected (nothing was
|
|
@@ -1011,25 +1459,21 @@ class KbqTagList {
|
|
|
1011
1459
|
});
|
|
1012
1460
|
});
|
|
1013
1461
|
}
|
|
1462
|
+
ngAfterContentChecked() {
|
|
1463
|
+
// Syncs the list here so `changes` emits after the projected items are bound and before the host bindings.
|
|
1464
|
+
this.tagsList();
|
|
1465
|
+
}
|
|
1014
1466
|
ngAfterViewInit() {
|
|
1015
1467
|
this.setupFocusMonitor();
|
|
1016
1468
|
}
|
|
1017
1469
|
ngOnDestroy() {
|
|
1018
|
-
this.stateChanges.complete();
|
|
1019
1470
|
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
1020
1471
|
this.tagsSubscriptions$.next();
|
|
1021
1472
|
}
|
|
1022
1473
|
/** @docs-private */
|
|
1023
1474
|
updateErrorState() {
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
const matcher = this.errorStateMatcher || this.defaultErrorStateMatcher;
|
|
1027
|
-
const control = this.ngControl ? this.ngControl.control : null;
|
|
1028
|
-
const newState = matcher.isErrorState(control, parent);
|
|
1029
|
-
if (newState !== oldState) {
|
|
1030
|
-
this.errorState = newState;
|
|
1031
|
-
this.stateChanges.next();
|
|
1032
|
-
}
|
|
1475
|
+
this.errorStateTracker.errorStateMatcher = this.errorStateMatcher();
|
|
1476
|
+
this.errorStateTracker.updateErrorState();
|
|
1033
1477
|
}
|
|
1034
1478
|
/** Notifies that the next `tags.changes` emission is UI-initiated. */
|
|
1035
1479
|
notifyPendingTagChange() {
|
|
@@ -1048,7 +1492,7 @@ class KbqTagList {
|
|
|
1048
1492
|
* Implemented as part of ControlValueAccessor.
|
|
1049
1493
|
*/
|
|
1050
1494
|
writeValue(value) {
|
|
1051
|
-
this.value
|
|
1495
|
+
this.value.set(value);
|
|
1052
1496
|
}
|
|
1053
1497
|
/**
|
|
1054
1498
|
* Implemented as part of ControlValueAccessor.
|
|
@@ -1066,8 +1510,7 @@ class KbqTagList {
|
|
|
1066
1510
|
* Implemented as part of ControlValueAccessor.
|
|
1067
1511
|
*/
|
|
1068
1512
|
setDisabledState(isDisabled) {
|
|
1069
|
-
this.disabled
|
|
1070
|
-
this.stateChanges.next();
|
|
1513
|
+
this.disabled.set(isDisabled);
|
|
1071
1514
|
}
|
|
1072
1515
|
/**
|
|
1073
1516
|
* Implemented as part of KbqFormFieldControl.
|
|
@@ -1081,18 +1524,26 @@ class KbqTagList {
|
|
|
1081
1524
|
* Focuses the tag list. If there is a tag input, focuses that instead.
|
|
1082
1525
|
*/
|
|
1083
1526
|
focus() {
|
|
1084
|
-
|
|
1527
|
+
// Untracked, like the other imperative methods: called from a consumer's `effect()`, the state read on the
|
|
1528
|
+
// way — `disabled`, the tags and their state — would make the effect run again whenever it changes.
|
|
1529
|
+
untracked(() => this.focusFirstTag());
|
|
1530
|
+
}
|
|
1531
|
+
focusFirstTag() {
|
|
1532
|
+
if (this.disabled())
|
|
1085
1533
|
return;
|
|
1086
1534
|
if (this.tagInput) {
|
|
1087
1535
|
this.focusInput();
|
|
1088
|
-
this.stateChanges.next();
|
|
1089
1536
|
return;
|
|
1090
1537
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1538
|
+
// `tags` still lists the tags a pending removal has not rendered away yet, so handing focus to one
|
|
1539
|
+
// of those gives it to a view about to be destroyed and it ends up on the body.
|
|
1540
|
+
const index = this.tags?.toArray().findIndex((tag) => !this.pendingRemoval.has(tag) && !tag.disabled) ?? -1;
|
|
1541
|
+
if (index > -1) {
|
|
1542
|
+
this.keyManager.setActiveItem(index);
|
|
1094
1543
|
return;
|
|
1095
1544
|
}
|
|
1545
|
+
// Nothing is left to take it, so keep focus on the list rather than lose it to the body.
|
|
1546
|
+
this.elementRef.nativeElement.focus();
|
|
1096
1547
|
}
|
|
1097
1548
|
/**
|
|
1098
1549
|
* Focuses the tag input inside the tag list.
|
|
@@ -1112,7 +1563,7 @@ class KbqTagList {
|
|
|
1112
1563
|
handleSelectionInteraction(tag, extendRange) {
|
|
1113
1564
|
const tags = this.tags.toArray();
|
|
1114
1565
|
const tagIndex = tags.indexOf(tag);
|
|
1115
|
-
if (this.disabled || !tag.selectable || tag.disabled || !this.isValidIndex(tagIndex))
|
|
1566
|
+
if (this.disabled() || !tag.selectable() || tag.disabled || !this.isValidIndex(tagIndex))
|
|
1116
1567
|
return;
|
|
1117
1568
|
if (extendRange) {
|
|
1118
1569
|
this.extendSelectionTo(tag);
|
|
@@ -1127,7 +1578,7 @@ class KbqTagList {
|
|
|
1127
1578
|
*/
|
|
1128
1579
|
keydown(event) {
|
|
1129
1580
|
const target = event.target;
|
|
1130
|
-
if (this.disabled || isNull(target))
|
|
1581
|
+
if (this.disabled() || isNull(target))
|
|
1131
1582
|
return;
|
|
1132
1583
|
const shouldSelectAll = this.selectable() && isSelectAll(event);
|
|
1133
1584
|
const shouldUpdateKeyboardRange = this.selectable() &&
|
|
@@ -1140,7 +1591,7 @@ class KbqTagList {
|
|
|
1140
1591
|
if (this.isInputEmpty(target)) {
|
|
1141
1592
|
if (event.keyCode === BACKSPACE ||
|
|
1142
1593
|
event.keyCode === LEFT_ARROW ||
|
|
1143
|
-
(event.keyCode === TAB && event.shiftKey)) {
|
|
1594
|
+
(event.keyCode === TAB$1 && event.shiftKey)) {
|
|
1144
1595
|
this.keyManager.setLastItemActive();
|
|
1145
1596
|
event.preventDefault();
|
|
1146
1597
|
return;
|
|
@@ -1182,37 +1633,37 @@ class KbqTagList {
|
|
|
1182
1633
|
}
|
|
1183
1634
|
}
|
|
1184
1635
|
}
|
|
1185
|
-
this.stateChanges.next();
|
|
1186
1636
|
}
|
|
1187
1637
|
}
|
|
1188
1638
|
/** When blurred, mark the field as touched when focus moved outside the tag list. */
|
|
1189
1639
|
blur() {
|
|
1190
|
-
|
|
1191
|
-
this.
|
|
1192
|
-
|
|
1193
|
-
if (!this.disabled) {
|
|
1194
|
-
if (this.tagInput) {
|
|
1195
|
-
// If there's a tag input, we should check whether the focus moved to tag input.
|
|
1196
|
-
// If the focus is not moved to tag input, mark the field as touched. If the focus moved
|
|
1197
|
-
// to tag input, do nothing.
|
|
1198
|
-
// Timeout is needed to wait for the focus() event trigger on tag input.
|
|
1199
|
-
setTimeout(() => {
|
|
1200
|
-
if (!this.focused) {
|
|
1201
|
-
this.markAsTouched();
|
|
1202
|
-
}
|
|
1203
|
-
});
|
|
1640
|
+
untracked(() => {
|
|
1641
|
+
if (!this.hasFocusedTag()) {
|
|
1642
|
+
this.keyManager.setActiveItem(-1);
|
|
1204
1643
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1644
|
+
if (!this.disabled()) {
|
|
1645
|
+
if (this.tagInput) {
|
|
1646
|
+
// If there's a tag input, we should check whether the focus moved to tag input.
|
|
1647
|
+
// If the focus is not moved to tag input, mark the field as touched. If the focus moved
|
|
1648
|
+
// to tag input, do nothing.
|
|
1649
|
+
// Timeout is needed to wait for the focus() event trigger on tag input.
|
|
1650
|
+
setTimeout(() => {
|
|
1651
|
+
if (!this.focused()) {
|
|
1652
|
+
this.markAsTouched();
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
else {
|
|
1657
|
+
// If there's no tag input, then mark the field as touched.
|
|
1658
|
+
this.markAsTouched();
|
|
1659
|
+
}
|
|
1208
1660
|
}
|
|
1209
|
-
}
|
|
1661
|
+
});
|
|
1210
1662
|
}
|
|
1211
1663
|
/** Mark the field as touched */
|
|
1212
1664
|
markAsTouched() {
|
|
1213
1665
|
this.onTouched();
|
|
1214
1666
|
this.changeDetectorRef.markForCheck();
|
|
1215
|
-
this.stateChanges.next();
|
|
1216
1667
|
}
|
|
1217
1668
|
/**
|
|
1218
1669
|
* Check the tab index as you should not be allowed to focus an empty list.
|
|
@@ -1221,7 +1672,7 @@ class KbqTagList {
|
|
|
1221
1672
|
*/
|
|
1222
1673
|
updateTabIndex() {
|
|
1223
1674
|
// If we have 0 tags, we should not allow keyboard focus
|
|
1224
|
-
this._tabIndex
|
|
1675
|
+
this._tabIndex.set(this.userTabIndex || (this.tags.length === 0 ? -1 : 0));
|
|
1225
1676
|
}
|
|
1226
1677
|
/**
|
|
1227
1678
|
* If the amount of tags changed, we need to update the
|
|
@@ -1267,7 +1718,7 @@ class KbqTagList {
|
|
|
1267
1718
|
this.tags
|
|
1268
1719
|
.toArray()
|
|
1269
1720
|
.reverse()
|
|
1270
|
-
.find((tag) => tag.selectable && !tag.disabled));
|
|
1721
|
+
.find((tag) => tag.selectable() && !tag.disabled));
|
|
1271
1722
|
}
|
|
1272
1723
|
/**
|
|
1273
1724
|
* Unselects all tags in the list.
|
|
@@ -1275,7 +1726,7 @@ class KbqTagList {
|
|
|
1275
1726
|
* @docs-private
|
|
1276
1727
|
*/
|
|
1277
1728
|
unselectAll() {
|
|
1278
|
-
this.tags.forEach((tag) => tag.setSelectedState(false));
|
|
1729
|
+
untracked(() => this.tags.forEach((tag) => tag.setSelectedState(false)));
|
|
1279
1730
|
this.rangeSelection = null;
|
|
1280
1731
|
}
|
|
1281
1732
|
/**
|
|
@@ -1284,20 +1735,39 @@ class KbqTagList {
|
|
|
1284
1735
|
* @docs-private
|
|
1285
1736
|
*/
|
|
1286
1737
|
removeSelected() {
|
|
1287
|
-
this.selected.forEach((tag) => tag.remove());
|
|
1738
|
+
untracked(() => this.selected.filter((tag) => tag.canRemove).forEach((tag) => tag.remove()));
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Removes the tags `clearPredicate` accepts, which by default leaves the disabled ones in place.
|
|
1742
|
+
*
|
|
1743
|
+
* The tags belong to the consumer, so each one is asked to go through its `removed` output, the same
|
|
1744
|
+
* output the remove control reports to. Unlike that control it will ask for a disabled tag too, when
|
|
1745
|
+
* the predicate accepts one.
|
|
1746
|
+
*
|
|
1747
|
+
* @docs-private
|
|
1748
|
+
*/
|
|
1749
|
+
clear() {
|
|
1750
|
+
const targets = untracked(() => this.clearTargets);
|
|
1751
|
+
targets.forEach((tag) => this.pendingRemoval.add(tag));
|
|
1752
|
+
// `KbqCleaner` restores focus to the control right after this, and the autocomplete must not read
|
|
1753
|
+
// that as the user asking for the option list.
|
|
1754
|
+
this.tagInput?.suppressAutocompleteOnNextFocus?.();
|
|
1755
|
+
// Last to first: every handler runs before anything re-renders, so removing by position would see
|
|
1756
|
+
// the indices ahead of it shift if we went the other way.
|
|
1757
|
+
targets.reverse().forEach((tag) => tag.remove());
|
|
1288
1758
|
}
|
|
1289
1759
|
/** Whether the rendered tags no longer match the value this control last reported. */
|
|
1290
1760
|
hasTagsValueChanged() {
|
|
1291
1761
|
const currentValue = this.tags.map(({ value }) => value);
|
|
1292
|
-
|
|
1762
|
+
const value = this.value();
|
|
1763
|
+
if (!Array.isArray(value)) {
|
|
1293
1764
|
return currentValue.length > 0;
|
|
1294
1765
|
}
|
|
1295
|
-
return
|
|
1296
|
-
currentValue.some((value, index) => value !== this._value[index]));
|
|
1766
|
+
return value.length !== currentValue.length || currentValue.some((item, index) => item !== value[index]);
|
|
1297
1767
|
}
|
|
1298
1768
|
propagateTagsChanges() {
|
|
1299
1769
|
const valueToEmit = this.tags.map((tag) => tag.value);
|
|
1300
|
-
this.
|
|
1770
|
+
this.value.set(valueToEmit);
|
|
1301
1771
|
this.change.emit(new KbqTagListChange(this, valueToEmit));
|
|
1302
1772
|
this.valueChange.emit(valueToEmit);
|
|
1303
1773
|
this.onChange(valueToEmit);
|
|
@@ -1317,22 +1787,16 @@ class KbqTagList {
|
|
|
1317
1787
|
this.keyManager.setFocusOrigin(origin);
|
|
1318
1788
|
this.keyManager.updateActiveItem(tagIndex);
|
|
1319
1789
|
}
|
|
1320
|
-
this.stateChanges.next();
|
|
1321
|
-
});
|
|
1322
|
-
this.tagBlurChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(() => {
|
|
1323
|
-
this.blur();
|
|
1324
|
-
this.stateChanges.next();
|
|
1325
1790
|
});
|
|
1791
|
+
this.tagBlurChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(() => this.blur());
|
|
1326
1792
|
}
|
|
1327
1793
|
listenToTagsRemoved() {
|
|
1328
|
-
this.tagRemoveChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe((
|
|
1329
|
-
const tag = event.tag;
|
|
1330
|
-
const tagIndex = this.tags.toArray().indexOf(event.tag);
|
|
1794
|
+
this.tagRemoveChanges.pipe(takeUntil(this.tagsSubscriptions$)).subscribe(({ tag }) => {
|
|
1331
1795
|
// In case the tag that will be removed is currently focused, we temporarily store
|
|
1332
1796
|
// the index in order to be able to determine an appropriate sibling tag that will
|
|
1333
|
-
// receive focus.
|
|
1334
|
-
if (
|
|
1335
|
-
this.lastDestroyedTagIndex =
|
|
1797
|
+
// receive focus. Taken from the key manager: `tags` no longer holds a destroyed tag.
|
|
1798
|
+
if (tag.hasFocus && this.keyManager.activeItem === tag) {
|
|
1799
|
+
this.lastDestroyedTagIndex = this.keyManager.activeItemIndex;
|
|
1336
1800
|
}
|
|
1337
1801
|
});
|
|
1338
1802
|
// Set the pending flag so the subsequent `tags.changes` is treated as UI action.
|
|
@@ -1349,9 +1813,6 @@ class KbqTagList {
|
|
|
1349
1813
|
hasFocusedTag() {
|
|
1350
1814
|
return this.tags.some((tag) => tag.hasFocus);
|
|
1351
1815
|
}
|
|
1352
|
-
syncTagsRemovableState() {
|
|
1353
|
-
this.tags?.forEach((tag) => (tag.removable = this.removable));
|
|
1354
|
-
}
|
|
1355
1816
|
setupDropListInitialProperties() {
|
|
1356
1817
|
this.syncDropListDisabledState();
|
|
1357
1818
|
this.dropList.elementContainerSelector = '.kbq-tags-list__list-container';
|
|
@@ -1395,7 +1856,7 @@ class KbqTagList {
|
|
|
1395
1856
|
const fromIndex = Math.min(anchorIndex, activeEndIndex);
|
|
1396
1857
|
const toIndex = Math.max(anchorIndex, activeEndIndex);
|
|
1397
1858
|
tags.forEach((tag, index) => {
|
|
1398
|
-
if (tag.disabled || !tag.selectable)
|
|
1859
|
+
if (tag.disabled || !tag.selectable())
|
|
1399
1860
|
return;
|
|
1400
1861
|
const belongsToRange = index >= fromIndex && index <= toIndex;
|
|
1401
1862
|
const belongedToPreviousRange = index >= previousFromIndex && index <= previousToIndex;
|
|
@@ -1408,12 +1869,21 @@ class KbqTagList {
|
|
|
1408
1869
|
setRangeOrigin(anchor) {
|
|
1409
1870
|
this.rangeSelection = anchor ? { anchor, activeEnd: anchor } : null;
|
|
1410
1871
|
}
|
|
1411
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1412
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1872
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagList, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1873
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTagList, isStandalone: true, selector: "kbq-tag-list", inputs: { valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholderInput: { classPropertyName: "placeholderInput", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, clearPredicate: { classPropertyName: "clearPredicate", publicName: "clearPredicate", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, draggableInput: { classPropertyName: "draggableInput", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, tabIndexInput: { classPropertyName: "tabIndexInput", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropped: "dropped", valueChange: "valueChange", change: "change" }, host: { listeners: { "focus": "focus()", "blur": "blur()", "keydown": "keydown($event)" }, properties: { "class.kbq-disabled": "disabled()", "class.kbq-invalid": "errorState()", "class.kbq-tag-list_selectable": "selectable()", "class.kbq-tag-list_editable": "editable()", "class.kbq-tag-list_removable": "removable()", "class.kbq-tag-list_draggable": "draggable", "attr.tabindex": "tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [
|
|
1413
1874
|
{ provide: KbqFormFieldControl, useExisting: KbqTagList },
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1875
|
+
kbqCleanerFactoryProvider((() => {
|
|
1876
|
+
const tagList = inject(KbqTagList);
|
|
1877
|
+
return {
|
|
1878
|
+
get control() {
|
|
1879
|
+
return tagList;
|
|
1880
|
+
},
|
|
1881
|
+
clearByEscape: false,
|
|
1882
|
+
clear: (() => tagList.clear()),
|
|
1883
|
+
canClear: (() => tagList.canClear)
|
|
1884
|
+
};
|
|
1885
|
+
}))
|
|
1886
|
+
], queries: [{ propertyName: "cleaner", first: true, predicate: KbqCleaner, isSignal: true }, { propertyName: "tagsQuery", predicate: i0.forwardRef(() => KbqTag), descendants: true, isSignal: true }], exportAs: ["kbqTagList"], usesOnChanges: true, hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
|
|
1417
1887
|
<div class="kbq-tags-list__list-container">
|
|
1418
1888
|
<ng-content />
|
|
1419
1889
|
</div>
|
|
@@ -1423,9 +1893,9 @@ class KbqTagList {
|
|
|
1423
1893
|
<ng-content select="kbq-cleaner" />
|
|
1424
1894
|
</div>
|
|
1425
1895
|
}
|
|
1426
|
-
`, isInline: true, styles: ["
|
|
1896
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{animation:none;transition:none}}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1427
1897
|
}
|
|
1428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagList, decorators: [{
|
|
1429
1899
|
type: Component,
|
|
1430
1900
|
args: [{ selector: 'kbq-tag-list', template: `
|
|
1431
1901
|
<div class="kbq-tags-list__list-container">
|
|
@@ -1439,364 +1909,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1439
1909
|
}
|
|
1440
1910
|
`, providers: [
|
|
1441
1911
|
{ provide: KbqFormFieldControl, useExisting: KbqTagList },
|
|
1442
|
-
|
|
1443
|
-
|
|
1912
|
+
kbqCleanerFactoryProvider((() => {
|
|
1913
|
+
const tagList = inject(KbqTagList);
|
|
1914
|
+
return {
|
|
1915
|
+
get control() {
|
|
1916
|
+
return tagList;
|
|
1917
|
+
},
|
|
1918
|
+
clearByEscape: false,
|
|
1919
|
+
clear: (() => tagList.clear()),
|
|
1920
|
+
canClear: (() => tagList.canClear)
|
|
1921
|
+
};
|
|
1922
|
+
}))
|
|
1444
1923
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1445
1924
|
class: 'kbq-tag-list',
|
|
1446
|
-
'[class.kbq-disabled]': 'disabled',
|
|
1447
|
-
'[class.kbq-invalid]': 'errorState',
|
|
1925
|
+
'[class.kbq-disabled]': 'disabled()',
|
|
1926
|
+
'[class.kbq-invalid]': 'errorState()',
|
|
1448
1927
|
'[class.kbq-tag-list_selectable]': 'selectable()',
|
|
1449
1928
|
'[class.kbq-tag-list_editable]': 'editable()',
|
|
1450
|
-
'[class.kbq-tag-list_removable]': 'removable',
|
|
1929
|
+
'[class.kbq-tag-list_removable]': 'removable()',
|
|
1451
1930
|
'[class.kbq-tag-list_draggable]': 'draggable',
|
|
1452
1931
|
'[attr.tabindex]': 'tabIndex',
|
|
1453
1932
|
'[id]': 'uid',
|
|
1454
1933
|
'(focus)': 'focus()',
|
|
1455
1934
|
'(blur)': 'blur()',
|
|
1456
1935
|
'(keydown)': 'keydown($event)'
|
|
1457
|
-
}, hostDirectives: [CdkDropList], exportAs: 'kbqTagList', styles: ["
|
|
1458
|
-
}], ctorParameters: () => [], propDecorators: { value: [{
|
|
1459
|
-
type: Input
|
|
1460
|
-
}], required: [{
|
|
1461
|
-
type: Input
|
|
1462
|
-
}], placeholder: [{
|
|
1463
|
-
type: Input
|
|
1464
|
-
}], disabled: [{
|
|
1465
|
-
type: Input,
|
|
1466
|
-
args: [{ transform: booleanAttribute }]
|
|
1467
|
-
}], draggable: [{
|
|
1468
|
-
type: Input,
|
|
1469
|
-
args: [{ transform: booleanAttribute }]
|
|
1470
|
-
}], dropped: [{ type: i0.Output, args: ["dropped"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], removable: [{
|
|
1471
|
-
type: Input,
|
|
1472
|
-
args: [{ transform: booleanAttribute }]
|
|
1473
|
-
}], tabIndex: [{
|
|
1474
|
-
type: Input
|
|
1475
|
-
}], valueChange: [{ type: i0.Output, args: ["valueChange"] }], errorStateMatcher: [{
|
|
1476
|
-
type: Input
|
|
1477
|
-
}], change: [{ type: i0.Output, args: ["change"] }], cleaner: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqCleaner), { ...{ descendants: false }, isSignal: true }] }], tags: [{
|
|
1478
|
-
type: ContentChildren,
|
|
1479
|
-
args: [forwardRef(() => KbqTag), {
|
|
1480
|
-
// Need to use `descendants: true`,
|
|
1481
|
-
// Ivy will no longer match indirect descendants if it's left as false.
|
|
1482
|
-
descendants: true
|
|
1483
|
-
}]
|
|
1484
|
-
}] } });
|
|
1485
|
-
|
|
1486
|
-
const KBQ_TAG_INPUT_DEFAULT_SEPARATORS = [
|
|
1487
|
-
{ symbol: /\r?\n/, key: 'Enter', keyCode: ENTER$1 },
|
|
1488
|
-
{ symbol: /\t/, key: 'Tab', keyCode: TAB$1 },
|
|
1489
|
-
{ symbol: / /, key: ' ', keyCode: SPACE$1 },
|
|
1490
|
-
{ symbol: /,/, key: ',', keyCode: COMMA },
|
|
1491
|
-
{ symbol: /;/, key: ';', keyCode: SEMICOLON }
|
|
1492
|
-
];
|
|
1493
|
-
const KBQ_TAGS_DEFAULT_OPTIONS_CONFIG = { separatorKeyCodes: [ENTER$1] };
|
|
1494
|
-
/** Injection token to be used to override the default options. */
|
|
1495
|
-
const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken('kbq-tags-default-options', {
|
|
1496
|
-
providedIn: 'root',
|
|
1497
|
-
factory: () => KBQ_TAGS_DEFAULT_OPTIONS_CONFIG
|
|
1498
|
-
});
|
|
1499
|
-
/** Utility provider for `KBQ_TAGS_DEFAULT_OPTIONS`. */
|
|
1500
|
-
const kbqTagsDefaultOptionsProvider = (options) => ({
|
|
1501
|
-
provide: KBQ_TAGS_DEFAULT_OPTIONS,
|
|
1502
|
-
useValue: { ...KBQ_TAGS_DEFAULT_OPTIONS_CONFIG, ...options }
|
|
1503
|
-
});
|
|
1504
|
-
// Increasing integer for generating unique ids.
|
|
1505
|
-
let nextUniqueId = 0;
|
|
1506
|
-
/**
|
|
1507
|
-
* Directive that adds tag-specific behaviors to an input element inside `<kbq-form-field>`.
|
|
1508
|
-
* May be placed inside or outside of an `<kbq-tag-list>`.
|
|
1509
|
-
*/
|
|
1510
|
-
class KbqTagInput {
|
|
1511
|
-
/**
|
|
1512
|
-
* The list of key codes that will trigger a tagEnd event.
|
|
1513
|
-
*
|
|
1514
|
-
* Defaults to `[ENTER]`.
|
|
1515
|
-
*/
|
|
1516
|
-
// TODO: Skipped for migration because:
|
|
1517
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1518
|
-
set separatorKeyCodes(value) {
|
|
1519
|
-
this._separatorKeyCodes = value || [];
|
|
1520
|
-
}
|
|
1521
|
-
/**
|
|
1522
|
-
* The effective set of separators: entries gated by `keyCode` are included only when that
|
|
1523
|
-
* code is present in `separatorKeyCodes`; entries without a `keyCode` (no single-keystroke
|
|
1524
|
-
* equivalent, e.g. a run of whitespace) are always included.
|
|
1525
|
-
* @docs-private
|
|
1526
|
-
*/
|
|
1527
|
-
get separators() {
|
|
1528
|
-
return this._separators.filter((separator) => separator.keyCode === undefined || this._separatorKeyCodes.includes(separator.keyCode));
|
|
1529
|
-
}
|
|
1530
|
-
/** Register input for tag list */
|
|
1531
|
-
// TODO: Skipped for migration because:
|
|
1532
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1533
|
-
set tagList(value) {
|
|
1534
|
-
if (value) {
|
|
1535
|
-
this._tagList = value;
|
|
1536
|
-
this._tagList.registerInput(this);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
/**
|
|
1540
|
-
* Whether or not the tagEnd event will be emitted when the input is blurred.
|
|
1541
|
-
*/
|
|
1542
|
-
// TODO: Skipped for migration because:
|
|
1543
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1544
|
-
get addOnBlur() {
|
|
1545
|
-
return this._addOnBlur;
|
|
1546
|
-
}
|
|
1547
|
-
set addOnBlur(value) {
|
|
1548
|
-
this._addOnBlur = coerceBooleanProperty(value);
|
|
1549
|
-
}
|
|
1550
|
-
/** Whether the input is disabled. */
|
|
1551
|
-
// TODO: Skipped for migration because:
|
|
1552
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1553
|
-
get disabled() {
|
|
1554
|
-
return this._disabled || (this._tagList && this._tagList.disabled);
|
|
1555
|
-
}
|
|
1556
|
-
set disabled(value) {
|
|
1557
|
-
this._disabled = coerceBooleanProperty(value);
|
|
1558
|
-
}
|
|
1559
|
-
/** Whether the input is empty. */
|
|
1560
|
-
get empty() {
|
|
1561
|
-
return !this.inputElement.value;
|
|
1562
|
-
}
|
|
1563
|
-
constructor() {
|
|
1564
|
-
this.elementRef = inject(ElementRef);
|
|
1565
|
-
this.defaultOptions = inject(KBQ_TAGS_DEFAULT_OPTIONS);
|
|
1566
|
-
this.trimDirective = inject(KbqTrim, { optional: true, self: true });
|
|
1567
|
-
/**
|
|
1568
|
-
* The form control instance bound to the input, if any.
|
|
1569
|
-
*
|
|
1570
|
-
* @deprecated Read only, and unused by the library: validation lives on the `<kbq-tag-list>`
|
|
1571
|
-
* control. Binding `[formControl]`/`[ngModel]` to the input itself stays supported — it is what
|
|
1572
|
-
* `kbqAutocomplete` drives the input through — only its validators are not consulted.
|
|
1573
|
-
* Will be removed in a future major release.
|
|
1574
|
-
* @docs-private
|
|
1575
|
-
*/
|
|
1576
|
-
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
1577
|
-
/**
|
|
1578
|
-
* The autocomplete trigger attached to the input, if any.
|
|
1579
|
-
* @docs-private
|
|
1580
|
-
*/
|
|
1581
|
-
this.autocompleteTrigger = inject(KbqAutocompleteTrigger, { optional: true, self: true });
|
|
1582
|
-
/**
|
|
1583
|
-
* Whether the control is focused.
|
|
1584
|
-
* @docs-private
|
|
1585
|
-
*/
|
|
1586
|
-
this.focused = false;
|
|
1587
|
-
/** Whether the control's value was filled in by the browser. */
|
|
1588
|
-
this.autofilled = kbqInjectAutofilled();
|
|
1589
|
-
this._separatorKeyCodes = this.defaultOptions.separatorKeyCodes;
|
|
1590
|
-
this._separators = this.defaultOptions.separators || KBQ_TAG_INPUT_DEFAULT_SEPARATORS;
|
|
1591
|
-
/** Emitted when a tag is to be added. */
|
|
1592
|
-
this.tagEnd = output({ alias: 'kbqTagInputTokenEnd' });
|
|
1593
|
-
/** A value indicating whether allow/prevent tags duplication */
|
|
1594
|
-
this.distinct = input(false, ...(ngDevMode ? [{ debugName: "distinct" }] : []));
|
|
1595
|
-
/** The input's placeholder text. */
|
|
1596
|
-
// TODO: Skipped for migration because:
|
|
1597
|
-
// This input overrides a field from a superclass, while the superclass field
|
|
1598
|
-
// is not migrated.
|
|
1599
|
-
this.placeholder = '';
|
|
1600
|
-
/** Unique id for the input. */
|
|
1601
|
-
// TODO: Skipped for migration because:
|
|
1602
|
-
// This input overrides a field from a superclass, while the superclass field
|
|
1603
|
-
// is not migrated.
|
|
1604
|
-
this.id = `kbq-tag-list-input-${nextUniqueId++}`;
|
|
1605
|
-
this._addOnBlur = true;
|
|
1606
|
-
/**
|
|
1607
|
-
* Whether the tagEnd event will be emitted when the text pasted.
|
|
1608
|
-
* @default true
|
|
1609
|
-
*/
|
|
1610
|
-
this.addOnPaste = input(this.defaultOptions.addOnPaste ?? true, ...(ngDevMode ? [{ debugName: "addOnPaste", alias: 'kbqTagInputAddOnPaste',
|
|
1611
|
-
transform: booleanAttribute }] : [{
|
|
1612
|
-
alias: 'kbqTagInputAddOnPaste',
|
|
1613
|
-
transform: booleanAttribute
|
|
1614
|
-
}]));
|
|
1615
|
-
this._disabled = false;
|
|
1616
|
-
this.inputElement = this.elementRef.nativeElement;
|
|
1617
|
-
}
|
|
1618
|
-
ngOnChanges() {
|
|
1619
|
-
this._tagList.stateChanges.next();
|
|
1620
|
-
}
|
|
1621
|
-
/** @docs-private */
|
|
1622
|
-
onKeydown(event) {
|
|
1623
|
-
const isSeparatorKey = this.matchesInputSeparator(event);
|
|
1624
|
-
if (!this.inputElement.value) {
|
|
1625
|
-
if (isSeparatorKey && event.keyCode !== TAB$1) {
|
|
1626
|
-
event.preventDefault();
|
|
1627
|
-
}
|
|
1628
|
-
this._tagList.keydown(event);
|
|
1629
|
-
event.stopPropagation();
|
|
1630
|
-
return;
|
|
1631
|
-
}
|
|
1632
|
-
if (isSeparatorKey) {
|
|
1633
|
-
if (event.keyCode === ENTER$1 &&
|
|
1634
|
-
this.autocompleteTrigger?.panelOpen &&
|
|
1635
|
-
this.autocompleteTrigger?.activeOption) {
|
|
1636
|
-
return;
|
|
1637
|
-
}
|
|
1638
|
-
this.emitTagEnd();
|
|
1639
|
-
event.preventDefault();
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
/**
|
|
1643
|
-
* Checks to see if the blur should emit the (tagEnd) event.
|
|
1644
|
-
* @docs-private
|
|
1645
|
-
*/
|
|
1646
|
-
blur(event) {
|
|
1647
|
-
this.focused = false;
|
|
1648
|
-
// Blur the tag list if it is not focused
|
|
1649
|
-
if (!this._tagList.focused) {
|
|
1650
|
-
this._tagList.blur();
|
|
1651
|
-
}
|
|
1652
|
-
// Chromium fires `blur` synchronously when the input becomes disabled, so without this
|
|
1653
|
-
// guard disabling a focused tag input would append whatever was typed.
|
|
1654
|
-
if (!this.disabled && this.addOnBlur && (this.autocompleteTrigger?.onInputBlur()(event) ?? true)) {
|
|
1655
|
-
this.emitTagEnd();
|
|
1656
|
-
}
|
|
1657
|
-
this._tagList.stateChanges.next();
|
|
1658
|
-
}
|
|
1659
|
-
/**
|
|
1660
|
-
* @deprecated No-op. Validation belongs to the `<kbq-tag-list>` form control, which
|
|
1661
|
-
* revalidates itself whenever its value changes. Will be removed in a future major release.
|
|
1662
|
-
* @docs-private
|
|
1663
|
-
*/
|
|
1664
|
-
triggerValidation() { }
|
|
1665
|
-
/**
|
|
1666
|
-
* Checks to see if the (tagEnd) event needs to be emitted.
|
|
1667
|
-
* @docs-private
|
|
1668
|
-
*/
|
|
1669
|
-
emitTagEnd() {
|
|
1670
|
-
this.addTag(this.trimValue(this.inputElement.value), this.existingTagValues());
|
|
1671
|
-
}
|
|
1672
|
-
/**
|
|
1673
|
-
* Whether the current input value duplicates an existing tag.
|
|
1674
|
-
* @docs-private
|
|
1675
|
-
*/
|
|
1676
|
-
get hasDuplicates() {
|
|
1677
|
-
return this.tagValues().has(this.trimValue(this.inputElement.value));
|
|
1678
|
-
}
|
|
1679
|
-
/** @docs-private */
|
|
1680
|
-
onInput() {
|
|
1681
|
-
// Let tag list know whenever the value changes.
|
|
1682
|
-
this._tagList.stateChanges.next();
|
|
1683
|
-
}
|
|
1684
|
-
/** @docs-private */
|
|
1685
|
-
onPaste($event) {
|
|
1686
|
-
if (!$event.clipboardData) {
|
|
1687
|
-
return;
|
|
1688
|
-
}
|
|
1689
|
-
const data = $event.clipboardData.getData('text');
|
|
1690
|
-
if (!data || !this.addOnPaste()) {
|
|
1691
|
-
return;
|
|
1692
|
-
}
|
|
1693
|
-
const separatorsInString = this.getPasteSeparatorPatterns(data);
|
|
1694
|
-
// prettier-ignore
|
|
1695
|
-
const dividedString = separatorsInString.length > 0 ?
|
|
1696
|
-
[...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
|
|
1697
|
-
[data];
|
|
1698
|
-
// Built once per paste, then updated as items are accepted, so a batch also dedupes
|
|
1699
|
-
// against itself — `tags` is a QueryList that cannot refresh between iterations.
|
|
1700
|
-
const existingValues = this.existingTagValues();
|
|
1701
|
-
dividedString.forEach((item) => this.addTag(this.trimValue(item), existingValues));
|
|
1702
|
-
$event.preventDefault();
|
|
1703
|
-
$event.stopPropagation();
|
|
1704
|
-
}
|
|
1705
|
-
/** @docs-private */
|
|
1706
|
-
onFocus() {
|
|
1707
|
-
this.focused = true;
|
|
1708
|
-
this._tagList.unselectAll();
|
|
1709
|
-
this._tagList.stateChanges.next();
|
|
1710
|
-
}
|
|
1711
|
-
/** Focuses the input. */
|
|
1712
|
-
focus() {
|
|
1713
|
-
this.inputElement.focus();
|
|
1714
|
-
}
|
|
1715
|
-
getPasteSeparatorPatterns(value) {
|
|
1716
|
-
return this.separators
|
|
1717
|
-
.filter((separator) => (!separator.appliesTo || separator.appliesTo.includes('paste')) &&
|
|
1718
|
-
value.search(separator.symbol) > -1)
|
|
1719
|
-
.map((separator) => separator.symbol.source);
|
|
1720
|
-
}
|
|
1721
|
-
/**
|
|
1722
|
-
* Single path for adding a tag, shared by typed input, blur and paste.
|
|
1723
|
-
* `existingValues` is `null` unless `distinct` is on, and is mutated as values are accepted.
|
|
1724
|
-
*/
|
|
1725
|
-
addTag(value, existingValues) {
|
|
1726
|
-
if (existingValues) {
|
|
1727
|
-
if (existingValues.has(value))
|
|
1728
|
-
return;
|
|
1729
|
-
existingValues.add(value);
|
|
1730
|
-
}
|
|
1731
|
-
// An empty value adds nothing, so latching the flag here would make the next
|
|
1732
|
-
// programmatic tags update look UI-initiated.
|
|
1733
|
-
if (value) {
|
|
1734
|
-
this._tagList?.notifyPendingTagChange();
|
|
1735
|
-
}
|
|
1736
|
-
this.tagEnd.emit({ input: this.inputElement, value });
|
|
1737
|
-
}
|
|
1738
|
-
/** Values to dedupe against, or `null` when duplicates are allowed. */
|
|
1739
|
-
existingTagValues() {
|
|
1740
|
-
return this.distinct() ? this.tagValues() : null;
|
|
1741
|
-
}
|
|
1742
|
-
tagValues() {
|
|
1743
|
-
return new Set(this._tagList.tags.map(({ value }) => value));
|
|
1744
|
-
}
|
|
1745
|
-
trimValue(value) {
|
|
1746
|
-
return (this.trimDirective ? this.trimDirective.trim(value) : value);
|
|
1747
|
-
}
|
|
1748
|
-
/** Checks whether a keydown event matches a separator that applies to typed input. */
|
|
1749
|
-
matchesInputSeparator(event) {
|
|
1750
|
-
return this.separators.some((separator) => separator.key === event.key &&
|
|
1751
|
-
!hasModifierKey(event) &&
|
|
1752
|
-
(!separator.appliesTo || separator.appliesTo.includes('input')));
|
|
1753
|
-
}
|
|
1754
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1755
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqTagInput, isStandalone: true, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: { classPropertyName: "separatorKeyCodes", publicName: "kbqTagInputSeparatorKeyCodes", isSignal: false, isRequired: false, transformFunction: null }, distinct: { classPropertyName: "distinct", publicName: "distinct", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, tagList: { classPropertyName: "tagList", publicName: "kbqTagInputFor", isSignal: false, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "kbqTagInputAddOnBlur", isSignal: false, isRequired: false, transformFunction: null }, addOnPaste: { classPropertyName: "addOnPaste", publicName: "kbqTagInputAddOnPaste", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { tagEnd: "kbqTagInputTokenEnd" }, host: { listeners: { "keydown": "onKeydown($event)", "blur": "blur($event)", "focus": "onFocus()", "input": "onInput()", "paste": "onPaste($event)" }, properties: { "id": "id", "attr.disabled": "disabled || null", "attr.placeholder": "placeholder || null" }, classAttribute: "kbq-tag-input" }, exportAs: ["kbqTagInput", "kbqTagInputFor"], usesOnChanges: true, hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
1756
|
-
}
|
|
1757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTagInput, decorators: [{
|
|
1758
|
-
type: Directive,
|
|
1759
|
-
args: [{
|
|
1760
|
-
selector: 'input[kbqTagInputFor]',
|
|
1761
|
-
host: {
|
|
1762
|
-
class: 'kbq-tag-input',
|
|
1763
|
-
'[id]': 'id',
|
|
1764
|
-
'[attr.disabled]': 'disabled || null',
|
|
1765
|
-
'[attr.placeholder]': 'placeholder || null',
|
|
1766
|
-
'(keydown)': 'onKeydown($event)',
|
|
1767
|
-
'(blur)': 'blur($event)',
|
|
1768
|
-
'(focus)': 'onFocus()',
|
|
1769
|
-
'(input)': 'onInput()',
|
|
1770
|
-
'(paste)': 'onPaste($event)'
|
|
1771
|
-
},
|
|
1772
|
-
hostDirectives: [KbqFieldSizingContent],
|
|
1773
|
-
exportAs: 'kbqTagInput, kbqTagInputFor'
|
|
1774
|
-
}]
|
|
1775
|
-
}], ctorParameters: () => [], propDecorators: { separatorKeyCodes: [{
|
|
1776
|
-
type: Input,
|
|
1777
|
-
args: ['kbqTagInputSeparatorKeyCodes']
|
|
1778
|
-
}], tagEnd: [{ type: i0.Output, args: ["kbqTagInputTokenEnd"] }], distinct: [{ type: i0.Input, args: [{ isSignal: true, alias: "distinct", required: false }] }], placeholder: [{
|
|
1779
|
-
type: Input
|
|
1780
|
-
}], id: [{
|
|
1781
|
-
type: Input
|
|
1782
|
-
}], tagList: [{
|
|
1783
|
-
type: Input,
|
|
1784
|
-
args: ['kbqTagInputFor']
|
|
1785
|
-
}], addOnBlur: [{
|
|
1786
|
-
type: Input,
|
|
1787
|
-
args: ['kbqTagInputAddOnBlur']
|
|
1788
|
-
}], addOnPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTagInputAddOnPaste", required: false }] }], disabled: [{
|
|
1789
|
-
type: Input
|
|
1790
|
-
}] } });
|
|
1936
|
+
}, hostDirectives: [CdkDropList], exportAs: 'kbqTagList', styles: ["@charset \"UTF-8\";.kbq-tag-list{display:flex;flex-direction:row;min-height:var(--kbq-size-xxl);box-sizing:border-box}.kbq-tag-list:focus-visible{outline:none}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}.kbq-tag-list.cdk-drop-list-dragging .cdk-drag.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tag-list.cdk-drop-list-dragging .cdk-drag{animation:none;transition:none}}.kbq-tag-input{background:transparent;padding:0;margin:0;border:none;outline:none}.kbq-tag-input::-ms-clear{display:none;width:0;height:0}.kbq-tag-input::-ms-reveal{display:none;width:0;height:0}.kbq-tag-input::-webkit-search-decoration,.kbq-tag-input::-webkit-search-cancel-button,.kbq-tag-input::-webkit-search-results-button,.kbq-tag-input::-webkit-search-results-decoration{display:none}.kbq-tag-input{padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:var(--kbq-size-xxs);padding-right:unset;min-width:var(--kbq-size-3xl);max-width:100%;flex-grow:1}.kbq-tag-input.kbq-input{--kbq-input-size-padding-vertical: 0;--kbq-form-field-size-border-radius: 0;padding-left:var(--kbq-size-xxs);min-height:unset!important;width:auto}.kbq-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;box-sizing:border-box;min-width:0;gap:var(--kbq-tag-list-size-content-gap)}.kbq-tags-list__list-container .kbq-tag-input:first-child{padding-left:var(--kbq-size-s)}.kbq-tags-list__cleaner .kbq-cleaner{max-height:24px}.kbq-form-field-type-tag-list .kbq-form-field__container{padding-top:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width));padding-bottom:calc(var(--kbq-tag-input-size-padding-vertical) - var(--kbq-form-field-size-border-width))}body:has(.kbq-tag-list.cdk-drop-list-dragging){cursor:grabbing}\n", ".kbq-tag,.kbq-tag-list,.kbq-tag-input{--kbq-tag-list-size-content-gap: var(--kbq-size-xxs);--kbq-tag-size-padding-horizontal: var(--kbq-size-xxs);--kbq-tag-size-padding-vertical: var(--kbq-size-3xs);--kbq-tag-size-content-gap-horizontal: var(--kbq-size-3xs);--kbq-tag-size-icon-margin-left: var(--kbq-size-3xs);--kbq-tag-size-close-button-margin-right: var(--kbq-size-3xs);--kbq-tag-theme-fade-on-default-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-default-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-default-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-default-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-background: var(--kbq-states-background-theme-fade-hover);--kbq-tag-theme-fade-on-states-hover-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-hover-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-hover-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-background: var(--kbq-background-theme-fade);--kbq-tag-theme-fade-on-states-focus-text: var(--kbq-foreground-theme);--kbq-tag-theme-fade-on-states-focus-icon: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-close-button: var(--kbq-icon-theme);--kbq-tag-theme-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-theme-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-theme-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-theme-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-theme-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-theme-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-theme-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-theme-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-default-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-default-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-default-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-default-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-background: var(--kbq-states-background-contrast-fade-hover);--kbq-tag-contrast-fade-on-states-hover-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-hover-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-hover-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-background: var(--kbq-background-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-text: var(--kbq-foreground-contrast);--kbq-tag-contrast-fade-on-states-focus-icon: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-close-button: var(--kbq-icon-contrast-fade);--kbq-tag-contrast-fade-on-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-contrast-fade-on-states-selected-background: var(--kbq-background-theme);--kbq-tag-contrast-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-contrast-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-contrast-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-contrast-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-contrast-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-contrast-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-default-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-default-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-default-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-default-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-tag-error-fade-on-states-hover-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-hover-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-hover-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-background: var(--kbq-background-error-fade);--kbq-tag-error-fade-on-states-focus-text: var(--kbq-foreground-error);--kbq-tag-error-fade-on-states-focus-icon: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-close-button: var(--kbq-icon-error);--kbq-tag-error-fade-on-states-focus-outline: var(--kbq-states-line-focus-error);--kbq-tag-error-fade-on-states-selected-background: var(--kbq-background-error);--kbq-tag-error-fade-on-states-selected-text: var(--kbq-foreground-white);--kbq-tag-error-fade-on-states-selected-icon: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-selected-close-button: var(--kbq-icon-white);--kbq-tag-error-fade-on-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-error-fade-on-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-error-fade-on-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-error-fade-on-states-disabled-close-button: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-default-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-default-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-default-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-default-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-background: var(--kbq-states-background-warning-fade-hover);--kbq-tag-warning-fade-states-hover-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-hover-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-hover-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-background: var(--kbq-background-warning-fade);--kbq-tag-warning-fade-states-focus-text: var(--kbq-foreground-warning);--kbq-tag-warning-fade-states-focus-icon: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-close-button: var(--kbq-icon-warning);--kbq-tag-warning-fade-states-focus-outline: var(--kbq-states-line-focus-theme);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-contrast);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-contrast);--kbq-tag-warning-fade-states-disabled-background: var(--kbq-states-background-disabled);--kbq-tag-warning-fade-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-tag-warning-fade-states-disabled-icon: var(--kbq-states-icon-disabled);--kbq-tag-warning-fade-states-disabled-close-button: var(--kbq-states-icon-disabled)}\n"] }]
|
|
1937
|
+
}], ctorParameters: () => [], propDecorators: { valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], placeholderInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], dropped: [{ type: i0.Output, args: ["dropped"] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], clearPredicate: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearPredicate", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], change: [{ type: i0.Output, args: ["change"] }], cleaner: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqCleaner), { ...{ descendants: false }, isSignal: true }] }], tagsQuery: [{ type: i0.ContentChildren, args: [forwardRef(() => KbqTag), { ...{ descendants: true }, isSignal: true }] }], draggableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], tabIndexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
|
|
1791
1938
|
|
|
1792
1939
|
const COMPONENTS = [
|
|
1793
1940
|
KbqTagEditSubmit,
|
|
1794
|
-
KbqTagEditInput
|
|
1941
|
+
KbqTagEditInput,
|
|
1942
|
+
KbqTagPrefix,
|
|
1943
|
+
KbqTagSuffix
|
|
1795
1944
|
];
|
|
1796
1945
|
class KbqTagsModule {
|
|
1797
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1798
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1799
|
-
KbqTagEditInput,
|
|
1946
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1947
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, imports: [PlatformModule, KbqTagEditSubmit,
|
|
1948
|
+
KbqTagEditInput,
|
|
1949
|
+
KbqTagPrefix,
|
|
1950
|
+
KbqTagSuffix, KbqTagList,
|
|
1800
1951
|
KbqTag,
|
|
1801
1952
|
KbqTagInput,
|
|
1802
1953
|
KbqTagTrailingIcon,
|
|
@@ -1807,10 +1958,12 @@ class KbqTagsModule {
|
|
|
1807
1958
|
KbqTagTrailingIcon,
|
|
1808
1959
|
KbqTagAvatar,
|
|
1809
1960
|
KbqTagRemove, KbqTagEditSubmit,
|
|
1810
|
-
KbqTagEditInput
|
|
1811
|
-
|
|
1961
|
+
KbqTagEditInput,
|
|
1962
|
+
KbqTagPrefix,
|
|
1963
|
+
KbqTagSuffix] }); }
|
|
1964
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER] })], imports: [PlatformModule] }); }
|
|
1812
1965
|
}
|
|
1813
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTagsModule, decorators: [{
|
|
1814
1967
|
type: NgModule,
|
|
1815
1968
|
args: [{
|
|
1816
1969
|
imports: [
|
|
@@ -1823,7 +1976,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1823
1976
|
KbqTagAvatar,
|
|
1824
1977
|
KbqTagRemove
|
|
1825
1978
|
],
|
|
1826
|
-
providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER
|
|
1979
|
+
providers: [kbqTagsDefaultOptionsProvider({ separatorKeyCodes: [ENTER] })],
|
|
1827
1980
|
exports: [
|
|
1828
1981
|
KbqTagList,
|
|
1829
1982
|
KbqTag,
|
|
@@ -1840,5 +1993,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1840
1993
|
* Generated bundle index. Do not edit.
|
|
1841
1994
|
*/
|
|
1842
1995
|
|
|
1843
|
-
export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagEditChange, KbqTagEditInput, KbqTagEditSubmit, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagRemove, KbqTagSelectionChange, KbqTagTrailingIcon, KbqTagsModule, kbqTagsDefaultOptionsProvider };
|
|
1996
|
+
export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagEditChange, KbqTagEditInput, KbqTagEditSubmit, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagPrefix, KbqTagRemove, KbqTagSelectionChange, KbqTagSuffix, KbqTagTrailingIcon, KbqTagsModule, kbqTagsDefaultOptionsProvider };
|
|
1844
1997
|
//# sourceMappingURL=koobiq-components-tags.mjs.map
|