@koobiq/components 18.35.0 → 18.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.component.d.ts +1 -1
- package/app-switcher/_app-switcher-theme.scss +34 -0
- package/app-switcher/app-switcher-animations.d.ts +5 -0
- package/app-switcher/app-switcher-dropdown-app.d.ts +11 -0
- package/app-switcher/app-switcher-dropdown-app.scss +85 -0
- package/app-switcher/app-switcher-dropdown-site.d.ts +9 -0
- package/app-switcher/app-switcher-dropdown-site.scss +53 -0
- package/app-switcher/app-switcher.d.ts +191 -0
- package/app-switcher/app-switcher.module.d.ts +10 -0
- package/app-switcher/app-switcher.scss +64 -0
- package/app-switcher/index.d.ts +1 -0
- package/app-switcher/kbq-app-switcher-list-item.d.ts +16 -0
- package/app-switcher/kbq-app-switcher-list-item.scss +180 -0
- package/app-switcher/public-api.d.ts +6 -0
- package/badge/badge.component.d.ts +1 -1
- package/badge/badge.component.scss +2 -0
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/button/button.component.d.ts +2 -2
- package/core/common-behaviors/clipboard.d.ts +1 -1
- package/core/common-behaviors/color.d.ts +5 -5
- package/core/common-behaviors/focus-monitor.d.ts +19 -0
- package/core/common-behaviors/hovered.d.ts +13 -0
- package/core/common-behaviors/index.d.ts +4 -0
- package/core/common-behaviors/orientation.d.ts +4 -0
- package/core/common-behaviors/read-state.d.ts +12 -0
- package/core/locales/en-US.d.ts +62 -0
- package/core/locales/es-LA.d.ts +62 -0
- package/core/locales/fa-IR.d.ts +62 -0
- package/core/locales/locale-service.d.ts +434 -0
- package/core/locales/pt-BR.d.ts +62 -0
- package/core/locales/ru-RU.d.ts +62 -0
- package/core/locales/tk-TM.d.ts +62 -0
- package/core/locales/types.d.ts +22 -0
- package/core/locales/zh-CN.d.ts +62 -0
- package/core/navbar/rectangle-item.d.ts +1 -1
- package/core/option/action.d.ts +1 -1
- package/core/option/option.d.ts +1 -1
- package/core/pop-up/constants.d.ts +2 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -3
- package/core/pop-up/pop-up.d.ts +2 -1
- package/core/select/common.d.ts +3 -0
- package/core/select/constants.d.ts +5 -0
- package/core/styles/common/_select.scss +5 -0
- package/core/utils/dom.d.ts +1 -6
- package/divider/divider.scss +1 -0
- package/dropdown/dropdown.component.d.ts +5 -1
- package/dropdown/dropdown.module.d.ts +1 -1
- package/esm2022/accordion/accordion-content.mjs +3 -3
- package/esm2022/accordion/accordion-header.mjs +3 -3
- package/esm2022/accordion/accordion-item.mjs +3 -3
- package/esm2022/accordion/accordion-trigger.component.mjs +3 -3
- package/esm2022/accordion/accordion.component.mjs +5 -5
- package/esm2022/accordion/accordion.module.mjs +4 -4
- package/esm2022/actions-panel/actions-panel-container.mjs +3 -3
- package/esm2022/actions-panel/actions-panel.mjs +3 -3
- package/esm2022/actions-panel/module.mjs +4 -4
- package/esm2022/alert/alert.component.mjs +12 -12
- package/esm2022/alert/alert.module.mjs +4 -4
- package/esm2022/app-switcher/app-switcher-animations.mjs +18 -0
- package/esm2022/app-switcher/app-switcher-dropdown-app.mjs +75 -0
- package/esm2022/app-switcher/app-switcher-dropdown-site.mjs +60 -0
- package/esm2022/app-switcher/app-switcher.mjs +446 -0
- package/esm2022/app-switcher/app-switcher.module.mjs +45 -0
- package/esm2022/app-switcher/index.mjs +2 -0
- package/esm2022/app-switcher/kbq-app-switcher-list-item.mjs +84 -0
- package/esm2022/app-switcher/koobiq-components-app-switcher.mjs +5 -0
- package/esm2022/app-switcher/public-api.mjs +7 -0
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +3 -3
- package/esm2022/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/autocomplete/autocomplete.module.mjs +4 -4
- package/esm2022/badge/badge.component.mjs +11 -11
- package/esm2022/badge/badge.module.mjs +4 -4
- package/esm2022/breadcrumbs/breadcrumbs.mjs +17 -17
- package/esm2022/breadcrumbs/breadcrumbs.module.mjs +4 -4
- package/esm2022/button/button.component.mjs +7 -7
- package/esm2022/button/button.dropdown-trigger.directive.mjs +3 -3
- package/esm2022/button/button.module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle.component.mjs +6 -6
- package/esm2022/button-toggle/button-toggle.module.mjs +4 -4
- package/esm2022/checkbox/checkbox-module.mjs +4 -4
- package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/clamped-text/clamped-text.mjs +3 -3
- package/esm2022/clamped-text/module.mjs +4 -4
- package/esm2022/code-block/code-block-highlight.mjs +7 -7
- package/esm2022/code-block/code-block.mjs +4 -4
- package/esm2022/code-block/code-block.module.mjs +4 -4
- package/esm2022/content-panel/content-panel.mjs +24 -24
- package/esm2022/content-panel/module.mjs +4 -4
- package/esm2022/content-panel/resizable.mjs +6 -6
- package/esm2022/core/common-behaviors/clipboard.mjs +4 -4
- package/esm2022/core/common-behaviors/color.mjs +6 -7
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/common-behaviors/focus-monitor.mjs +37 -0
- package/esm2022/core/common-behaviors/hovered.mjs +31 -0
- package/esm2022/core/common-behaviors/index.mjs +5 -1
- package/esm2022/core/common-behaviors/orientation.mjs +2 -0
- package/esm2022/core/common-behaviors/read-state.mjs +33 -0
- package/esm2022/core/error/error-state-matcher.mjs +9 -9
- package/esm2022/core/form-field/field-sizing-content.mjs +3 -3
- package/esm2022/core/formatters/date/formatter.mjs +3 -3
- package/esm2022/core/formatters/date/formatter.pipe.mjs +78 -78
- package/esm2022/core/formatters/filesize/formatter.mjs +3 -3
- package/esm2022/core/formatters/index.mjs +4 -4
- package/esm2022/core/formatters/number/formatter.mjs +12 -12
- package/esm2022/core/forms/forms-module.mjs +4 -4
- package/esm2022/core/forms/forms.directive.mjs +6 -6
- package/esm2022/core/highlight/highlight.pipe.mjs +3 -3
- package/esm2022/core/highlight/index.mjs +4 -4
- package/esm2022/core/line/line.mjs +7 -7
- package/esm2022/core/locales/en-US.mjs +105 -1
- package/esm2022/core/locales/es-LA.mjs +105 -1
- package/esm2022/core/locales/fa-IR.mjs +75 -1
- package/esm2022/core/locales/locale-service.mjs +3 -3
- package/esm2022/core/locales/locale-service.module.mjs +4 -4
- package/esm2022/core/locales/pt-BR.mjs +105 -1
- package/esm2022/core/locales/ru-RU.mjs +119 -1
- package/esm2022/core/locales/tk-TM.mjs +105 -1
- package/esm2022/core/locales/types.mjs +1 -1
- package/esm2022/core/locales/zh-CN.mjs +63 -1
- package/esm2022/core/navbar/rectangle-item.mjs +7 -6
- package/esm2022/core/option/action-container.mjs +3 -3
- package/esm2022/core/option/action.mjs +4 -4
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option-module.mjs +4 -4
- package/esm2022/core/option/option.mjs +4 -4
- package/esm2022/core/pop-up/constants.mjs +2 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +6 -6
- package/esm2022/core/pop-up/pop-up.mjs +4 -4
- package/esm2022/core/select/common.mjs +27 -17
- package/esm2022/core/select/constants.mjs +6 -1
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +4 -4
- package/esm2022/core/services/measure-scrollbar.service.mjs +3 -3
- package/esm2022/core/services/theme.service.mjs +3 -3
- package/esm2022/core/utils/dom.mjs +2 -8
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -3
- package/esm2022/datepicker/calendar-header.component.mjs +3 -3
- package/esm2022/datepicker/calendar.component.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.directive.mjs +6 -6
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +4 -4
- package/esm2022/datepicker/datepicker-toggle.component.mjs +9 -9
- package/esm2022/datepicker/datepicker.component.mjs +6 -6
- package/esm2022/datepicker/month-view.component.mjs +3 -3
- package/esm2022/divider/divider.component.mjs +4 -4
- package/esm2022/divider/divider.module.mjs +4 -4
- package/esm2022/dl/dl.component.mjs +9 -9
- package/esm2022/dl/dl.module.mjs +4 -4
- package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2022/dropdown/dropdown-item.component.mjs +3 -3
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +5 -5
- package/esm2022/dropdown/dropdown.component.mjs +18 -8
- package/esm2022/dropdown/dropdown.module.mjs +14 -10
- package/esm2022/dynamic-translation/dynamic-translation.mjs +9 -9
- package/esm2022/dynamic-translation/module.mjs +4 -4
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -7
- package/esm2022/empty-state/empty-state.component.mjs +15 -15
- package/esm2022/empty-state/empty-state.module.mjs +4 -4
- package/esm2022/file-upload/file-drop.mjs +3 -3
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/file-upload.module.mjs +4 -4
- package/esm2022/file-upload/multiple-file-upload.component.mjs +19 -8
- package/esm2022/file-upload/single-file-upload.component.mjs +13 -5
- package/esm2022/filter-bar/filter-bar-button.mjs +3 -3
- package/esm2022/filter-bar/filter-bar.mjs +3 -3
- package/esm2022/filter-bar/filter-bar.module.mjs +4 -4
- package/esm2022/filter-bar/filter-refresher.mjs +3 -3
- package/esm2022/filter-bar/filter-reset.mjs +3 -3
- package/esm2022/filter-bar/filter-search.mjs +3 -3
- package/esm2022/filter-bar/filters.mjs +4 -4
- package/esm2022/filter-bar/pipe-add.mjs +5 -5
- package/esm2022/filter-bar/pipe.directive.mjs +3 -3
- package/esm2022/filter-bar/pipes/base-pipe.mjs +7 -7
- package/esm2022/filter-bar/pipes/pipe-button.mjs +3 -3
- package/esm2022/filter-bar/pipes/pipe-date.mjs +6 -6
- package/esm2022/filter-bar/pipes/pipe-datetime.mjs +6 -6
- package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +12 -7
- package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +12 -7
- package/esm2022/filter-bar/pipes/pipe-readonly.mjs +6 -6
- package/esm2022/filter-bar/pipes/pipe-select.mjs +6 -6
- package/esm2022/filter-bar/pipes/pipe-state.mjs +3 -3
- package/esm2022/filter-bar/pipes/pipe-text.mjs +6 -6
- package/esm2022/filter-bar/pipes/pipe-title.mjs +3 -3
- package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +6 -6
- package/esm2022/form-field/cleaner.mjs +3 -3
- package/esm2022/form-field/error.mjs +3 -3
- package/esm2022/form-field/fieldset.mjs +11 -11
- package/esm2022/form-field/form-field.mjs +11 -11
- package/esm2022/form-field/form-field.module.mjs +4 -4
- package/esm2022/form-field/hint.mjs +3 -3
- package/esm2022/form-field/label.mjs +3 -3
- package/esm2022/form-field/password-hint.mjs +3 -3
- package/esm2022/form-field/password-toggle.mjs +7 -7
- package/esm2022/form-field/prefix.mjs +3 -3
- package/esm2022/form-field/reactive-password-hint.mjs +3 -3
- package/esm2022/form-field/stepper.mjs +3 -3
- package/esm2022/form-field/suffix.mjs +3 -3
- package/esm2022/form-field/validate.directive.mjs +3 -3
- package/esm2022/icon/icon-button.component.mjs +3 -3
- package/esm2022/icon/icon-item.component.mjs +3 -3
- package/esm2022/icon/icon.component.mjs +4 -4
- package/esm2022/icon/icon.module.mjs +4 -4
- package/esm2022/inline-edit/index.mjs +3 -0
- package/esm2022/inline-edit/inline-edit.mjs +378 -0
- package/esm2022/inline-edit/koobiq-components-inline-edit.mjs +5 -0
- package/esm2022/inline-edit/module.mjs +25 -0
- package/esm2022/input/input-number-validators.mjs +6 -6
- package/esm2022/input/input-number.mjs +4 -4
- package/esm2022/input/input-password.mjs +4 -4
- package/esm2022/input/input.mjs +7 -7
- package/esm2022/input/input.module.mjs +4 -4
- package/esm2022/link/link.component.mjs +6 -6
- package/esm2022/link/link.module.mjs +4 -4
- package/esm2022/list/list-selection.component.mjs +10 -10
- package/esm2022/list/list.component.mjs +6 -6
- package/esm2022/list/list.module.mjs +4 -4
- package/esm2022/loader-overlay/loader-overlay.component.mjs +13 -13
- package/esm2022/loader-overlay/loader-overlay.module.mjs +4 -4
- package/esm2022/markdown/markdown.component.mjs +5 -5
- package/esm2022/markdown/markdown.module.mjs +4 -4
- package/esm2022/markdown/markdown.service.mjs +3 -3
- package/esm2022/modal/css-unit.pipe.mjs +3 -3
- package/esm2022/modal/modal-control.service.mjs +3 -3
- package/esm2022/modal/modal.component.mjs +4 -4
- package/esm2022/modal/modal.directive.mjs +12 -12
- package/esm2022/modal/modal.module.mjs +4 -4
- package/esm2022/modal/modal.service.mjs +3 -3
- package/esm2022/navbar/navbar-item.component.mjs +49 -38
- package/esm2022/navbar/navbar.component.mjs +10 -10
- package/esm2022/navbar/navbar.module.mjs +4 -4
- package/esm2022/navbar/vertical-navbar.component.mjs +4 -4
- package/esm2022/navbar-ic/navbar-ic-header.mjs +7 -7
- package/esm2022/navbar-ic/navbar-ic-item.mjs +30 -38
- package/esm2022/navbar-ic/navbar-ic.mjs +18 -13
- package/esm2022/navbar-ic/navbar-ic.module.mjs +4 -4
- package/esm2022/notification-center/index.mjs +2 -0
- package/esm2022/notification-center/koobiq-components-notification-center.mjs +5 -0
- package/esm2022/notification-center/notification-center-animations.mjs +18 -0
- package/esm2022/notification-center/notification-center.mjs +353 -0
- package/esm2022/notification-center/notification-center.module.mjs +38 -0
- package/esm2022/notification-center/notification-center.service.mjs +127 -0
- package/esm2022/notification-center/notification-item.mjs +70 -0
- package/esm2022/notification-center/public-api.mjs +5 -0
- package/esm2022/overflow-items/module.mjs +4 -4
- package/esm2022/overflow-items/overflow-items.mjs +95 -41
- package/esm2022/popover/popover-confirm.component.mjs +10 -10
- package/esm2022/popover/popover.component.mjs +18 -13
- package/esm2022/popover/popover.module.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.component.mjs +9 -9
- package/esm2022/progress-bar/progress-bar.module.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.component.mjs +9 -9
- package/esm2022/progress-spinner/progress-spinner.module.mjs +4 -4
- package/esm2022/radio/radio.component.mjs +6 -6
- package/esm2022/radio/radio.module.mjs +4 -4
- package/esm2022/risk-level/risk-level.component.mjs +3 -3
- package/esm2022/risk-level/risk-level.module.mjs +4 -4
- package/esm2022/scrollbar/scrollbar.component.mjs +3 -3
- package/esm2022/scrollbar/scrollbar.directive.mjs +3 -3
- package/esm2022/scrollbar/scrollbar.module.mjs +4 -4
- package/esm2022/search-expandable/index.mjs +2 -0
- package/esm2022/search-expandable/koobiq-components-search-expandable.mjs +5 -0
- package/esm2022/search-expandable/public-api.mjs +3 -0
- package/esm2022/search-expandable/search-expandable.mjs +177 -0
- package/esm2022/search-expandable/search-expandable.module.mjs +18 -0
- package/esm2022/select/select-option.directive.mjs +3 -3
- package/esm2022/select/select.component.mjs +37 -10
- package/esm2022/select/select.module.mjs +4 -4
- package/esm2022/sidebar/sidebar.component.mjs +9 -9
- package/esm2022/sidebar/sidebar.module.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-directives.mjs +15 -15
- package/esm2022/sidepanel/sidepanel.module.mjs +4 -4
- package/esm2022/sidepanel/sidepanel.service.mjs +3 -3
- package/esm2022/split-button/index.mjs +2 -0
- package/esm2022/split-button/koobiq-components-split-button.mjs +5 -0
- package/esm2022/split-button/public-api.mjs +3 -0
- package/esm2022/split-button/split-button.mjs +92 -0
- package/esm2022/split-button/split-button.module.mjs +18 -0
- package/esm2022/splitter/splitter.component.mjs +13 -13
- package/esm2022/splitter/splitter.module.mjs +4 -4
- package/esm2022/table/table.component.mjs +6 -6
- package/esm2022/table/table.module.mjs +4 -4
- package/esm2022/tabs/paginated-tab-header.mjs +4 -4
- package/esm2022/tabs/tab-body.component.mjs +6 -6
- package/esm2022/tabs/tab-content.directive.mjs +3 -3
- package/esm2022/tabs/tab-group.component.mjs +15 -15
- package/esm2022/tabs/tab-header.component.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -4
- package/esm2022/tabs/tab-label.directive.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar.mjs +10 -10
- package/esm2022/tabs/tab.component.mjs +3 -3
- package/esm2022/tabs/tabs.module.mjs +4 -4
- package/esm2022/tags/tag-input.mjs +17 -11
- package/esm2022/tags/tag-list.component.mjs +236 -194
- package/esm2022/tags/tag.component.mjs +209 -138
- package/esm2022/tags/tag.module.mjs +4 -4
- package/esm2022/textarea/textarea.component.mjs +5 -5
- package/esm2022/textarea/textarea.module.mjs +4 -4
- package/esm2022/time-range/constants.mjs +21 -0
- package/esm2022/time-range/index.mjs +8 -0
- package/esm2022/time-range/koobiq-components-time-range.mjs +5 -0
- package/esm2022/time-range/module.mjs +36 -0
- package/esm2022/time-range/time-range-editor.mjs +219 -0
- package/esm2022/time-range/time-range-title-as-form-field.mjs +59 -0
- package/esm2022/time-range/time-range-title.mjs +112 -0
- package/esm2022/time-range/time-range.mjs +229 -0
- package/esm2022/time-range/time-range.service.mjs +189 -0
- package/esm2022/time-range/types.mjs +2 -0
- package/esm2022/timepicker/timepicker.directive.mjs +4 -4
- package/esm2022/timepicker/timepicker.module.mjs +4 -4
- package/esm2022/timezone/cities-by-filter.pipe.mjs +3 -3
- package/esm2022/timezone/timezone-option.component.mjs +3 -3
- package/esm2022/timezone/timezone-option.directive.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +9 -9
- package/esm2022/timezone/timezone.module.mjs +4 -4
- package/esm2022/timezone/utc-offset.pipe.mjs +3 -3
- package/esm2022/title/title.directive.mjs +3 -3
- package/esm2022/title/title.module.mjs +4 -4
- package/esm2022/toast/toast-container.component.mjs +3 -3
- package/esm2022/toast/toast.component.mjs +20 -14
- package/esm2022/toast/toast.module.mjs +4 -4
- package/esm2022/toast/toast.service.mjs +5 -4
- package/esm2022/toast/toast.type.mjs +1 -1
- package/esm2022/toggle/toggle.component.mjs +3 -3
- package/esm2022/toggle/toggle.module.mjs +4 -4
- package/esm2022/tooltip/tooltip.component.mjs +19 -19
- package/esm2022/tooltip/tooltip.module.mjs +4 -4
- package/esm2022/top-bar/module.mjs +4 -4
- package/esm2022/top-bar/top-bar.mjs +9 -9
- package/esm2022/tree/node.mjs +3 -3
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.directive.mjs +3 -3
- package/esm2022/tree/toggle.mjs +16 -12
- package/esm2022/tree/tree-base.mjs +7 -7
- package/esm2022/tree/tree-option.component.mjs +5 -9
- package/esm2022/tree/tree-selection.component.mjs +4 -4
- package/esm2022/tree/tree.mjs +3 -3
- package/esm2022/tree/tree.module.mjs +4 -4
- package/esm2022/tree-select/tree-select.component.mjs +54 -14
- package/esm2022/tree-select/tree-select.module.mjs +4 -4
- package/esm2022/username/module.mjs +4 -4
- package/esm2022/username/username.mjs +15 -15
- package/esm2022/username/username.pipe.mjs +8 -8
- package/fesm2022/koobiq-components-accordion.mjs +20 -20
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -10
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +704 -0
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -0
- package/fesm2022/koobiq-components-autocomplete.mjs +13 -13
- package/fesm2022/koobiq-components-badge.mjs +14 -14
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +20 -20
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +10 -10
- package/fesm2022/koobiq-components-button.mjs +13 -13
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +10 -10
- package/fesm2022/koobiq-components-clamped-text.mjs +7 -7
- package/fesm2022/koobiq-components-code-block.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +34 -34
- package/fesm2022/koobiq-components-core.mjs +1032 -263
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +40 -40
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +8 -8
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +13 -13
- package/fesm2022/koobiq-components-dropdown.mjs +39 -25
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +36 -18
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +96 -86
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +60 -60
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +13 -13
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +407 -0
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -0
- package/fesm2022/koobiq-components-input.mjs +22 -22
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +10 -10
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +19 -19
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +12 -12
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +28 -28
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +53 -56
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +65 -54
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +586 -0
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -0
- package/fesm2022/koobiq-components-overflow-items.mjs +98 -44
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +30 -25
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-risk-level.mjs +7 -7
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +199 -0
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -0
- package/fesm2022/koobiq-components-select.mjs +43 -16
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +25 -25
- package/fesm2022/koobiq-components-split-button.mjs +114 -0
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +16 -16
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +10 -10
- package/fesm2022/koobiq-components-tabs.mjs +52 -52
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +461 -346
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +8 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +840 -0
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -0
- package/fesm2022/koobiq-components-timepicker.mjs +7 -7
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +24 -24
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +28 -21
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +7 -7
- package/fesm2022/koobiq-components-tooltip.mjs +22 -22
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +57 -17
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +44 -44
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/_file-upload-theme.scss +1 -1
- package/file-upload/file-upload.d.ts +1 -1
- package/file-upload/multiple-file-upload.component.d.ts +1 -0
- package/file-upload/single-file-upload.component.d.ts +1 -0
- package/filter-bar/pipes/base-pipe.d.ts +1 -1
- package/filter-bar/pipes/base-pipe.scss +3 -3
- package/filter-bar/pipes/pipe-date.scss +1 -0
- package/form-field/fieldset-tokens.scss +1 -1
- package/form-field/form-field-tokens.scss +1 -1
- package/form-field/form-field.d.ts +1 -1
- package/form-field/form-field.scss +1 -9
- package/form-field/password-toggle.d.ts +1 -1
- package/icon/icon.component.d.ts +2 -2
- package/inline-edit/index.d.ts +2 -0
- package/inline-edit/inline-edit-tokens.scss +8 -0
- package/inline-edit/inline-edit.d.ts +136 -0
- package/inline-edit/inline-edit.scss +208 -0
- package/inline-edit/module.d.ts +7 -0
- package/input/input-number.d.ts +1 -1
- package/input/input-password.d.ts +2 -2
- package/input/input.d.ts +2 -2
- package/link/link.component.d.ts +3 -3
- package/list/list-selection.component.d.ts +1 -1
- package/loader-overlay/loader-overlay.component.d.ts +1 -1
- package/markdown/_markdown-theme.scss +1 -1
- package/markdown/markdown-tokens.scss +1 -0
- package/markdown/markdown.scss +8 -0
- package/modal/modal.component.d.ts +1 -1
- package/navbar/navbar-item.component.d.ts +3 -2
- package/navbar/navbar.component.d.ts +4 -4
- package/navbar/vertical-navbar.component.d.ts +2 -2
- package/navbar-ic/navbar-ic-header.d.ts +1 -1
- package/navbar-ic/navbar-ic-item.d.ts +2 -2
- package/navbar-ic/navbar-ic.d.ts +4 -2
- package/notification-center/_notification-center-theme.scss +27 -0
- package/notification-center/index.d.ts +1 -0
- package/notification-center/notification-center-animations.d.ts +5 -0
- package/notification-center/notification-center.d.ts +153 -0
- package/notification-center/notification-center.module.d.ts +7 -0
- package/notification-center/notification-center.scss +126 -0
- package/notification-center/notification-center.service.d.ts +72 -0
- package/notification-center/notification-item.d.ts +27 -0
- package/notification-center/notification-item.scss +157 -0
- package/notification-center/public-api.d.ts +4 -0
- package/overflow-items/overflow-items.d.ts +23 -9
- package/package.json +46 -10
- package/popover/popover.component.d.ts +5 -1
- package/popover/popover.scss +15 -7
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/ng-add/index.js +5 -5
- package/search-expandable/index.d.ts +1 -0
- package/search-expandable/public-api.d.ts +2 -0
- package/search-expandable/search-expandable.d.ts +70 -0
- package/search-expandable/search-expandable.module.d.ts +7 -0
- package/search-expandable/search-expandable.scss +21 -0
- package/select/select.component.d.ts +38 -3
- package/split-button/_split-button-theme.scss +59 -0
- package/split-button/index.d.ts +1 -0
- package/split-button/public-api.d.ts +2 -0
- package/split-button/split-button.d.ts +31 -0
- package/split-button/split-button.module.d.ts +7 -0
- package/split-button/split-button.scss +83 -0
- package/splitter/splitter.component.d.ts +5 -5
- package/tabs/paginated-tab-header.d.ts +1 -1
- package/tabs/tab-header.component.d.ts +2 -2
- package/tabs/tab-label-wrapper.directive.d.ts +2 -2
- package/tabs/tab-nav-bar.d.ts +3 -3
- package/tags/_tag-theme.scss +21 -15
- package/tags/tag-input.d.ts +2 -0
- package/tags/tag-list.component.d.ts +133 -45
- package/tags/tag-list.scss +11 -0
- package/tags/tag-tokens.scss +17 -1
- package/tags/tag.component.d.ts +79 -20
- package/tags/tag.scss +9 -0
- package/textarea/textarea.component.d.ts +2 -2
- package/time-range/constants.d.ts +8 -0
- package/time-range/index.d.ts +7 -0
- package/time-range/module.d.ts +10 -0
- package/time-range/time-range-editor.d.ts +67 -0
- package/time-range/time-range-title-as-form-field.d.ts +40 -0
- package/time-range/time-range-title.d.ts +18 -0
- package/time-range/time-range.d.ts +75 -0
- package/time-range/time-range.scss +66 -0
- package/time-range/time-range.service.d.ts +29 -0
- package/time-range/types.d.ts +43 -0
- package/timepicker/timepicker.directive.d.ts +2 -2
- package/toast/toast.component.d.ts +6 -4
- package/toast/toast.component.scss +11 -1
- package/toast/toast.service.d.ts +1 -0
- package/toast/toast.type.d.ts +1 -0
- package/tree/toggle.d.ts +1 -1
- package/tree/tree-base.d.ts +2 -2
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-selection.component.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +44 -3
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Directive, inject, EventEmitter, signal, booleanAttribute,
|
|
2
|
+
import { InjectionToken, Directive, inject, DestroyRef, ElementRef, EventEmitter, signal, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, Output, ViewChild, ContentChildren, forwardRef, Inject, Optional, Self, NgModule } from '@angular/core';
|
|
3
3
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
4
4
|
import * as i3 from '@angular/forms';
|
|
5
|
-
import {
|
|
5
|
+
import { hasModifierKey, isSelectAll, ENTER as ENTER$1, TAB, SPACE as SPACE$1, COMMA, SEMICOLON } from '@koobiq/cdk/keycodes';
|
|
6
6
|
import * as i3$1 from '@koobiq/components/autocomplete';
|
|
7
7
|
import * as i1 from '@koobiq/components/core';
|
|
8
|
-
import { KbqFieldSizingContent, KbqColorDirective,
|
|
8
|
+
import { KbqFieldSizingContent, KbqColorDirective, KbqComponentColors, isNull, KBQ_TITLE_TEXT_REF, KbqHovered, isBoolean } from '@koobiq/components/core';
|
|
9
9
|
import * as i1$1 from '@koobiq/components/form-field';
|
|
10
10
|
import { KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
12
|
+
import * as i2$1 from '@angular/cdk/bidi';
|
|
13
|
+
import * as i2 from '@angular/cdk/drag-drop';
|
|
14
|
+
import { CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
|
|
15
|
+
import { DELETE, SPACE, BACKSPACE, ENTER, ESCAPE, F2, HOME, END } from '@angular/cdk/keycodes';
|
|
13
16
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
14
17
|
import { FocusKeyManager } from '@koobiq/cdk/a11y';
|
|
15
|
-
import { Subject, merge } from 'rxjs';
|
|
16
|
-
import {
|
|
17
|
-
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
18
|
-
import { SPACE, DELETE, BACKSPACE, ENTER, ESCAPE, F2 } from '@angular/cdk/keycodes';
|
|
18
|
+
import { Subject, debounceTime, merge } from 'rxjs';
|
|
19
|
+
import { startWith, filter } from 'rxjs/operators';
|
|
19
20
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
20
21
|
import { PlatformModule } from '@angular/cdk/platform';
|
|
21
22
|
|
|
@@ -49,10 +50,10 @@ const getTagEditInputMissingError = () => {
|
|
|
49
50
|
* @docs-private
|
|
50
51
|
*/
|
|
51
52
|
class KbqTagAvatar {
|
|
52
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
53
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
53
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagAvatar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
54
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagAvatar, selector: "kbq-tag-avatar, [kbqTagAvatar]", host: { classAttribute: "kbq-tag-avatar" }, ngImport: i0 }); }
|
|
54
55
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagAvatar, decorators: [{
|
|
56
57
|
type: Directive,
|
|
57
58
|
args: [{
|
|
58
59
|
selector: 'kbq-tag-avatar, [kbqTagAvatar]',
|
|
@@ -64,10 +65,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
64
65
|
* @docs-private
|
|
65
66
|
*/
|
|
66
67
|
class KbqTagTrailingIcon {
|
|
67
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
68
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
68
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagTrailingIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
69
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagTrailingIcon, selector: "kbq-tag-trailing-icon, [kbqTagTrailingIcon]", host: { classAttribute: "kbq-tag-trailing-icon" }, ngImport: i0 }); }
|
|
69
70
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagTrailingIcon, decorators: [{
|
|
71
72
|
type: Directive,
|
|
72
73
|
args: [{
|
|
73
74
|
selector: 'kbq-tag-trailing-icon, [kbqTagTrailingIcon]',
|
|
@@ -82,10 +83,10 @@ class KbqTagEditSubmit {
|
|
|
82
83
|
/** @docs-private */
|
|
83
84
|
this.tag = inject(KbqTag);
|
|
84
85
|
}
|
|
85
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
86
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
86
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
87
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagEditSubmit, isStandalone: true, selector: "[kbqTagEditSubmit]", host: { listeners: { "click": "tag.submitEditing(\"click\")" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-edit-submit" }, exportAs: ["kbqTagEditSubmit"], ngImport: i0 }); }
|
|
87
88
|
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditSubmit, decorators: [{
|
|
89
90
|
type: Directive,
|
|
90
91
|
args: [{
|
|
91
92
|
standalone: true,
|
|
@@ -118,20 +119,20 @@ class KbqTagEditInput {
|
|
|
118
119
|
this.tag.submitEditing('enter');
|
|
119
120
|
break;
|
|
120
121
|
}
|
|
121
|
-
// prevent KbqTag from receiving these keydown events
|
|
122
|
+
// We should prevent KbqTag from receiving these keydown events
|
|
122
123
|
case BACKSPACE:
|
|
123
|
-
case
|
|
124
|
-
case
|
|
124
|
+
case SPACE:
|
|
125
|
+
case DELETE: {
|
|
125
126
|
event.stopPropagation();
|
|
126
127
|
break;
|
|
127
128
|
}
|
|
128
129
|
default:
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
132
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
132
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
133
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagEditInput, isStandalone: true, selector: "[kbqTagEditInput]", host: { listeners: { "keydown": "handleKeydown($event)" }, classAttribute: "kbq-tag-edit-input" }, exportAs: ["kbqTagEditInput"], hostDirectives: [{ directive: i1.KbqFieldSizingContent }], ngImport: i0 }); }
|
|
133
134
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditInput, decorators: [{
|
|
135
136
|
type: Directive,
|
|
136
137
|
args: [{
|
|
137
138
|
standalone: true,
|
|
@@ -145,17 +146,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
145
146
|
}]
|
|
146
147
|
}] });
|
|
147
148
|
class KbqTag extends KbqColorDirective {
|
|
148
|
-
/**
|
|
149
|
-
* Whether the tag list is editable.
|
|
150
|
-
*
|
|
151
|
-
* @docs-private
|
|
152
|
-
*/
|
|
153
|
-
get tagListEditable() {
|
|
154
|
-
return !!this.tagList?.editable;
|
|
155
|
-
}
|
|
156
149
|
/** Whether the tag is editable. */
|
|
157
150
|
get editable() {
|
|
158
|
-
return
|
|
151
|
+
return this._editable ?? !!this.tagList?.editable;
|
|
159
152
|
}
|
|
160
153
|
set editable(value) {
|
|
161
154
|
this._editable = value;
|
|
@@ -165,11 +158,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
165
158
|
return this._selected;
|
|
166
159
|
}
|
|
167
160
|
set selected(value) {
|
|
168
|
-
|
|
169
|
-
if (coercedValue !== this._selected) {
|
|
170
|
-
this._selected = coercedValue;
|
|
171
|
-
this.dispatchSelectionChange();
|
|
172
|
-
}
|
|
161
|
+
this.setSelectedState(value, { emitEvent: true });
|
|
173
162
|
}
|
|
174
163
|
/** The value of the tag. Defaults to the content inside `<kbq-tag>` tags. */
|
|
175
164
|
get value() {
|
|
@@ -185,19 +174,19 @@ class KbqTag extends KbqColorDirective {
|
|
|
185
174
|
* not selectable.
|
|
186
175
|
*/
|
|
187
176
|
get selectable() {
|
|
188
|
-
return this._selectable && this.
|
|
177
|
+
return this._selectable && (this.tagList?.selectable ?? true);
|
|
189
178
|
}
|
|
190
179
|
set selectable(value) {
|
|
191
|
-
this._selectable =
|
|
180
|
+
this._selectable = value;
|
|
192
181
|
}
|
|
193
182
|
/**
|
|
194
|
-
* Determines whether
|
|
183
|
+
* Determines whether the tag is removable.
|
|
195
184
|
*/
|
|
196
185
|
get removable() {
|
|
197
|
-
return this._removable;
|
|
186
|
+
return this._removable && (this.tagList?.removable ?? true);
|
|
198
187
|
}
|
|
199
188
|
set removable(value) {
|
|
200
|
-
this._removable =
|
|
189
|
+
this._removable = value;
|
|
201
190
|
}
|
|
202
191
|
get tabindex() {
|
|
203
192
|
return this.disabled ? null : this._tabindex;
|
|
@@ -205,32 +194,54 @@ class KbqTag extends KbqColorDirective {
|
|
|
205
194
|
set tabindex(value) {
|
|
206
195
|
this._tabindex = value;
|
|
207
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Whether the tag is disabled.
|
|
199
|
+
*/
|
|
208
200
|
get disabled() {
|
|
209
|
-
return this._disabled;
|
|
201
|
+
return this._disabled || (this.tagList?.disabled ?? false);
|
|
210
202
|
}
|
|
211
203
|
set disabled(value) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
204
|
+
this._disabled = value;
|
|
205
|
+
this.syncDragDisabledState();
|
|
215
206
|
}
|
|
216
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Whether the tag is draggable.
|
|
209
|
+
*
|
|
210
|
+
* @docs-private
|
|
211
|
+
*/
|
|
212
|
+
get draggable() {
|
|
213
|
+
return (this.tagList?.draggable ?? false) && !this.disabled;
|
|
214
|
+
}
|
|
215
|
+
constructor(changeDetectorRef) {
|
|
217
216
|
super();
|
|
218
217
|
this.changeDetectorRef = changeDetectorRef;
|
|
219
|
-
this._ngZone = _ngZone;
|
|
220
218
|
this.focusMonitor = inject(FocusMonitor);
|
|
221
219
|
this.tagList = inject(KbqTagList, { optional: true });
|
|
220
|
+
this.drag = inject(CdkDrag, { host: true });
|
|
221
|
+
this.destroyRef = inject(DestroyRef);
|
|
222
222
|
/** @docs-private */
|
|
223
|
-
this.elementRef =
|
|
224
|
-
/**
|
|
223
|
+
this.elementRef = inject(ElementRef);
|
|
224
|
+
/**
|
|
225
|
+
* Emits when the tag is focused.
|
|
226
|
+
*
|
|
227
|
+
* @docs-private
|
|
228
|
+
*/
|
|
225
229
|
this.onFocus = new Subject();
|
|
226
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* Emits when the tag is blurred.
|
|
232
|
+
*
|
|
233
|
+
* @docs-private
|
|
234
|
+
*/
|
|
227
235
|
this.onBlur = new Subject();
|
|
228
236
|
/** @docs-private */
|
|
229
237
|
this.nativeElement = this.elementRef.nativeElement;
|
|
230
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* Whether the tag has focus.
|
|
240
|
+
*
|
|
241
|
+
* @docs-private
|
|
242
|
+
*/
|
|
231
243
|
this.hasFocus = false;
|
|
232
|
-
|
|
233
|
-
this.tagListSelectable = true;
|
|
244
|
+
this.focusOrigin = null;
|
|
234
245
|
/** Whether the tag edits can't be submitted. */
|
|
235
246
|
this.preventEditSubmit = false;
|
|
236
247
|
/**
|
|
@@ -255,19 +266,20 @@ class KbqTag extends KbqColorDirective {
|
|
|
255
266
|
this.color = KbqComponentColors.ContrastFade;
|
|
256
267
|
this.setDefaultColor(KbqComponentColors.ContrastFade);
|
|
257
268
|
this.addHostClassName();
|
|
269
|
+
this.setupDragInitialProperties();
|
|
258
270
|
}
|
|
259
271
|
ngAfterContentInit() {
|
|
260
272
|
this.addClassModificatorForIcons();
|
|
261
273
|
}
|
|
262
274
|
ngAfterViewInit() {
|
|
263
|
-
this.
|
|
264
|
-
isNull(focusOrigin) ? this.blur() : this.focus();
|
|
265
|
-
});
|
|
275
|
+
this.setupFocusMonitor();
|
|
266
276
|
}
|
|
267
277
|
ngOnDestroy() {
|
|
278
|
+
this.cancelEditing('destroy');
|
|
268
279
|
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
269
280
|
this.destroyed.emit({ tag: this });
|
|
270
281
|
}
|
|
282
|
+
/** @docs-private */
|
|
271
283
|
addClassModificatorForIcons() {
|
|
272
284
|
const icons = this.contentChildren.map((item) => item.elementRef.nativeElement);
|
|
273
285
|
if (icons.length === 1) {
|
|
@@ -288,6 +300,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
288
300
|
secondIconElement.classList.add('kbq-icon_right');
|
|
289
301
|
}
|
|
290
302
|
}
|
|
303
|
+
/** @docs-private */
|
|
291
304
|
addHostClassName() {
|
|
292
305
|
// Add class for the different tags
|
|
293
306
|
for (const attr of TAG_ATTRIBUTE_NAMES) {
|
|
@@ -299,42 +312,46 @@ class KbqTag extends KbqColorDirective {
|
|
|
299
312
|
}
|
|
300
313
|
this.elementRef.nativeElement.classList.add('kbq-standard-tag');
|
|
301
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Selects the tag.
|
|
317
|
+
*/
|
|
302
318
|
select() {
|
|
303
|
-
if (!this.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
319
|
+
if (this.disabled || !this.selectable)
|
|
320
|
+
return;
|
|
321
|
+
this.setSelectedState(true, { emitEvent: true });
|
|
307
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Deselects the tag.
|
|
325
|
+
*/
|
|
308
326
|
deselect() {
|
|
309
|
-
if (this.
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
327
|
+
if (this.disabled || !this.selectable)
|
|
328
|
+
return;
|
|
329
|
+
this.setSelectedState(false, { emitEvent: true });
|
|
313
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Selects the tag and emits event with isUserInput flag.
|
|
333
|
+
*
|
|
334
|
+
* @docs-private
|
|
335
|
+
*/
|
|
314
336
|
selectViaInteraction() {
|
|
315
|
-
if (!this.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
}
|
|
337
|
+
if (this.disabled || !this.selectable)
|
|
338
|
+
return;
|
|
339
|
+
this.setSelectedState(true, { isUserInput: true, emitEvent: true });
|
|
319
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Toggles the current selected state of the tag.
|
|
343
|
+
*/
|
|
320
344
|
toggleSelected(isUserInput = false) {
|
|
321
|
-
this.
|
|
322
|
-
|
|
345
|
+
if (this.disabled || !this.selectable)
|
|
346
|
+
return this.selected;
|
|
347
|
+
this.setSelectedState(!this.selected, { isUserInput, emitEvent: true });
|
|
323
348
|
return this.selected;
|
|
324
349
|
}
|
|
325
|
-
/**
|
|
350
|
+
/** Focuses the tag. */
|
|
326
351
|
focus() {
|
|
327
|
-
if (
|
|
352
|
+
if (this.disabled)
|
|
328
353
|
return;
|
|
329
|
-
|
|
330
|
-
if (!this.editing())
|
|
331
|
-
this.elementRef.nativeElement.focus();
|
|
332
|
-
this.onFocus.next({ tag: this });
|
|
333
|
-
Promise.resolve().then(() => {
|
|
334
|
-
this.hasFocus = true;
|
|
335
|
-
this.changeDetectorRef.markForCheck();
|
|
336
|
-
});
|
|
337
|
-
}
|
|
354
|
+
this.elementRef.nativeElement.focus();
|
|
338
355
|
}
|
|
339
356
|
/**
|
|
340
357
|
* Allows for programmatic removal of the tag. Called by the KbqTagList when the DELETE or
|
|
@@ -349,34 +366,33 @@ class KbqTag extends KbqColorDirective {
|
|
|
349
366
|
}
|
|
350
367
|
/** @docs-private */
|
|
351
368
|
handleMousedown(event) {
|
|
352
|
-
if (this.disabled || !this.selectable)
|
|
353
|
-
event.preventDefault();
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
369
|
+
if (this.disabled || (!this.selectable && !this.editable) || this.editing())
|
|
370
|
+
return event.preventDefault();
|
|
371
|
+
if (hasModifierKey(event, 'metaKey', 'ctrlKey', 'shiftKey') && this.selectable)
|
|
372
|
+
this.toggleSelected(true);
|
|
373
|
+
event.stopPropagation();
|
|
358
374
|
}
|
|
359
375
|
/** @docs-private */
|
|
360
376
|
handleKeydown(event) {
|
|
361
|
-
if (this.disabled)
|
|
377
|
+
if (this.disabled || this.editing())
|
|
362
378
|
return;
|
|
363
|
-
}
|
|
364
379
|
switch (event.keyCode) {
|
|
365
380
|
case DELETE:
|
|
366
|
-
case BACKSPACE:
|
|
367
|
-
|
|
368
|
-
|
|
381
|
+
case BACKSPACE: {
|
|
382
|
+
const hasSelectedTags = this.tagList &&
|
|
383
|
+
(Array.isArray(this.tagList.selected) ? this.tagList.selected.length > 0 : !!this.tagList.selected);
|
|
384
|
+
// If there is a tag list and it has selected tags, remove them, otherwise remove focused tag.
|
|
385
|
+
hasSelectedTags ? this.tagList.removeSelected() : this.remove();
|
|
369
386
|
// Always prevent so page navigation does not occur
|
|
370
387
|
event.preventDefault();
|
|
371
388
|
break;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
this.toggleSelected(true);
|
|
376
|
-
}
|
|
389
|
+
}
|
|
390
|
+
case SPACE: {
|
|
391
|
+
this.toggleSelected(true);
|
|
377
392
|
// Always prevent space from scrolling the page since the list has focus
|
|
378
393
|
event.preventDefault();
|
|
379
394
|
break;
|
|
395
|
+
}
|
|
380
396
|
case F2:
|
|
381
397
|
case ENTER:
|
|
382
398
|
this.startEditing(event.key);
|
|
@@ -386,20 +402,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
386
402
|
}
|
|
387
403
|
/** @docs-private */
|
|
388
404
|
blur() {
|
|
389
|
-
this.
|
|
390
|
-
// When animations are enabled, Angular may end up removing the tag from the DOM a little
|
|
391
|
-
// earlier than usual, causing it to be blurred and throwing off the logic in the tag list
|
|
392
|
-
// that moves focus not the next item. To work around the issue, we defer marking the tag
|
|
393
|
-
// as not focused until the next time the zone stabilizes.
|
|
394
|
-
this._ngZone.onStable
|
|
395
|
-
.asObservable()
|
|
396
|
-
.pipe(take(1))
|
|
397
|
-
.subscribe(() => {
|
|
398
|
-
this._ngZone.run(() => {
|
|
399
|
-
this.hasFocus = false;
|
|
400
|
-
this.onBlur.next({ tag: this });
|
|
401
|
-
});
|
|
402
|
-
});
|
|
405
|
+
this.elementRef.nativeElement.blur();
|
|
403
406
|
}
|
|
404
407
|
/** @docs-private */
|
|
405
408
|
handleDblClick(event) {
|
|
@@ -417,7 +420,6 @@ class KbqTag extends KbqColorDirective {
|
|
|
417
420
|
const input = this.editInputElementRef?.nativeElement;
|
|
418
421
|
if (!input)
|
|
419
422
|
throw getTagEditInputMissingError();
|
|
420
|
-
input.focus();
|
|
421
423
|
input.select();
|
|
422
424
|
});
|
|
423
425
|
}
|
|
@@ -427,7 +429,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
427
429
|
return;
|
|
428
430
|
this.editing.set(false);
|
|
429
431
|
this.editChange.emit({ tag: this, type: 'cancel', reason });
|
|
430
|
-
this.textElement.nativeElement.scrollTo({ left: 0, behavior: 'instant' });
|
|
432
|
+
this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
|
|
431
433
|
}
|
|
432
434
|
/** @docs-private */
|
|
433
435
|
submitEditing(reason) {
|
|
@@ -435,17 +437,70 @@ class KbqTag extends KbqColorDirective {
|
|
|
435
437
|
return;
|
|
436
438
|
this.editing.set(false);
|
|
437
439
|
this.editChange.emit({ tag: this, type: 'submit', reason });
|
|
438
|
-
this.textElement.nativeElement.scrollTo({ left: 0, behavior: 'instant' });
|
|
440
|
+
this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Sets the selected state of the tag.
|
|
444
|
+
*
|
|
445
|
+
* @docs-private
|
|
446
|
+
*/
|
|
447
|
+
setSelectedState(selected, options = {}) {
|
|
448
|
+
const { isUserInput = false, emitEvent = false } = options;
|
|
449
|
+
if (selected !== this.selected) {
|
|
450
|
+
this._selected = selected;
|
|
451
|
+
if (emitEvent) {
|
|
452
|
+
this.selectionChange.emit({
|
|
453
|
+
source: this,
|
|
454
|
+
isUserInput,
|
|
455
|
+
selected: this.selected
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
this.changeDetectorRef.markForCheck();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
setupDragInitialProperties() {
|
|
462
|
+
this.syncDragDisabledState();
|
|
463
|
+
this.drag.started.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
464
|
+
this.drag.data = {
|
|
465
|
+
tag: this,
|
|
466
|
+
hasFocus: this.hasFocus,
|
|
467
|
+
focusOrigin: this.focusOrigin
|
|
468
|
+
};
|
|
469
|
+
});
|
|
439
470
|
}
|
|
440
|
-
|
|
441
|
-
this.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
471
|
+
syncDragDisabledState() {
|
|
472
|
+
this.drag.disabled = !this.draggable;
|
|
473
|
+
}
|
|
474
|
+
setupFocusMonitor() {
|
|
475
|
+
this.focusMonitor
|
|
476
|
+
.monitor(this.elementRef, true)
|
|
477
|
+
.pipe(
|
|
478
|
+
// Debounce to ensure correct hasFocus and focusOrigin state during drag start operations
|
|
479
|
+
debounceTime(0))
|
|
480
|
+
.subscribe((origin) => {
|
|
481
|
+
if (this.disabled)
|
|
482
|
+
return;
|
|
483
|
+
this.focusOrigin = origin;
|
|
484
|
+
const hasFocus = !isNull(origin);
|
|
485
|
+
if (hasFocus !== this.hasFocus) {
|
|
486
|
+
this.hasFocus = hasFocus;
|
|
487
|
+
if (this.hasFocus) {
|
|
488
|
+
this.onFocus.next({ tag: this });
|
|
489
|
+
if (!this.tagList)
|
|
490
|
+
this.select();
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
this.onBlur.next({ tag: this });
|
|
494
|
+
this.cancelEditing('blur');
|
|
495
|
+
if (!this.tagList)
|
|
496
|
+
this.deselect();
|
|
497
|
+
}
|
|
498
|
+
this.changeDetectorRef.markForCheck();
|
|
499
|
+
}
|
|
445
500
|
});
|
|
446
501
|
}
|
|
447
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
448
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.
|
|
502
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTag, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
503
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: { editable: ["editable", "editable", booleanAttribute], preventEditSubmit: ["preventEditSubmit", "preventEditSubmit", booleanAttribute], selected: ["selected", "selected", booleanAttribute], value: "value", selectable: ["selectable", "selectable", booleanAttribute], removable: ["removable", "removable", booleanAttribute], tabindex: "tabindex", disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { editChange: "editChange", selectionChange: "selectionChange", destroyed: "destroyed", removed: "removed" }, host: { listeners: { "dblclick": "handleDblClick($event)", "mousedown": "handleMousedown($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.tabindex": "tabindex", "attr.disabled": "disabled || null", "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" }, classAttribute: "kbq-tag" }, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], queries: [{ propertyName: "editInputElementRef", first: true, predicate: KbqTagEditInput, descendants: true, read: ElementRef }, { propertyName: "avatar", first: true, predicate: KbqTagAvatar, descendants: true }, { propertyName: "trailingIcon", first: true, predicate: KbqTagTrailingIcon, descendants: true }, { propertyName: "removeIcon", first: true, predicate: i0.forwardRef(() => KbqTagRemove), descendants: true }, { propertyName: "contentChildren", predicate: KbqIcon }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true }], exportAs: ["kbqTag"], usesInheritance: true, hostDirectives: [{ directive: i1.KbqHovered }, { directive: i2.CdkDrag }], ngImport: i0, template: `
|
|
449
504
|
<div class="kbq-tag__wrapper">
|
|
450
505
|
<ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
|
|
451
506
|
<span #kbqTitleText class="kbq-tag__text">
|
|
@@ -458,14 +513,16 @@ class KbqTag extends KbqColorDirective {
|
|
|
458
513
|
@if (editing()) {
|
|
459
514
|
<ng-content select="[kbqTagEditSubmit]" />
|
|
460
515
|
} @else {
|
|
461
|
-
|
|
516
|
+
@if (removable) {
|
|
517
|
+
<ng-content select="[kbqTagRemove]" />
|
|
518
|
+
}
|
|
462
519
|
}
|
|
463
520
|
</div>
|
|
464
|
-
`, isInline: true, styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px;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-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;min-width:var(--kbq-size-xs);max-width:100%}.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.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__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
521
|
+
`, isInline: true, styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-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;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-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;min-width:var(--kbq-size-xs);max-width:100%}.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.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__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
465
522
|
}
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTag, decorators: [{
|
|
467
524
|
type: Component,
|
|
468
|
-
args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', exportAs: 'kbqTag', template: `
|
|
525
|
+
args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', exportAs: 'kbqTag', hostDirectives: [KbqHovered, CdkDrag], template: `
|
|
469
526
|
<div class="kbq-tag__wrapper">
|
|
470
527
|
<ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
|
|
471
528
|
<span #kbqTitleText class="kbq-tag__text">
|
|
@@ -478,7 +535,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
478
535
|
@if (editing()) {
|
|
479
536
|
<ng-content select="[kbqTagEditSubmit]" />
|
|
480
537
|
} @else {
|
|
481
|
-
|
|
538
|
+
@if (removable) {
|
|
539
|
+
<ng-content select="[kbqTagRemove]" />
|
|
540
|
+
}
|
|
482
541
|
}
|
|
483
542
|
</div>
|
|
484
543
|
`, host: {
|
|
@@ -486,18 +545,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
486
545
|
'[attr.tabindex]': 'tabindex',
|
|
487
546
|
'[attr.disabled]': 'disabled || null',
|
|
488
547
|
'[class.kbq-selected]': 'selected',
|
|
489
|
-
'[class.kbq-focused]': 'hasFocus',
|
|
490
548
|
'[class.kbq-tag-with-avatar]': 'avatar',
|
|
491
549
|
'[class.kbq-tag-with-icon]': 'contentChildren',
|
|
492
550
|
'[class.kbq-tag-with-trailing-icon]': 'trailingIcon || removeIcon',
|
|
493
551
|
'[class.kbq-disabled]': 'disabled',
|
|
494
552
|
'[class.kbq-tag_editable]': 'editable',
|
|
495
553
|
'[class.kbq-tag_editing]': 'editing()',
|
|
554
|
+
'[class.kbq-tag_removable]': 'removable',
|
|
555
|
+
'[class.kbq-tag_selectable]': 'selectable',
|
|
556
|
+
'[class.kbq-tag_draggable]': 'draggable',
|
|
496
557
|
'(dblclick)': 'handleDblClick($event)',
|
|
497
558
|
'(mousedown)': 'handleMousedown($event)',
|
|
498
559
|
'(keydown)': 'handleKeydown($event)'
|
|
499
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-block;max-width:100%;padding:var(--kbq-tag-size-padding-vertical) var(--kbq-tag-size-padding-horizontal);border-radius:4px;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-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;min-width:var(--kbq-size-xs);max-width:100%}.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.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__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"] }]
|
|
500
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }
|
|
560
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqTag }], styles: [".kbq-tag{-webkit-user-select:none;-moz-user-select:none;-ms-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;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-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;min-width:var(--kbq-size-xs);max-width:100%}.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.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__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}\n"] }]
|
|
561
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { editable: [{
|
|
501
562
|
type: Input,
|
|
502
563
|
args: [{ transform: booleanAttribute }]
|
|
503
564
|
}], preventEditSubmit: [{
|
|
@@ -530,17 +591,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
530
591
|
}], removed: [{
|
|
531
592
|
type: Output
|
|
532
593
|
}], selected: [{
|
|
533
|
-
type: Input
|
|
594
|
+
type: Input,
|
|
595
|
+
args: [{ transform: booleanAttribute }]
|
|
534
596
|
}], value: [{
|
|
535
597
|
type: Input
|
|
536
598
|
}], selectable: [{
|
|
537
|
-
type: Input
|
|
599
|
+
type: Input,
|
|
600
|
+
args: [{ transform: booleanAttribute }]
|
|
538
601
|
}], removable: [{
|
|
539
|
-
type: Input
|
|
602
|
+
type: Input,
|
|
603
|
+
args: [{ transform: booleanAttribute }]
|
|
540
604
|
}], tabindex: [{
|
|
541
605
|
type: Input
|
|
542
606
|
}], disabled: [{
|
|
543
|
-
type: Input
|
|
607
|
+
type: Input,
|
|
608
|
+
args: [{ transform: booleanAttribute }]
|
|
544
609
|
}] } });
|
|
545
610
|
/**
|
|
546
611
|
*
|
|
@@ -557,10 +622,15 @@ class KbqTagRemove {
|
|
|
557
622
|
constructor(parentTag) {
|
|
558
623
|
this.parentTag = parentTag;
|
|
559
624
|
}
|
|
560
|
-
|
|
561
|
-
|
|
625
|
+
/** @docs-private */
|
|
626
|
+
focus(event) {
|
|
627
|
+
event.stopPropagation();
|
|
562
628
|
}
|
|
563
|
-
/**
|
|
629
|
+
/**
|
|
630
|
+
* Calls the parent tag's public `remove()` method if applicable.
|
|
631
|
+
*
|
|
632
|
+
* @docs-private
|
|
633
|
+
*/
|
|
564
634
|
handleClick(event) {
|
|
565
635
|
if (this.parentTag.removable) {
|
|
566
636
|
this.parentTag.hasFocus = true;
|
|
@@ -573,10 +643,10 @@ class KbqTagRemove {
|
|
|
573
643
|
// that the tag is being removed before the event bubbles up.
|
|
574
644
|
event.stopPropagation();
|
|
575
645
|
}
|
|
576
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
577
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
646
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagRemove, deps: [{ token: forwardRef(() => KbqTag) }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
647
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagRemove, selector: "[kbqTagRemove]", host: { listeners: { "click": "handleClick($event)", "focus": "focus($event)" }, properties: { "attr.tabindex": "-1" }, classAttribute: "kbq-tag-remove kbq-tag-trailing-icon" }, ngImport: i0 }); }
|
|
578
648
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagRemove, decorators: [{
|
|
580
650
|
type: Directive,
|
|
581
651
|
args: [{
|
|
582
652
|
selector: '[kbqTagRemove]',
|
|
@@ -622,35 +692,19 @@ class KbqTagList {
|
|
|
622
692
|
get tagEditChanges() {
|
|
623
693
|
return merge(...this.tags.map((tag) => tag.editChange));
|
|
624
694
|
}
|
|
625
|
-
/**
|
|
695
|
+
/**
|
|
696
|
+
* The array of selected tags inside tag list.
|
|
697
|
+
*
|
|
698
|
+
* @docs-private
|
|
699
|
+
*/
|
|
626
700
|
get selected() {
|
|
627
|
-
|
|
701
|
+
const selected = this.tags.filter(({ selected }) => selected);
|
|
702
|
+
return this.multiple ? selected : selected[0];
|
|
628
703
|
}
|
|
704
|
+
/** @docs-private */
|
|
629
705
|
get canShowCleaner() {
|
|
630
706
|
return this.cleaner && this.tags.length > 0;
|
|
631
707
|
}
|
|
632
|
-
/** Whether the user should be allowed to select multiple tags. */
|
|
633
|
-
get multiple() {
|
|
634
|
-
return this._multiple;
|
|
635
|
-
}
|
|
636
|
-
set multiple(value) {
|
|
637
|
-
this._multiple = coerceBooleanProperty(value);
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* A function to compare the option values with the selected values. The first argument
|
|
641
|
-
* is a value from an option. The second is a value from the selection. A boolean
|
|
642
|
-
* should be returned.
|
|
643
|
-
*/
|
|
644
|
-
get compareWith() {
|
|
645
|
-
return this._compareWith;
|
|
646
|
-
}
|
|
647
|
-
set compareWith(fn) {
|
|
648
|
-
this._compareWith = fn;
|
|
649
|
-
if (this.selectionModel) {
|
|
650
|
-
// A different comparator means the selection could change.
|
|
651
|
-
this.initializeSelection();
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
708
|
/**
|
|
655
709
|
* Implemented as part of KbqFormFieldControl.
|
|
656
710
|
* @docs-private
|
|
@@ -659,7 +713,6 @@ class KbqTagList {
|
|
|
659
713
|
return this._value;
|
|
660
714
|
}
|
|
661
715
|
set value(value) {
|
|
662
|
-
this.writeValue(value);
|
|
663
716
|
this._value = value;
|
|
664
717
|
}
|
|
665
718
|
/**
|
|
@@ -717,19 +770,23 @@ class KbqTagList {
|
|
|
717
770
|
return this.ngControl ? !!this.ngControl.disabled : this._disabled;
|
|
718
771
|
}
|
|
719
772
|
set disabled(value) {
|
|
720
|
-
this._disabled =
|
|
721
|
-
this.
|
|
773
|
+
this._disabled = value;
|
|
774
|
+
this.syncDropListDisabledState();
|
|
722
775
|
}
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
* the selected states for all the tags inside the tag list are always ignored.
|
|
726
|
-
*/
|
|
727
|
-
get selectable() {
|
|
728
|
-
return this._selectable;
|
|
776
|
+
get draggable() {
|
|
777
|
+
return this._draggable && !this.disabled;
|
|
729
778
|
}
|
|
730
|
-
set
|
|
731
|
-
this.
|
|
732
|
-
this.
|
|
779
|
+
set draggable(value) {
|
|
780
|
+
this._draggable = value;
|
|
781
|
+
this.syncDropListDisabledState();
|
|
782
|
+
}
|
|
783
|
+
/** Whether the tags in the list are removable. */
|
|
784
|
+
get removable() {
|
|
785
|
+
return this._removable;
|
|
786
|
+
}
|
|
787
|
+
set removable(value) {
|
|
788
|
+
this._removable = value;
|
|
789
|
+
this.syncTagsRemovableState();
|
|
733
790
|
}
|
|
734
791
|
get tabIndex() {
|
|
735
792
|
return this._tabIndex;
|
|
@@ -746,6 +803,14 @@ class KbqTagList {
|
|
|
746
803
|
this.parentForm = parentForm;
|
|
747
804
|
this.parentFormGroup = parentFormGroup;
|
|
748
805
|
this.ngControl = ngControl;
|
|
806
|
+
this.dropList = inject(CdkDropList, { host: true });
|
|
807
|
+
this.destroyRef = inject(DestroyRef);
|
|
808
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
809
|
+
/**
|
|
810
|
+
* Implemented as part of KbqFormFieldControl.
|
|
811
|
+
*
|
|
812
|
+
* @docs-private
|
|
813
|
+
*/
|
|
749
814
|
this.controlType = 'tag-list';
|
|
750
815
|
/**
|
|
751
816
|
* Emits whenever the component state changes and should cause the parent
|
|
@@ -753,8 +818,35 @@ class KbqTagList {
|
|
|
753
818
|
* @docs-private
|
|
754
819
|
*/
|
|
755
820
|
this.stateChanges = new Subject();
|
|
756
|
-
/**
|
|
821
|
+
/**
|
|
822
|
+
* Whether the user should be allowed to select multiple tags.
|
|
823
|
+
*
|
|
824
|
+
* NOTE! Component does not support dynamic multiple attribute changes.
|
|
825
|
+
*/
|
|
826
|
+
this.multiple = false;
|
|
827
|
+
/**
|
|
828
|
+
* A function to compare the option values with the selected values. The first argument
|
|
829
|
+
* is a value from an option. The second is a value from the selection. A boolean
|
|
830
|
+
* should be returned.
|
|
831
|
+
*
|
|
832
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
833
|
+
*/
|
|
834
|
+
this.compareWith = (o1, o2) => o1 === o2;
|
|
835
|
+
this._required = false;
|
|
836
|
+
this._disabled = false;
|
|
837
|
+
this._draggable = false;
|
|
838
|
+
/**
|
|
839
|
+
* Emits when the user drops tag inside tag list container.
|
|
840
|
+
*/
|
|
841
|
+
this.dropped = new EventEmitter();
|
|
842
|
+
/**
|
|
843
|
+
* Whether or not this tag list is selectable. When a tag list is not selectable,
|
|
844
|
+
* the selected states for all the tags inside the tag list are always ignored.
|
|
845
|
+
*/
|
|
846
|
+
this.selectable = true;
|
|
847
|
+
/** Whether the tags in the list are editable. */
|
|
757
848
|
this.editable = false;
|
|
849
|
+
this._removable = true;
|
|
758
850
|
this._tabIndex = 0;
|
|
759
851
|
/**
|
|
760
852
|
* Event that emits whenever the raw value of the tag-list changes. This is here primarily
|
|
@@ -762,40 +854,49 @@ class KbqTagList {
|
|
|
762
854
|
* @docs-private
|
|
763
855
|
*/
|
|
764
856
|
this.valueChange = new EventEmitter();
|
|
857
|
+
/** @docs-private */
|
|
765
858
|
this.uid = `kbq-tag-list-${nextUniqueId$1++}`;
|
|
766
859
|
/**
|
|
767
860
|
* User defined tab index.
|
|
768
861
|
* When it is not null, use user defined tab index. Otherwise use tabIndex
|
|
862
|
+
*
|
|
863
|
+
* @docs-private
|
|
769
864
|
*/
|
|
770
865
|
this.userTabIndex = null;
|
|
866
|
+
/**
|
|
867
|
+
* @docs-private
|
|
868
|
+
*
|
|
869
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
870
|
+
*/
|
|
771
871
|
this.tagChanges = new EventEmitter();
|
|
772
|
-
/**
|
|
872
|
+
/**
|
|
873
|
+
* Orientation of the tag list.
|
|
874
|
+
*
|
|
875
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
876
|
+
*/
|
|
773
877
|
this.orientation = 'horizontal';
|
|
774
878
|
/** Event emitted when the selected tag list value has been changed by the user. */
|
|
775
879
|
this.change = new EventEmitter();
|
|
776
|
-
/**
|
|
880
|
+
/**
|
|
881
|
+
* Whether the component is in an error state.
|
|
882
|
+
*
|
|
883
|
+
* @docs-private
|
|
884
|
+
*/
|
|
777
885
|
this.errorState = false;
|
|
778
|
-
this._required = false;
|
|
779
|
-
this._disabled = false;
|
|
780
|
-
this._selectable = true;
|
|
781
|
-
this._multiple = false;
|
|
782
886
|
/**
|
|
783
887
|
* When a tag is destroyed, we store the index of the destroyed tag until the tags
|
|
784
888
|
* query list notifies about the update. This is necessary because we cannot determine an
|
|
785
889
|
* appropriate tag that should receive focus until the array of tags updated completely.
|
|
786
890
|
*/
|
|
787
891
|
this.lastDestroyedTagIndex = null;
|
|
788
|
-
|
|
892
|
+
/** @docs-private */
|
|
789
893
|
this.onTouched = () => { };
|
|
894
|
+
/** @docs-private */
|
|
790
895
|
this.onChange = () => { };
|
|
791
|
-
this._compareWith = (o1, o2) => o1 === o2;
|
|
792
896
|
if (this.ngControl) {
|
|
793
897
|
this.ngControl.valueAccessor = this;
|
|
794
898
|
}
|
|
795
|
-
|
|
796
|
-
ngOnInit() {
|
|
797
|
-
this.selectionModel = new SelectionModel(this.multiple, undefined, false);
|
|
798
|
-
this.stateChanges.next();
|
|
899
|
+
this.setupDropListInitialProperties();
|
|
799
900
|
}
|
|
800
901
|
ngDoCheck() {
|
|
801
902
|
if (this.ngControl) {
|
|
@@ -828,16 +929,7 @@ class KbqTagList {
|
|
|
828
929
|
this.tags.changes
|
|
829
930
|
.pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
|
|
830
931
|
.subscribe((currentTags) => {
|
|
831
|
-
if (this.disabled) {
|
|
832
|
-
// Since this happens after the content has been
|
|
833
|
-
// checked, we need to defer it to the next tick.
|
|
834
|
-
Promise.resolve().then(() => {
|
|
835
|
-
this.syncTagsDisabledState();
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
932
|
this.resetTags();
|
|
839
|
-
// Reset tags selected/deselected status
|
|
840
|
-
this.initializeSelection();
|
|
841
933
|
// Check to see if we need to update our tab index
|
|
842
934
|
this.updateTabIndex();
|
|
843
935
|
// Check to see if we have a destroyed tag and need to refocus
|
|
@@ -845,7 +937,6 @@ class KbqTagList {
|
|
|
845
937
|
// Defer setting the value in order to avoid the "Expression
|
|
846
938
|
// has changed after it was checked" errors from Angular.
|
|
847
939
|
Promise.resolve().then(() => {
|
|
848
|
-
this.tagChanges.emit(this.tags.toArray());
|
|
849
940
|
this.stateChanges.next();
|
|
850
941
|
// do not call on initial
|
|
851
942
|
if (currentTags) {
|
|
@@ -853,12 +944,16 @@ class KbqTagList {
|
|
|
853
944
|
}
|
|
854
945
|
});
|
|
855
946
|
});
|
|
856
|
-
|
|
947
|
+
}
|
|
948
|
+
ngAfterViewInit() {
|
|
949
|
+
this.setupFocusMonitor();
|
|
857
950
|
}
|
|
858
951
|
ngOnDestroy() {
|
|
859
952
|
this.stateChanges.complete();
|
|
953
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
860
954
|
this.dropSubscriptions();
|
|
861
955
|
}
|
|
956
|
+
/** @docs-private */
|
|
862
957
|
updateErrorState() {
|
|
863
958
|
const oldState = this.errorState;
|
|
864
959
|
const parent = this.parentFormGroup || this.parentForm;
|
|
@@ -870,7 +965,11 @@ class KbqTagList {
|
|
|
870
965
|
this.stateChanges.next();
|
|
871
966
|
}
|
|
872
967
|
}
|
|
873
|
-
/**
|
|
968
|
+
/**
|
|
969
|
+
* Associates an HTML input element with this tag list.
|
|
970
|
+
*
|
|
971
|
+
* @docs-private
|
|
972
|
+
*/
|
|
874
973
|
registerInput(inputElement) {
|
|
875
974
|
this.tagInput = inputElement;
|
|
876
975
|
// todo need rethink about it (#DS-3740)
|
|
@@ -878,27 +977,34 @@ class KbqTagList {
|
|
|
878
977
|
inputElement.ngControl.statusChanges.subscribe(() => this.ngControl.control.setErrors(inputElement.ngControl.errors));
|
|
879
978
|
}
|
|
880
979
|
}
|
|
881
|
-
|
|
980
|
+
/**
|
|
981
|
+
* Implemented as part of ControlValueAccessor.
|
|
982
|
+
*/
|
|
882
983
|
writeValue(value) {
|
|
883
|
-
|
|
884
|
-
this.setSelectionByValue(value, false);
|
|
885
|
-
}
|
|
984
|
+
this.value = value;
|
|
886
985
|
}
|
|
887
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Implemented as part of ControlValueAccessor.
|
|
988
|
+
*/
|
|
888
989
|
registerOnChange(fn) {
|
|
889
990
|
this.onChange = fn;
|
|
890
991
|
}
|
|
891
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Implemented as part of ControlValueAccessor.
|
|
994
|
+
*/
|
|
892
995
|
registerOnTouched(fn) {
|
|
893
996
|
this.onTouched = fn;
|
|
894
997
|
}
|
|
895
|
-
|
|
998
|
+
/**
|
|
999
|
+
* Implemented as part of ControlValueAccessor.
|
|
1000
|
+
*/
|
|
896
1001
|
setDisabledState(isDisabled) {
|
|
897
1002
|
this.disabled = isDisabled;
|
|
898
1003
|
this.stateChanges.next();
|
|
899
1004
|
}
|
|
900
1005
|
/**
|
|
901
1006
|
* Implemented as part of KbqFormFieldControl.
|
|
1007
|
+
*
|
|
902
1008
|
* @docs-private
|
|
903
1009
|
*/
|
|
904
1010
|
onContainerClick(event) {
|
|
@@ -936,15 +1042,26 @@ class KbqTagList {
|
|
|
936
1042
|
}
|
|
937
1043
|
/**
|
|
938
1044
|
* Pass events to the keyboard manager. Available here for tests.
|
|
1045
|
+
*
|
|
1046
|
+
* @docs-private
|
|
939
1047
|
*/
|
|
940
1048
|
keydown(event) {
|
|
941
1049
|
const target = event.target;
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1050
|
+
if (this.disabled || isNull(target))
|
|
1051
|
+
return;
|
|
1052
|
+
const _isSelectAll = this.multiple && this.selectable && isSelectAll(event);
|
|
1053
|
+
if (this.isInputEmpty(target)) {
|
|
1054
|
+
if (event.keyCode === BACKSPACE) {
|
|
1055
|
+
this.keyManager.setLastItemActive();
|
|
1056
|
+
event.preventDefault();
|
|
1057
|
+
}
|
|
1058
|
+
else if (_isSelectAll) {
|
|
1059
|
+
this.selectAll();
|
|
1060
|
+
this.keyManager.setLastItemActive();
|
|
1061
|
+
event.preventDefault();
|
|
1062
|
+
}
|
|
946
1063
|
}
|
|
947
|
-
else if (
|
|
1064
|
+
else if (this.isTagElement(target)) {
|
|
948
1065
|
if (event.keyCode === HOME) {
|
|
949
1066
|
this.keyManager.setFirstItemActive();
|
|
950
1067
|
event.preventDefault();
|
|
@@ -953,29 +1070,23 @@ class KbqTagList {
|
|
|
953
1070
|
this.keyManager.setLastItemActive();
|
|
954
1071
|
event.preventDefault();
|
|
955
1072
|
}
|
|
1073
|
+
else if (_isSelectAll) {
|
|
1074
|
+
this.selectAll();
|
|
1075
|
+
this.keyManager.setLastItemActive();
|
|
1076
|
+
event.preventDefault();
|
|
1077
|
+
}
|
|
956
1078
|
else {
|
|
957
1079
|
this.keyManager.onKeydown(event);
|
|
958
1080
|
}
|
|
959
1081
|
this.stateChanges.next();
|
|
960
1082
|
}
|
|
961
1083
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
this.sortValues();
|
|
969
|
-
}
|
|
970
|
-
else {
|
|
971
|
-
const correspondingTag = this.selectValue(value, isUserInput);
|
|
972
|
-
// Shift focus to the active item. Note that we shouldn't do this in multiple
|
|
973
|
-
// mode, because we don't know what tag the user interacted with last.
|
|
974
|
-
if (correspondingTag && isUserInput) {
|
|
975
|
-
this.keyManager.setActiveItem(correspondingTag);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
1084
|
+
/**
|
|
1085
|
+
* @docs-private
|
|
1086
|
+
*
|
|
1087
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
1088
|
+
*/
|
|
1089
|
+
setSelectionByValue(_value, _isUserInput = true) { }
|
|
979
1090
|
/** When blurred, mark the field as touched when focus moved outside the tag list. */
|
|
980
1091
|
blur() {
|
|
981
1092
|
if (!this.hasFocusedTag()) {
|
|
@@ -1009,6 +1120,8 @@ class KbqTagList {
|
|
|
1009
1120
|
}
|
|
1010
1121
|
/**
|
|
1011
1122
|
* Check the tab index as you should not be allowed to focus an empty list.
|
|
1123
|
+
*
|
|
1124
|
+
* @docs-private
|
|
1012
1125
|
*/
|
|
1013
1126
|
updateTabIndex() {
|
|
1014
1127
|
// If we have 0 tags, we should not allow keyboard focus
|
|
@@ -1017,6 +1130,8 @@ class KbqTagList {
|
|
|
1017
1130
|
/**
|
|
1018
1131
|
* If the amount of tags changed, we need to update the
|
|
1019
1132
|
* key manager state and focus the next closest tag.
|
|
1133
|
+
*
|
|
1134
|
+
* @docs-private
|
|
1020
1135
|
*/
|
|
1021
1136
|
updateFocusForDestroyedTags() {
|
|
1022
1137
|
if (this.lastDestroyedTagIndex != null) {
|
|
@@ -1046,78 +1161,27 @@ class KbqTagList {
|
|
|
1046
1161
|
}
|
|
1047
1162
|
return false;
|
|
1048
1163
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
const correspondingTag = this.tags.find((tag) => {
|
|
1055
|
-
return tag.value != null && this._compareWith(tag.value, value);
|
|
1056
|
-
});
|
|
1057
|
-
if (correspondingTag) {
|
|
1058
|
-
if (isUserInput) {
|
|
1059
|
-
correspondingTag.selectViaInteraction();
|
|
1060
|
-
}
|
|
1061
|
-
else {
|
|
1062
|
-
correspondingTag.select();
|
|
1063
|
-
}
|
|
1064
|
-
this.selectionModel.select(correspondingTag);
|
|
1065
|
-
}
|
|
1066
|
-
return correspondingTag;
|
|
1067
|
-
}
|
|
1068
|
-
initializeSelection() {
|
|
1069
|
-
// Defer setting the value in order to avoid the "Expression
|
|
1070
|
-
// has changed after it was checked" errors from Angular.
|
|
1071
|
-
Promise.resolve().then(() => {
|
|
1072
|
-
if (this.ngControl || this._value) {
|
|
1073
|
-
this.setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);
|
|
1074
|
-
this.stateChanges.next();
|
|
1075
|
-
}
|
|
1076
|
-
});
|
|
1164
|
+
isTagElement(element) {
|
|
1165
|
+
return element.classList.contains('kbq-tag');
|
|
1166
|
+
}
|
|
1167
|
+
selectAll() {
|
|
1168
|
+
this.tags.forEach((tag) => tag.selectViaInteraction());
|
|
1077
1169
|
}
|
|
1078
1170
|
/**
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1171
|
+
* Unselects all tags in the list.
|
|
1172
|
+
*
|
|
1173
|
+
* @docs-private
|
|
1081
1174
|
*/
|
|
1082
|
-
|
|
1083
|
-
this.
|
|
1084
|
-
this.tags.forEach((tag) => {
|
|
1085
|
-
if (tag !== skip) {
|
|
1086
|
-
tag.deselect();
|
|
1087
|
-
}
|
|
1088
|
-
});
|
|
1089
|
-
this.stateChanges.next();
|
|
1175
|
+
unselectAll() {
|
|
1176
|
+
this.tags.forEach((tag) => tag.setSelectedState(false));
|
|
1090
1177
|
}
|
|
1091
1178
|
/**
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1179
|
+
* Removes all selected tags from the list.
|
|
1180
|
+
*
|
|
1181
|
+
* @docs-private
|
|
1094
1182
|
*/
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
this.selectionModel.clear();
|
|
1098
|
-
this.tags.forEach((tag) => {
|
|
1099
|
-
if (tag.selected) {
|
|
1100
|
-
this.selectionModel.select(tag);
|
|
1101
|
-
}
|
|
1102
|
-
});
|
|
1103
|
-
this.stateChanges.next();
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
/** Emits change event to set the model value. */
|
|
1107
|
-
// todo need rethink this method and selection logic (#DS-3740)
|
|
1108
|
-
propagateChanges(fallbackValue) {
|
|
1109
|
-
let valueToEmit;
|
|
1110
|
-
if (Array.isArray(this.selected)) {
|
|
1111
|
-
valueToEmit = this.selected.map((tag) => tag.value);
|
|
1112
|
-
}
|
|
1113
|
-
else {
|
|
1114
|
-
valueToEmit = this.selected ? this.selected.value : fallbackValue;
|
|
1115
|
-
}
|
|
1116
|
-
this._value = valueToEmit;
|
|
1117
|
-
this.change.emit(new KbqTagListChange(this, valueToEmit));
|
|
1118
|
-
this.valueChange.emit(valueToEmit);
|
|
1119
|
-
this.onChange(valueToEmit);
|
|
1120
|
-
this.changeDetectorRef.markForCheck();
|
|
1183
|
+
removeSelected() {
|
|
1184
|
+
Array.isArray(this.selected) ? this.selected.forEach((tag) => tag.remove()) : this.selected.remove();
|
|
1121
1185
|
}
|
|
1122
1186
|
propagateTagsChanges() {
|
|
1123
1187
|
const valueToEmit = this.tags.map((tag) => tag.value);
|
|
@@ -1159,23 +1223,12 @@ class KbqTagList {
|
|
|
1159
1223
|
/** Listens to user-generated selection events on each tag. */
|
|
1160
1224
|
listenToTagsSelection() {
|
|
1161
1225
|
this.tagSelectionSubscription = this.tagSelectionChanges.subscribe((event) => {
|
|
1162
|
-
if (event.source.selected) {
|
|
1163
|
-
this.selectionModel.select(event.source);
|
|
1164
|
-
}
|
|
1165
|
-
else {
|
|
1166
|
-
this.selectionModel.deselect(event.source);
|
|
1167
|
-
}
|
|
1168
|
-
// For single selection tag list, make sure the deselected value is unselected.
|
|
1169
1226
|
if (!this.multiple) {
|
|
1170
1227
|
this.tags.forEach((tag) => {
|
|
1171
|
-
if (
|
|
1172
|
-
tag.
|
|
1173
|
-
}
|
|
1228
|
+
if (tag !== event.source)
|
|
1229
|
+
tag.setSelectedState(false);
|
|
1174
1230
|
});
|
|
1175
1231
|
}
|
|
1176
|
-
if (event.isUserInput) {
|
|
1177
|
-
this.propagateChanges();
|
|
1178
|
-
}
|
|
1179
1232
|
});
|
|
1180
1233
|
}
|
|
1181
1234
|
/** Listens to user-generated selection events on each tag. */
|
|
@@ -1185,10 +1238,14 @@ class KbqTagList {
|
|
|
1185
1238
|
if (this.isValidIndex(tagIndex)) {
|
|
1186
1239
|
this.keyManager.updateActiveItem(tagIndex);
|
|
1187
1240
|
}
|
|
1241
|
+
if (!this.multiple)
|
|
1242
|
+
event.tag.select();
|
|
1188
1243
|
this.stateChanges.next();
|
|
1189
1244
|
});
|
|
1190
|
-
this.tagBlurSubscription = this.tagBlurChanges.subscribe(() => {
|
|
1245
|
+
this.tagBlurSubscription = this.tagBlurChanges.subscribe((event) => {
|
|
1191
1246
|
this.blur();
|
|
1247
|
+
if (!this.multiple)
|
|
1248
|
+
event.tag.deselect();
|
|
1192
1249
|
this.stateChanges.next();
|
|
1193
1250
|
});
|
|
1194
1251
|
}
|
|
@@ -1213,7 +1270,7 @@ class KbqTagList {
|
|
|
1213
1270
|
originatesFromTag(event) {
|
|
1214
1271
|
let currentElement = event.target;
|
|
1215
1272
|
while (currentElement && currentElement !== this.elementRef.nativeElement) {
|
|
1216
|
-
if (
|
|
1273
|
+
if (this.isTagElement(currentElement)) {
|
|
1217
1274
|
return true;
|
|
1218
1275
|
}
|
|
1219
1276
|
currentElement = currentElement.parentElement;
|
|
@@ -1224,13 +1281,8 @@ class KbqTagList {
|
|
|
1224
1281
|
hasFocusedTag() {
|
|
1225
1282
|
return this.tags.some((tag) => tag.hasFocus);
|
|
1226
1283
|
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
if (this.tags) {
|
|
1230
|
-
this.tags.forEach((tag) => {
|
|
1231
|
-
tag.disabled = this._disabled;
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1284
|
+
syncTagsRemovableState() {
|
|
1285
|
+
this.tags?.forEach((tag) => (tag.removable = this.removable));
|
|
1234
1286
|
}
|
|
1235
1287
|
/** Revalidate control. */
|
|
1236
1288
|
revalidate() {
|
|
@@ -1240,27 +1292,73 @@ class KbqTagList {
|
|
|
1240
1292
|
control.statusChanges.emit(control.status);
|
|
1241
1293
|
}
|
|
1242
1294
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1295
|
+
setupDropListInitialProperties() {
|
|
1296
|
+
this.syncDropListDisabledState();
|
|
1297
|
+
this.dropList.elementContainerSelector = '.kbq-tags-list__list-container';
|
|
1298
|
+
this.dropList.orientation = 'mixed';
|
|
1299
|
+
this.dropList.dropped
|
|
1300
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1301
|
+
.subscribe(({ currentIndex, previousIndex, event, item }) => {
|
|
1302
|
+
const { tag, hasFocus, focusOrigin } = item.data;
|
|
1303
|
+
this.dropped.emit({ currentIndex, previousIndex, event, tag });
|
|
1304
|
+
if (this.tagInput) {
|
|
1305
|
+
return this.tagInput.focus();
|
|
1306
|
+
}
|
|
1307
|
+
if (hasFocus) {
|
|
1308
|
+
return setTimeout(() => this.focusMonitor.focusVia(tag.nativeElement, focusOrigin));
|
|
1309
|
+
}
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
syncDropListDisabledState() {
|
|
1313
|
+
this.dropList.disabled = !this.draggable;
|
|
1247
1314
|
}
|
|
1248
|
-
|
|
1249
|
-
|
|
1315
|
+
setupFocusMonitor() {
|
|
1316
|
+
this.focusMonitor.monitor(this.elementRef, true).subscribe((origin) => {
|
|
1317
|
+
if (!origin)
|
|
1318
|
+
this.unselectAll();
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagList, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ErrorStateMatcher }, { token: i2$1.Directionality, optional: true }, { token: i3.NgForm, optional: true }, { token: i3.FormGroupDirective, optional: true }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1322
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTagList, selector: "kbq-tag-list", inputs: { multiple: ["multiple", "multiple", booleanAttribute], compareWith: "compareWith", value: "value", required: "required", placeholder: "placeholder", disabled: ["disabled", "disabled", booleanAttribute], draggable: ["draggable", "draggable", booleanAttribute], selectable: ["selectable", "selectable", booleanAttribute], editable: ["editable", "editable", booleanAttribute], removable: ["removable", "removable", booleanAttribute], tabIndex: "tabIndex", errorStateMatcher: "errorStateMatcher", orientation: "orientation" }, 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_multiple": "multiple", "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": "disabled ? null : tabIndex", "id": "uid" }, classAttribute: "kbq-tag-list" }, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }], queries: [{ propertyName: "cleaner", first: true, predicate: ["kbqTagListCleaner"], descendants: true, static: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["kbqTagList"], hostDirectives: [{ directive: i2.CdkDropList }], ngImport: i0, template: `
|
|
1323
|
+
<div class="kbq-tags-list__list-container">
|
|
1324
|
+
<ng-content />
|
|
1325
|
+
</div>
|
|
1326
|
+
|
|
1327
|
+
@if (canShowCleaner) {
|
|
1328
|
+
<div class="kbq-tags-list__cleaner">
|
|
1329
|
+
<ng-content select="kbq-cleaner" />
|
|
1330
|
+
</div>
|
|
1331
|
+
}
|
|
1332
|
+
`, isInline: true, styles: [".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-input{border:none;outline:none;background:transparent;text-overflow:ellipsis;min-height:unset;padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:4px;padding-right:unset}.kbq-tag-input.kbq-input{padding:unset;min-height:unset}.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{max-width:100%;flex:1 1 auto}.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-line-warning);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-white);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-white);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-white);--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 }); }
|
|
1250
1333
|
}
|
|
1251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagList, decorators: [{
|
|
1252
1335
|
type: Component,
|
|
1253
|
-
args: [{ selector: 'kbq-tag-list', exportAs: 'kbqTagList',
|
|
1336
|
+
args: [{ selector: 'kbq-tag-list', exportAs: 'kbqTagList', template: `
|
|
1337
|
+
<div class="kbq-tags-list__list-container">
|
|
1338
|
+
<ng-content />
|
|
1339
|
+
</div>
|
|
1340
|
+
|
|
1341
|
+
@if (canShowCleaner) {
|
|
1342
|
+
<div class="kbq-tags-list__cleaner">
|
|
1343
|
+
<ng-content select="kbq-cleaner" />
|
|
1344
|
+
</div>
|
|
1345
|
+
}
|
|
1346
|
+
`, host: {
|
|
1254
1347
|
class: 'kbq-tag-list',
|
|
1255
1348
|
'[class.kbq-disabled]': 'disabled',
|
|
1256
1349
|
'[class.kbq-invalid]': 'errorState',
|
|
1350
|
+
'[class.kbq-tag-list_multiple]': 'multiple',
|
|
1351
|
+
'[class.kbq-tag-list_selectable]': 'selectable',
|
|
1352
|
+
'[class.kbq-tag-list_editable]': 'editable',
|
|
1353
|
+
'[class.kbq-tag-list_removable]': 'removable',
|
|
1354
|
+
'[class.kbq-tag-list_draggable]': 'draggable',
|
|
1257
1355
|
'[attr.tabindex]': 'disabled ? null : tabIndex',
|
|
1258
1356
|
'[id]': 'uid',
|
|
1259
1357
|
'(focus)': 'focus()',
|
|
1260
1358
|
'(blur)': 'blur()',
|
|
1261
1359
|
'(keydown)': 'keydown($event)'
|
|
1262
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }],
|
|
1263
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ErrorStateMatcher }, { type: i2.Directionality, decorators: [{
|
|
1360
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }], hostDirectives: [CdkDropList], styles: [".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-input{border:none;outline:none;background:transparent;text-overflow:ellipsis;min-height:unset;padding-top:var(--kbq-tag-size-padding-vertical);padding-bottom:var(--kbq-tag-size-padding-vertical);padding-left:4px;padding-right:unset}.kbq-tag-input.kbq-input{padding:unset;min-height:unset}.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{max-width:100%;flex:1 1 auto}.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-line-warning);--kbq-tag-warning-fade-states-selected-background: var(--kbq-background-warning);--kbq-tag-warning-fade-states-selected-text: var(--kbq-foreground-white);--kbq-tag-warning-fade-states-selected-icon: var(--kbq-icon-white);--kbq-tag-warning-fade-states-selected-close-button: var(--kbq-icon-white);--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"] }]
|
|
1361
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.ErrorStateMatcher }, { type: i2$1.Directionality, decorators: [{
|
|
1264
1362
|
type: Optional
|
|
1265
1363
|
}] }, { type: i3.NgForm, decorators: [{
|
|
1266
1364
|
type: Optional
|
|
@@ -1271,7 +1369,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1271
1369
|
}, {
|
|
1272
1370
|
type: Self
|
|
1273
1371
|
}] }], propDecorators: { multiple: [{
|
|
1274
|
-
type: Input
|
|
1372
|
+
type: Input,
|
|
1373
|
+
args: [{ transform: booleanAttribute }]
|
|
1275
1374
|
}], compareWith: [{
|
|
1276
1375
|
type: Input
|
|
1277
1376
|
}], value: [{
|
|
@@ -1281,12 +1380,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1281
1380
|
}], placeholder: [{
|
|
1282
1381
|
type: Input
|
|
1283
1382
|
}], disabled: [{
|
|
1284
|
-
type: Input
|
|
1383
|
+
type: Input,
|
|
1384
|
+
args: [{ transform: booleanAttribute }]
|
|
1385
|
+
}], draggable: [{
|
|
1386
|
+
type: Input,
|
|
1387
|
+
args: [{ transform: booleanAttribute }]
|
|
1388
|
+
}], dropped: [{
|
|
1389
|
+
type: Output
|
|
1285
1390
|
}], selectable: [{
|
|
1286
|
-
type: Input
|
|
1391
|
+
type: Input,
|
|
1392
|
+
args: [{ transform: booleanAttribute }]
|
|
1287
1393
|
}], editable: [{
|
|
1288
1394
|
type: Input,
|
|
1289
1395
|
args: [{ transform: booleanAttribute }]
|
|
1396
|
+
}], removable: [{
|
|
1397
|
+
type: Input,
|
|
1398
|
+
args: [{ transform: booleanAttribute }]
|
|
1290
1399
|
}], tabIndex: [{
|
|
1291
1400
|
type: Input
|
|
1292
1401
|
}], valueChange: [{
|
|
@@ -1457,13 +1566,12 @@ class KbqTagInput {
|
|
|
1457
1566
|
if ((data && data.length === 0) || !this.addOnPaste) {
|
|
1458
1567
|
return;
|
|
1459
1568
|
}
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1569
|
+
const separatorsInString = this.getSeparatorsForString(data);
|
|
1570
|
+
// prettier-ignore
|
|
1571
|
+
const dividedString = separatorsInString.length > 0 ?
|
|
1572
|
+
[...data.split(new RegExp(`${separatorsInString.join('|')}`))] :
|
|
1573
|
+
[data];
|
|
1574
|
+
const items = dividedString.map((item) => this.trimValue(item));
|
|
1467
1575
|
if (items.length === 0) {
|
|
1468
1576
|
items.push(data);
|
|
1469
1577
|
}
|
|
@@ -1487,14 +1595,21 @@ class KbqTagInput {
|
|
|
1487
1595
|
this.setDefaultInputWidth();
|
|
1488
1596
|
}
|
|
1489
1597
|
}
|
|
1598
|
+
/** @docs-private */
|
|
1490
1599
|
onFocus() {
|
|
1491
1600
|
this.focused = true;
|
|
1601
|
+
this._tagList.unselectAll();
|
|
1492
1602
|
this._tagList.stateChanges.next();
|
|
1493
1603
|
}
|
|
1494
1604
|
/** Focuses the input. */
|
|
1495
1605
|
focus() {
|
|
1496
1606
|
this.inputElement.focus();
|
|
1497
1607
|
}
|
|
1608
|
+
getSeparatorsForString(value) {
|
|
1609
|
+
return this.separators
|
|
1610
|
+
.filter((separator) => value.search(separator.key) > -1)
|
|
1611
|
+
.map((separator) => separator.key);
|
|
1612
|
+
}
|
|
1498
1613
|
trimValue(value) {
|
|
1499
1614
|
return this.trimDirective ? this.trimDirective.trim(value) : value;
|
|
1500
1615
|
}
|
|
@@ -1515,10 +1630,10 @@ class KbqTagInput {
|
|
|
1515
1630
|
isSeparatorKey(event) {
|
|
1516
1631
|
return this.separators.some((separator) => separator.key === event.key && !event.shiftKey);
|
|
1517
1632
|
}
|
|
1518
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1519
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.
|
|
1633
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagInput, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: KBQ_TAGS_DEFAULT_OPTIONS }, { token: i1$1.KbqTrim, optional: true, self: true }, { token: i3.NgControl, optional: true, self: true }, { token: i3$1.KbqAutocompleteTrigger, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1634
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTagInput, selector: "input[kbqTagInputFor]", inputs: { separatorKeyCodes: ["kbqTagInputSeparatorKeyCodes", "separatorKeyCodes"], distinct: "distinct", placeholder: "placeholder", id: "id", tagList: ["kbqTagInputFor", "tagList"], addOnBlur: ["kbqTagInputAddOnBlur", "addOnBlur"], addOnPaste: ["kbqTagInputAddOnPaste", "addOnPaste"], disabled: "disabled" }, 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, ngImport: i0 }); }
|
|
1520
1635
|
}
|
|
1521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagInput, decorators: [{
|
|
1522
1637
|
type: Directive,
|
|
1523
1638
|
args: [{
|
|
1524
1639
|
selector: 'input[kbqTagInputFor]',
|
|
@@ -1580,8 +1695,8 @@ const COMPONENTS = [
|
|
|
1580
1695
|
KbqTagEditInput
|
|
1581
1696
|
];
|
|
1582
1697
|
class KbqTagsModule {
|
|
1583
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1584
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.
|
|
1698
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1699
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: KbqTagsModule, declarations: [KbqTagList,
|
|
1585
1700
|
KbqTag,
|
|
1586
1701
|
KbqTagInput,
|
|
1587
1702
|
KbqTagTrailingIcon,
|
|
@@ -1594,14 +1709,14 @@ class KbqTagsModule {
|
|
|
1594
1709
|
KbqTagAvatar,
|
|
1595
1710
|
KbqTagRemove, KbqTagEditSubmit,
|
|
1596
1711
|
KbqTagEditInput] }); }
|
|
1597
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.
|
|
1712
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagsModule, providers: [
|
|
1598
1713
|
{
|
|
1599
1714
|
provide: KBQ_TAGS_DEFAULT_OPTIONS,
|
|
1600
1715
|
useValue: { separatorKeyCodes: [ENTER$1] }
|
|
1601
1716
|
}
|
|
1602
1717
|
], imports: [PlatformModule] }); }
|
|
1603
1718
|
}
|
|
1604
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagsModule, decorators: [{
|
|
1605
1720
|
type: NgModule,
|
|
1606
1721
|
args: [{
|
|
1607
1722
|
imports: [
|