@koobiq/components 18.34.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-theme.scss +1 -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/form-field/field-sizing-content.d.ts +21 -0
- package/core/form-field/index.d.ts +1 -0
- package/core/locales/en-US.d.ts +68 -0
- package/core/locales/es-LA.d.ts +68 -0
- package/core/locales/fa-IR.d.ts +68 -0
- package/core/locales/locale-service.d.ts +476 -0
- package/core/locales/pt-BR.d.ts +68 -0
- package/core/locales/ru-RU.d.ts +68 -0
- package/core/locales/tk-TM.d.ts +68 -0
- package/core/locales/types.d.ts +22 -0
- package/core/locales/zh-CN.d.ts +68 -0
- package/core/navbar/index.d.ts +1 -0
- package/core/navbar/rectangle-item.d.ts +14 -0
- package/core/option/action.d.ts +1 -1
- package/core/option/option.d.ts +4 -2
- package/core/pop-up/constants.d.ts +2 -1
- package/core/pop-up/pop-up-trigger.d.ts +5 -3
- package/core/pop-up/pop-up.d.ts +2 -1
- package/core/public-api.d.ts +1 -0
- 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 +4 -0
- package/core/utils/index.d.ts +1 -0
- package/core/utils/utils.d.ts +4 -0
- package/datepicker/datepicker-input.directive.d.ts +18 -7
- package/divider/divider.scss +1 -0
- package/dropdown/dropdown-item.scss +1 -0
- package/dropdown/dropdown-trigger.directive.d.ts +7 -1
- 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 +9 -9
- 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 +114 -0
- package/esm2022/core/form-field/index.mjs +2 -1
- 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 +111 -1
- package/esm2022/core/locales/es-LA.mjs +111 -1
- package/esm2022/core/locales/fa-IR.mjs +81 -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 +111 -1
- package/esm2022/core/locales/ru-RU.mjs +125 -1
- package/esm2022/core/locales/tk-TM.mjs +111 -1
- package/esm2022/core/locales/types.mjs +1 -1
- package/esm2022/core/locales/zh-CN.mjs +69 -1
- package/esm2022/core/navbar/index.mjs +2 -0
- package/esm2022/core/navbar/rectangle-item.mjs +40 -0
- 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 +10 -6
- package/esm2022/core/pop-up/constants.mjs +2 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +10 -6
- package/esm2022/core/pop-up/pop-up.mjs +4 -4
- package/esm2022/core/public-api.mjs +2 -1
- 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 +8 -0
- package/esm2022/core/utils/index.mjs +2 -1
- package/esm2022/core/utils/utils.mjs +9 -1
- 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 +29 -26
- 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 +5 -5
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +33 -13
- 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 +6 -1
- package/esm2022/file-upload/file-upload.module.mjs +4 -4
- package/esm2022/file-upload/multiple-file-upload.component.mjs +29 -13
- package/esm2022/file-upload/single-file-upload.component.mjs +25 -10
- package/esm2022/filter-bar/filter-bar-button.mjs +3 -3
- package/esm2022/filter-bar/filter-bar.mjs +6 -6
- 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 +18 -6
- 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 +19 -14
- 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/index.mjs +2 -0
- package/esm2022/navbar-ic/koobiq-components-navbar-ic.mjs +5 -0
- package/esm2022/navbar-ic/navbar-ic-header.mjs +58 -0
- package/esm2022/navbar-ic/navbar-ic-item.mjs +391 -0
- package/esm2022/navbar-ic/navbar-ic.animation.mjs +9 -0
- package/esm2022/navbar-ic/navbar-ic.mjs +286 -0
- package/esm2022/navbar-ic/navbar-ic.module.mjs +74 -0
- package/esm2022/navbar-ic/public-api.mjs +5 -0
- 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 +24 -14
- 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 +256 -195
- package/esm2022/tags/tag.component.mjs +398 -118
- package/esm2022/tags/tag.module.mjs +20 -10
- 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 +20 -20
- 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 +15 -15
- 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 +1218 -237
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +62 -60
- 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 +69 -35
- 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 +60 -25
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +118 -96
- 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 +797 -0
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -0
- 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 +36 -26
- 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 +683 -331
- 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 +23 -23
- 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 +6 -3
- package/file-upload/multiple-file-upload.component.d.ts +4 -1
- package/file-upload/single-file-upload.component.d.ts +4 -1
- package/filter-bar/_filter-bar-theme.scss +2 -2
- package/filter-bar/filters.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 +8 -10
- 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-theme.scss +81 -0
- package/navbar-ic/index.d.ts +1 -0
- package/navbar-ic/navbar-ic-divider.scss +7 -0
- package/navbar-ic/navbar-ic-header.d.ts +18 -0
- package/navbar-ic/navbar-ic-header.scss +53 -0
- package/navbar-ic/navbar-ic-item.d.ts +125 -0
- package/navbar-ic/navbar-ic-item.scss +96 -0
- package/navbar-ic/navbar-ic-tokens.scss +22 -0
- package/navbar-ic/navbar-ic.animation.d.ts +2 -0
- package/navbar-ic/navbar-ic.d.ts +105 -0
- package/navbar-ic/navbar-ic.module.d.ts +14 -0
- package/navbar-ic/navbar-ic.scss +32 -0
- package/navbar-ic/public-api.d.ts +4 -0
- 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 +52 -10
- package/popover/_popover-theme.scss +6 -2
- package/popover/popover-tokens.scss +2 -0
- package/popover/popover.component.d.ts +8 -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 +6 -6
- 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 +31 -16
- package/tags/tag-input.d.ts +2 -0
- package/tags/tag-list.component.d.ts +141 -45
- package/tags/tag-list.scss +16 -0
- package/tags/tag-tokens.scss +17 -1
- package/tags/tag.component.d.ts +151 -22
- package/tags/tag.module.d.ts +1 -1
- package/tags/tag.scss +27 -0
- package/textarea/textarea-tokens.scss +1 -1
- 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/tooltip/_tooltip-theme.scss +9 -2
- package/tooltip/tooltip-tokens.scss +2 -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,25 +1,38 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Directive, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
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 { KbqColorDirective, KbqComponentColors, KBQ_TITLE_TEXT_REF, isBoolean } from '@koobiq/components/core';
|
|
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 {
|
|
18
|
+
import { Subject, debounceTime, merge } from 'rxjs';
|
|
19
|
+
import { startWith, filter } from 'rxjs/operators';
|
|
17
20
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
18
21
|
import { PlatformModule } from '@angular/cdk/platform';
|
|
19
22
|
|
|
20
23
|
/** Injection token to be used to override the default options for the chips module. */
|
|
21
24
|
const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken('kbq-tags-default-options');
|
|
22
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Event object emitted by KbqTag when the tag is edited.
|
|
28
|
+
*/
|
|
29
|
+
class KbqTagEditChange {
|
|
30
|
+
constructor(tag, type, reason) {
|
|
31
|
+
this.tag = tag;
|
|
32
|
+
this.type = type;
|
|
33
|
+
this.reason = reason;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
23
36
|
/** Event object emitted by KbqTag when selected or deselected. */
|
|
24
37
|
class KbqTagSelectionChange {
|
|
25
38
|
constructor(source, selected, isUserInput = false) {
|
|
@@ -29,15 +42,18 @@ class KbqTagSelectionChange {
|
|
|
29
42
|
}
|
|
30
43
|
}
|
|
31
44
|
const TAG_ATTRIBUTE_NAMES = ['kbq-basic-tag'];
|
|
45
|
+
const getTagEditInputMissingError = () => {
|
|
46
|
+
return Error('Editable kbq-tag must contain a KbqTagEditInput.');
|
|
47
|
+
};
|
|
32
48
|
/**
|
|
33
49
|
* Dummy directive to add CSS class to tag avatar.
|
|
34
50
|
* @docs-private
|
|
35
51
|
*/
|
|
36
52
|
class KbqTagAvatar {
|
|
37
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
38
|
-
/** @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 }); }
|
|
39
55
|
}
|
|
40
|
-
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: [{
|
|
41
57
|
type: Directive,
|
|
42
58
|
args: [{
|
|
43
59
|
selector: 'kbq-tag-avatar, [kbqTagAvatar]',
|
|
@@ -49,31 +65,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
49
65
|
* @docs-private
|
|
50
66
|
*/
|
|
51
67
|
class KbqTagTrailingIcon {
|
|
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.
|
|
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 }); }
|
|
54
70
|
}
|
|
55
|
-
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: [{
|
|
56
72
|
type: Directive,
|
|
57
73
|
args: [{
|
|
58
74
|
selector: 'kbq-tag-trailing-icon, [kbqTagTrailingIcon]',
|
|
59
75
|
host: { class: 'kbq-tag-trailing-icon' }
|
|
60
76
|
}]
|
|
61
77
|
}] });
|
|
78
|
+
/**
|
|
79
|
+
* Directive to add submit behavior for the editable tag.
|
|
80
|
+
*/
|
|
81
|
+
class KbqTagEditSubmit {
|
|
82
|
+
constructor() {
|
|
83
|
+
/** @docs-private */
|
|
84
|
+
this.tag = inject(KbqTag);
|
|
85
|
+
}
|
|
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 }); }
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditSubmit, decorators: [{
|
|
90
|
+
type: Directive,
|
|
91
|
+
args: [{
|
|
92
|
+
standalone: true,
|
|
93
|
+
selector: '[kbqTagEditSubmit]',
|
|
94
|
+
exportAs: 'kbqTagEditSubmit',
|
|
95
|
+
host: {
|
|
96
|
+
class: 'kbq-tag-edit-submit',
|
|
97
|
+
'[attr.tabindex]': '-1',
|
|
98
|
+
'(click)': 'tag.submitEditing("click")'
|
|
99
|
+
}
|
|
100
|
+
}]
|
|
101
|
+
}] });
|
|
102
|
+
/**
|
|
103
|
+
* Directive to add input behavior for the editable tag.
|
|
104
|
+
*/
|
|
105
|
+
class KbqTagEditInput {
|
|
106
|
+
constructor() {
|
|
107
|
+
this.tag = inject(KbqTag);
|
|
108
|
+
}
|
|
109
|
+
/** @docs-private */
|
|
110
|
+
handleKeydown(event) {
|
|
111
|
+
switch (event.keyCode) {
|
|
112
|
+
case ESCAPE: {
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
this.tag.cancelEditing('escape');
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
case ENTER: {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
this.tag.submitEditing('enter');
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
// We should prevent KbqTag from receiving these keydown events
|
|
123
|
+
case BACKSPACE:
|
|
124
|
+
case SPACE:
|
|
125
|
+
case DELETE: {
|
|
126
|
+
event.stopPropagation();
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
default:
|
|
130
|
+
}
|
|
131
|
+
}
|
|
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 }); }
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagEditInput, decorators: [{
|
|
136
|
+
type: Directive,
|
|
137
|
+
args: [{
|
|
138
|
+
standalone: true,
|
|
139
|
+
selector: '[kbqTagEditInput]',
|
|
140
|
+
exportAs: 'kbqTagEditInput',
|
|
141
|
+
host: {
|
|
142
|
+
class: 'kbq-tag-edit-input',
|
|
143
|
+
'(keydown)': 'handleKeydown($event)'
|
|
144
|
+
},
|
|
145
|
+
hostDirectives: [KbqFieldSizingContent]
|
|
146
|
+
}]
|
|
147
|
+
}] });
|
|
62
148
|
class KbqTag extends KbqColorDirective {
|
|
149
|
+
/** Whether the tag is editable. */
|
|
150
|
+
get editable() {
|
|
151
|
+
return this._editable ?? !!this.tagList?.editable;
|
|
152
|
+
}
|
|
153
|
+
set editable(value) {
|
|
154
|
+
this._editable = value;
|
|
155
|
+
}
|
|
63
156
|
/** Whether the tag is selected. */
|
|
64
157
|
get selected() {
|
|
65
158
|
return this._selected;
|
|
66
159
|
}
|
|
67
160
|
set selected(value) {
|
|
68
|
-
|
|
69
|
-
if (coercedValue !== this._selected) {
|
|
70
|
-
this._selected = coercedValue;
|
|
71
|
-
this.dispatchSelectionChange();
|
|
72
|
-
}
|
|
161
|
+
this.setSelectedState(value, { emitEvent: true });
|
|
73
162
|
}
|
|
74
163
|
/** The value of the tag. Defaults to the content inside `<kbq-tag>` tags. */
|
|
75
164
|
get value() {
|
|
76
|
-
return this._value
|
|
165
|
+
return this._value ?? this.elementRef.nativeElement.textContent?.trim();
|
|
77
166
|
}
|
|
78
167
|
set value(value) {
|
|
79
168
|
this._value = value;
|
|
@@ -85,19 +174,19 @@ class KbqTag extends KbqColorDirective {
|
|
|
85
174
|
* not selectable.
|
|
86
175
|
*/
|
|
87
176
|
get selectable() {
|
|
88
|
-
return this._selectable && this.
|
|
177
|
+
return this._selectable && (this.tagList?.selectable ?? true);
|
|
89
178
|
}
|
|
90
179
|
set selectable(value) {
|
|
91
|
-
this._selectable =
|
|
180
|
+
this._selectable = value;
|
|
92
181
|
}
|
|
93
182
|
/**
|
|
94
|
-
* Determines whether
|
|
183
|
+
* Determines whether the tag is removable.
|
|
95
184
|
*/
|
|
96
185
|
get removable() {
|
|
97
|
-
return this._removable;
|
|
186
|
+
return this._removable && (this.tagList?.removable ?? true);
|
|
98
187
|
}
|
|
99
188
|
set removable(value) {
|
|
100
|
-
this._removable =
|
|
189
|
+
this._removable = value;
|
|
101
190
|
}
|
|
102
191
|
get tabindex() {
|
|
103
192
|
return this.disabled ? null : this._tabindex;
|
|
@@ -105,27 +194,64 @@ class KbqTag extends KbqColorDirective {
|
|
|
105
194
|
set tabindex(value) {
|
|
106
195
|
this._tabindex = value;
|
|
107
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Whether the tag is disabled.
|
|
199
|
+
*/
|
|
108
200
|
get disabled() {
|
|
109
|
-
return this._disabled;
|
|
201
|
+
return this._disabled || (this.tagList?.disabled ?? false);
|
|
110
202
|
}
|
|
111
203
|
set disabled(value) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
204
|
+
this._disabled = value;
|
|
205
|
+
this.syncDragDisabledState();
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Whether the tag is draggable.
|
|
209
|
+
*
|
|
210
|
+
* @docs-private
|
|
211
|
+
*/
|
|
212
|
+
get draggable() {
|
|
213
|
+
return (this.tagList?.draggable ?? false) && !this.disabled;
|
|
115
214
|
}
|
|
116
|
-
constructor(
|
|
215
|
+
constructor(changeDetectorRef) {
|
|
117
216
|
super();
|
|
118
|
-
this.elementRef = elementRef;
|
|
119
217
|
this.changeDetectorRef = changeDetectorRef;
|
|
120
|
-
this.
|
|
121
|
-
|
|
218
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
219
|
+
this.tagList = inject(KbqTagList, { optional: true });
|
|
220
|
+
this.drag = inject(CdkDrag, { host: true });
|
|
221
|
+
this.destroyRef = inject(DestroyRef);
|
|
222
|
+
/** @docs-private */
|
|
223
|
+
this.elementRef = inject(ElementRef);
|
|
224
|
+
/**
|
|
225
|
+
* Emits when the tag is focused.
|
|
226
|
+
*
|
|
227
|
+
* @docs-private
|
|
228
|
+
*/
|
|
122
229
|
this.onFocus = new Subject();
|
|
123
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* Emits when the tag is blurred.
|
|
232
|
+
*
|
|
233
|
+
* @docs-private
|
|
234
|
+
*/
|
|
124
235
|
this.onBlur = new Subject();
|
|
125
|
-
/**
|
|
236
|
+
/** @docs-private */
|
|
237
|
+
this.nativeElement = this.elementRef.nativeElement;
|
|
238
|
+
/**
|
|
239
|
+
* Whether the tag has focus.
|
|
240
|
+
*
|
|
241
|
+
* @docs-private
|
|
242
|
+
*/
|
|
126
243
|
this.hasFocus = false;
|
|
127
|
-
|
|
128
|
-
|
|
244
|
+
this.focusOrigin = null;
|
|
245
|
+
/** Whether the tag edits can't be submitted. */
|
|
246
|
+
this.preventEditSubmit = false;
|
|
247
|
+
/**
|
|
248
|
+
* Emits event when the tag is edited.
|
|
249
|
+
*/
|
|
250
|
+
this.editChange = new EventEmitter();
|
|
251
|
+
/**
|
|
252
|
+
* @docs-private
|
|
253
|
+
*/
|
|
254
|
+
this.editing = signal(false);
|
|
129
255
|
/** Emitted when the tag is selected or deselected. */
|
|
130
256
|
this.selectionChange = new EventEmitter();
|
|
131
257
|
/** Emitted when the tag is destroyed. */
|
|
@@ -140,11 +266,20 @@ class KbqTag extends KbqColorDirective {
|
|
|
140
266
|
this.color = KbqComponentColors.ContrastFade;
|
|
141
267
|
this.setDefaultColor(KbqComponentColors.ContrastFade);
|
|
142
268
|
this.addHostClassName();
|
|
143
|
-
this.
|
|
269
|
+
this.setupDragInitialProperties();
|
|
144
270
|
}
|
|
145
271
|
ngAfterContentInit() {
|
|
146
272
|
this.addClassModificatorForIcons();
|
|
147
273
|
}
|
|
274
|
+
ngAfterViewInit() {
|
|
275
|
+
this.setupFocusMonitor();
|
|
276
|
+
}
|
|
277
|
+
ngOnDestroy() {
|
|
278
|
+
this.cancelEditing('destroy');
|
|
279
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
280
|
+
this.destroyed.emit({ tag: this });
|
|
281
|
+
}
|
|
282
|
+
/** @docs-private */
|
|
148
283
|
addClassModificatorForIcons() {
|
|
149
284
|
const icons = this.contentChildren.map((item) => item.elementRef.nativeElement);
|
|
150
285
|
if (icons.length === 1) {
|
|
@@ -165,6 +300,7 @@ class KbqTag extends KbqColorDirective {
|
|
|
165
300
|
secondIconElement.classList.add('kbq-icon_right');
|
|
166
301
|
}
|
|
167
302
|
}
|
|
303
|
+
/** @docs-private */
|
|
168
304
|
addHostClassName() {
|
|
169
305
|
// Add class for the different tags
|
|
170
306
|
for (const attr of TAG_ATTRIBUTE_NAMES) {
|
|
@@ -176,45 +312,46 @@ class KbqTag extends KbqColorDirective {
|
|
|
176
312
|
}
|
|
177
313
|
this.elementRef.nativeElement.classList.add('kbq-standard-tag');
|
|
178
314
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
315
|
+
/**
|
|
316
|
+
* Selects the tag.
|
|
317
|
+
*/
|
|
182
318
|
select() {
|
|
183
|
-
if (!this.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
319
|
+
if (this.disabled || !this.selectable)
|
|
320
|
+
return;
|
|
321
|
+
this.setSelectedState(true, { emitEvent: true });
|
|
187
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Deselects the tag.
|
|
325
|
+
*/
|
|
188
326
|
deselect() {
|
|
189
|
-
if (this.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
327
|
+
if (this.disabled || !this.selectable)
|
|
328
|
+
return;
|
|
329
|
+
this.setSelectedState(false, { emitEvent: true });
|
|
193
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Selects the tag and emits event with isUserInput flag.
|
|
333
|
+
*
|
|
334
|
+
* @docs-private
|
|
335
|
+
*/
|
|
194
336
|
selectViaInteraction() {
|
|
195
|
-
if (!this.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
337
|
+
if (this.disabled || !this.selectable)
|
|
338
|
+
return;
|
|
339
|
+
this.setSelectedState(true, { isUserInput: true, emitEvent: true });
|
|
199
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Toggles the current selected state of the tag.
|
|
343
|
+
*/
|
|
200
344
|
toggleSelected(isUserInput = false) {
|
|
201
|
-
this.
|
|
202
|
-
|
|
345
|
+
if (this.disabled || !this.selectable)
|
|
346
|
+
return this.selected;
|
|
347
|
+
this.setSelectedState(!this.selected, { isUserInput, emitEvent: true });
|
|
203
348
|
return this.selected;
|
|
204
349
|
}
|
|
205
|
-
/**
|
|
350
|
+
/** Focuses the tag. */
|
|
206
351
|
focus() {
|
|
207
|
-
if (
|
|
352
|
+
if (this.disabled)
|
|
208
353
|
return;
|
|
209
|
-
|
|
210
|
-
if (!this.hasFocus) {
|
|
211
|
-
this.elementRef.nativeElement.focus();
|
|
212
|
-
this.onFocus.next({ tag: this });
|
|
213
|
-
Promise.resolve().then(() => {
|
|
214
|
-
this.hasFocus = true;
|
|
215
|
-
this.changeDetectorRef.markForCheck();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
354
|
+
this.elementRef.nativeElement.focus();
|
|
218
355
|
}
|
|
219
356
|
/**
|
|
220
357
|
* Allows for programmatic removal of the tag. Called by the KbqTagList when the DELETE or
|
|
@@ -227,80 +364,212 @@ class KbqTag extends KbqColorDirective {
|
|
|
227
364
|
this.removed.emit({ tag: this });
|
|
228
365
|
}
|
|
229
366
|
}
|
|
367
|
+
/** @docs-private */
|
|
230
368
|
handleMousedown(event) {
|
|
231
|
-
if (this.disabled || !this.selectable)
|
|
232
|
-
event.preventDefault();
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
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();
|
|
237
374
|
}
|
|
375
|
+
/** @docs-private */
|
|
238
376
|
handleKeydown(event) {
|
|
239
|
-
if (this.disabled)
|
|
377
|
+
if (this.disabled || this.editing())
|
|
240
378
|
return;
|
|
241
|
-
}
|
|
242
379
|
switch (event.keyCode) {
|
|
243
380
|
case DELETE:
|
|
244
|
-
case BACKSPACE:
|
|
245
|
-
|
|
246
|
-
|
|
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();
|
|
247
386
|
// Always prevent so page navigation does not occur
|
|
248
387
|
event.preventDefault();
|
|
249
388
|
break;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
this.toggleSelected(true);
|
|
254
|
-
}
|
|
389
|
+
}
|
|
390
|
+
case SPACE: {
|
|
391
|
+
this.toggleSelected(true);
|
|
255
392
|
// Always prevent space from scrolling the page since the list has focus
|
|
256
393
|
event.preventDefault();
|
|
257
394
|
break;
|
|
395
|
+
}
|
|
396
|
+
case F2:
|
|
397
|
+
case ENTER:
|
|
398
|
+
this.startEditing(event.key);
|
|
399
|
+
break;
|
|
258
400
|
default:
|
|
259
401
|
}
|
|
260
402
|
}
|
|
403
|
+
/** @docs-private */
|
|
261
404
|
blur() {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
405
|
+
this.elementRef.nativeElement.blur();
|
|
406
|
+
}
|
|
407
|
+
/** @docs-private */
|
|
408
|
+
handleDblClick(event) {
|
|
409
|
+
if (this.disabled || !this.editable)
|
|
410
|
+
return;
|
|
411
|
+
event.stopPropagation();
|
|
412
|
+
this.startEditing('dblclick');
|
|
413
|
+
}
|
|
414
|
+
startEditing(reason) {
|
|
415
|
+
if (!this.editable || this.editing())
|
|
416
|
+
return;
|
|
417
|
+
this.editing.set(true);
|
|
418
|
+
this.editChange.emit({ tag: this, type: 'start', reason });
|
|
419
|
+
setTimeout(() => {
|
|
420
|
+
const input = this.editInputElementRef?.nativeElement;
|
|
421
|
+
if (!input)
|
|
422
|
+
throw getTagEditInputMissingError();
|
|
423
|
+
input.select();
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/** @docs-private */
|
|
427
|
+
cancelEditing(reason) {
|
|
428
|
+
if (!this.editing())
|
|
429
|
+
return;
|
|
430
|
+
this.editing.set(false);
|
|
431
|
+
this.editChange.emit({ tag: this, type: 'cancel', reason });
|
|
432
|
+
this.textElement.nativeElement.scrollTo?.({ left: 0, behavior: 'instant' });
|
|
433
|
+
}
|
|
434
|
+
/** @docs-private */
|
|
435
|
+
submitEditing(reason) {
|
|
436
|
+
if (!this.editing() || this.preventEditSubmit)
|
|
437
|
+
return;
|
|
438
|
+
this.editing.set(false);
|
|
439
|
+
this.editChange.emit({ tag: this, type: 'submit', reason });
|
|
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
|
+
};
|
|
274
469
|
});
|
|
275
470
|
}
|
|
276
|
-
|
|
277
|
-
this.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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
|
+
}
|
|
281
500
|
});
|
|
282
501
|
}
|
|
283
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
284
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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: `
|
|
504
|
+
<div class="kbq-tag__wrapper">
|
|
505
|
+
<ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
|
|
506
|
+
<span #kbqTitleText class="kbq-tag__text">
|
|
507
|
+
@if (editing()) {
|
|
508
|
+
<ng-content select="[kbqTagEditInput]" />
|
|
509
|
+
} @else {
|
|
510
|
+
<ng-content />
|
|
511
|
+
}
|
|
512
|
+
</span>
|
|
513
|
+
@if (editing()) {
|
|
514
|
+
<ng-content select="[kbqTagEditSubmit]" />
|
|
515
|
+
} @else {
|
|
516
|
+
@if (removable) {
|
|
517
|
+
<ng-content select="[kbqTagRemove]" />
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
</div>
|
|
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 }); }
|
|
285
522
|
}
|
|
286
|
-
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: [{
|
|
287
524
|
type: Component,
|
|
288
|
-
args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', exportAs: 'kbqTag',
|
|
525
|
+
args: [{ selector: 'kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]', exportAs: 'kbqTag', hostDirectives: [KbqHovered, CdkDrag], template: `
|
|
526
|
+
<div class="kbq-tag__wrapper">
|
|
527
|
+
<ng-content select="[kbq-icon]:not([kbqTagRemove]):not([kbqTagEditSubmit])" />
|
|
528
|
+
<span #kbqTitleText class="kbq-tag__text">
|
|
529
|
+
@if (editing()) {
|
|
530
|
+
<ng-content select="[kbqTagEditInput]" />
|
|
531
|
+
} @else {
|
|
532
|
+
<ng-content />
|
|
533
|
+
}
|
|
534
|
+
</span>
|
|
535
|
+
@if (editing()) {
|
|
536
|
+
<ng-content select="[kbqTagEditSubmit]" />
|
|
537
|
+
} @else {
|
|
538
|
+
@if (removable) {
|
|
539
|
+
<ng-content select="[kbqTagRemove]" />
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
</div>
|
|
543
|
+
`, host: {
|
|
289
544
|
class: 'kbq-tag',
|
|
290
545
|
'[attr.tabindex]': 'tabindex',
|
|
291
546
|
'[attr.disabled]': 'disabled || null',
|
|
292
547
|
'[class.kbq-selected]': 'selected',
|
|
293
|
-
'[class.kbq-focused]': 'hasFocus',
|
|
294
548
|
'[class.kbq-tag-with-avatar]': 'avatar',
|
|
295
549
|
'[class.kbq-tag-with-icon]': 'contentChildren',
|
|
296
550
|
'[class.kbq-tag-with-trailing-icon]': 'trailingIcon || removeIcon',
|
|
297
551
|
'[class.kbq-disabled]': 'disabled',
|
|
552
|
+
'[class.kbq-tag_editable]': 'editable',
|
|
553
|
+
'[class.kbq-tag_editing]': 'editing()',
|
|
554
|
+
'[class.kbq-tag_removable]': 'removable',
|
|
555
|
+
'[class.kbq-tag_selectable]': 'selectable',
|
|
556
|
+
'[class.kbq-tag_draggable]': 'draggable',
|
|
557
|
+
'(dblclick)': 'handleDblClick($event)',
|
|
298
558
|
'(mousedown)': 'handleMousedown($event)',
|
|
299
|
-
'(keydown)': 'handleKeydown($event)'
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
559
|
+
'(keydown)': 'handleKeydown($event)'
|
|
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: [{
|
|
562
|
+
type: Input,
|
|
563
|
+
args: [{ transform: booleanAttribute }]
|
|
564
|
+
}], preventEditSubmit: [{
|
|
565
|
+
type: Input,
|
|
566
|
+
args: [{ transform: booleanAttribute }]
|
|
567
|
+
}], editInputElementRef: [{
|
|
568
|
+
type: ContentChild,
|
|
569
|
+
args: [KbqTagEditInput, { read: ElementRef }]
|
|
570
|
+
}], editChange: [{
|
|
571
|
+
type: Output
|
|
572
|
+
}], textElement: [{
|
|
304
573
|
type: ViewChild,
|
|
305
574
|
args: ['kbqTitleText']
|
|
306
575
|
}], contentChildren: [{
|
|
@@ -322,17 +591,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
322
591
|
}], removed: [{
|
|
323
592
|
type: Output
|
|
324
593
|
}], selected: [{
|
|
325
|
-
type: Input
|
|
594
|
+
type: Input,
|
|
595
|
+
args: [{ transform: booleanAttribute }]
|
|
326
596
|
}], value: [{
|
|
327
597
|
type: Input
|
|
328
598
|
}], selectable: [{
|
|
329
|
-
type: Input
|
|
599
|
+
type: Input,
|
|
600
|
+
args: [{ transform: booleanAttribute }]
|
|
330
601
|
}], removable: [{
|
|
331
|
-
type: Input
|
|
602
|
+
type: Input,
|
|
603
|
+
args: [{ transform: booleanAttribute }]
|
|
332
604
|
}], tabindex: [{
|
|
333
605
|
type: Input
|
|
334
606
|
}], disabled: [{
|
|
335
|
-
type: Input
|
|
607
|
+
type: Input,
|
|
608
|
+
args: [{ transform: booleanAttribute }]
|
|
336
609
|
}] } });
|
|
337
610
|
/**
|
|
338
611
|
*
|
|
@@ -349,10 +622,15 @@ class KbqTagRemove {
|
|
|
349
622
|
constructor(parentTag) {
|
|
350
623
|
this.parentTag = parentTag;
|
|
351
624
|
}
|
|
352
|
-
|
|
353
|
-
|
|
625
|
+
/** @docs-private */
|
|
626
|
+
focus(event) {
|
|
627
|
+
event.stopPropagation();
|
|
354
628
|
}
|
|
355
|
-
/**
|
|
629
|
+
/**
|
|
630
|
+
* Calls the parent tag's public `remove()` method if applicable.
|
|
631
|
+
*
|
|
632
|
+
* @docs-private
|
|
633
|
+
*/
|
|
356
634
|
handleClick(event) {
|
|
357
635
|
if (this.parentTag.removable) {
|
|
358
636
|
this.parentTag.hasFocus = true;
|
|
@@ -365,10 +643,10 @@ class KbqTagRemove {
|
|
|
365
643
|
// that the tag is being removed before the event bubbles up.
|
|
366
644
|
event.stopPropagation();
|
|
367
645
|
}
|
|
368
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
369
|
-
/** @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 }); }
|
|
370
648
|
}
|
|
371
|
-
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: [{
|
|
372
650
|
type: Directive,
|
|
373
651
|
args: [{
|
|
374
652
|
selector: '[kbqTagRemove]',
|
|
@@ -410,35 +688,23 @@ class KbqTagList {
|
|
|
410
688
|
get tagRemoveChanges() {
|
|
411
689
|
return merge(...this.tags.map((tag) => tag.destroyed));
|
|
412
690
|
}
|
|
413
|
-
/**
|
|
691
|
+
/** Combined stream of all of the child tags' edit change events. */
|
|
692
|
+
get tagEditChanges() {
|
|
693
|
+
return merge(...this.tags.map((tag) => tag.editChange));
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* The array of selected tags inside tag list.
|
|
697
|
+
*
|
|
698
|
+
* @docs-private
|
|
699
|
+
*/
|
|
414
700
|
get selected() {
|
|
415
|
-
|
|
701
|
+
const selected = this.tags.filter(({ selected }) => selected);
|
|
702
|
+
return this.multiple ? selected : selected[0];
|
|
416
703
|
}
|
|
704
|
+
/** @docs-private */
|
|
417
705
|
get canShowCleaner() {
|
|
418
706
|
return this.cleaner && this.tags.length > 0;
|
|
419
707
|
}
|
|
420
|
-
/** Whether the user should be allowed to select multiple tags. */
|
|
421
|
-
get multiple() {
|
|
422
|
-
return this._multiple;
|
|
423
|
-
}
|
|
424
|
-
set multiple(value) {
|
|
425
|
-
this._multiple = coerceBooleanProperty(value);
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* A function to compare the option values with the selected values. The first argument
|
|
429
|
-
* is a value from an option. The second is a value from the selection. A boolean
|
|
430
|
-
* should be returned.
|
|
431
|
-
*/
|
|
432
|
-
get compareWith() {
|
|
433
|
-
return this._compareWith;
|
|
434
|
-
}
|
|
435
|
-
set compareWith(fn) {
|
|
436
|
-
this._compareWith = fn;
|
|
437
|
-
if (this.selectionModel) {
|
|
438
|
-
// A different comparator means the selection could change.
|
|
439
|
-
this.initializeSelection();
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
708
|
/**
|
|
443
709
|
* Implemented as part of KbqFormFieldControl.
|
|
444
710
|
* @docs-private
|
|
@@ -447,7 +713,6 @@ class KbqTagList {
|
|
|
447
713
|
return this._value;
|
|
448
714
|
}
|
|
449
715
|
set value(value) {
|
|
450
|
-
this.writeValue(value);
|
|
451
716
|
this._value = value;
|
|
452
717
|
}
|
|
453
718
|
/**
|
|
@@ -505,19 +770,23 @@ class KbqTagList {
|
|
|
505
770
|
return this.ngControl ? !!this.ngControl.disabled : this._disabled;
|
|
506
771
|
}
|
|
507
772
|
set disabled(value) {
|
|
508
|
-
this._disabled =
|
|
509
|
-
this.
|
|
773
|
+
this._disabled = value;
|
|
774
|
+
this.syncDropListDisabledState();
|
|
510
775
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
* the selected states for all the tags inside the tag list are always ignored.
|
|
514
|
-
*/
|
|
515
|
-
get selectable() {
|
|
516
|
-
return this._selectable;
|
|
776
|
+
get draggable() {
|
|
777
|
+
return this._draggable && !this.disabled;
|
|
517
778
|
}
|
|
518
|
-
set
|
|
519
|
-
this.
|
|
520
|
-
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();
|
|
521
790
|
}
|
|
522
791
|
get tabIndex() {
|
|
523
792
|
return this._tabIndex;
|
|
@@ -534,6 +803,14 @@ class KbqTagList {
|
|
|
534
803
|
this.parentForm = parentForm;
|
|
535
804
|
this.parentFormGroup = parentFormGroup;
|
|
536
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
|
+
*/
|
|
537
814
|
this.controlType = 'tag-list';
|
|
538
815
|
/**
|
|
539
816
|
* Emits whenever the component state changes and should cause the parent
|
|
@@ -541,6 +818,35 @@ class KbqTagList {
|
|
|
541
818
|
* @docs-private
|
|
542
819
|
*/
|
|
543
820
|
this.stateChanges = new Subject();
|
|
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. */
|
|
848
|
+
this.editable = false;
|
|
849
|
+
this._removable = true;
|
|
544
850
|
this._tabIndex = 0;
|
|
545
851
|
/**
|
|
546
852
|
* Event that emits whenever the raw value of the tag-list changes. This is here primarily
|
|
@@ -548,40 +854,49 @@ class KbqTagList {
|
|
|
548
854
|
* @docs-private
|
|
549
855
|
*/
|
|
550
856
|
this.valueChange = new EventEmitter();
|
|
857
|
+
/** @docs-private */
|
|
551
858
|
this.uid = `kbq-tag-list-${nextUniqueId$1++}`;
|
|
552
859
|
/**
|
|
553
860
|
* User defined tab index.
|
|
554
861
|
* When it is not null, use user defined tab index. Otherwise use tabIndex
|
|
862
|
+
*
|
|
863
|
+
* @docs-private
|
|
555
864
|
*/
|
|
556
865
|
this.userTabIndex = null;
|
|
866
|
+
/**
|
|
867
|
+
* @docs-private
|
|
868
|
+
*
|
|
869
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
870
|
+
*/
|
|
557
871
|
this.tagChanges = new EventEmitter();
|
|
558
|
-
/**
|
|
872
|
+
/**
|
|
873
|
+
* Orientation of the tag list.
|
|
874
|
+
*
|
|
875
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
876
|
+
*/
|
|
559
877
|
this.orientation = 'horizontal';
|
|
560
878
|
/** Event emitted when the selected tag list value has been changed by the user. */
|
|
561
879
|
this.change = new EventEmitter();
|
|
562
|
-
/**
|
|
880
|
+
/**
|
|
881
|
+
* Whether the component is in an error state.
|
|
882
|
+
*
|
|
883
|
+
* @docs-private
|
|
884
|
+
*/
|
|
563
885
|
this.errorState = false;
|
|
564
|
-
this._required = false;
|
|
565
|
-
this._disabled = false;
|
|
566
|
-
this._selectable = true;
|
|
567
|
-
this._multiple = false;
|
|
568
886
|
/**
|
|
569
887
|
* When a tag is destroyed, we store the index of the destroyed tag until the tags
|
|
570
888
|
* query list notifies about the update. This is necessary because we cannot determine an
|
|
571
889
|
* appropriate tag that should receive focus until the array of tags updated completely.
|
|
572
890
|
*/
|
|
573
891
|
this.lastDestroyedTagIndex = null;
|
|
574
|
-
|
|
892
|
+
/** @docs-private */
|
|
575
893
|
this.onTouched = () => { };
|
|
894
|
+
/** @docs-private */
|
|
576
895
|
this.onChange = () => { };
|
|
577
|
-
this._compareWith = (o1, o2) => o1 === o2;
|
|
578
896
|
if (this.ngControl) {
|
|
579
897
|
this.ngControl.valueAccessor = this;
|
|
580
898
|
}
|
|
581
|
-
|
|
582
|
-
ngOnInit() {
|
|
583
|
-
this.selectionModel = new SelectionModel(this.multiple, undefined, false);
|
|
584
|
-
this.stateChanges.next();
|
|
899
|
+
this.setupDropListInitialProperties();
|
|
585
900
|
}
|
|
586
901
|
ngDoCheck() {
|
|
587
902
|
if (this.ngControl) {
|
|
@@ -614,16 +929,7 @@ class KbqTagList {
|
|
|
614
929
|
this.tags.changes
|
|
615
930
|
.pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
|
|
616
931
|
.subscribe((currentTags) => {
|
|
617
|
-
if (this.disabled) {
|
|
618
|
-
// Since this happens after the content has been
|
|
619
|
-
// checked, we need to defer it to the next tick.
|
|
620
|
-
Promise.resolve().then(() => {
|
|
621
|
-
this.syncTagsDisabledState();
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
932
|
this.resetTags();
|
|
625
|
-
// Reset tags selected/deselected status
|
|
626
|
-
this.initializeSelection();
|
|
627
933
|
// Check to see if we need to update our tab index
|
|
628
934
|
this.updateTabIndex();
|
|
629
935
|
// Check to see if we have a destroyed tag and need to refocus
|
|
@@ -631,7 +937,6 @@ class KbqTagList {
|
|
|
631
937
|
// Defer setting the value in order to avoid the "Expression
|
|
632
938
|
// has changed after it was checked" errors from Angular.
|
|
633
939
|
Promise.resolve().then(() => {
|
|
634
|
-
this.tagChanges.emit(this.tags.toArray());
|
|
635
940
|
this.stateChanges.next();
|
|
636
941
|
// do not call on initial
|
|
637
942
|
if (currentTags) {
|
|
@@ -639,12 +944,16 @@ class KbqTagList {
|
|
|
639
944
|
}
|
|
640
945
|
});
|
|
641
946
|
});
|
|
642
|
-
|
|
947
|
+
}
|
|
948
|
+
ngAfterViewInit() {
|
|
949
|
+
this.setupFocusMonitor();
|
|
643
950
|
}
|
|
644
951
|
ngOnDestroy() {
|
|
645
952
|
this.stateChanges.complete();
|
|
953
|
+
this.focusMonitor.stopMonitoring(this.elementRef);
|
|
646
954
|
this.dropSubscriptions();
|
|
647
955
|
}
|
|
956
|
+
/** @docs-private */
|
|
648
957
|
updateErrorState() {
|
|
649
958
|
const oldState = this.errorState;
|
|
650
959
|
const parent = this.parentFormGroup || this.parentForm;
|
|
@@ -656,7 +965,11 @@ class KbqTagList {
|
|
|
656
965
|
this.stateChanges.next();
|
|
657
966
|
}
|
|
658
967
|
}
|
|
659
|
-
/**
|
|
968
|
+
/**
|
|
969
|
+
* Associates an HTML input element with this tag list.
|
|
970
|
+
*
|
|
971
|
+
* @docs-private
|
|
972
|
+
*/
|
|
660
973
|
registerInput(inputElement) {
|
|
661
974
|
this.tagInput = inputElement;
|
|
662
975
|
// todo need rethink about it (#DS-3740)
|
|
@@ -664,27 +977,34 @@ class KbqTagList {
|
|
|
664
977
|
inputElement.ngControl.statusChanges.subscribe(() => this.ngControl.control.setErrors(inputElement.ngControl.errors));
|
|
665
978
|
}
|
|
666
979
|
}
|
|
667
|
-
|
|
980
|
+
/**
|
|
981
|
+
* Implemented as part of ControlValueAccessor.
|
|
982
|
+
*/
|
|
668
983
|
writeValue(value) {
|
|
669
|
-
|
|
670
|
-
this.setSelectionByValue(value, false);
|
|
671
|
-
}
|
|
984
|
+
this.value = value;
|
|
672
985
|
}
|
|
673
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Implemented as part of ControlValueAccessor.
|
|
988
|
+
*/
|
|
674
989
|
registerOnChange(fn) {
|
|
675
990
|
this.onChange = fn;
|
|
676
991
|
}
|
|
677
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Implemented as part of ControlValueAccessor.
|
|
994
|
+
*/
|
|
678
995
|
registerOnTouched(fn) {
|
|
679
996
|
this.onTouched = fn;
|
|
680
997
|
}
|
|
681
|
-
|
|
998
|
+
/**
|
|
999
|
+
* Implemented as part of ControlValueAccessor.
|
|
1000
|
+
*/
|
|
682
1001
|
setDisabledState(isDisabled) {
|
|
683
1002
|
this.disabled = isDisabled;
|
|
684
1003
|
this.stateChanges.next();
|
|
685
1004
|
}
|
|
686
1005
|
/**
|
|
687
1006
|
* Implemented as part of KbqFormFieldControl.
|
|
1007
|
+
*
|
|
688
1008
|
* @docs-private
|
|
689
1009
|
*/
|
|
690
1010
|
onContainerClick(event) {
|
|
@@ -722,15 +1042,26 @@ class KbqTagList {
|
|
|
722
1042
|
}
|
|
723
1043
|
/**
|
|
724
1044
|
* Pass events to the keyboard manager. Available here for tests.
|
|
1045
|
+
*
|
|
1046
|
+
* @docs-private
|
|
725
1047
|
*/
|
|
726
1048
|
keydown(event) {
|
|
727
1049
|
const target = event.target;
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
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
|
+
}
|
|
732
1063
|
}
|
|
733
|
-
else if (
|
|
1064
|
+
else if (this.isTagElement(target)) {
|
|
734
1065
|
if (event.keyCode === HOME) {
|
|
735
1066
|
this.keyManager.setFirstItemActive();
|
|
736
1067
|
event.preventDefault();
|
|
@@ -739,29 +1070,23 @@ class KbqTagList {
|
|
|
739
1070
|
this.keyManager.setLastItemActive();
|
|
740
1071
|
event.preventDefault();
|
|
741
1072
|
}
|
|
1073
|
+
else if (_isSelectAll) {
|
|
1074
|
+
this.selectAll();
|
|
1075
|
+
this.keyManager.setLastItemActive();
|
|
1076
|
+
event.preventDefault();
|
|
1077
|
+
}
|
|
742
1078
|
else {
|
|
743
1079
|
this.keyManager.onKeydown(event);
|
|
744
1080
|
}
|
|
745
1081
|
this.stateChanges.next();
|
|
746
1082
|
}
|
|
747
1083
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
this.sortValues();
|
|
755
|
-
}
|
|
756
|
-
else {
|
|
757
|
-
const correspondingTag = this.selectValue(value, isUserInput);
|
|
758
|
-
// Shift focus to the active item. Note that we shouldn't do this in multiple
|
|
759
|
-
// mode, because we don't know what tag the user interacted with last.
|
|
760
|
-
if (correspondingTag && isUserInput) {
|
|
761
|
-
this.keyManager.setActiveItem(correspondingTag);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
1084
|
+
/**
|
|
1085
|
+
* @docs-private
|
|
1086
|
+
*
|
|
1087
|
+
* @deprecated Unused. Will be removed in next major release.
|
|
1088
|
+
*/
|
|
1089
|
+
setSelectionByValue(_value, _isUserInput = true) { }
|
|
765
1090
|
/** When blurred, mark the field as touched when focus moved outside the tag list. */
|
|
766
1091
|
blur() {
|
|
767
1092
|
if (!this.hasFocusedTag()) {
|
|
@@ -795,6 +1120,8 @@ class KbqTagList {
|
|
|
795
1120
|
}
|
|
796
1121
|
/**
|
|
797
1122
|
* Check the tab index as you should not be allowed to focus an empty list.
|
|
1123
|
+
*
|
|
1124
|
+
* @docs-private
|
|
798
1125
|
*/
|
|
799
1126
|
updateTabIndex() {
|
|
800
1127
|
// If we have 0 tags, we should not allow keyboard focus
|
|
@@ -803,6 +1130,8 @@ class KbqTagList {
|
|
|
803
1130
|
/**
|
|
804
1131
|
* If the amount of tags changed, we need to update the
|
|
805
1132
|
* key manager state and focus the next closest tag.
|
|
1133
|
+
*
|
|
1134
|
+
* @docs-private
|
|
806
1135
|
*/
|
|
807
1136
|
updateFocusForDestroyedTags() {
|
|
808
1137
|
if (this.lastDestroyedTagIndex != null) {
|
|
@@ -832,78 +1161,27 @@ class KbqTagList {
|
|
|
832
1161
|
}
|
|
833
1162
|
return false;
|
|
834
1163
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
const correspondingTag = this.tags.find((tag) => {
|
|
841
|
-
return tag.value != null && this._compareWith(tag.value, value);
|
|
842
|
-
});
|
|
843
|
-
if (correspondingTag) {
|
|
844
|
-
if (isUserInput) {
|
|
845
|
-
correspondingTag.selectViaInteraction();
|
|
846
|
-
}
|
|
847
|
-
else {
|
|
848
|
-
correspondingTag.select();
|
|
849
|
-
}
|
|
850
|
-
this.selectionModel.select(correspondingTag);
|
|
851
|
-
}
|
|
852
|
-
return correspondingTag;
|
|
853
|
-
}
|
|
854
|
-
initializeSelection() {
|
|
855
|
-
// Defer setting the value in order to avoid the "Expression
|
|
856
|
-
// has changed after it was checked" errors from Angular.
|
|
857
|
-
Promise.resolve().then(() => {
|
|
858
|
-
if (this.ngControl || this._value) {
|
|
859
|
-
this.setSelectionByValue(this.ngControl ? this.ngControl.value : this._value, false);
|
|
860
|
-
this.stateChanges.next();
|
|
861
|
-
}
|
|
862
|
-
});
|
|
1164
|
+
isTagElement(element) {
|
|
1165
|
+
return element.classList.contains('kbq-tag');
|
|
1166
|
+
}
|
|
1167
|
+
selectAll() {
|
|
1168
|
+
this.tags.forEach((tag) => tag.selectViaInteraction());
|
|
863
1169
|
}
|
|
864
1170
|
/**
|
|
865
|
-
*
|
|
866
|
-
*
|
|
1171
|
+
* Unselects all tags in the list.
|
|
1172
|
+
*
|
|
1173
|
+
* @docs-private
|
|
867
1174
|
*/
|
|
868
|
-
|
|
869
|
-
this.
|
|
870
|
-
this.tags.forEach((tag) => {
|
|
871
|
-
if (tag !== skip) {
|
|
872
|
-
tag.deselect();
|
|
873
|
-
}
|
|
874
|
-
});
|
|
875
|
-
this.stateChanges.next();
|
|
1175
|
+
unselectAll() {
|
|
1176
|
+
this.tags.forEach((tag) => tag.setSelectedState(false));
|
|
876
1177
|
}
|
|
877
1178
|
/**
|
|
878
|
-
*
|
|
879
|
-
*
|
|
1179
|
+
* Removes all selected tags from the list.
|
|
1180
|
+
*
|
|
1181
|
+
* @docs-private
|
|
880
1182
|
*/
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
this.selectionModel.clear();
|
|
884
|
-
this.tags.forEach((tag) => {
|
|
885
|
-
if (tag.selected) {
|
|
886
|
-
this.selectionModel.select(tag);
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
|
-
this.stateChanges.next();
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
/** Emits change event to set the model value. */
|
|
893
|
-
// todo need rethink this method and selection logic (#DS-3740)
|
|
894
|
-
propagateChanges(fallbackValue) {
|
|
895
|
-
let valueToEmit;
|
|
896
|
-
if (Array.isArray(this.selected)) {
|
|
897
|
-
valueToEmit = this.selected.map((tag) => tag.value);
|
|
898
|
-
}
|
|
899
|
-
else {
|
|
900
|
-
valueToEmit = this.selected ? this.selected.value : fallbackValue;
|
|
901
|
-
}
|
|
902
|
-
this._value = valueToEmit;
|
|
903
|
-
this.change.emit(new KbqTagListChange(this, valueToEmit));
|
|
904
|
-
this.valueChange.emit(valueToEmit);
|
|
905
|
-
this.onChange(valueToEmit);
|
|
906
|
-
this.changeDetectorRef.markForCheck();
|
|
1183
|
+
removeSelected() {
|
|
1184
|
+
Array.isArray(this.selected) ? this.selected.forEach((tag) => tag.remove()) : this.selected.remove();
|
|
907
1185
|
}
|
|
908
1186
|
propagateTagsChanges() {
|
|
909
1187
|
const valueToEmit = this.tags.map((tag) => tag.value);
|
|
@@ -918,6 +1196,7 @@ class KbqTagList {
|
|
|
918
1196
|
this.listenToTagsFocus();
|
|
919
1197
|
this.listenToTagsSelection();
|
|
920
1198
|
this.listenToTagsRemoved();
|
|
1199
|
+
this.listenToTagsEdit();
|
|
921
1200
|
}
|
|
922
1201
|
dropSubscriptions() {
|
|
923
1202
|
if (this.tagFocusSubscription) {
|
|
@@ -936,27 +1215,20 @@ class KbqTagList {
|
|
|
936
1215
|
this.tagRemoveSubscription.unsubscribe();
|
|
937
1216
|
this.tagRemoveSubscription = null;
|
|
938
1217
|
}
|
|
1218
|
+
if (this.tagEditSubscription) {
|
|
1219
|
+
this.tagEditSubscription.unsubscribe();
|
|
1220
|
+
this.tagEditSubscription = null;
|
|
1221
|
+
}
|
|
939
1222
|
}
|
|
940
1223
|
/** Listens to user-generated selection events on each tag. */
|
|
941
1224
|
listenToTagsSelection() {
|
|
942
1225
|
this.tagSelectionSubscription = this.tagSelectionChanges.subscribe((event) => {
|
|
943
|
-
if (event.source.selected) {
|
|
944
|
-
this.selectionModel.select(event.source);
|
|
945
|
-
}
|
|
946
|
-
else {
|
|
947
|
-
this.selectionModel.deselect(event.source);
|
|
948
|
-
}
|
|
949
|
-
// For single selection tag list, make sure the deselected value is unselected.
|
|
950
1226
|
if (!this.multiple) {
|
|
951
1227
|
this.tags.forEach((tag) => {
|
|
952
|
-
if (
|
|
953
|
-
tag.
|
|
954
|
-
}
|
|
1228
|
+
if (tag !== event.source)
|
|
1229
|
+
tag.setSelectedState(false);
|
|
955
1230
|
});
|
|
956
1231
|
}
|
|
957
|
-
if (event.isUserInput) {
|
|
958
|
-
this.propagateChanges();
|
|
959
|
-
}
|
|
960
1232
|
});
|
|
961
1233
|
}
|
|
962
1234
|
/** Listens to user-generated selection events on each tag. */
|
|
@@ -966,10 +1238,14 @@ class KbqTagList {
|
|
|
966
1238
|
if (this.isValidIndex(tagIndex)) {
|
|
967
1239
|
this.keyManager.updateActiveItem(tagIndex);
|
|
968
1240
|
}
|
|
1241
|
+
if (!this.multiple)
|
|
1242
|
+
event.tag.select();
|
|
969
1243
|
this.stateChanges.next();
|
|
970
1244
|
});
|
|
971
|
-
this.tagBlurSubscription = this.tagBlurChanges.subscribe(() => {
|
|
1245
|
+
this.tagBlurSubscription = this.tagBlurChanges.subscribe((event) => {
|
|
972
1246
|
this.blur();
|
|
1247
|
+
if (!this.multiple)
|
|
1248
|
+
event.tag.deselect();
|
|
973
1249
|
this.stateChanges.next();
|
|
974
1250
|
});
|
|
975
1251
|
}
|
|
@@ -985,11 +1261,16 @@ class KbqTagList {
|
|
|
985
1261
|
}
|
|
986
1262
|
});
|
|
987
1263
|
}
|
|
1264
|
+
listenToTagsEdit() {
|
|
1265
|
+
this.tagEditSubscription = this.tagEditChanges
|
|
1266
|
+
.pipe(filter(({ type }) => type === 'submit'))
|
|
1267
|
+
.subscribe(() => this.propagateTagsChanges());
|
|
1268
|
+
}
|
|
988
1269
|
/** Checks whether an event comes from inside a tag element. */
|
|
989
1270
|
originatesFromTag(event) {
|
|
990
1271
|
let currentElement = event.target;
|
|
991
1272
|
while (currentElement && currentElement !== this.elementRef.nativeElement) {
|
|
992
|
-
if (
|
|
1273
|
+
if (this.isTagElement(currentElement)) {
|
|
993
1274
|
return true;
|
|
994
1275
|
}
|
|
995
1276
|
currentElement = currentElement.parentElement;
|
|
@@ -1000,13 +1281,8 @@ class KbqTagList {
|
|
|
1000
1281
|
hasFocusedTag() {
|
|
1001
1282
|
return this.tags.some((tag) => tag.hasFocus);
|
|
1002
1283
|
}
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
if (this.tags) {
|
|
1006
|
-
this.tags.forEach((tag) => {
|
|
1007
|
-
tag.disabled = this._disabled;
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1284
|
+
syncTagsRemovableState() {
|
|
1285
|
+
this.tags?.forEach((tag) => (tag.removable = this.removable));
|
|
1010
1286
|
}
|
|
1011
1287
|
/** Revalidate control. */
|
|
1012
1288
|
revalidate() {
|
|
@@ -1016,27 +1292,73 @@ class KbqTagList {
|
|
|
1016
1292
|
control.statusChanges.emit(control.status);
|
|
1017
1293
|
}
|
|
1018
1294
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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;
|
|
1023
1314
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
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 }); }
|
|
1026
1333
|
}
|
|
1027
|
-
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: [{
|
|
1028
1335
|
type: Component,
|
|
1029
|
-
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: {
|
|
1030
1347
|
class: 'kbq-tag-list',
|
|
1031
1348
|
'[class.kbq-disabled]': 'disabled',
|
|
1032
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',
|
|
1033
1355
|
'[attr.tabindex]': 'disabled ? null : tabIndex',
|
|
1034
1356
|
'[id]': 'uid',
|
|
1035
1357
|
'(focus)': 'focus()',
|
|
1036
1358
|
'(blur)': 'blur()',
|
|
1037
1359
|
'(keydown)': 'keydown($event)'
|
|
1038
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: KbqFormFieldControl, useExisting: KbqTagList }],
|
|
1039
|
-
}], 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: [{
|
|
1040
1362
|
type: Optional
|
|
1041
1363
|
}] }, { type: i3.NgForm, decorators: [{
|
|
1042
1364
|
type: Optional
|
|
@@ -1047,7 +1369,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1047
1369
|
}, {
|
|
1048
1370
|
type: Self
|
|
1049
1371
|
}] }], propDecorators: { multiple: [{
|
|
1050
|
-
type: Input
|
|
1372
|
+
type: Input,
|
|
1373
|
+
args: [{ transform: booleanAttribute }]
|
|
1051
1374
|
}], compareWith: [{
|
|
1052
1375
|
type: Input
|
|
1053
1376
|
}], value: [{
|
|
@@ -1057,9 +1380,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1057
1380
|
}], placeholder: [{
|
|
1058
1381
|
type: Input
|
|
1059
1382
|
}], disabled: [{
|
|
1060
|
-
type: Input
|
|
1383
|
+
type: Input,
|
|
1384
|
+
args: [{ transform: booleanAttribute }]
|
|
1385
|
+
}], draggable: [{
|
|
1386
|
+
type: Input,
|
|
1387
|
+
args: [{ transform: booleanAttribute }]
|
|
1388
|
+
}], dropped: [{
|
|
1389
|
+
type: Output
|
|
1061
1390
|
}], selectable: [{
|
|
1062
|
-
type: Input
|
|
1391
|
+
type: Input,
|
|
1392
|
+
args: [{ transform: booleanAttribute }]
|
|
1393
|
+
}], editable: [{
|
|
1394
|
+
type: Input,
|
|
1395
|
+
args: [{ transform: booleanAttribute }]
|
|
1396
|
+
}], removable: [{
|
|
1397
|
+
type: Input,
|
|
1398
|
+
args: [{ transform: booleanAttribute }]
|
|
1063
1399
|
}], tabIndex: [{
|
|
1064
1400
|
type: Input
|
|
1065
1401
|
}], valueChange: [{
|
|
@@ -1083,9 +1419,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1083
1419
|
}] } });
|
|
1084
1420
|
|
|
1085
1421
|
const KbqTagInputDefaultSeparators = {
|
|
1086
|
-
[ENTER]: { symbol: /\r?\n/, key: 'Enter' },
|
|
1422
|
+
[ENTER$1]: { symbol: /\r?\n/, key: 'Enter' },
|
|
1087
1423
|
[TAB]: { symbol: /\t/, key: 'Tab' },
|
|
1088
|
-
[SPACE]: { symbol: / /, key: ' ' },
|
|
1424
|
+
[SPACE$1]: { symbol: / /, key: ' ' },
|
|
1089
1425
|
[COMMA]: { symbol: /,/, key: ',' },
|
|
1090
1426
|
[SEMICOLON]: { symbol: /;/, key: ';' }
|
|
1091
1427
|
};
|
|
@@ -1230,13 +1566,12 @@ class KbqTagInput {
|
|
|
1230
1566
|
if ((data && data.length === 0) || !this.addOnPaste) {
|
|
1231
1567
|
return;
|
|
1232
1568
|
}
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
}
|
|
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));
|
|
1240
1575
|
if (items.length === 0) {
|
|
1241
1576
|
items.push(data);
|
|
1242
1577
|
}
|
|
@@ -1260,14 +1595,21 @@ class KbqTagInput {
|
|
|
1260
1595
|
this.setDefaultInputWidth();
|
|
1261
1596
|
}
|
|
1262
1597
|
}
|
|
1598
|
+
/** @docs-private */
|
|
1263
1599
|
onFocus() {
|
|
1264
1600
|
this.focused = true;
|
|
1601
|
+
this._tagList.unselectAll();
|
|
1265
1602
|
this._tagList.stateChanges.next();
|
|
1266
1603
|
}
|
|
1267
1604
|
/** Focuses the input. */
|
|
1268
1605
|
focus() {
|
|
1269
1606
|
this.inputElement.focus();
|
|
1270
1607
|
}
|
|
1608
|
+
getSeparatorsForString(value) {
|
|
1609
|
+
return this.separators
|
|
1610
|
+
.filter((separator) => value.search(separator.key) > -1)
|
|
1611
|
+
.map((separator) => separator.key);
|
|
1612
|
+
}
|
|
1271
1613
|
trimValue(value) {
|
|
1272
1614
|
return this.trimDirective ? this.trimDirective.trim(value) : value;
|
|
1273
1615
|
}
|
|
@@ -1288,10 +1630,10 @@ class KbqTagInput {
|
|
|
1288
1630
|
isSeparatorKey(event) {
|
|
1289
1631
|
return this.separators.some((separator) => separator.key === event.key && !event.shiftKey);
|
|
1290
1632
|
}
|
|
1291
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1292
|
-
/** @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 }); }
|
|
1293
1635
|
}
|
|
1294
|
-
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: [{
|
|
1295
1637
|
type: Directive,
|
|
1296
1638
|
args: [{
|
|
1297
1639
|
selector: 'input[kbqTagInputFor]',
|
|
@@ -1348,37 +1690,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1348
1690
|
type: Input
|
|
1349
1691
|
}] } });
|
|
1350
1692
|
|
|
1693
|
+
const COMPONENTS = [
|
|
1694
|
+
KbqTagEditSubmit,
|
|
1695
|
+
KbqTagEditInput
|
|
1696
|
+
];
|
|
1351
1697
|
class KbqTagsModule {
|
|
1352
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.
|
|
1353
|
-
/** @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,
|
|
1354
1700
|
KbqTag,
|
|
1355
1701
|
KbqTagInput,
|
|
1356
1702
|
KbqTagTrailingIcon,
|
|
1357
1703
|
KbqTagAvatar,
|
|
1358
|
-
KbqTagRemove], imports: [PlatformModule
|
|
1704
|
+
KbqTagRemove], imports: [PlatformModule, KbqTagEditSubmit,
|
|
1705
|
+
KbqTagEditInput], exports: [KbqTagList,
|
|
1359
1706
|
KbqTag,
|
|
1360
1707
|
KbqTagInput,
|
|
1361
1708
|
KbqTagTrailingIcon,
|
|
1362
1709
|
KbqTagAvatar,
|
|
1363
|
-
KbqTagRemove
|
|
1364
|
-
|
|
1710
|
+
KbqTagRemove, KbqTagEditSubmit,
|
|
1711
|
+
KbqTagEditInput] }); }
|
|
1712
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTagsModule, providers: [
|
|
1365
1713
|
{
|
|
1366
1714
|
provide: KBQ_TAGS_DEFAULT_OPTIONS,
|
|
1367
|
-
useValue: { separatorKeyCodes: [ENTER] }
|
|
1715
|
+
useValue: { separatorKeyCodes: [ENTER$1] }
|
|
1368
1716
|
}
|
|
1369
1717
|
], imports: [PlatformModule] }); }
|
|
1370
1718
|
}
|
|
1371
|
-
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: [{
|
|
1372
1720
|
type: NgModule,
|
|
1373
1721
|
args: [{
|
|
1374
|
-
imports: [
|
|
1722
|
+
imports: [
|
|
1723
|
+
PlatformModule,
|
|
1724
|
+
...COMPONENTS
|
|
1725
|
+
],
|
|
1375
1726
|
exports: [
|
|
1376
1727
|
KbqTagList,
|
|
1377
1728
|
KbqTag,
|
|
1378
1729
|
KbqTagInput,
|
|
1379
1730
|
KbqTagTrailingIcon,
|
|
1380
1731
|
KbqTagAvatar,
|
|
1381
|
-
KbqTagRemove
|
|
1732
|
+
KbqTagRemove,
|
|
1733
|
+
...COMPONENTS
|
|
1382
1734
|
],
|
|
1383
1735
|
declarations: [
|
|
1384
1736
|
KbqTagList,
|
|
@@ -1391,7 +1743,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1391
1743
|
providers: [
|
|
1392
1744
|
{
|
|
1393
1745
|
provide: KBQ_TAGS_DEFAULT_OPTIONS,
|
|
1394
|
-
useValue: { separatorKeyCodes: [ENTER] }
|
|
1746
|
+
useValue: { separatorKeyCodes: [ENTER$1] }
|
|
1395
1747
|
}
|
|
1396
1748
|
]
|
|
1397
1749
|
}]
|
|
@@ -1401,5 +1753,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1401
1753
|
* Generated bundle index. Do not edit.
|
|
1402
1754
|
*/
|
|
1403
1755
|
|
|
1404
|
-
export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagRemove, KbqTagSelectionChange, KbqTagTrailingIcon, KbqTagsModule };
|
|
1756
|
+
export { KBQ_TAGS_DEFAULT_OPTIONS, KbqTag, KbqTagAvatar, KbqTagEditChange, KbqTagEditInput, KbqTagEditSubmit, KbqTagInput, KbqTagList, KbqTagListChange, KbqTagRemove, KbqTagSelectionChange, KbqTagTrailingIcon, KbqTagsModule };
|
|
1405
1757
|
//# sourceMappingURL=koobiq-components-tags.mjs.map
|