@koobiq/components 17.0.0-rc.1 → 17.0.0-rc.11
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/README.md +1 -2
- package/alert/_alert-theme.scss +48 -24
- package/alert/alert.component.d.ts +23 -3
- package/alert/alert.component.scss +91 -59
- package/alert/public-api.d.ts +1 -1
- package/autocomplete/_autocomplete-theme.scss +3 -3
- package/autocomplete/autocomplete.scss +8 -18
- package/autocomplete/public-api.d.ts +2 -2
- package/badge/_badge-theme.scss +30 -45
- package/badge/badge.component.scss +18 -39
- package/badge/public-api.d.ts +1 -1
- package/button/_button-base.scss +7 -14
- package/button/_button-theme.scss +30 -86
- package/button/button.component.d.ts +4 -3
- package/button/button.scss +7 -17
- package/button/public-api.d.ts +1 -1
- package/button-toggle/_button-toggle-theme.scss +19 -20
- package/button-toggle/button-toggle.scss +17 -44
- package/button-toggle/public-api.d.ts +1 -1
- package/card/_card-theme.scss +18 -17
- package/card/card.component.d.ts +1 -1
- package/card/card.component.scss +3 -6
- package/card/public-api.d.ts +1 -1
- package/checkbox/_checkbox-theme.scss +50 -50
- package/checkbox/checkbox.scss +31 -35
- package/code-block/README.md +18 -14
- package/code-block/_code-block-theme.scss +53 -23
- package/code-block/actionbar.component.scss +11 -25
- package/code-block/code-block.component.d.ts +12 -4
- package/code-block/code-block.scss +62 -77
- package/code-block/public-api.d.ts +1 -1
- package/core/animation/index.d.ts +1 -1
- package/core/common-behaviors/index.d.ts +3 -3
- package/core/datetime/index.d.ts +1 -1
- package/core/form-field/form-field-ref.d.ts +2 -0
- package/core/formatters/index.d.ts +1 -1
- package/core/forms/_forms-theme.scss +4 -8
- package/core/forms/_forms.scss +13 -43
- package/core/forms/index.d.ts +1 -1
- package/core/locales/formatters.d.ts +96 -0
- package/core/locales/index.d.ts +1 -1
- package/core/locales/locale-service.d.ts +97 -0
- package/core/option/_optgroup-theme.scss +4 -6
- package/core/option/_option-action-theme.scss +8 -11
- package/core/option/_option-theme.scss +15 -20
- package/core/option/index.d.ts +2 -2
- package/core/option/optgroup.scss +2 -3
- package/core/option/option.scss +0 -1
- package/core/pop-up/_pop-up.scss +0 -1
- package/core/pop-up/pop-up-trigger.d.ts +4 -2
- package/core/public-api.d.ts +3 -3
- package/core/select/common.d.ts +35 -0
- package/core/select/constants.d.ts +1 -1
- package/core/select/index.d.ts +3 -2
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +15 -19
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -9
- package/core/services/theme.service.d.ts +3 -2
- package/core/styles/_core.scss +0 -1
- package/core/styles/_koobiq-theme.scss +5 -3
- package/core/styles/common/_animation.scss +9 -8
- package/core/styles/common/_button.scss +0 -2
- package/core/styles/common/_clearfix.scss +1 -1
- package/core/styles/common/_groups.scss +3 -9
- package/core/styles/common/_list.scss +24 -66
- package/core/styles/common/_overlay.scss +4 -3
- package/core/styles/common/_popup.scss +5 -5
- package/core/styles/common/_rtl.scss +4 -4
- package/core/styles/common/_select.scss +48 -42
- package/core/styles/common/_tokens.scss +47 -0
- package/core/styles/functions/_number.scss +14 -19
- package/core/styles/functions/_string.scss +18 -19
- package/core/styles/functions/_timing.scss +24 -24
- package/core/styles/theming/_components-theming.scss +1322 -1326
- package/core/styles/theming/_scrollbar-theme.scss +8 -5
- package/core/styles/theming/_theming.scss +26 -29
- package/core/styles/typography/_typography-utils.scss +1 -2
- package/core/styles/typography/_typography.scss +138 -85
- package/core/styles/visual/_body.scss +0 -2
- package/core/styles/visual/_layout.scss +44 -38
- package/core/utils/data-size/config.d.ts +20 -2
- package/core/utils/data-size/data-size.pipe.d.ts +10 -9
- package/core/utils/data-size/index.d.ts +1 -1
- package/core/utils/data-size/size.d.ts +3 -4
- package/core/utils/public-api.d.ts +1 -1
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/calendar-body.scss +3 -11
- package/datepicker/calendar-header.scss +4 -10
- package/datepicker/calendar.scss +5 -17
- package/datepicker/datepicker-content.scss +5 -15
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/datepicker/datepicker-input.scss +0 -5
- package/datepicker/datepicker-toggle.scss +3 -3
- package/datepicker/public-api.d.ts +4 -4
- package/divider/_divider-theme.scss +2 -1
- package/divider/divider.scss +9 -26
- package/dl/_dl-theme.scss +5 -8
- package/dl/dl.scss +5 -20
- package/dl/public-api.d.ts +1 -1
- package/dropdown/_dropdown-theme.scss +30 -22
- package/dropdown/dropdown-content.directive.d.ts +1 -1
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +12 -16
- package/dropdown/dropdown-trigger.directive.d.ts +2 -2
- package/dropdown/dropdown.component.d.ts +1 -1
- package/dropdown/dropdown.scss +6 -15
- package/dropdown/public-api.d.ts +5 -5
- package/ellipsis-center/ellipsis-center.directive.d.ts +4 -3
- package/empty-state/README.md +0 -0
- package/empty-state/_empty-state-theme.scss +56 -0
- package/empty-state/empty-state.component.d.ts +31 -0
- package/empty-state/empty-state.module.d.ts +10 -0
- package/empty-state/empty-state.scss +81 -0
- package/empty-state/index.d.ts +1 -0
- package/empty-state/public-api.d.ts +2 -0
- package/esm2022/alert/alert.component.mjs +52 -5
- package/esm2022/alert/alert.module.mjs +1 -1
- package/esm2022/alert/public-api.mjs +2 -2
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +1 -1
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +23 -31
- package/esm2022/autocomplete/autocomplete.component.mjs +14 -9
- package/esm2022/autocomplete/autocomplete.module.mjs +3 -3
- package/esm2022/autocomplete/public-api.mjs +3 -3
- package/esm2022/badge/badge.component.mjs +8 -6
- package/esm2022/badge/badge.module.mjs +1 -1
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/button/button.component.mjs +20 -10
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button-toggle/button-toggle.component.mjs +24 -16
- package/esm2022/button-toggle/button-toggle.module.mjs +1 -1
- package/esm2022/button-toggle/public-api.mjs +2 -2
- package/esm2022/card/card.component.mjs +2 -2
- package/esm2022/card/card.module.mjs +1 -1
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/checkbox/checkbox-module.mjs +1 -1
- package/esm2022/checkbox/checkbox-required-validator.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +6 -6
- package/esm2022/checkbox/public-api.mjs +1 -1
- package/esm2022/code-block/actionbar.component.mjs +4 -6
- package/esm2022/code-block/code-block.component.mjs +64 -17
- package/esm2022/code-block/code-block.module.mjs +9 -5
- package/esm2022/code-block/public-api.mjs +2 -2
- package/esm2022/core/animation/fade-animations.mjs +1 -1
- package/esm2022/core/animation/index.mjs +2 -2
- package/esm2022/core/animation/select-animations.mjs +5 -5
- package/esm2022/core/common-behaviors/color.mjs +4 -2
- package/esm2022/core/common-behaviors/common-module.mjs +2 -2
- package/esm2022/core/common-behaviors/constructor.mjs +1 -1
- package/esm2022/core/common-behaviors/disabled.mjs +1 -1
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/common-behaviors/index.mjs +4 -4
- package/esm2022/core/common-behaviors/tabindex.mjs +1 -1
- package/esm2022/core/datetime/date-adapter.mjs +1 -1
- package/esm2022/core/datetime/date-formats.mjs +1 -1
- package/esm2022/core/datetime/index.mjs +2 -2
- package/esm2022/core/error/error-options.mjs +1 -1
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.pipe.mjs +1 -1
- package/esm2022/core/formatters/index.mjs +2 -2
- package/esm2022/core/formatters/number/formatter.mjs +19 -20
- package/esm2022/core/forms/forms-module.mjs +1 -1
- package/esm2022/core/forms/forms.directive.mjs +1 -1
- package/esm2022/core/forms/index.mjs +2 -2
- package/esm2022/core/highlight/highlight.pipe.mjs +1 -1
- package/esm2022/core/highlight/index.mjs +1 -1
- package/esm2022/core/label/label-options.mjs +1 -1
- package/esm2022/core/line/line.mjs +2 -2
- package/esm2022/core/locales/en-US.mjs +1 -1
- package/esm2022/core/locales/es-LA.mjs +1 -1
- package/esm2022/core/locales/fa-IR.mjs +1 -1
- package/esm2022/core/locales/formatters.mjs +97 -1
- package/esm2022/core/locales/index.mjs +2 -2
- package/esm2022/core/locales/locale-service.mjs +10 -4
- package/esm2022/core/locales/locale-service.module.mjs +1 -1
- package/esm2022/core/locales/pt-BR.mjs +1 -1
- package/esm2022/core/locales/ru-RU.mjs +3 -3
- package/esm2022/core/locales/zh-CN.mjs +1 -1
- package/esm2022/core/option/action.mjs +20 -12
- package/esm2022/core/option/index.mjs +3 -3
- package/esm2022/core/option/optgroup.mjs +4 -4
- package/esm2022/core/option/option-module.mjs +1 -1
- package/esm2022/core/option/option.mjs +13 -7
- package/esm2022/core/overlay/overlay-position-map.mjs +1 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +29 -30
- package/esm2022/core/pop-up/pop-up.mjs +1 -1
- package/esm2022/core/public-api.mjs +4 -4
- package/esm2022/core/select/common.mjs +120 -0
- package/esm2022/core/select/constants.mjs +1 -1
- package/esm2022/core/select/index.mjs +4 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +1 -1
- package/esm2022/core/services/measure-scrollbar.service.mjs +1 -1
- package/esm2022/core/services/theme.service.mjs +5 -4
- package/esm2022/core/title/title-text-ref.mjs +1 -1
- package/esm2022/core/utils/data-size/config.mjs +5 -17
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +35 -22
- package/esm2022/core/utils/data-size/index.mjs +2 -2
- package/esm2022/core/utils/data-size/size.mjs +7 -14
- package/esm2022/core/utils/public-api.mjs +2 -2
- package/esm2022/core/utils/utils.mjs +4 -2
- package/esm2022/core/validation/validation.mjs +4 -2
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -3
- package/esm2022/datepicker/calendar-header.component.mjs +8 -7
- package/esm2022/datepicker/calendar.component.mjs +6 -6
- package/esm2022/datepicker/datepicker-animations.mjs +2 -2
- package/esm2022/datepicker/datepicker-errors.mjs +1 -1
- package/esm2022/datepicker/datepicker-input.directive.mjs +42 -34
- package/esm2022/datepicker/datepicker-intl.mjs +1 -1
- package/esm2022/datepicker/datepicker-module.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.component.mjs +11 -10
- package/esm2022/datepicker/datepicker.component.mjs +15 -15
- package/esm2022/datepicker/month-view.component.mjs +14 -13
- package/esm2022/datepicker/public-api.mjs +5 -5
- package/esm2022/divider/divider.component.mjs +1 -1
- package/esm2022/divider/divider.module.mjs +1 -1
- package/esm2022/dl/dl.component.mjs +1 -1
- package/esm2022/dl/dl.module.mjs +2 -2
- package/esm2022/dl/public-api.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +5 -5
- 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 +25 -31
- package/esm2022/dropdown/dropdown.component.mjs +10 -18
- package/esm2022/dropdown/dropdown.module.mjs +1 -1
- package/esm2022/dropdown/dropdown.types.mjs +1 -1
- package/esm2022/dropdown/public-api.mjs +6 -6
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +9 -7
- package/esm2022/empty-state/empty-state.component.mjs +104 -0
- package/esm2022/empty-state/empty-state.module.mjs +50 -0
- package/esm2022/empty-state/index.mjs +2 -0
- package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
- package/esm2022/empty-state/public-api.mjs +3 -0
- package/esm2022/file-upload/file-drop.mjs +2 -2
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/file-upload.module.mjs +12 -6
- package/esm2022/file-upload/index.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +96 -29
- package/esm2022/file-upload/public-api.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +100 -25
- package/esm2022/form-field/cleaner.mjs +13 -3
- package/esm2022/form-field/form-field-control.mjs +1 -1
- package/esm2022/form-field/form-field-errors.mjs +1 -1
- package/esm2022/form-field/form-field.mjs +8 -13
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/hint.mjs +4 -4
- package/esm2022/form-field/password-hint.mjs +15 -15
- package/esm2022/form-field/password-toggle.mjs +14 -15
- package/esm2022/form-field/prefix.mjs +1 -1
- package/esm2022/form-field/public-api.mjs +4 -4
- package/esm2022/form-field/stepper.mjs +33 -29
- package/esm2022/form-field/suffix.mjs +1 -1
- package/esm2022/form-field/validate.directive.mjs +6 -5
- package/esm2022/icon/icon-button.component.mjs +2 -2
- package/esm2022/icon/icon-item.component.mjs +16 -6
- package/esm2022/icon/icon.component.mjs +3 -4
- package/esm2022/icon/icon.module.mjs +1 -1
- package/esm2022/icon/public-api.mjs +3 -3
- package/esm2022/input/input-number-validators.mjs +1 -1
- package/esm2022/input/input-number.mjs +35 -36
- package/esm2022/input/input-password.mjs +13 -7
- package/esm2022/input/input-value-accessor.mjs +1 -1
- package/esm2022/input/input.mjs +13 -7
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/public-api.mjs +3 -3
- package/esm2022/link/link.component.mjs +2 -2
- package/esm2022/link/link.module.mjs +1 -1
- package/esm2022/link/public-api.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +34 -36
- package/esm2022/list/list.component.mjs +3 -3
- package/esm2022/list/list.module.mjs +2 -2
- package/esm2022/list/public-api.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +4 -4
- package/esm2022/loader-overlay/loader-overlay.module.mjs +1 -1
- package/esm2022/loader-overlay/public-api.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +22 -8
- package/esm2022/markdown/markdown.module.mjs +1 -1
- package/esm2022/markdown/markdown.service.mjs +1 -1
- package/esm2022/modal/css-unit.pipe.mjs +1 -1
- package/esm2022/modal/modal-control.service.mjs +3 -2
- package/esm2022/modal/modal-ref.class.mjs +1 -1
- package/esm2022/modal/modal-util.mjs +1 -1
- package/esm2022/modal/modal.component.mjs +54 -32
- package/esm2022/modal/modal.directive.mjs +27 -11
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +3 -2
- package/esm2022/modal/modal.type.mjs +1 -1
- package/esm2022/modal/public-api.mjs +3 -3
- package/esm2022/navbar/index.mjs +1 -1
- package/esm2022/navbar/navbar-item.component.mjs +47 -38
- package/esm2022/navbar/navbar.component.mjs +19 -28
- package/esm2022/navbar/navbar.module.mjs +2 -2
- package/esm2022/navbar/public-api.mjs +3 -3
- package/esm2022/navbar/vertical-navbar.component.mjs +17 -18
- package/esm2022/popover/popover-animations.mjs +1 -1
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +5 -5
- package/esm2022/popover/popover.module.mjs +1 -1
- package/esm2022/popover/public-api.mjs +3 -3
- package/esm2022/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.module.mjs +2 -2
- package/esm2022/progress-bar/public-api.mjs +2 -2
- package/esm2022/progress-spinner/progress-spinner.component.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.module.mjs +1 -1
- package/esm2022/progress-spinner/public-api.mjs +2 -2
- package/esm2022/radio/public-api.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +9 -10
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/risk-level/public-api.mjs +2 -2
- package/esm2022/risk-level/risk-level.component.mjs +1 -1
- package/esm2022/risk-level/risk-level.module.mjs +1 -1
- package/esm2022/scrollbar/public-api.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +15 -13
- package/esm2022/scrollbar/scrollbar.directive.mjs +3 -3
- package/esm2022/scrollbar/scrollbar.module.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.types.mjs +3 -2
- package/esm2022/select/public-api.mjs +3 -3
- package/esm2022/select/select-option.directive.mjs +14 -9
- package/esm2022/select/select.component.mjs +92 -172
- package/esm2022/select/select.module.mjs +28 -28
- package/esm2022/sidebar/public-api.mjs +2 -2
- package/esm2022/sidebar/sidebar-animations.mjs +1 -1
- package/esm2022/sidebar/sidebar.component.mjs +3 -3
- package/esm2022/sidebar/sidebar.module.mjs +1 -1
- package/esm2022/sidepanel/public-api.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-animations.mjs +7 -3
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-directives.mjs +30 -16
- package/esm2022/sidepanel/sidepanel-ref.mjs +10 -4
- package/esm2022/sidepanel/sidepanel.module.mjs +1 -1
- package/esm2022/sidepanel/sidepanel.service.mjs +11 -14
- package/esm2022/splitter/public-api.mjs +2 -2
- package/esm2022/splitter/splitter.component.mjs +45 -35
- package/esm2022/splitter/splitter.module.mjs +1 -1
- package/esm2022/table/public-api.mjs +2 -2
- package/esm2022/table/table.component.mjs +29 -6
- package/esm2022/table/table.module.mjs +14 -6
- package/esm2022/tabs/paginated-tab-header.mjs +8 -11
- package/esm2022/tabs/public-api.mjs +6 -6
- package/esm2022/tabs/tab-body.component.mjs +9 -9
- package/esm2022/tabs/tab-content.directive.mjs +1 -1
- package/esm2022/tabs/tab-group.component.mjs +61 -21
- package/esm2022/tabs/tab-header.component.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +1 -1
- package/esm2022/tabs/tab-label.directive.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/index.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +4 -4
- package/esm2022/tabs/tab.component.mjs +4 -6
- package/esm2022/tabs/tabs-animations.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +2 -2
- package/esm2022/tags/public-api.mjs +5 -5
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +26 -14
- package/esm2022/tags/tag-list.component.mjs +14 -20
- package/esm2022/tags/tag-text-control.mjs +1 -1
- package/esm2022/tags/tag.component.mjs +6 -8
- package/esm2022/tags/tag.module.mjs +9 -5
- package/esm2022/textarea/index.mjs +1 -1
- package/esm2022/textarea/textarea.component.mjs +15 -15
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/timepicker/public-api.mjs +2 -2
- package/esm2022/timepicker/timepicker.constants.mjs +6 -1
- package/esm2022/timepicker/timepicker.directive.mjs +72 -28
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timezone/cities-by-filter.pipe.mjs +1 -1
- package/esm2022/timezone/timezone-option.component.mjs +12 -11
- package/esm2022/timezone/timezone-option.directive.mjs +9 -7
- package/esm2022/timezone/timezone-select.component.mjs +7 -7
- package/esm2022/timezone/timezone.module.mjs +1 -1
- package/esm2022/timezone/timezone.utils.mjs +5 -9
- package/esm2022/timezone/utc-offset.pipe.mjs +1 -1
- package/esm2022/title/public-api.mjs +2 -2
- package/esm2022/title/title.directive.mjs +11 -8
- package/esm2022/title/title.module.mjs +1 -1
- package/esm2022/toast/public-api.mjs +4 -4
- package/esm2022/toast/toast-animations.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +5 -6
- package/esm2022/toast/toast.component.mjs +6 -6
- package/esm2022/toast/toast.module.mjs +1 -1
- package/esm2022/toast/toast.service.mjs +26 -37
- package/esm2022/toast/toast.type.mjs +3 -1
- package/esm2022/toggle/public-api.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +17 -9
- package/esm2022/toggle/toggle.module.mjs +1 -1
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/tooltip.animations.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +32 -16
- package/esm2022/tooltip/tooltip.module.mjs +2 -2
- package/esm2022/tree/control/base-tree-control.mjs +1 -1
- package/esm2022/tree/control/flat-tree-control.filters.mjs +4 -7
- package/esm2022/tree/control/flat-tree-control.mjs +4 -7
- package/esm2022/tree/control/nested-tree-control.mjs +1 -1
- package/esm2022/tree/control/tree-control.mjs +1 -1
- package/esm2022/tree/data-source/flat-data-source.mjs +3 -8
- package/esm2022/tree/data-source/nested-data-source.mjs +2 -3
- package/esm2022/tree/node.mjs +1 -1
- package/esm2022/tree/outlet.mjs +1 -1
- package/esm2022/tree/padding.directive.mjs +5 -6
- package/esm2022/tree/public-api.mjs +11 -11
- package/esm2022/tree/toggle.mjs +8 -5
- package/esm2022/tree/tree-base.mjs +4 -4
- package/esm2022/tree/tree-errors.mjs +1 -1
- package/esm2022/tree/tree-option.component.mjs +9 -13
- package/esm2022/tree/tree-selection.component.mjs +19 -33
- package/esm2022/tree/tree.mjs +7 -3
- package/esm2022/tree/tree.module.mjs +4 -4
- package/esm2022/tree-select/public-api.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +73 -98
- package/esm2022/tree-select/tree-select.module.mjs +31 -11
- package/fesm2022/koobiq-components-alert.mjs +55 -8
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +58 -61
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +10 -8
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +28 -20
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +22 -12
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-card.mjs +2 -2
- package/fesm2022/koobiq-components-card.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +3 -3
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +75 -27
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +623 -397
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +101 -90
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +3 -3
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +127 -141
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +5 -4
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +157 -0
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +207 -62
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +88 -81
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +17 -8
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +62 -51
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +1 -1
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +39 -41
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +7 -7
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +20 -6
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +88 -49
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +84 -85
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +12 -12
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +5 -5
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +5 -5
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +11 -12
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +2 -2
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +17 -14
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +136 -212
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +3 -3
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +108 -87
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +46 -36
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +42 -11
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +87 -52
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +53 -46
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -13
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +79 -30
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +23 -25
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +13 -10
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +86 -95
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +17 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +33 -18
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +110 -114
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +509 -533
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +124 -73
- package/file-upload/file-upload.module.d.ts +11 -10
- package/file-upload/file-upload.scss +0 -6
- package/file-upload/multiple-file-upload.component.d.ts +37 -7
- package/file-upload/multiple-file-upload.component.scss +50 -120
- package/file-upload/public-api.d.ts +1 -1
- package/file-upload/single-file-upload.component.d.ts +37 -7
- package/file-upload/single-file-upload.component.scss +12 -33
- package/form-field/_form-field-theme.scss +46 -36
- package/form-field/_hint-theme.scss +15 -20
- package/form-field/cleaner.scss +3 -9
- package/form-field/form-field.scss +23 -26
- package/form-field/hint.scss +5 -8
- package/form-field/password-toggle.d.ts +3 -2
- package/form-field/password-toggle.scss +3 -10
- package/form-field/public-api.d.ts +3 -3
- package/form-field/stepper.scss +4 -11
- package/icon/_icon-button-theme.scss +47 -36
- package/icon/_icon-item-theme.scss +47 -26
- package/icon/_icon-theme.scss +12 -14
- package/icon/icon-button.scss +5 -20
- package/icon/icon-item.component.d.ts +3 -1
- package/icon/icon-item.scss +10 -8
- package/icon/icon.scss +0 -6
- package/icon/public-api.d.ts +2 -2
- package/input/_input-theme.scss +6 -4
- package/input/input.scss +11 -10
- package/input/public-api.d.ts +2 -2
- package/link/_link-theme.scss +32 -49
- package/link/link.component.d.ts +1 -1
- package/link/public-api.d.ts +1 -1
- package/list/_list-theme.scss +21 -19
- package/list/list-selection.component.d.ts +2 -2
- package/list/list.scss +2 -6
- package/list/public-api.d.ts +2 -2
- package/loader-overlay/_loader-overlay-theme.scss +17 -18
- package/loader-overlay/loader-overlay.scss +9 -33
- package/loader-overlay/public-api.d.ts +1 -1
- package/markdown/_markdown-theme.scss +47 -47
- package/markdown/markdown.scss +41 -91
- package/modal/README.md +4 -3
- package/modal/_modal-animation.scss +0 -1
- package/modal/_modal-confirm.scss +2 -7
- package/modal/_modal-theme.scss +11 -13
- package/modal/modal.component.d.ts +1 -1
- package/modal/modal.directive.d.ts +3 -3
- package/modal/modal.scss +15 -31
- package/modal/modal.type.d.ts +2 -2
- package/modal/public-api.d.ts +2 -2
- package/navbar/README.md +21 -20
- package/navbar/_navbar-item_horizontal.scss +40 -33
- package/navbar/_navbar-item_vertical.scss +31 -33
- package/navbar/_navbar-theme.scss +20 -24
- package/navbar/navbar-brand.scss +24 -27
- package/navbar/navbar-divider.scss +4 -8
- package/navbar/navbar-item.component.d.ts +4 -4
- package/navbar/navbar-item.scss +20 -15
- package/navbar/navbar.scss +2 -6
- package/navbar/public-api.d.ts +2 -2
- package/navbar/vertical-navbar.scss +4 -6
- package/package.json +17 -10
- package/popover/README.md +18 -14
- package/popover/_popover-theme.scss +9 -17
- package/popover/popover.component.d.ts +1 -1
- package/popover/popover.scss +15 -29
- package/popover/public-api.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +7 -11
- package/progress-bar/progress-bar.scss +6 -19
- package/progress-bar/public-api.d.ts +1 -1
- package/progress-spinner/_progress-spinner-theme.scss +6 -8
- package/progress-spinner/progress-spinner.scss +8 -18
- package/progress-spinner/public-api.d.ts +1 -1
- package/radio/_radio-theme.scss +37 -37
- package/radio/public-api.d.ts +1 -1
- package/radio/radio.scss +35 -40
- package/risk-level/_risk-level-theme.scss +25 -31
- package/risk-level/public-api.d.ts +1 -1
- package/risk-level/risk-level.component.scss +4 -10
- package/schematics/collection.json +11 -0
- package/schematics/ng-add/index.js +70 -0
- package/schematics/ng-add/schema.json +15 -0
- package/scrollbar/_scrollbar-component-theme.scss +15 -19
- package/scrollbar/public-api.d.ts +1 -1
- package/scrollbar/scrollbar.component.scss +68 -63
- package/scrollbar/scrollbar.directive.d.ts +1 -1
- package/scrollbar/scrollbar.types.d.ts +1 -1
- package/select/_select-theme.scss +14 -16
- package/select/public-api.d.ts +2 -2
- package/select/select-option.directive.d.ts +3 -2
- package/select/select.component.d.ts +12 -33
- package/select/select.module.d.ts +1 -1
- package/select/select.scss +3 -11
- package/sidebar/public-api.d.ts +1 -1
- package/sidepanel/_sidepanel-theme.scss +8 -10
- package/sidepanel/public-api.d.ts +3 -3
- package/sidepanel/sidepanel.scss +20 -37
- package/splitter/_splitter-theme.scss +5 -6
- package/splitter/public-api.d.ts +1 -1
- package/splitter/splitter.component.d.ts +10 -5
- package/splitter/splitter.scss +0 -1
- package/table/_table-theme.scss +16 -15
- package/table/public-api.d.ts +1 -1
- package/table/table.component.d.ts +8 -1
- package/table/table.module.d.ts +1 -1
- package/table/table.scss +41 -42
- package/tabs/_tabs-common.scss +13 -15
- package/tabs/_tabs-theme.scss +76 -44
- package/tabs/paginated-tab-header.d.ts +1 -1
- package/tabs/public-api.d.ts +5 -5
- package/tabs/tab-body.component.d.ts +4 -4
- package/tabs/tab-group.component.d.ts +10 -4
- package/tabs/tab-group.scss +2 -8
- package/tabs/tab-header.scss +0 -10
- package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -9
- package/tags/_tag-theme.scss +22 -27
- package/tags/public-api.d.ts +4 -4
- package/tags/tag-default-options.d.ts +1 -0
- package/tags/tag-input.d.ts +8 -2
- package/tags/tag-list.scss +15 -12
- package/tags/tag.component.d.ts +1 -1
- package/tags/tag.scss +5 -11
- package/textarea/_textarea-theme.scss +2 -5
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea/textarea.scss +5 -10
- package/timepicker/public-api.d.ts +1 -1
- package/timepicker/timepicker.constants.d.ts +2 -0
- package/timepicker/timepicker.directive.d.ts +11 -4
- package/timepicker/timepicker.scss +2 -8
- package/timezone/_timezone-option-theme.scss +8 -10
- package/timezone/timezone-option.component.scss +5 -8
- package/timezone/timezone-option.directive.d.ts +4 -3
- package/timezone/timezone-select.component.d.ts +2 -1
- package/timezone/timezone-select.component.scss +2 -4
- package/timezone/timezone.utils.d.ts +1 -1
- package/title/public-api.d.ts +1 -1
- package/title/title.directive.d.ts +0 -1
- package/toast/_toast-theme.scss +20 -16
- package/toast/public-api.d.ts +3 -3
- package/toast/toast-container.component.scss +5 -6
- package/toast/toast.component.scss +28 -29
- package/toast/toast.service.d.ts +9 -5
- package/toast/toast.type.d.ts +3 -1
- package/toggle/_toggle-theme.scss +49 -42
- package/toggle/public-api.d.ts +1 -1
- package/toggle/toggle.scss +9 -22
- package/tooltip/_tooltip-theme.scss +12 -16
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +14 -10
- package/tooltip/tooltip.scss +7 -13
- package/tree/_tree-theme.scss +20 -23
- package/tree/public-api.d.ts +10 -10
- package/tree/toggle.scss +3 -6
- package/tree/tree-base.d.ts +2 -2
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-option.scss +17 -14
- package/tree/tree-selection.component.d.ts +2 -1
- package/tree-select/_tree-select-theme.scss +12 -15
- package/tree-select/public-api.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +13 -20
- package/tree-select/tree-select.module.d.ts +1 -2
- package/tree-select/tree-select.scss +1 -6
- package/core/styles/_variables.scss +0 -1
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i4 from '@angular/cdk/a11y';
|
|
2
|
+
import * as i3 from '@angular/cdk/bidi';
|
|
3
|
+
import * as i2 from '@angular/cdk/overlay';
|
|
2
4
|
import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
|
|
3
|
-
import * as i6 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Directive, Inject, Optional,
|
|
7
|
-
import * as
|
|
8
|
-
import { mixinTabIndex, mixinDisabled, mixinErrorState, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, getKbqSelectNonArrayValueError, KbqVirtualOption, SELECT_PANEL_PADDING_X, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, KBQ_OPTION_PARENT_COMPONENT, KbqOption, KbqOptgroup, kbqSelectAnimations, KbqOptionModule, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER } from '@koobiq/components/core';
|
|
9
|
-
import * as i1 from '@koobiq/components/form-field';
|
|
10
|
-
import { KbqFormFieldControl, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
11
|
-
import * as i7 from '@koobiq/components/icon';
|
|
12
|
-
import { KbqIconModule } from '@koobiq/components/icon';
|
|
13
|
-
import * as i8 from '@koobiq/components/tags';
|
|
14
|
-
import { KbqTag, KbqTagsModule } from '@koobiq/components/tags';
|
|
6
|
+
import { Directive, Inject, Optional, EventEmitter, isDevMode, ElementRef, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Self, ViewChild, ContentChild, ViewChildren, ContentChildren, Input, Output, NgModule } from '@angular/core';
|
|
7
|
+
import * as i1 from '@koobiq/components/core';
|
|
8
|
+
import { mixinTabIndex, mixinDisabled, mixinErrorState, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, getKbqSelectNonArrayValueError, KbqVirtualOption, SELECT_PANEL_PADDING_X, SELECT_PANEL_INDENT_PADDING_X, SELECT_PANEL_VIEWPORT_PADDING, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, KBQ_OPTION_PARENT_COMPONENT, KbqSelectFooter, KbqSelectTrigger, KbqSelectMatcher, KbqSelectSearch, KbqOption, KbqOptgroup, kbqSelectAnimations, KbqOptionModule, KbqSelectSearchEmptyResult, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER } from '@koobiq/components/core';
|
|
15
9
|
import { KbqTooltipTrigger, KBQ_TOOLTIP_SCROLL_STRATEGY, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
16
|
-
import * as i3 from '@angular/cdk/bidi';
|
|
17
10
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
18
11
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
19
12
|
import { CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
20
|
-
import * as
|
|
13
|
+
import * as i4$1 from '@angular/forms';
|
|
21
14
|
import { ActiveDescendantKeyManager } from '@koobiq/cdk/a11y';
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
15
|
+
import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, ESCAPE, TAB, HOME, END, PAGE_UP, PAGE_DOWN, A, BACKSPACE, DELETE } from '@koobiq/cdk/keycodes';
|
|
16
|
+
import * as i5 from '@koobiq/components/form-field';
|
|
17
|
+
import { KbqFormFieldControl, KbqFormFieldModule } from '@koobiq/components/form-field';
|
|
18
|
+
import * as i8 from '@koobiq/components/tags';
|
|
19
|
+
import { KbqTag, KbqTagsModule } from '@koobiq/components/tags';
|
|
20
|
+
import { SizeXxs } from '@koobiq/design-tokens';
|
|
21
|
+
import { Subject, defer, merge, Subscription, BehaviorSubject } from 'rxjs';
|
|
22
|
+
import { switchMap, take, filter, map, distinctUntilChanged, takeUntil, startWith, delay } from 'rxjs/operators';
|
|
23
|
+
import * as i6 from '@angular/common';
|
|
24
|
+
import { CommonModule } from '@angular/common';
|
|
25
|
+
import * as i7 from '@koobiq/components/icon';
|
|
26
|
+
import { KbqIconModule } from '@koobiq/components/icon';
|
|
26
27
|
|
|
27
28
|
class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
28
29
|
get textElement() {
|
|
@@ -31,16 +32,19 @@ class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
|
31
32
|
get isOverflown() {
|
|
32
33
|
return this.textElement.clientWidth < this.textElement.scrollWidth;
|
|
33
34
|
}
|
|
34
|
-
constructor(option, overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction) {
|
|
35
|
-
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction);
|
|
35
|
+
constructor(option, overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor) {
|
|
36
|
+
super(overlay, elementRef, ngZone, scrollDispatcher, hostView, scrollStrategy, direction, focusMonitor);
|
|
36
37
|
this.option = option;
|
|
37
38
|
}
|
|
38
39
|
ngAfterViewInit() {
|
|
39
40
|
this.content = this.option.viewValue;
|
|
40
|
-
this.resizeObserver = new ResizeObserver(() => this.disabled = !this.isOverflown);
|
|
41
|
-
this.mutationObserver = new MutationObserver(() => this.content = this.option.viewValue);
|
|
41
|
+
this.resizeObserver = new ResizeObserver(() => (this.disabled = !this.isOverflown));
|
|
42
|
+
this.mutationObserver = new MutationObserver(() => (this.content = this.option.viewValue));
|
|
42
43
|
this.mutationObserver.observe(this.textElement, {
|
|
43
|
-
characterData: true,
|
|
44
|
+
characterData: true,
|
|
45
|
+
attributes: false,
|
|
46
|
+
childList: true,
|
|
47
|
+
subtree: true
|
|
44
48
|
});
|
|
45
49
|
}
|
|
46
50
|
ngOnDestroy() {
|
|
@@ -71,7 +75,7 @@ class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
|
71
75
|
this.disabled = true;
|
|
72
76
|
this.hide();
|
|
73
77
|
}
|
|
74
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqOptionTooltip, deps: [{ token:
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqOptionTooltip, deps: [{ token: i1.KbqOption }, { token: i2.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i2.ScrollDispatcher }, { token: i0.ViewContainerRef }, { token: KBQ_TOOLTIP_SCROLL_STRATEGY }, { token: i3.Directionality, optional: true }, { token: i4.FocusMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
75
79
|
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqOptionTooltip, selector: "kbq-option", host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focus": "onFocus()", "blur": "onBlur()" } }, usesInheritance: true, ngImport: i0 }); }
|
|
76
80
|
}
|
|
77
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqOptionTooltip, decorators: [{
|
|
@@ -85,12 +89,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
85
89
|
'(blur)': 'onBlur()'
|
|
86
90
|
}
|
|
87
91
|
}]
|
|
88
|
-
}], ctorParameters: () => [{ type:
|
|
92
|
+
}], ctorParameters: () => [{ type: i1.KbqOption }, { type: i2.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i2.ScrollDispatcher }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
|
89
93
|
type: Inject,
|
|
90
94
|
args: [KBQ_TOOLTIP_SCROLL_STRATEGY]
|
|
91
95
|
}] }, { type: i3.Directionality, decorators: [{
|
|
92
96
|
type: Optional
|
|
93
|
-
}] }] });
|
|
97
|
+
}] }, { type: i4.FocusMonitor }] });
|
|
94
98
|
|
|
95
99
|
/* tslint:disable:no-empty */
|
|
96
100
|
let nextUniqueId = 0;
|
|
@@ -101,101 +105,6 @@ class KbqSelectChange {
|
|
|
101
105
|
this.value = value;
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
|
-
class KbqSelectFooter {
|
|
105
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
106
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelectFooter, selector: "kbq-select-footer, [kbq-select-footer]", host: { classAttribute: "kbq-select__footer" }, ngImport: i0 }); }
|
|
107
|
-
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectFooter, decorators: [{
|
|
109
|
-
type: Directive,
|
|
110
|
-
args: [{
|
|
111
|
-
selector: 'kbq-select-footer, [kbq-select-footer]',
|
|
112
|
-
host: { class: 'kbq-select__footer' }
|
|
113
|
-
}]
|
|
114
|
-
}] });
|
|
115
|
-
class KbqSelectSearch {
|
|
116
|
-
constructor(formField) {
|
|
117
|
-
this.searchChangesSubscription = new Subscription();
|
|
118
|
-
this.isSearchChanged = false;
|
|
119
|
-
formField.canCleanerClearByEsc = false;
|
|
120
|
-
}
|
|
121
|
-
focus() {
|
|
122
|
-
this.input.focus();
|
|
123
|
-
}
|
|
124
|
-
reset() {
|
|
125
|
-
this.input.ngControl.reset();
|
|
126
|
-
}
|
|
127
|
-
ngAfterContentInit() {
|
|
128
|
-
if (!this.input) {
|
|
129
|
-
throw Error('KbqSelectSearch does not work without kbqInput');
|
|
130
|
-
}
|
|
131
|
-
if (!this.input.ngControl) {
|
|
132
|
-
throw Error('KbqSelectSearch does not work without ngControl');
|
|
133
|
-
}
|
|
134
|
-
Promise.resolve().then(() => {
|
|
135
|
-
this.searchChangesSubscription = this.input.ngControl.valueChanges.subscribe(() => {
|
|
136
|
-
this.isSearchChanged = true;
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
ngOnDestroy() {
|
|
141
|
-
this.searchChangesSubscription.unsubscribe();
|
|
142
|
-
}
|
|
143
|
-
handleKeydown(event) {
|
|
144
|
-
// tslint:disable-next-line:deprecation
|
|
145
|
-
if (event.keyCode === ESCAPE) {
|
|
146
|
-
if (this.input.value) {
|
|
147
|
-
this.reset();
|
|
148
|
-
event.stopPropagation();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
// tslint:disable-next-line:deprecation
|
|
152
|
-
if ([SPACE, HOME, END].includes(event.keyCode)) {
|
|
153
|
-
event.stopPropagation();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectSearch, deps: [{ token: i1.KbqFormField }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
157
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelectSearch, selector: "[kbqSelectSearch]", host: { listeners: { "keydown": "handleKeydown($event)" } }, queries: [{ propertyName: "input", first: true, predicate: KbqInput, descendants: true }], exportAs: ["kbqSelectSearch"], ngImport: i0 }); }
|
|
158
|
-
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectSearch, decorators: [{
|
|
160
|
-
type: Directive,
|
|
161
|
-
args: [{
|
|
162
|
-
selector: '[kbqSelectSearch]',
|
|
163
|
-
exportAs: 'kbqSelectSearch',
|
|
164
|
-
host: {
|
|
165
|
-
'(keydown)': 'handleKeydown($event)'
|
|
166
|
-
}
|
|
167
|
-
}]
|
|
168
|
-
}], ctorParameters: () => [{ type: i1.KbqFormField }], propDecorators: { input: [{
|
|
169
|
-
type: ContentChild,
|
|
170
|
-
args: [KbqInput, { static: false }]
|
|
171
|
-
}] } });
|
|
172
|
-
class KbqSelectSearchEmptyResult {
|
|
173
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectSearchEmptyResult, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
174
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelectSearchEmptyResult, selector: "[kbq-select-search-empty-result]", exportAs: ["kbqSelectSearchEmptyResult"], ngImport: i0 }); }
|
|
175
|
-
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectSearchEmptyResult, decorators: [{
|
|
177
|
-
type: Directive,
|
|
178
|
-
args: [{
|
|
179
|
-
selector: '[kbq-select-search-empty-result]',
|
|
180
|
-
exportAs: 'kbqSelectSearchEmptyResult'
|
|
181
|
-
}]
|
|
182
|
-
}] });
|
|
183
|
-
class KbqSelectTrigger {
|
|
184
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
185
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelectTrigger, selector: "kbq-select-trigger, [kbq-select-trigger]", ngImport: i0 }); }
|
|
186
|
-
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectTrigger, decorators: [{
|
|
188
|
-
type: Directive,
|
|
189
|
-
args: [{ selector: 'kbq-select-trigger, [kbq-select-trigger]' }]
|
|
190
|
-
}] });
|
|
191
|
-
class KbqSelectMatcher {
|
|
192
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectMatcher, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
193
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelectMatcher, selector: "kbq-select-matcher, [kbq-select-matcher]", ngImport: i0 }); }
|
|
194
|
-
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectMatcher, decorators: [{
|
|
196
|
-
type: Directive,
|
|
197
|
-
args: [{ selector: 'kbq-select-matcher, [kbq-select-matcher]' }]
|
|
198
|
-
}] });
|
|
199
108
|
/** @docs-private */
|
|
200
109
|
class KbqSelectBase {
|
|
201
110
|
constructor(elementRef, defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl) {
|
|
@@ -297,7 +206,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
297
206
|
this._focused = value;
|
|
298
207
|
}
|
|
299
208
|
get isEmptySearchResult() {
|
|
300
|
-
return this.search && this.options.length === 0 && !!this.search.
|
|
209
|
+
return this.search && this.options.length === 0 && !!this.search.value();
|
|
301
210
|
}
|
|
302
211
|
get canShowCleaner() {
|
|
303
212
|
return !this.disabled && this.cleaner && this.selectionModel.hasValue();
|
|
@@ -324,6 +233,12 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
324
233
|
get empty() {
|
|
325
234
|
return !this.selectionModel || this.selectionModel.isEmpty();
|
|
326
235
|
}
|
|
236
|
+
get firstSelected() {
|
|
237
|
+
return this.selectionModel.selected.filter((option) => !option.disabled)[0] || null;
|
|
238
|
+
}
|
|
239
|
+
get firstFiltered() {
|
|
240
|
+
return !this.options.find((option) => option === this.firstSelected);
|
|
241
|
+
}
|
|
327
242
|
constructor(_changeDetectorRef, _ngZone, _renderer, defaultErrorStateMatcher, elementRef, overlayContainer, _dir, parentForm, parentFormGroup, parentFormField, ngControl, scrollStrategyFactory, localeService) {
|
|
328
243
|
super(elementRef, defaultErrorStateMatcher, parentForm, parentFormGroup, ngControl);
|
|
329
244
|
this._changeDetectorRef = _changeDetectorRef;
|
|
@@ -379,9 +294,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
379
294
|
if (this.options) {
|
|
380
295
|
return merge(...this.options.map((option) => option.onSelectionChange), ...this.selectionModel.selected.map((option) => option.onSelectionChange), this.options.changes.pipe(switchMap((list) => merge(...list.map((option) => option.onSelectionChange)))));
|
|
381
296
|
}
|
|
382
|
-
return this._ngZone.onStable
|
|
383
|
-
.asObservable()
|
|
384
|
-
.pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
|
297
|
+
return this._ngZone.onStable.asObservable().pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
|
385
298
|
});
|
|
386
299
|
/** Event emitted when the select panel has been toggled. */
|
|
387
300
|
this.openedChange = new EventEmitter();
|
|
@@ -421,8 +334,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
421
334
|
};
|
|
422
335
|
/** Comparison function to specify which option is displayed. Defaults to object equality. */
|
|
423
336
|
this._compareWith = (o1, o2) => o1 === o2;
|
|
424
|
-
this.localeService?.changes
|
|
425
|
-
.subscribe(this.updateLocaleParams);
|
|
337
|
+
this.localeService?.changes.subscribe(this.updateLocaleParams);
|
|
426
338
|
if (this.ngControl) {
|
|
427
339
|
// Note: we provide the value accessor through here, instead of
|
|
428
340
|
// the `providers` to avoid running into a circular import.
|
|
@@ -437,9 +349,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
437
349
|
// We need `distinctUntilChanged` here, because some browsers will
|
|
438
350
|
// fire the animation end event twice for the same animation. See:
|
|
439
351
|
// https://github.com/angular/angular/issues/24084
|
|
440
|
-
this.panelDoneAnimatingStream
|
|
441
|
-
.pipe(distinctUntilChanged(), takeUntil(this.destroy))
|
|
442
|
-
.subscribe(() => {
|
|
352
|
+
this.panelDoneAnimatingStream.pipe(distinctUntilChanged(), takeUntil(this.destroy)).subscribe(() => {
|
|
443
353
|
if (this.panelOpen) {
|
|
444
354
|
this.scrollTop = 0;
|
|
445
355
|
if (this.search) {
|
|
@@ -452,28 +362,24 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
452
362
|
this._changeDetectorRef.markForCheck();
|
|
453
363
|
}
|
|
454
364
|
});
|
|
455
|
-
merge(this.optionSelectionChanges, this.visibleChanges)
|
|
365
|
+
merge(this.optionSelectionChanges, this.visibleChanges)
|
|
366
|
+
.pipe(takeUntil(this.destroy), distinctUntilChanged())
|
|
456
367
|
.subscribe(() => setTimeout(() => this.calculateHiddenItems(), 0));
|
|
457
368
|
}
|
|
458
369
|
ngAfterContentInit() {
|
|
459
370
|
this.withVirtualScroll = !!this.cdkVirtualForOf;
|
|
460
371
|
this.initKeyManager();
|
|
461
|
-
this.selectionModel.changed
|
|
462
|
-
.pipe(takeUntil(this.destroy))
|
|
463
|
-
.subscribe((event) => {
|
|
372
|
+
this.selectionModel.changed.pipe(takeUntil(this.destroy)).subscribe((event) => {
|
|
464
373
|
event.added.forEach((option) => option.select());
|
|
465
374
|
event.removed.forEach((option) => option.deselect());
|
|
466
375
|
});
|
|
467
|
-
this.options.changes
|
|
468
|
-
.pipe(startWith(null), takeUntil(this.destroy))
|
|
469
|
-
.subscribe(() => {
|
|
376
|
+
this.options.changes.pipe(startWith(null), takeUntil(this.destroy)).subscribe(() => {
|
|
470
377
|
this.resetOptions();
|
|
471
378
|
this.initializeSelection();
|
|
472
379
|
});
|
|
473
380
|
}
|
|
474
381
|
ngAfterViewInit() {
|
|
475
|
-
this.tags.changes
|
|
476
|
-
.subscribe(() => {
|
|
382
|
+
this.tags.changes.subscribe(() => {
|
|
477
383
|
setTimeout(() => this.calculateHiddenItems(), 0);
|
|
478
384
|
});
|
|
479
385
|
}
|
|
@@ -540,7 +446,8 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
540
446
|
this.highlightCorrectOption();
|
|
541
447
|
this._changeDetectorRef.markForCheck();
|
|
542
448
|
// Set the font size on the panel element once it exists.
|
|
543
|
-
this._ngZone.onStable
|
|
449
|
+
this._ngZone.onStable
|
|
450
|
+
.asObservable()
|
|
544
451
|
.pipe(take(1))
|
|
545
452
|
.subscribe(() => {
|
|
546
453
|
this.scrollActiveOptionIntoView();
|
|
@@ -649,19 +556,14 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
649
556
|
* Callback that is invoked when the overlay panel has been attached.
|
|
650
557
|
*/
|
|
651
558
|
onAttached() {
|
|
652
|
-
this.overlayDir.positionChange
|
|
653
|
-
.pipe(take(1))
|
|
654
|
-
.subscribe(() => {
|
|
559
|
+
this.overlayDir.positionChange.pipe(take(1)).subscribe(() => {
|
|
655
560
|
this._changeDetectorRef.detectChanges();
|
|
656
561
|
this.setOverlayPosition();
|
|
657
562
|
this.optionsContainer.nativeElement.scrollTop = this.scrollTop;
|
|
658
563
|
this.updateScrollSize();
|
|
659
564
|
});
|
|
660
|
-
this.options.changes
|
|
661
|
-
|
|
662
|
-
.subscribe(() => this.setOverlayPosition());
|
|
663
|
-
this.closeSubscription = this.closingActions()
|
|
664
|
-
.subscribe(() => this.close());
|
|
565
|
+
this.options.changes.pipe(delay(1)).subscribe(() => this.setOverlayPosition());
|
|
566
|
+
this.closeSubscription = this.closingActions().subscribe(() => this.close());
|
|
665
567
|
}
|
|
666
568
|
/** Returns the theme to be used on the panel. */
|
|
667
569
|
getPanelTheme() {
|
|
@@ -698,12 +600,12 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
698
600
|
const itemsCounterWidth = Math.floor(itemsCounter.getBoundingClientRect().width);
|
|
699
601
|
const matcherListWidth = Math.floor(matcherList.getBoundingClientRect().width);
|
|
700
602
|
const matcherWidth = matcherListWidth + (itemsCounterShowed ? itemsCounterWidth : 0);
|
|
701
|
-
if (itemsCounterShowed &&
|
|
603
|
+
if (itemsCounterShowed && totalItemsWidth < matcherWidth) {
|
|
702
604
|
this.hiddenItems = 0;
|
|
703
605
|
this._changeDetectorRef.detectChanges();
|
|
704
606
|
}
|
|
705
607
|
if (totalVisibleItemsWidth === matcherListWidth ||
|
|
706
|
-
|
|
608
|
+
totalVisibleItemsWidth + itemsCounterWidth < matcherListWidth) {
|
|
707
609
|
this._changeDetectorRef.markForCheck();
|
|
708
610
|
return;
|
|
709
611
|
}
|
|
@@ -713,14 +615,35 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
713
615
|
getItemHeight() {
|
|
714
616
|
return this.options.first ? this.options.first.getHeight() : 0;
|
|
715
617
|
}
|
|
618
|
+
handleClick($event) {
|
|
619
|
+
if (this.footer?.nativeElement.contains($event.target)) {
|
|
620
|
+
this.close();
|
|
621
|
+
}
|
|
622
|
+
}
|
|
716
623
|
isVisible() {
|
|
717
624
|
return this.elementRef.nativeElement.offsetTop < this.elementRef.nativeElement.offsetHeight;
|
|
718
625
|
}
|
|
626
|
+
currentOverlayPosition() {
|
|
627
|
+
const element = this.overlayDir.overlayRef.hostElement;
|
|
628
|
+
return Array.from(this.overlayContainer.getContainerElement().childNodes).findIndex((node) => {
|
|
629
|
+
return node.firstChild.id == element.firstChild.id;
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
modalOverlayPosition() {
|
|
633
|
+
return Array.from(this.overlayContainer.getContainerElement().childNodes).findIndex((childNode) => childNode.classList.contains('kbq-modal-overlay'));
|
|
634
|
+
}
|
|
719
635
|
closingActions() {
|
|
720
|
-
return merge(this.overlayDir.overlayRef.outsidePointerEvents()
|
|
721
|
-
.pipe(filter((event) => !this.elementRef.nativeElement.contains(event.target)),
|
|
722
636
|
// used for calling toggle on select from outside of component
|
|
723
|
-
|
|
637
|
+
const outsidePointerEvents = this.overlayDir
|
|
638
|
+
.overlayRef.outsidePointerEvents()
|
|
639
|
+
.pipe(delay(0))
|
|
640
|
+
.pipe(filter(() => {
|
|
641
|
+
if (this.overlayContainer.getContainerElement().childElementCount > 1) {
|
|
642
|
+
return this.currentOverlayPosition() > this.modalOverlayPosition();
|
|
643
|
+
}
|
|
644
|
+
return true;
|
|
645
|
+
}));
|
|
646
|
+
return merge(outsidePointerEvents, this.overlayDir.overlayRef.detachments());
|
|
724
647
|
}
|
|
725
648
|
getHeightOfOptionsContainer() {
|
|
726
649
|
return this.optionsContainer.nativeElement.getClientRects()[0].height;
|
|
@@ -736,10 +659,11 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
736
659
|
triggerClone.querySelector('.kbq-select__match-hidden-text')?.remove();
|
|
737
660
|
this._renderer.appendChild(this.trigger.nativeElement, triggerClone);
|
|
738
661
|
let totalItemsWidth = 0;
|
|
739
|
-
triggerClone.querySelectorAll('kbq-tag')
|
|
740
|
-
|
|
662
|
+
const selectedItemsViewValueContainers = triggerClone.querySelectorAll('kbq-tag');
|
|
663
|
+
selectedItemsViewValueContainers.forEach((item) => (totalItemsWidth += this.getItemWidth(item)));
|
|
741
664
|
triggerClone.remove();
|
|
742
|
-
|
|
665
|
+
// item width + flex gap between each item
|
|
666
|
+
return totalItemsWidth + parseInt(SizeXxs) * (selectedItemsViewValueContainers.length - 1);
|
|
743
667
|
}
|
|
744
668
|
getItemWidth(element) {
|
|
745
669
|
const computedStyle = window.getComputedStyle(element);
|
|
@@ -768,7 +692,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
768
692
|
/* tslint:disable-next-line */
|
|
769
693
|
const keyCode = event.keyCode;
|
|
770
694
|
const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;
|
|
771
|
-
if (isArrowKey && event.altKey || keyCode === ESCAPE || keyCode === TAB) {
|
|
695
|
+
if ((isArrowKey && event.altKey) || keyCode === ESCAPE || keyCode === TAB) {
|
|
772
696
|
// Close the select on ALT + arrow key to match the native <select>
|
|
773
697
|
event.preventDefault();
|
|
774
698
|
this.close();
|
|
@@ -809,13 +733,19 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
809
733
|
else {
|
|
810
734
|
const previouslyFocusedIndex = this.keyManager.activeItemIndex;
|
|
811
735
|
this.keyManager.onKeydown(event);
|
|
812
|
-
if (this._multiple &&
|
|
736
|
+
if (this._multiple &&
|
|
737
|
+
isArrowKey &&
|
|
738
|
+
event.shiftKey &&
|
|
739
|
+
this.keyManager.activeItem &&
|
|
813
740
|
this.keyManager.activeItemIndex !== previouslyFocusedIndex) {
|
|
814
741
|
this.keyManager.activeItem.selectViaInteraction();
|
|
815
742
|
}
|
|
816
743
|
if (this.search) {
|
|
817
744
|
this.search.focus();
|
|
818
745
|
}
|
|
746
|
+
if (this.search && (this.keyManager.isTyping() || [BACKSPACE, DELETE].includes(keyCode))) {
|
|
747
|
+
setTimeout(() => this.highlightCorrectOption());
|
|
748
|
+
}
|
|
819
749
|
}
|
|
820
750
|
}
|
|
821
751
|
initializeSelection() {
|
|
@@ -879,9 +809,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
879
809
|
}
|
|
880
810
|
else if (this.withVirtualScroll) {
|
|
881
811
|
const source = this.cdkVirtualForOf?.cdkVirtualForOf;
|
|
882
|
-
const correspondingOptionVirtual = source instanceof Array
|
|
883
|
-
? source.find((item) => this.compareWith(item, value))
|
|
884
|
-
: undefined;
|
|
812
|
+
const correspondingOptionVirtual = source instanceof Array ? source.find((item) => this.compareWith(item, value)) : undefined;
|
|
885
813
|
if (correspondingOptionVirtual) {
|
|
886
814
|
const kbqVirtualOption = new KbqVirtualOption(correspondingOptionVirtual, this.disabled);
|
|
887
815
|
this.selectionModel.select(kbqVirtualOption);
|
|
@@ -896,9 +824,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
896
824
|
.withTypeAhead(typeAheadDebounce, this.search ? -1 : 0)
|
|
897
825
|
.withVerticalOrientation()
|
|
898
826
|
.withHorizontalOrientation(this.isRtl() ? 'rtl' : 'ltr');
|
|
899
|
-
this.keyManager.change
|
|
900
|
-
.pipe(takeUntil(this.destroy))
|
|
901
|
-
.subscribe(() => {
|
|
827
|
+
this.keyManager.change.pipe(takeUntil(this.destroy)).subscribe(() => {
|
|
902
828
|
if (this.panelOpen && this.panel) {
|
|
903
829
|
this.scrollActiveOptionIntoView();
|
|
904
830
|
}
|
|
@@ -910,9 +836,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
910
836
|
/** Drops current option subscriptions and IDs and resets from scratch. */
|
|
911
837
|
resetOptions() {
|
|
912
838
|
const changedOrDestroyed = merge(this.options.changes, this.destroy);
|
|
913
|
-
this.optionSelectionChanges
|
|
914
|
-
.pipe(takeUntil(changedOrDestroyed))
|
|
915
|
-
.subscribe((event) => {
|
|
839
|
+
this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe((event) => {
|
|
916
840
|
this.onSelect(event.source, event.isUserInput);
|
|
917
841
|
if (this.search && this.search.isSearchChanged) {
|
|
918
842
|
Promise.resolve().then(() => this.keyManager.updateActiveItem(0));
|
|
@@ -957,7 +881,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
957
881
|
// want to restore focus back to the trigger, in order to
|
|
958
882
|
// prevent the select keyboard controls from clashing with
|
|
959
883
|
// the ones from `kbq-option`.
|
|
960
|
-
// If search is
|
|
884
|
+
// If search is available then we focus search again.
|
|
961
885
|
if (this.search) {
|
|
962
886
|
this.search.focus();
|
|
963
887
|
}
|
|
@@ -976,9 +900,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
976
900
|
sortValues() {
|
|
977
901
|
if (this.multiple) {
|
|
978
902
|
const options = this.options.toArray();
|
|
979
|
-
this.selectionModel.sort((a, b) => this.sortComparator ?
|
|
980
|
-
this.sortComparator(a, b, options) :
|
|
981
|
-
a.value - b.value);
|
|
903
|
+
this.selectionModel.sort((a, b) => this.sortComparator ? this.sortComparator(a, b, options) : a.value - b.value);
|
|
982
904
|
this.stateChanges.next();
|
|
983
905
|
}
|
|
984
906
|
}
|
|
@@ -1003,11 +925,11 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
1003
925
|
*/
|
|
1004
926
|
highlightCorrectOption() {
|
|
1005
927
|
if (this.keyManager) {
|
|
1006
|
-
if (this.empty) {
|
|
928
|
+
if (this.empty || !this.firstSelected || this.firstFiltered) {
|
|
1007
929
|
this.keyManager.setFirstItemActive();
|
|
1008
930
|
}
|
|
1009
931
|
else {
|
|
1010
|
-
this.keyManager.setActiveItem(this.
|
|
932
|
+
this.keyManager.setActiveItem(this.firstSelected);
|
|
1011
933
|
}
|
|
1012
934
|
}
|
|
1013
935
|
}
|
|
@@ -1038,8 +960,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
1038
960
|
}
|
|
1039
961
|
// Determine if select overflows on either side.
|
|
1040
962
|
const leftOverflow = 0 - (overlayRect.left + offsetX - (isRtl ? paddingWidth : 0));
|
|
1041
|
-
const rightOverflow = overlayRect.right + offsetX - windowWidth
|
|
1042
|
-
+ (isRtl ? 0 : paddingWidth);
|
|
963
|
+
const rightOverflow = overlayRect.right + offsetX - windowWidth + (isRtl ? 0 : paddingWidth);
|
|
1043
964
|
// If the element overflows on either side, reduce the offset to allow it to fit.
|
|
1044
965
|
if (leftOverflow > 0 || rightOverflow > 0) {
|
|
1045
966
|
[offsetX, overlayMaxWidth] = this.calculateOverlayXPosition(overlayRect, windowWidth, offsetX);
|
|
@@ -1080,6 +1001,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
1080
1001
|
return [offsetX, overlayMaxWidth];
|
|
1081
1002
|
}
|
|
1082
1003
|
resetOverlay() {
|
|
1004
|
+
this.overlayDir.overlayRef.hostElement.classList.add('kbq-select-overlay');
|
|
1083
1005
|
this.overlayDir.offsetX = 0;
|
|
1084
1006
|
this.overlayDir.overlayRef.overlayElement.style.maxWidth = 'unset';
|
|
1085
1007
|
this.overlayDir.overlayRef.updatePosition();
|
|
@@ -1096,8 +1018,7 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
1096
1018
|
this._renderer.appendChild(this.trigger.nativeElement, triggerClone);
|
|
1097
1019
|
let visibleItemsCount = 0;
|
|
1098
1020
|
let totalVisibleItemsWidth = 0;
|
|
1099
|
-
triggerClone.querySelectorAll('kbq-tag')
|
|
1100
|
-
.forEach((item) => {
|
|
1021
|
+
triggerClone.querySelectorAll('kbq-tag').forEach((item) => {
|
|
1101
1022
|
if (item.offsetTop < item.offsetHeight) {
|
|
1102
1023
|
totalVisibleItemsWidth += this.getItemWidth(item);
|
|
1103
1024
|
visibleItemsCount++;
|
|
@@ -1114,11 +1035,11 @@ class KbqSelect extends KbqSelectMixinBase {
|
|
|
1114
1035
|
this._renderer.setStyle(triggerClone, 'left', '0');
|
|
1115
1036
|
return triggerClone;
|
|
1116
1037
|
}
|
|
1117
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelect, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token:
|
|
1038
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelect, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1.ErrorStateMatcher }, { token: i0.ElementRef }, { token: i2.OverlayContainer }, { token: i3.Directionality, optional: true }, { token: i4$1.NgForm, optional: true }, { token: i4$1.FormGroupDirective, optional: true }, { token: i5.KbqFormField, optional: true }, { token: i4$1.NgControl, optional: true, self: true }, { token: KBQ_SELECT_SCROLL_STRATEGY }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1118
1039
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqSelect, selector: "kbq-select", inputs: { disabled: "disabled", tabIndex: "tabIndex", hiddenItemsText: "hiddenItemsText", panelClass: "panelClass", backdropClass: "backdropClass", errorStateMatcher: "errorStateMatcher", sortComparator: "sortComparator", hasBackdrop: "hasBackdrop", placeholder: "placeholder", required: "required", multiple: "multiple", compareWith: "compareWith", value: "value", id: "id", hiddenItemsTextFormatter: "hiddenItemsTextFormatter" }, outputs: { openedChange: "openedChange", openedStream: "opened", closedStream: "closed", selectionChange: "selectionChange", valueChange: "valueChange" }, host: { listeners: { "click": "toggle()", "keydown": "handleKeydown($event)", "focus": "onFocus()", "blur": "onBlur()", "window:resize": "calculateHiddenItems()" }, properties: { "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null", "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState" }, classAttribute: "kbq-select" }, providers: [
|
|
1119
1040
|
{ provide: KbqFormFieldControl, useExisting: KbqSelect },
|
|
1120
1041
|
{ provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqSelect }
|
|
1121
|
-
], queries: [{ propertyName: "cdkVirtualForOf", first: true, predicate: CdkVirtualForOf, descendants: true }, { propertyName: "customTrigger", first: true, predicate: KbqSelectTrigger, descendants: true }, { propertyName: "customMatcher", first: true, predicate: KbqSelectMatcher, descendants: true }, { propertyName: "customTagTemplateRef", first: true, predicate: ["kbqSelectTagContent"], descendants: true, read: TemplateRef }, { propertyName: "cleaner", first: true, predicate: ["kbqSelectCleaner"], descendants: true, static: true }, { propertyName: "search", first: true, predicate: KbqSelectSearch, descendants: true }, { propertyName: "options", predicate: KbqOption, descendants: true }, { propertyName: "optionGroups", predicate: KbqOptgroup }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "optionsContainer", first: true, predicate: ["optionsContainer"], descendants: true }, { propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["kbqSelect"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div cdk-overlay-origin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n [class.kbq-select__trigger_empty]=\"empty\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [ngSwitch]=\"!!customMatcher\">\n\n <select class=\"cdk-visually-hidden\" [id]=\"id\"></select>\n\n <div class=\"kbq-select__matcher\" *ngSwitchCase=\"false\">\n <span class=\"kbq-select__placeholder\" *ngIf=\"empty\">{{ placeholder || '\\u00A0' }}</span>\n <span *ngIf=\"!empty\" [ngSwitch]=\"!!customTrigger\">\n <div *ngSwitchDefault [ngSwitch]=\"multiple\" class=\"kbq-select__match-container\">\n <span *ngSwitchCase=\"false\" class=\"kbq-select__matcher-text\">{{ triggerValue }}</span>\n <div *ngSwitchCase=\"true\" class=\"kbq-select__match-list\">\n <ng-container *ngIf=\"!customTagTemplateRef\">\n <kbq-tag *ngFor=\"let option of triggerValues\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n [class.kbq-error]=\"errorState\">\n {{ option.viewValue }}\n <i kbq-icon=\"mc-close-S_16\" kbqTagRemove\n *ngIf=\"!option.disabled && !disabled\"\n (click)=\"onRemoveMatcherItem(option, $event)\">\n </i>\n </kbq-tag>\n </ng-container>\n <ng-container *ngIf=\"customTagTemplateRef\">\n <ng-container *ngFor=\"let option of triggerValues\"\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{$implicit: option, select: this}\">\n </ng-container>\n </ng-container>\n </div>\n <div class=\"kbq-select__match-hidden-text\" [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\">\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n\n <div class=\"kbq-select__cleaner\" *ngIf=\"canShowCleaner\" (click)=\"clearValue($event)\">\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i class=\"kbq-select__arrow\" kbq-icon=\"mc-angle-down-S_16\" [color]=\"'contrast-fade'\"></i>\n </div>\n </div>\n\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" *ngSwitchCase=\"true\"></ng-content>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayPanelClass]=\"'kbq-select-overlay'\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.transformOrigin]=\"transformOrigin\"\n [style.font-size.px]=\"triggerFontSize\"\n (keydown)=\"handleKeydown($event)\">\n\n <div *ngIf=\"search\" class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\"></ng-content>\n </div>\n\n <div #optionsContainer\n class=\"kbq-select__content kbq-scrollbar\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\">\n\n <div *ngIf=\"isEmptySearchResult\" class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-select .kbq-select__trigger.kbq-select__trigger_single .kbq-select__matcher,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple.kbq-select__trigger_empty .kbq-select__matcher{padding:calc(var(--kbq-select-size-single-padding-vertical, 8px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-vertical, 8px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-left, 12px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-left, 4px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-container{display:flex}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);gap:var(--kbq-select-size-multiple-content-gap, 4px);margin-right:var(--kbq-select-size-multiple-content-gap, 4px)}.kbq-select .kbq-select__match-container{width:100%;text-overflow:ellipsis;overflow:hidden}.kbq-select .kbq-select__match-container .kbq-select__match-hidden-text{flex:0 0 70px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, 4px);text-align:right}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;padding:4px}.kbq-form-field-appearance-fill .kbq-select .kbq-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-25%)}.kbq-disabled.kbq-select .kbq-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-select__panel{min-width:100%;overflow:hidden;border-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-select__panel .kbq-optgroup-label,.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);border:var(--kbq-option-size-border-width, 2px) solid transparent}.kbq-select__panel .kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:4px 0;overflow:hidden auto}.kbq-select__panel .kbq-select__footer{display:flex;align-items:center;box-sizing:border-box;min-height:40px;border-top-width:1px;border-top-style:solid;padding:4px 12px}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport{min-height:calc(var(--kbq-select-panel-size-max-height, 256px));max-height:calc(var(--kbq-select-panel-size-max-height, 256px))}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{max-width:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: i7.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i8.KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: ["color", "selected", "value", "selectable", "removable", "tabindex", "disabled"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["kbqTag"] }, { kind: "directive", type: i8.KbqTagRemove, selector: "[kbqTagRemove]" }], animations: [
|
|
1042
|
+
], queries: [{ propertyName: "footer", first: true, predicate: KbqSelectFooter, descendants: true, read: ElementRef }, { propertyName: "cdkVirtualForOf", first: true, predicate: CdkVirtualForOf, descendants: true }, { propertyName: "customTrigger", first: true, predicate: KbqSelectTrigger, descendants: true }, { propertyName: "customMatcher", first: true, predicate: KbqSelectMatcher, descendants: true }, { propertyName: "customTagTemplateRef", first: true, predicate: ["kbqSelectTagContent"], descendants: true, read: TemplateRef }, { propertyName: "cleaner", first: true, predicate: ["kbqSelectCleaner"], descendants: true, static: true }, { propertyName: "search", first: true, predicate: KbqSelectSearch, descendants: true }, { propertyName: "options", predicate: KbqOption, descendants: true }, { propertyName: "optionGroups", predicate: KbqOptgroup }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }, { propertyName: "optionsContainer", first: true, predicate: ["optionsContainer"], descendants: true }, { propertyName: "overlayDir", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "tags", predicate: KbqTag, descendants: true }], exportAs: ["kbqSelect"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n #origin=\"cdkOverlayOrigin\"\n #trigger\n cdk-overlay-origin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n [ngSwitch]=\"!!customMatcher\"\n>\n <select\n class=\"cdk-visually-hidden\"\n [id]=\"id\"\n ></select>\n\n <div\n *ngSwitchCase=\"false\"\n class=\"kbq-select__matcher\"\n >\n <span\n *ngIf=\"empty\"\n class=\"kbq-select__placeholder\"\n >\n {{ placeholder || '\\u00A0' }}\n </span>\n <span\n *ngIf=\"!empty\"\n [ngSwitch]=\"!!customTrigger\"\n >\n <div\n *ngSwitchDefault\n class=\"kbq-select__match-container\"\n [ngSwitch]=\"multiple\"\n >\n <span\n *ngSwitchCase=\"false\"\n class=\"kbq-select__matcher-text\"\n >\n {{ triggerValue }}\n </span>\n <div\n *ngSwitchCase=\"true\"\n class=\"kbq-select__match-list\"\n >\n <ng-container *ngIf=\"!customTagTemplateRef\">\n <kbq-tag\n *ngFor=\"let option of triggerValues\"\n [class.kbq-error]=\"errorState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n <i\n *ngIf=\"!option.disabled && !disabled\"\n kbq-icon=\"mc-close-S_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n </kbq-tag>\n </ng-container>\n <ng-container *ngIf=\"customTagTemplateRef\">\n <ng-container\n *ngFor=\"let option of triggerValues\"\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n ></ng-container>\n </ng-container>\n </div>\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n <ng-content\n *ngSwitchCase=\"true\"\n select=\"kbq-select-trigger, [kbq-select-trigger]\"\n ></ng-content>\n </span>\n\n <div\n *ngIf=\"canShowCleaner\"\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i\n kbq-icon=\"mc-angle-down-S_16\"\n class=\"kbq-select__arrow\"\n [color]=\"'contrast-fade'\"\n ></i>\n </div>\n </div>\n\n <ng-content\n *ngSwitchCase=\"true\"\n select=\"kbq-select-matcher, [kbq-select-matcher]\"\n ></ng-content>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPanelClass]=\"'kbq-select-overlay'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div\n *ngIf=\"search\"\n class=\"kbq-select__search-container\"\n >\n <ng-content select=\"[kbqSelectSearch]\"></ng-content>\n </div>\n\n <div\n #optionsContainer\n class=\"kbq-select__content kbq-scrollbar\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n [@fadeInContent]=\"'showing'\"\n >\n <div\n *ngIf=\"isEmptySearchResult\"\n class=\"kbq-select__no-options-message\"\n >\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-select .kbq-select__trigger.kbq-select__trigger_single .kbq-select__matcher,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple.kbq-select__trigger_empty .kbq-select__matcher{padding:calc(var(--kbq-select-size-single-padding-vertical, 6px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-vertical, 6px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-left, 12px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-left, 4px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-container{display:flex}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);gap:var(--kbq-select-size-multiple-content-gap, 4px);margin-right:var(--kbq-select-size-multiple-content-gap, 4px)}.kbq-select .kbq-select__match-container{width:100%;text-overflow:ellipsis;overflow:hidden}.kbq-select .kbq-select__match-container .kbq-select__match-hidden-text{flex:0 0 70px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, 4px);text-align:right}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;padding:4px}.kbq-form-field-appearance-fill .kbq-select .kbq-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-25%)}.kbq-disabled.kbq-select .kbq-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-select__panel{min-width:100%;overflow:hidden;border-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-select__panel .kbq-optgroup-label,.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);border:var(--kbq-option-size-border-width, 2px) solid transparent}.kbq-select__panel .kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:4px 0;overflow:hidden auto}.kbq-select__panel .kbq-select__footer{display:flex;align-items:center;box-sizing:border-box;min-height:40px;border-top-width:1px;border-top-style:solid;padding:var(--kbq-size-xxs, 4px) var(--kbq-size-m, 12px)}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport{min-height:var(--kbq-select-panel-size-max-height, 256px);max-height:var(--kbq-select-panel-size-max-height, 256px)}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{max-width:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: i7.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i8.KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: ["color", "selected", "value", "selectable", "removable", "tabindex", "disabled"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["kbqTag"] }, { kind: "directive", type: i8.KbqTagRemove, selector: "[kbqTagRemove]" }], animations: [
|
|
1122
1043
|
kbqSelectAnimations.transformPanel,
|
|
1123
1044
|
kbqSelectAnimations.fadeInContent
|
|
1124
1045
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -1142,23 +1063,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
1142
1063
|
], providers: [
|
|
1143
1064
|
{ provide: KbqFormFieldControl, useExisting: KbqSelect },
|
|
1144
1065
|
{ provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqSelect }
|
|
1145
|
-
], template: "<div cdk-overlay-origin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n [class.kbq-select__trigger_empty]=\"empty\"\n #origin=\"cdkOverlayOrigin\"\n #trigger\n [ngSwitch]=\"!!customMatcher\">\n\n <select class=\"cdk-visually-hidden\" [id]=\"id\"></select>\n\n <div class=\"kbq-select__matcher\" *ngSwitchCase=\"false\">\n <span class=\"kbq-select__placeholder\" *ngIf=\"empty\">{{ placeholder || '\\u00A0' }}</span>\n <span *ngIf=\"!empty\" [ngSwitch]=\"!!customTrigger\">\n <div *ngSwitchDefault [ngSwitch]=\"multiple\" class=\"kbq-select__match-container\">\n <span *ngSwitchCase=\"false\" class=\"kbq-select__matcher-text\">{{ triggerValue }}</span>\n <div *ngSwitchCase=\"true\" class=\"kbq-select__match-list\">\n <ng-container *ngIf=\"!customTagTemplateRef\">\n <kbq-tag *ngFor=\"let option of triggerValues\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n [class.kbq-error]=\"errorState\">\n {{ option.viewValue }}\n <i kbq-icon=\"mc-close-S_16\" kbqTagRemove\n *ngIf=\"!option.disabled && !disabled\"\n (click)=\"onRemoveMatcherItem(option, $event)\">\n </i>\n </kbq-tag>\n </ng-container>\n <ng-container *ngIf=\"customTagTemplateRef\">\n <ng-container *ngFor=\"let option of triggerValues\"\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{$implicit: option, select: this}\">\n </ng-container>\n </ng-container>\n </div>\n <div class=\"kbq-select__match-hidden-text\" [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\">\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" *ngSwitchCase=\"true\"></ng-content>\n </span>\n\n <div class=\"kbq-select__cleaner\" *ngIf=\"canShowCleaner\" (click)=\"clearValue($event)\">\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i class=\"kbq-select__arrow\" kbq-icon=\"mc-angle-down-S_16\" [color]=\"'contrast-fade'\"></i>\n </div>\n </div>\n\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" *ngSwitchCase=\"true\"></ng-content>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayPanelClass]=\"'kbq-select-overlay'\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttached()\"\n (detach)=\"close()\">\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.transformOrigin]=\"transformOrigin\"\n [style.font-size.px]=\"triggerFontSize\"\n (keydown)=\"handleKeydown($event)\">\n\n <div *ngIf=\"search\" class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\"></ng-content>\n </div>\n\n <div #optionsContainer\n class=\"kbq-select__content kbq-scrollbar\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\">\n\n <div *ngIf=\"isEmptySearchResult\" class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-select .kbq-select__trigger.kbq-select__trigger_single .kbq-select__matcher,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple.kbq-select__trigger_empty .kbq-select__matcher{padding:calc(var(--kbq-select-size-single-padding-vertical, 8px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-vertical, 8px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-left, 12px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-left, 4px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-container{display:flex}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);gap:var(--kbq-select-size-multiple-content-gap, 4px);margin-right:var(--kbq-select-size-multiple-content-gap, 4px)}.kbq-select .kbq-select__match-container{width:100%;text-overflow:ellipsis;overflow:hidden}.kbq-select .kbq-select__match-container .kbq-select__match-hidden-text{flex:0 0 70px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, 4px);text-align:right}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;padding:4px}.kbq-form-field-appearance-fill .kbq-select .kbq-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-25%)}.kbq-disabled.kbq-select .kbq-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-select__panel{min-width:100%;overflow:hidden;border-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-select__panel .kbq-optgroup-label,.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);border:var(--kbq-option-size-border-width, 2px) solid transparent}.kbq-select__panel .kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:4px 0;overflow:hidden auto}.kbq-select__panel .kbq-select__footer{display:flex;align-items:center;box-sizing:border-box;min-height:40px;border-top-width:1px;border-top-style:solid;padding:4px 12px}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport{min-height:calc(var(--kbq-select-panel-size-max-height, 256px));max-height:calc(var(--kbq-select-panel-size-max-height, 256px))}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{max-width:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}\n"] }]
|
|
1146
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type:
|
|
1066
|
+
], template: "<div\n #origin=\"cdkOverlayOrigin\"\n #trigger\n cdk-overlay-origin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n [ngSwitch]=\"!!customMatcher\"\n>\n <select\n class=\"cdk-visually-hidden\"\n [id]=\"id\"\n ></select>\n\n <div\n *ngSwitchCase=\"false\"\n class=\"kbq-select__matcher\"\n >\n <span\n *ngIf=\"empty\"\n class=\"kbq-select__placeholder\"\n >\n {{ placeholder || '\\u00A0' }}\n </span>\n <span\n *ngIf=\"!empty\"\n [ngSwitch]=\"!!customTrigger\"\n >\n <div\n *ngSwitchDefault\n class=\"kbq-select__match-container\"\n [ngSwitch]=\"multiple\"\n >\n <span\n *ngSwitchCase=\"false\"\n class=\"kbq-select__matcher-text\"\n >\n {{ triggerValue }}\n </span>\n <div\n *ngSwitchCase=\"true\"\n class=\"kbq-select__match-list\"\n >\n <ng-container *ngIf=\"!customTagTemplateRef\">\n <kbq-tag\n *ngFor=\"let option of triggerValues\"\n [class.kbq-error]=\"errorState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n <i\n *ngIf=\"!option.disabled && !disabled\"\n kbq-icon=\"mc-close-S_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n </kbq-tag>\n </ng-container>\n <ng-container *ngIf=\"customTagTemplateRef\">\n <ng-container\n *ngFor=\"let option of triggerValues\"\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n ></ng-container>\n </ng-container>\n </div>\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n </div>\n <ng-content\n *ngSwitchCase=\"true\"\n select=\"kbq-select-trigger, [kbq-select-trigger]\"\n ></ng-content>\n </span>\n\n <div\n *ngIf=\"canShowCleaner\"\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\"></ng-content>\n </div>\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i\n kbq-icon=\"mc-angle-down-S_16\"\n class=\"kbq-select__arrow\"\n [color]=\"'contrast-fade'\"\n ></i>\n </div>\n </div>\n\n <ng-content\n *ngSwitchCase=\"true\"\n select=\"kbq-select-matcher, [kbq-select-matcher]\"\n ></ng-content>\n</div>\n\n<ng-template\n cdk-connected-overlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"triggerRect?.width!\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPanelClass]=\"'kbq-select-overlay'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div\n *ngIf=\"search\"\n class=\"kbq-select__search-container\"\n >\n <ng-content select=\"[kbqSelectSearch]\"></ng-content>\n </div>\n\n <div\n #optionsContainer\n class=\"kbq-select__content kbq-scrollbar\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n [@fadeInContent]=\"'showing'\"\n >\n <div\n *ngIf=\"isEmptySearchResult\"\n class=\"kbq-select__no-options-message\"\n >\n <ng-content select=\"[kbq-select-search-empty-result]\"></ng-content>\n </div>\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\"></ng-content>\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-form-field-size-border-width, 1px) * 2)}.kbq-select .kbq-select__trigger.kbq-select__trigger_single .kbq-select__matcher,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple.kbq-select__trigger_empty .kbq-select__matcher{padding:calc(var(--kbq-select-size-single-padding-vertical, 6px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-vertical, 6px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-single-padding-left, 12px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-right, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-vertical, 4px) - var(--kbq-form-field-size-border-width, 1px)) calc(var(--kbq-select-size-multiple-padding-left, 4px) - var(--kbq-form-field-size-border-width, 1px))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-container{display:flex}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher .kbq-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);max-height:calc(var(--kbq-form-field-size-height, 32px) - var(--kbq-select-size-multiple-padding-vertical, 4px) * 2);gap:var(--kbq-select-size-multiple-content-gap, 4px);margin-right:var(--kbq-select-size-multiple-content-gap, 4px)}.kbq-select .kbq-select__match-container{width:100%;text-overflow:ellipsis;overflow:hidden}.kbq-select .kbq-select__match-container .kbq-select__match-hidden-text{flex:0 0 70px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, 4px);text-align:right}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;padding:4px}.kbq-form-field-appearance-fill .kbq-select .kbq-select__arrow-wrapper,.kbq-form-field-appearance-standard .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-50%)}.kbq-form-field-appearance-outline .kbq-select .kbq-select__arrow-wrapper{transform:translateY(-25%)}.kbq-disabled.kbq-select .kbq-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.kbq-select__panel{min-width:100%;overflow:hidden;border-radius:var(--kbq-select-panel-size-border-radius, 8px)}.kbq-select__panel .kbq-optgroup-label,.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, 32px);cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, 12px);padding-right:var(--kbq-option-size-horizontal-padding, 12px);border:var(--kbq-option-size-border-width, 2px) solid transparent}.kbq-select__panel .kbq-select__search-container{border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:4px 0;overflow:hidden auto}.kbq-select__panel .kbq-select__footer{display:flex;align-items:center;box-sizing:border-box;min-height:40px;border-top-width:1px;border-top-style:solid;padding:var(--kbq-size-xxs, 4px) var(--kbq-size-m, 12px)}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport{min-height:var(--kbq-select-panel-size-max-height, 256px);max-height:var(--kbq-select-panel-size-max-height, 256px)}.kbq-select__content:not(:has(>.kbq-select__no-options-message)) .cdk-virtual-scroll-viewport.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{max-width:100%}.kbq-form-field-type-select:not(.kbq-disabled) .kbq-form-field-flex{cursor:pointer}\n"] }]
|
|
1067
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.ErrorStateMatcher }, { type: i0.ElementRef }, { type: i2.OverlayContainer }, { type: i3.Directionality, decorators: [{
|
|
1147
1068
|
type: Optional
|
|
1148
|
-
}] }, { type:
|
|
1069
|
+
}] }, { type: i4$1.NgForm, decorators: [{
|
|
1149
1070
|
type: Optional
|
|
1150
|
-
}] }, { type:
|
|
1071
|
+
}] }, { type: i4$1.FormGroupDirective, decorators: [{
|
|
1151
1072
|
type: Optional
|
|
1152
|
-
}] }, { type:
|
|
1073
|
+
}] }, { type: i5.KbqFormField, decorators: [{
|
|
1153
1074
|
type: Optional
|
|
1154
|
-
}] }, { type:
|
|
1075
|
+
}] }, { type: i4$1.NgControl, decorators: [{
|
|
1155
1076
|
type: Self
|
|
1156
1077
|
}, {
|
|
1157
1078
|
type: Optional
|
|
1158
1079
|
}] }, { type: undefined, decorators: [{
|
|
1159
1080
|
type: Inject,
|
|
1160
1081
|
args: [KBQ_SELECT_SCROLL_STRATEGY]
|
|
1161
|
-
}] }, { type:
|
|
1082
|
+
}] }, { type: i1.KbqLocaleService, decorators: [{
|
|
1162
1083
|
type: Optional
|
|
1163
1084
|
}, {
|
|
1164
1085
|
type: Inject,
|
|
@@ -1175,6 +1096,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
1175
1096
|
}], overlayDir: [{
|
|
1176
1097
|
type: ViewChild,
|
|
1177
1098
|
args: [CdkConnectedOverlay, { static: false }]
|
|
1099
|
+
}], footer: [{
|
|
1100
|
+
type: ContentChild,
|
|
1101
|
+
args: [KbqSelectFooter, { static: false, read: ElementRef }]
|
|
1178
1102
|
}], cdkVirtualForOf: [{
|
|
1179
1103
|
type: ContentChild,
|
|
1180
1104
|
args: [CdkVirtualForOf, { static: false }]
|
|
@@ -1245,26 +1169,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
1245
1169
|
class KbqSelectModule {
|
|
1246
1170
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1247
1171
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectModule, declarations: [KbqSelect,
|
|
1248
|
-
|
|
1249
|
-
KbqSelectSearchEmptyResult,
|
|
1250
|
-
KbqSelectTrigger,
|
|
1251
|
-
KbqSelectMatcher,
|
|
1252
|
-
KbqOptionTooltip,
|
|
1253
|
-
KbqSelectFooter], imports: [CommonModule,
|
|
1172
|
+
KbqOptionTooltip], imports: [CommonModule,
|
|
1254
1173
|
OverlayModule,
|
|
1255
1174
|
KbqOptionModule,
|
|
1256
1175
|
KbqIconModule,
|
|
1257
1176
|
KbqTagsModule,
|
|
1258
|
-
KbqToolTipModule
|
|
1259
|
-
KbqSelect,
|
|
1177
|
+
KbqToolTipModule,
|
|
1260
1178
|
KbqSelectSearch,
|
|
1261
|
-
KbqSelectSearchEmptyResult,
|
|
1262
|
-
KbqSelectTrigger,
|
|
1263
|
-
KbqSelectMatcher,
|
|
1264
1179
|
KbqSelectFooter,
|
|
1180
|
+
KbqSelectMatcher,
|
|
1181
|
+
KbqSelectTrigger,
|
|
1182
|
+
KbqSelectSearchEmptyResult], exports: [KbqFormFieldModule,
|
|
1183
|
+
KbqSelect,
|
|
1265
1184
|
KbqOptionTooltip,
|
|
1266
1185
|
KbqOptionModule,
|
|
1267
|
-
CommonModule
|
|
1186
|
+
CommonModule,
|
|
1187
|
+
KbqSelectSearch,
|
|
1188
|
+
KbqSelectFooter,
|
|
1189
|
+
KbqSelectMatcher,
|
|
1190
|
+
KbqSelectTrigger,
|
|
1191
|
+
KbqSelectSearchEmptyResult] }); }
|
|
1268
1192
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSelectModule, providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER], imports: [CommonModule,
|
|
1269
1193
|
OverlayModule,
|
|
1270
1194
|
KbqOptionModule,
|
|
@@ -1283,28 +1207,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
1283
1207
|
KbqOptionModule,
|
|
1284
1208
|
KbqIconModule,
|
|
1285
1209
|
KbqTagsModule,
|
|
1286
|
-
KbqToolTipModule
|
|
1210
|
+
KbqToolTipModule,
|
|
1211
|
+
KbqSelectSearch,
|
|
1212
|
+
KbqSelectFooter,
|
|
1213
|
+
KbqSelectMatcher,
|
|
1214
|
+
KbqSelectTrigger,
|
|
1215
|
+
KbqSelectSearchEmptyResult
|
|
1287
1216
|
],
|
|
1288
1217
|
exports: [
|
|
1289
1218
|
KbqFormFieldModule,
|
|
1290
1219
|
KbqSelect,
|
|
1291
|
-
KbqSelectSearch,
|
|
1292
|
-
KbqSelectSearchEmptyResult,
|
|
1293
|
-
KbqSelectTrigger,
|
|
1294
|
-
KbqSelectMatcher,
|
|
1295
|
-
KbqSelectFooter,
|
|
1296
1220
|
KbqOptionTooltip,
|
|
1297
1221
|
KbqOptionModule,
|
|
1298
|
-
CommonModule
|
|
1222
|
+
CommonModule,
|
|
1223
|
+
KbqSelectSearch,
|
|
1224
|
+
KbqSelectFooter,
|
|
1225
|
+
KbqSelectMatcher,
|
|
1226
|
+
KbqSelectTrigger,
|
|
1227
|
+
KbqSelectSearchEmptyResult
|
|
1299
1228
|
],
|
|
1300
1229
|
declarations: [
|
|
1301
1230
|
KbqSelect,
|
|
1302
|
-
|
|
1303
|
-
KbqSelectSearchEmptyResult,
|
|
1304
|
-
KbqSelectTrigger,
|
|
1305
|
-
KbqSelectMatcher,
|
|
1306
|
-
KbqOptionTooltip,
|
|
1307
|
-
KbqSelectFooter
|
|
1231
|
+
KbqOptionTooltip
|
|
1308
1232
|
],
|
|
1309
1233
|
providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER]
|
|
1310
1234
|
}]
|
|
@@ -1314,5 +1238,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
1314
1238
|
* Generated bundle index. Do not edit.
|
|
1315
1239
|
*/
|
|
1316
1240
|
|
|
1317
|
-
export { KbqOptionTooltip, KbqSelect, KbqSelectBase, KbqSelectChange,
|
|
1241
|
+
export { KbqOptionTooltip, KbqSelect, KbqSelectBase, KbqSelectChange, KbqSelectModule };
|
|
1318
1242
|
//# sourceMappingURL=koobiq-components-select.mjs.map
|