@koobiq/components 19.5.0 → 19.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion-content.directive.d.ts +4 -0
- package/accordion/accordion-trigger.directive.d.ts +4 -0
- package/actions-panel/actions-panel-container.scss +6 -0
- package/actions-panel/actions-panel-tokens.scss +4 -1
- package/autocomplete/autocomplete.component.d.ts +6 -1
- package/autocomplete/autocomplete.module.d.ts +1 -1
- package/autocomplete/autocomplete.scss +14 -3
- package/badge/badge-tokens.scss +3 -3
- package/button/button-group.d.ts +45 -0
- package/button/button-group.scss +17 -0
- package/button/button.component.d.ts +3 -0
- package/button/button.module.d.ts +2 -1
- package/button/public-api.d.ts +1 -0
- package/button-toggle/button-toggle-tokens.scss +1 -1
- package/checkbox/checkbox.d.ts +5 -4
- package/code-block/code-block-tokens.scss +35 -16
- package/code-block/code-block.d.ts +8 -3
- package/core/error/error-state-matcher.d.ts +10 -0
- package/core/forms/_forms.scss +10 -3
- package/core/option/_option-action-theme.scss +1 -0
- package/core/option/action-container.scss +4 -6
- package/core/option/option.scss +5 -0
- package/core/pop-up/pop-up-trigger.d.ts +1 -1
- package/core/select/common.d.ts +4 -4
- package/core/styles/common/_groups-mixins.scss +79 -0
- package/core/styles/common/_groups.scss +4 -34
- package/core/styles/common/_overlay.scss +4 -0
- package/core/styles/common/_select.scss +4 -0
- package/core/styles/theming/scrollbar-tokens.scss +6 -6
- package/core/styles/visual/_layout.scss +0 -2
- package/core/utils/utils.d.ts +2 -0
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/dropdown/dropdown-trigger.directive.d.ts +5 -0
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -1
- package/fesm2022/koobiq-components-accordion.mjs +52 -30
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +12 -12
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +25 -25
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +39 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +14 -14
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-button-toggle.mjs +12 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +146 -24
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +17 -19
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs +33 -20
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +28 -28
- package/fesm2022/koobiq-components-core.mjs +260 -238
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +40 -64
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +13 -13
- package/fesm2022/koobiq-components-dropdown.mjs +38 -21
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +8 -9
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +39 -39
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +109 -97
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +67 -60
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +31 -27
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +108 -68
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +22 -22
- package/fesm2022/koobiq-components-link.mjs +17 -17
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +19 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs +28 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +54 -22
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +34 -28
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +34 -34
- package/fesm2022/koobiq-components-navbar.mjs +45 -45
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +16 -16
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -16
- package/fesm2022/koobiq-components-popover.mjs +52 -23
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +14 -14
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +10 -10
- package/fesm2022/koobiq-components-risk-level.mjs +7 -7
- package/fesm2022/koobiq-components-scrollbar.mjs +12 -12
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +17 -8
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +340 -57
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +27 -27
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +51 -18
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +9 -9
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +16 -16
- package/fesm2022/koobiq-components-table.mjs +10 -10
- package/fesm2022/koobiq-components-tabs.mjs +52 -52
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +30 -30
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -7
- package/fesm2022/koobiq-components-time-range.mjs +24 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +10 -10
- package/fesm2022/koobiq-components-timezone.mjs +26 -26
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +8 -9
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +16 -16
- package/fesm2022/koobiq-components-toggle.mjs +12 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +84 -51
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +15 -15
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +12 -10
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +40 -41
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +28 -28
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/filter-bar/filter-search.d.ts +10 -1
- package/filter-bar/pipes/pipe-date.scss +2 -1
- package/form-field/form-field.d.ts +19 -1
- package/form-field/form-field.scss +22 -2
- package/icon/icon-button.component.d.ts +3 -0
- package/inline-edit/inline-edit-tokens.scss +3 -3
- package/inline-edit/inline-edit.d.ts +30 -11
- package/inline-edit/inline-edit.scss +28 -30
- package/link/_link-theme.scss +3 -1
- package/link/link-tokens.scss +7 -6
- package/link/link.component.d.ts +5 -4
- package/loader-overlay/_loader-overlay-theme.scss +12 -0
- package/loader-overlay/loader-overlay-tokens.scss +1 -0
- package/loader-overlay/loader-overlay.component.d.ts +7 -1
- package/markdown/_markdown-theme.scss +3 -31
- package/markdown/markdown-tokens.scss +0 -11
- package/markdown/markdown.component.d.ts +11 -6
- package/markdown/markdown.scss +0 -11
- package/navbar/navbar.scss +3 -0
- package/package.json +4 -5
- package/popover/popover.component.d.ts +15 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-spinner/progress-spinner.scss +1 -0
- package/schematics/ng-add/index.js +4 -5
- package/scrollbar/scrollbar-tokens.scss +7 -7
- package/search-expandable/search-expandable.d.ts +6 -2
- package/select/public-api.d.ts +1 -0
- package/select/select-common.d.ts +30 -0
- package/select/select.component.d.ts +192 -29
- package/select/select.module.d.ts +3 -2
- package/sidepanel/sidepanel-config.d.ts +6 -1
- package/skeleton/skeleton.d.ts +8 -4
- package/skeleton/skeleton.scss +19 -5
- package/split-button/_split-button-theme.scss +2 -1
- package/tags/tag-tokens.scss +4 -4
- package/title/title.directive.d.ts +0 -1
- package/toggle/toggle.component.d.ts +4 -3
- package/tooltip/tooltip-tokens.scss +4 -4
- package/tooltip/tooltip.component.d.ts +20 -2
- package/top-bar/top-bar.scss +3 -0
- package/tree/tree-option.scss +7 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input, booleanAttribute, Directive, inject, InjectionToken, DestroyRef, EventEmitter, output, afterNextRender, isDevMode, ElementRef, TemplateRef, numberAttribute, Input, Output, ContentChild, ContentChildren, ViewChildren, ViewChild, Optional, Host, Self, Inject, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@koobiq/components/progress-spinner';
|
|
4
|
+
import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
|
|
1
5
|
import { ContentObserver } from '@angular/cdk/observers';
|
|
2
6
|
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import * as i1 from '@koobiq/components/core';
|
|
6
|
-
import { KbqAbstractSelect, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, KbqVirtualOption, KbqComponentColors, KBQ_VALIDATION, KBQ_WINDOW, defaultOffsetY, isUndefined, getKbqSelectNonArrayValueError, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, kbqSelectAnimations, KbqSelectFooter, KbqSelectTrigger, KbqSelectMatcher, KbqSelectSearch, KbqOption, KbqOptgroup, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_POPUP, KbqOptionModule, KbqSelectSearchEmptyResult, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER } from '@koobiq/components/core';
|
|
7
|
+
import * as i1$1 from '@koobiq/components/core';
|
|
8
|
+
import { KbqAbstractSelect, getKbqSelectDynamicMultipleError, getKbqSelectNonFunctionValueError, KbqVirtualOption, KbqComponentColors, KBQ_VALIDATION, KBQ_WINDOW, defaultOffsetY, isUndefined, getKbqSelectNonArrayValueError, KBQ_SELECT_SCROLL_STRATEGY, KBQ_LOCALE_SERVICE, kbqSelectAnimations, KbqSelectFooter, KbqSelectTrigger, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqOption, KbqOptgroup, KBQ_OPTION_PARENT_COMPONENT, KBQ_PARENT_POPUP, KbqOptionModule, KBQ_SELECT_SCROLL_STRATEGY_PROVIDER } from '@koobiq/components/core';
|
|
7
9
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
8
10
|
import { CdkMonitorFocus, A11yModule } from '@angular/cdk/a11y';
|
|
9
11
|
import * as i3 from '@angular/cdk/bidi';
|
|
@@ -27,6 +29,97 @@ import { SizeXxs } from '@koobiq/design-tokens';
|
|
|
27
29
|
import { Subject, defer, merge, Subscription, BehaviorSubject, fromEvent } from 'rxjs';
|
|
28
30
|
import { switchMap, take, filter, map, delay, debounceTime, distinctUntilChanged, startWith, takeUntil } from 'rxjs/operators';
|
|
29
31
|
|
|
32
|
+
class KbqSelectLoading {
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectLoading, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: KbqSelectLoading, isStandalone: true, selector: "kbq-select-loading, [kbq-select-loading]", host: { classAttribute: "kbq-select-loading" }, exportAs: ["kbqSelectLoading"], ngImport: i0, template: `
|
|
35
|
+
<ng-content select="kbq-progress-spinner">
|
|
36
|
+
<div class="layout-row layout-margin-top-4xl layout-margin-bottom-4xl layout-align-center-center">
|
|
37
|
+
<kbq-progress-spinner [mode]="'indeterminate'" />
|
|
38
|
+
</div>
|
|
39
|
+
</ng-content>
|
|
40
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: KbqProgressSpinnerModule }, { kind: "component", type: i1.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["id", "value", "mode", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectLoading, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: 'kbq-select-loading, [kbq-select-loading]',
|
|
46
|
+
imports: [
|
|
47
|
+
KbqProgressSpinnerModule
|
|
48
|
+
],
|
|
49
|
+
template: `
|
|
50
|
+
<ng-content select="kbq-progress-spinner">
|
|
51
|
+
<div class="layout-row layout-margin-top-4xl layout-margin-bottom-4xl layout-align-center-center">
|
|
52
|
+
<kbq-progress-spinner [mode]="'indeterminate'" />
|
|
53
|
+
</div>
|
|
54
|
+
</ng-content>
|
|
55
|
+
`,
|
|
56
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
57
|
+
exportAs: 'kbqSelectLoading',
|
|
58
|
+
host: {
|
|
59
|
+
class: 'kbq-select-loading'
|
|
60
|
+
}
|
|
61
|
+
}]
|
|
62
|
+
}] });
|
|
63
|
+
/**
|
|
64
|
+
* This component renders the error for a Select component.
|
|
65
|
+
* The error message can be displayed in two visual variants: a default centered layout (when [paging] is falsy)
|
|
66
|
+
* or a variant with left‑aligned text suitable for pagination controls (when [paging] is truthy).
|
|
67
|
+
*/
|
|
68
|
+
class KbqSelectError {
|
|
69
|
+
constructor() {
|
|
70
|
+
/** Indicates whether styles for pagination controls should be used. */
|
|
71
|
+
this.paging = input(false, { transform: booleanAttribute });
|
|
72
|
+
}
|
|
73
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectError, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
74
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.20", type: KbqSelectError, isStandalone: true, selector: "kbq-select-error, [kbq-select-error]", inputs: { paging: { classPropertyName: "paging", publicName: "paging", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-select-error_default": "!paging()", "class.kbq-select-error_paging": "paging()" }, classAttribute: "kbq-select-error" }, exportAs: ["kbqSelectError"], ngImport: i0, template: `
|
|
75
|
+
<ng-content />
|
|
76
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column}:host.kbq-select-error_default{align-items:center;justify-content:center;margin-bottom:var(--kbq-size-3xl);margin-top:var(--kbq-size-3xl)}:host.kbq-select-error_paging{justify-content:start}:host.kbq-select-error_paging ::ng-deep .kbq-select-error__text{padding-left:var(--kbq-size-l)}::ng-deep .kbq-select-error__text{margin-top:var(--kbq-size-xs);margin-bottom:var(--kbq-size-3xs);color:var(--kbq-foreground-error)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
77
|
+
}
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectError, decorators: [{
|
|
79
|
+
type: Component,
|
|
80
|
+
args: [{ selector: 'kbq-select-error, [kbq-select-error]', template: `
|
|
81
|
+
<ng-content />
|
|
82
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kbqSelectError', host: {
|
|
83
|
+
class: 'kbq-select-error',
|
|
84
|
+
'[class.kbq-select-error_default]': '!paging()',
|
|
85
|
+
'[class.kbq-select-error_paging]': 'paging()'
|
|
86
|
+
}, styles: [":host{display:flex;flex-direction:column}:host.kbq-select-error_default{align-items:center;justify-content:center;margin-bottom:var(--kbq-size-3xl);margin-top:var(--kbq-size-3xl)}:host.kbq-select-error_paging{justify-content:start}:host.kbq-select-error_paging ::ng-deep .kbq-select-error__text{padding-left:var(--kbq-size-l)}::ng-deep .kbq-select-error__text{margin-top:var(--kbq-size-xs);margin-bottom:var(--kbq-size-3xs);color:var(--kbq-foreground-error)}\n"] }]
|
|
87
|
+
}] });
|
|
88
|
+
/**
|
|
89
|
+
* Marks an element as the error text container for a *KbqSelect* component.
|
|
90
|
+
*/
|
|
91
|
+
class KbqSelectErrorText {
|
|
92
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectErrorText, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
93
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqSelectErrorText, isStandalone: true, selector: "[kbq-select-error-text]", host: { classAttribute: "kbq-select-error__text" }, exportAs: ["kbqSelectErrorText"], ngImport: i0 }); }
|
|
94
|
+
}
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectErrorText, decorators: [{
|
|
96
|
+
type: Directive,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: '[kbq-select-error-text]',
|
|
99
|
+
exportAs: 'kbqSelectErrorText',
|
|
100
|
+
host: {
|
|
101
|
+
class: 'kbq-select-error__text'
|
|
102
|
+
}
|
|
103
|
+
}]
|
|
104
|
+
}] });
|
|
105
|
+
/**
|
|
106
|
+
* Component that represents the empty state of a select dropdown.
|
|
107
|
+
*/
|
|
108
|
+
class KbqSelectNoOptions {
|
|
109
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectNoOptions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: KbqSelectNoOptions, isStandalone: true, selector: "kbq-select-no-options, [kbq-select-no-options]", host: { classAttribute: "kbq-select-no-options" }, exportAs: ["kbqSelectNoOptions"], ngImport: i0, template: `
|
|
111
|
+
<ng-content />
|
|
112
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-bottom:var(--kbq-size-3xl);padding-top:var(--kbq-size-3xl);color:var(--kbq-foreground-contrast-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
113
|
+
}
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectNoOptions, decorators: [{
|
|
115
|
+
type: Component,
|
|
116
|
+
args: [{ selector: 'kbq-select-no-options, [kbq-select-no-options]', template: `
|
|
117
|
+
<ng-content />
|
|
118
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kbqSelectNoOptions', host: {
|
|
119
|
+
class: 'kbq-select-no-options'
|
|
120
|
+
}, styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-bottom:var(--kbq-size-3xl);padding-top:var(--kbq-size-3xl);color:var(--kbq-foreground-contrast-secondary)}\n"] }]
|
|
121
|
+
}] });
|
|
122
|
+
|
|
30
123
|
class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
31
124
|
get textElement() {
|
|
32
125
|
return this.option.textElement.nativeElement;
|
|
@@ -73,10 +166,10 @@ class KbqOptionTooltip extends KbqTooltipTrigger {
|
|
|
73
166
|
this.disabled = true;
|
|
74
167
|
this.hide();
|
|
75
168
|
}
|
|
76
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
77
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
169
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqOptionTooltip, deps: [{ token: i1$1.KbqOption }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
170
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: KbqOptionTooltip, isStandalone: true, selector: "kbq-option", host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focus": "onFocus()", "blur": "onBlur()" } }, usesInheritance: true, ngImport: i0 }); }
|
|
78
171
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqOptionTooltip, decorators: [{
|
|
80
173
|
type: Directive,
|
|
81
174
|
args: [{
|
|
82
175
|
selector: 'kbq-option',
|
|
@@ -87,7 +180,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
87
180
|
'(blur)': 'onBlur()'
|
|
88
181
|
}
|
|
89
182
|
}]
|
|
90
|
-
}], ctorParameters: () => [{ type: i1.KbqOption }] });
|
|
183
|
+
}], ctorParameters: () => [{ type: i1$1.KbqOption }] });
|
|
91
184
|
|
|
92
185
|
let nextUniqueId = 0;
|
|
93
186
|
/** Change event object that is emitted when the select value has changed. */
|
|
@@ -106,11 +199,15 @@ const kbqSelectOptionsProvider = (options) => {
|
|
|
106
199
|
useValue: options
|
|
107
200
|
};
|
|
108
201
|
};
|
|
202
|
+
/** Delay in milliseconds before displaying a result when there are no options. */
|
|
203
|
+
const delayBeforeDisplayingResultWithoutOptions = 101;
|
|
204
|
+
/** Minimum time in milliseconds to display the loading state. */
|
|
205
|
+
const minimumTimeToDisplayLoading = 300;
|
|
109
206
|
class KbqSelect extends KbqAbstractSelect {
|
|
110
207
|
/**
|
|
111
208
|
* Controls when the search functionality is displayed based on the number of available options.
|
|
112
209
|
*
|
|
113
|
-
* Automatically enables search hiding if value provided, even if `defaultOptions.
|
|
210
|
+
* Automatically enables search hiding if value provided, even if `defaultOptions.searchMinOptionsThreshold` is provided.
|
|
114
211
|
* @default undefined
|
|
115
212
|
*/
|
|
116
213
|
set searchMinOptionsThreshold(value) {
|
|
@@ -121,12 +218,20 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
121
218
|
get searchMinOptionsThreshold() {
|
|
122
219
|
return this._searchMinOptionsThreshold;
|
|
123
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Whether the overlay should have a backdrop.
|
|
223
|
+
* When true, clicking the backdrop will close the select.
|
|
224
|
+
*/
|
|
124
225
|
get hasBackdrop() {
|
|
125
226
|
return this._hasBackdrop;
|
|
126
227
|
}
|
|
127
228
|
set hasBackdrop(value) {
|
|
128
229
|
this._hasBackdrop = coerceBooleanProperty(value);
|
|
129
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Placeholder text to be shown when no value is selected.
|
|
233
|
+
* Displayed in the trigger when the select is closed and no value is selected.
|
|
234
|
+
*/
|
|
130
235
|
get placeholder() {
|
|
131
236
|
return this._placeholder;
|
|
132
237
|
}
|
|
@@ -134,6 +239,9 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
134
239
|
this._placeholder = value;
|
|
135
240
|
this.stateChanges.next();
|
|
136
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Whether the select is required. Affects validation and display of placeholder.
|
|
244
|
+
*/
|
|
137
245
|
get required() {
|
|
138
246
|
return this._required;
|
|
139
247
|
}
|
|
@@ -141,6 +249,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
141
249
|
this._required = coerceBooleanProperty(value);
|
|
142
250
|
this.stateChanges.next();
|
|
143
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Whether multiple options can be selected.
|
|
254
|
+
* Note: This cannot be changed dynamically after initialization.
|
|
255
|
+
*/
|
|
144
256
|
get multiple() {
|
|
145
257
|
return this._multiple;
|
|
146
258
|
}
|
|
@@ -151,9 +263,11 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
151
263
|
this._multiple = value;
|
|
152
264
|
}
|
|
153
265
|
/**
|
|
154
|
-
* Function to compare the option values with the selected values.
|
|
155
|
-
*
|
|
156
|
-
*
|
|
266
|
+
* Function to compare the option values with the selected values.
|
|
267
|
+
* The first argument is a value from an option.
|
|
268
|
+
* The second is a value from the selection.
|
|
269
|
+
* Should return true if the values match.
|
|
270
|
+
* Defaults to strict equality comparison.
|
|
157
271
|
*/
|
|
158
272
|
get compareWith() {
|
|
159
273
|
return this._compareWith;
|
|
@@ -169,7 +283,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
169
283
|
}
|
|
170
284
|
}
|
|
171
285
|
/**
|
|
172
|
-
* Function for handling the
|
|
286
|
+
* Function for handling the Ctrl + A (select all) keyboard combination.
|
|
287
|
+
* By default, the internal handler selects all options.
|
|
288
|
+
* @param event The keyboard event that triggered the handler.
|
|
289
|
+
* @param select Reference to this select component.
|
|
173
290
|
*/
|
|
174
291
|
get selectAllHandler() {
|
|
175
292
|
return this._selectAllHandler;
|
|
@@ -180,7 +297,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
180
297
|
}
|
|
181
298
|
this._selectAllHandler = fn;
|
|
182
299
|
}
|
|
183
|
-
/** Value of the select control. */
|
|
300
|
+
/** Value of the select control. Can be a single value or array of values for multiple selection. */
|
|
184
301
|
get value() {
|
|
185
302
|
return this._value;
|
|
186
303
|
}
|
|
@@ -190,6 +307,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
190
307
|
this._value = newValue;
|
|
191
308
|
}
|
|
192
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Unique identifier for the select component.
|
|
312
|
+
* Auto-generates an ID if not provided.
|
|
313
|
+
*/
|
|
193
314
|
get id() {
|
|
194
315
|
return this._id;
|
|
195
316
|
}
|
|
@@ -197,12 +318,20 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
197
318
|
this._id = value || this.uid;
|
|
198
319
|
this.stateChanges.next();
|
|
199
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Sets the tabIndex of the select element.
|
|
323
|
+
* Automatically set to -1 when disabled.
|
|
324
|
+
*/
|
|
200
325
|
get tabIndex() {
|
|
201
326
|
return this.disabled ? -1 : this._tabIndex;
|
|
202
327
|
}
|
|
203
328
|
set tabIndex(value) {
|
|
204
329
|
this._tabIndex = value;
|
|
205
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Whether the select is disabled.
|
|
333
|
+
* When disabled, the select cannot be opened and its value cannot be changed.
|
|
334
|
+
*/
|
|
206
335
|
get disabled() {
|
|
207
336
|
return this._disabled;
|
|
208
337
|
}
|
|
@@ -225,15 +354,19 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
225
354
|
set focused(value) {
|
|
226
355
|
this._focused = value;
|
|
227
356
|
}
|
|
357
|
+
/** Whether the search returned no results. */
|
|
228
358
|
get isEmptySearchResult() {
|
|
229
359
|
return this.search && this.options.filter((option) => option.selectable).length === 0 && !!this.search.value();
|
|
230
360
|
}
|
|
361
|
+
/** Whether the cleaner (clear button) should be shown. */
|
|
231
362
|
get canShowCleaner() {
|
|
232
363
|
return !this.disabled && this.cleaner && this.selectionModel.hasValue();
|
|
233
364
|
}
|
|
365
|
+
/** Returns the currently selected option(s). Single value or array for multiple selection. */
|
|
234
366
|
get selected() {
|
|
235
367
|
return this.multiSelection ? this.selectionModel.selected : this.selectionModel.selected[0];
|
|
236
368
|
}
|
|
369
|
+
/** Returns the display value for the trigger element. */
|
|
237
370
|
get triggerValue() {
|
|
238
371
|
if (this.empty)
|
|
239
372
|
return '';
|
|
@@ -242,6 +375,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
242
375
|
}
|
|
243
376
|
return this.selectionModel.selected[0].viewValue;
|
|
244
377
|
}
|
|
378
|
+
/** Returns all selected options in display order. */
|
|
245
379
|
get triggerValues() {
|
|
246
380
|
if (this.empty) {
|
|
247
381
|
return [];
|
|
@@ -252,12 +386,19 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
252
386
|
}
|
|
253
387
|
return selectedOptions;
|
|
254
388
|
}
|
|
389
|
+
/** Whether no option is currently selected. */
|
|
255
390
|
get empty() {
|
|
256
391
|
return !!this.selectionModel?.isEmpty();
|
|
257
392
|
}
|
|
393
|
+
/** Whether there are no options available. */
|
|
394
|
+
get noOptions() {
|
|
395
|
+
return this.options?.length === 0;
|
|
396
|
+
}
|
|
397
|
+
/** Returns the first selected option that is not disabled. */
|
|
258
398
|
get firstSelected() {
|
|
259
399
|
return this.selectionModel.selected.filter((option) => !option.disabled)[0] || null;
|
|
260
400
|
}
|
|
401
|
+
/** Whether the first selected option is filtered (not visible in the list). */
|
|
261
402
|
get firstFiltered() {
|
|
262
403
|
return !this.options.find((option) => option === this.firstSelected);
|
|
263
404
|
}
|
|
@@ -270,7 +411,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
270
411
|
? KbqComponentColors.Error
|
|
271
412
|
: KbqComponentColors.ContrastFade;
|
|
272
413
|
}
|
|
273
|
-
/** Whether multiple choice is enabled
|
|
414
|
+
/** Whether multiple choice is enabled. True if multiple or multiline mode is active. */
|
|
274
415
|
get multiSelection() {
|
|
275
416
|
return this.multiple || this.multiline;
|
|
276
417
|
}
|
|
@@ -306,10 +447,11 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
306
447
|
/** A name for this control that can be used by `kbq-form-field`. */
|
|
307
448
|
this.controlType = 'select';
|
|
308
449
|
this.hiddenItems = 0;
|
|
309
|
-
/** The cached font-size of the trigger element. */
|
|
450
|
+
/** The cached font-size of the trigger element in pixels. */
|
|
310
451
|
this.triggerFontSize = 0;
|
|
452
|
+
/** Previously selected options before the current selection was made. */
|
|
311
453
|
this.previousSelectionModelSelected = [];
|
|
312
|
-
/** The value of the select panel's transform-origin property. */
|
|
454
|
+
/** The value of the select panel's transform-origin property for animations. */
|
|
313
455
|
this.transformOrigin = 'top';
|
|
314
456
|
/** Emits when the panel element is finished transforming in. */
|
|
315
457
|
this.panelDoneAnimatingStream = new Subject();
|
|
@@ -317,7 +459,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
317
459
|
this.scrollStrategy = this.scrollStrategyFactory();
|
|
318
460
|
/**
|
|
319
461
|
* The y-offset of the overlay panel in relation to the trigger's top start corner.
|
|
320
|
-
* This must be adjusted to align the selected option text over the trigger text
|
|
462
|
+
* This must be adjusted to align the selected option text over the trigger text
|
|
321
463
|
* when the panel opens. Will change based on the y-position of the selected option.
|
|
322
464
|
*/
|
|
323
465
|
this.offsetY = defaultOffsetY;
|
|
@@ -343,10 +485,13 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
343
485
|
offsetY: -this.offsetY
|
|
344
486
|
}
|
|
345
487
|
];
|
|
488
|
+
/** Template string for hidden items text. Supports {{ number }} placeholder. */
|
|
346
489
|
this.hiddenItemsText = '+{{ number }}';
|
|
490
|
+
/** Classes to be passed to the overlay backdrop. */
|
|
347
491
|
this.backdropClass = 'cdk-overlay-transparent-backdrop';
|
|
348
492
|
/**
|
|
349
|
-
* Whether to use a multiline matcher or not. Default is false
|
|
493
|
+
* Whether to use a multiline matcher or not. Default is false.
|
|
494
|
+
* When true, allows multiple lines of text in the selected value display.
|
|
350
495
|
*/
|
|
351
496
|
this.multiline = false;
|
|
352
497
|
this._searchMinOptionsThreshold = this.resolveSearchMinOptionsThreshold(this.defaultOptions?.searchMinOptionsThreshold);
|
|
@@ -357,8 +502,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
357
502
|
}
|
|
358
503
|
return this._ngZone.onStable.asObservable().pipe(take(1), switchMap(() => this.optionSelectionChanges));
|
|
359
504
|
});
|
|
360
|
-
/** Event emitted when the select panel has been toggled. */
|
|
505
|
+
/** Event emitted when the select panel has been toggled. Emits true when opened, false when closed. */
|
|
361
506
|
this.openedChange = new EventEmitter();
|
|
507
|
+
/** Event emitted before the select panel starts opening. */
|
|
508
|
+
this.beforeOpened = output();
|
|
362
509
|
/** Event emitted when the select has been opened. */
|
|
363
510
|
this.openedStream = this.openedChange.pipe(filter((o) => o), map(() => { }));
|
|
364
511
|
/** Event emitted when the select has been closed. */
|
|
@@ -380,24 +527,33 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
380
527
|
*/
|
|
381
528
|
this.panelWidth = this.defaultOptions?.panelWidth || null;
|
|
382
529
|
/**
|
|
383
|
-
* Minimum width of the panel.
|
|
530
|
+
* Minimum width of the panel in pixels.
|
|
384
531
|
* If minWidth is larger than window width, it will be ignored.
|
|
385
532
|
*/
|
|
386
533
|
this.panelMinWidth = this.defaultOptions?.panelMinWidth ?? 200;
|
|
387
534
|
this._tabIndex = 0;
|
|
388
535
|
this._disabled = false;
|
|
536
|
+
/** Whether the select panel is currently open. */
|
|
389
537
|
this.panelOpen = false;
|
|
390
538
|
this._focused = false;
|
|
539
|
+
/** Subscription to the close event of the overlay. */
|
|
391
540
|
this.closeSubscription = Subscription.EMPTY;
|
|
392
541
|
/** The scroll position of the overlay panel, calculated to center the selected option. */
|
|
393
542
|
this.scrollTop = 0;
|
|
394
|
-
/** Unique id for this input. */
|
|
543
|
+
/** Unique id for this input. Auto-incremented for each instance. */
|
|
395
544
|
this.uid = `kbq-select-${nextUniqueId++}`;
|
|
545
|
+
/** Subject that emits when the component visibility changes. */
|
|
396
546
|
this.visibleChanges = new BehaviorSubject(false);
|
|
547
|
+
/** Flag indicating if the dropdown class has been added to the overlay container. */
|
|
548
|
+
this.classAddedToOverlayContainer = false;
|
|
397
549
|
/** `View -> model callback called when value changes` */
|
|
398
550
|
this.onChange = () => { };
|
|
399
551
|
/** `View -> model callback called when select has been touched` */
|
|
400
552
|
this.onTouched = () => { };
|
|
553
|
+
/**
|
|
554
|
+
* Calculates the number of hidden items in multiple selection mode.
|
|
555
|
+
* Updates the hiddenItems property and triggers change detection.
|
|
556
|
+
*/
|
|
401
557
|
this.calculateHiddenItems = () => {
|
|
402
558
|
if (!this.isBrowser ||
|
|
403
559
|
this.customTrigger ||
|
|
@@ -429,6 +585,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
429
585
|
}
|
|
430
586
|
this._changeDetectorRef.markForCheck();
|
|
431
587
|
};
|
|
588
|
+
/** Updates locale parameters from the locale service. */
|
|
432
589
|
this.updateLocaleParams = () => {
|
|
433
590
|
this.hiddenItemsText = this.localeService?.getParams('select').hiddenItemsText;
|
|
434
591
|
this._changeDetectorRef.markForCheck();
|
|
@@ -451,6 +608,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
451
608
|
}
|
|
452
609
|
});
|
|
453
610
|
}
|
|
611
|
+
/** Lifecycle hook called after component initialization. Initializes selection model and subscriptions. */
|
|
454
612
|
ngOnInit() {
|
|
455
613
|
this.selectionModel = new SelectionModel(this.multiSelection);
|
|
456
614
|
this.stateChanges.next();
|
|
@@ -481,12 +639,14 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
481
639
|
}
|
|
482
640
|
}, 0));
|
|
483
641
|
}
|
|
642
|
+
/** Lifecycle hook for change detection. Updates visibility and error state. */
|
|
484
643
|
ngDoCheck() {
|
|
485
644
|
this.visibleChanges.next(this.isVisible());
|
|
486
645
|
if (this.ngControl) {
|
|
487
646
|
this.updateErrorState();
|
|
488
647
|
}
|
|
489
648
|
}
|
|
649
|
+
/** Lifecycle hook after content initialization. Sets up key manager and option subscriptions. */
|
|
490
650
|
ngAfterContentInit() {
|
|
491
651
|
this.withVirtualScroll = !!this.cdkVirtualForOf;
|
|
492
652
|
this.initKeyManager();
|
|
@@ -502,10 +662,13 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
502
662
|
.pipe(takeUntilDestroyed(this.destroyRef), delay(0), filter(() => !this.keyManager.activeItem))
|
|
503
663
|
.subscribe(() => this.keyManager.updateActiveItem(0));
|
|
504
664
|
}
|
|
665
|
+
/** Lifecycle hook when component is destroyed. Cleans up subscriptions. */
|
|
505
666
|
ngOnDestroy() {
|
|
506
667
|
this.stateChanges.complete();
|
|
507
668
|
this.closeSubscription.unsubscribe();
|
|
669
|
+
clearTimeout(this.openPanelTimeout);
|
|
508
670
|
}
|
|
671
|
+
/** Updates the error state based on the error state matcher. */
|
|
509
672
|
updateErrorState() {
|
|
510
673
|
const oldState = this.errorState;
|
|
511
674
|
const parent = this.parentFormGroup || this.parentForm;
|
|
@@ -517,9 +680,19 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
517
680
|
this.stateChanges.next();
|
|
518
681
|
}
|
|
519
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* Formats the hidden items text with the number of hidden items.
|
|
685
|
+
* @param hiddenItemsText Template string with {{ number }} placeholder.
|
|
686
|
+
* @param hiddenItems Number of hidden items to display.
|
|
687
|
+
* @returns Formatted string with the number of hidden items.
|
|
688
|
+
*/
|
|
520
689
|
hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) {
|
|
521
690
|
return hiddenItemsText.replace('{{ number }}', hiddenItems.toString());
|
|
522
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* Clears the current selection.
|
|
694
|
+
* @param $event Mouse event to prevent default behavior.
|
|
695
|
+
*/
|
|
523
696
|
clearValue($event) {
|
|
524
697
|
// need to prevent opening
|
|
525
698
|
$event.stopPropagation();
|
|
@@ -530,6 +703,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
530
703
|
this.propagateChanges();
|
|
531
704
|
this.focus();
|
|
532
705
|
}
|
|
706
|
+
/** Resets the search component if present. */
|
|
533
707
|
resetSearch() {
|
|
534
708
|
if (!this.search) {
|
|
535
709
|
return;
|
|
@@ -551,11 +725,32 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
551
725
|
this.open();
|
|
552
726
|
}
|
|
553
727
|
}
|
|
554
|
-
/**
|
|
728
|
+
/**
|
|
729
|
+
* Triggers the opening of the panel component.
|
|
730
|
+
* If the component is disabled or the panel is already open, the call is ignored.
|
|
731
|
+
* Otherwise, the (beforeOpened) event is emitted.
|
|
732
|
+
* When no options are available, the panel is opened after a short delay;
|
|
733
|
+
* if options exist, it opens immediately.
|
|
734
|
+
*/
|
|
555
735
|
open() {
|
|
556
|
-
if (this.disabled ||
|
|
736
|
+
if (this.disabled || this.panelOpen)
|
|
557
737
|
return;
|
|
738
|
+
this.beforeOpened.emit();
|
|
739
|
+
if (this.noOptions) {
|
|
740
|
+
clearTimeout(this.openPanelTimeout);
|
|
741
|
+
this.openPanelTimeout = setTimeout(() => this.openPanel(), delayBeforeDisplayingResultWithoutOptions);
|
|
558
742
|
}
|
|
743
|
+
else {
|
|
744
|
+
this.openPanel();
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Internal method to open the panel. Handles overlay positioning and sizing.
|
|
749
|
+
* Sets up the overlay dimensions based on trigger size and configured options.
|
|
750
|
+
*/
|
|
751
|
+
openPanel() {
|
|
752
|
+
if (!this.trigger)
|
|
753
|
+
return;
|
|
559
754
|
// add check for form-field bounding rectangles, since it adds extra padding around the trigger
|
|
560
755
|
this.triggerRect = (this.parentFormField?.getConnectedOverlayOrigin().nativeElement || this.trigger.nativeElement).getBoundingClientRect();
|
|
561
756
|
// Note: The computed font-size will be a string pixel value (e.g. "16px").
|
|
@@ -588,24 +783,20 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
588
783
|
if (this.triggerFontSize && this.overlayDir.overlayRef && this.overlayDir.overlayRef.overlayElement) {
|
|
589
784
|
this.overlayDir.overlayRef.overlayElement.style.fontSize = `${this.triggerFontSize}px`;
|
|
590
785
|
}
|
|
591
|
-
|
|
592
|
-
if (overlayContainer.childNodes.length === 1) {
|
|
593
|
-
this._renderer.addClass(overlayContainer, 'cdk-overlay-container_dropdown');
|
|
594
|
-
}
|
|
786
|
+
this.addClassToOverlayContainer();
|
|
595
787
|
});
|
|
596
788
|
}
|
|
597
789
|
/** Closes the overlay panel and focuses the host element. */
|
|
598
790
|
close() {
|
|
599
|
-
if (!this.panelOpen)
|
|
791
|
+
if (!this.panelOpen)
|
|
600
792
|
return;
|
|
601
|
-
}
|
|
602
793
|
// the order of calls is important
|
|
603
794
|
this.resetSearch();
|
|
604
795
|
this.panelOpen = false;
|
|
605
796
|
this.keyManager.withHorizontalOrientation(this.isRtl() ? 'rtl' : 'ltr');
|
|
606
797
|
this._changeDetectorRef.markForCheck();
|
|
607
798
|
this.onTouched();
|
|
608
|
-
this.
|
|
799
|
+
this.removeClassFromOverlayContainer();
|
|
609
800
|
}
|
|
610
801
|
/**
|
|
611
802
|
* Sets the select's value. Part of the ControlValueAccessor interface
|
|
@@ -650,13 +841,21 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
650
841
|
this._changeDetectorRef.markForCheck();
|
|
651
842
|
this.stateChanges.next();
|
|
652
843
|
}
|
|
844
|
+
/**
|
|
845
|
+
* Checks if the current direction is RTL (right-to-left).
|
|
846
|
+
* @returns True if RTL mode is active, false otherwise.
|
|
847
|
+
*/
|
|
653
848
|
isRtl() {
|
|
654
849
|
return this._dir ? this._dir.value === 'rtl' : false;
|
|
655
850
|
}
|
|
851
|
+
/**
|
|
852
|
+
* Handles all keyboard events for the select.
|
|
853
|
+
* Delegates to appropriate handler based on panel state.
|
|
854
|
+
* @param event The keyboard event to handle.
|
|
855
|
+
*/
|
|
656
856
|
handleKeydown(event) {
|
|
657
|
-
if (this.disabled)
|
|
857
|
+
if (this.disabled)
|
|
658
858
|
return;
|
|
659
|
-
}
|
|
660
859
|
if (this.panelOpen) {
|
|
661
860
|
this.handleOpenKeydown(event);
|
|
662
861
|
}
|
|
@@ -664,6 +863,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
664
863
|
this.handleClosedKeydown(event);
|
|
665
864
|
}
|
|
666
865
|
}
|
|
866
|
+
/** Handles focus event on the select element. */
|
|
667
867
|
onFocus() {
|
|
668
868
|
if (!this.disabled) {
|
|
669
869
|
this._focused = true;
|
|
@@ -689,6 +889,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
689
889
|
}
|
|
690
890
|
/**
|
|
691
891
|
* Callback that is invoked when the overlay panel has been attached.
|
|
892
|
+
* Sets up position change subscription and closing actions.
|
|
692
893
|
*/
|
|
693
894
|
onAttached() {
|
|
694
895
|
this.overlayDir.positionChange.pipe(take(1)).subscribe(() => {
|
|
@@ -700,7 +901,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
700
901
|
this.options.changes.pipe(delay(1)).subscribe(() => this.setOverlayPosition());
|
|
701
902
|
this.closeSubscription = this.closingActions().subscribe(() => this.close());
|
|
702
903
|
}
|
|
703
|
-
/** Returns the theme to be used on the panel. */
|
|
904
|
+
/** Returns the theme to be used on the panel based on parent form field color. */
|
|
704
905
|
getPanelTheme() {
|
|
705
906
|
return this.parentFormField ? `kbq-${this.parentFormField.color}` : '';
|
|
706
907
|
}
|
|
@@ -715,14 +916,27 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
715
916
|
onContainerClick() {
|
|
716
917
|
this.focus();
|
|
717
918
|
}
|
|
718
|
-
/**
|
|
919
|
+
/**
|
|
920
|
+
* Handles removal of a matched item in the trigger.
|
|
921
|
+
* @param option The option to remove from selection.
|
|
922
|
+
* @param $event The mouse event that triggered the removal.
|
|
923
|
+
*/
|
|
719
924
|
onRemoveMatcherItem(option, $event) {
|
|
720
925
|
$event.stopPropagation();
|
|
721
926
|
option.deselect();
|
|
722
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
* Gets the height of a single option item.
|
|
930
|
+
* @returns The height in pixels of the first option, or 0 if no options exist.
|
|
931
|
+
*/
|
|
723
932
|
getItemHeight() {
|
|
724
933
|
return this.options.first ? this.options.first.getHeight() : 0;
|
|
725
934
|
}
|
|
935
|
+
/**
|
|
936
|
+
* Handles click events on the select.
|
|
937
|
+
* Closes the panel if click is inside the footer.
|
|
938
|
+
* @param $event The mouse event to handle.
|
|
939
|
+
*/
|
|
726
940
|
handleClick($event) {
|
|
727
941
|
if (this.footer?.nativeElement.contains($event.target)) {
|
|
728
942
|
this.close();
|
|
@@ -761,20 +975,29 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
761
975
|
}
|
|
762
976
|
/** @docs-private */
|
|
763
977
|
shouldShowSearch() {
|
|
764
|
-
return isUndefined(this.searchMinOptionsThreshold) ||
|
|
978
|
+
return (isUndefined(this.searchMinOptionsThreshold) ||
|
|
979
|
+
!!this.search.value() ||
|
|
980
|
+
this.options.length >= this.searchMinOptionsThreshold);
|
|
765
981
|
}
|
|
982
|
+
/** Checks if the component is currently visible in the viewport. */
|
|
766
983
|
isVisible() {
|
|
767
984
|
return this.elementRef.nativeElement.offsetTop < this.elementRef.nativeElement.offsetHeight;
|
|
768
985
|
}
|
|
986
|
+
/** Gets the current overlay position index in the container. */
|
|
769
987
|
currentOverlayPosition() {
|
|
770
988
|
const element = this.overlayDir.overlayRef.hostElement;
|
|
771
989
|
return Array.from(this.overlayContainer.getContainerElement().childNodes).findIndex((node) => {
|
|
772
990
|
return node.firstChild?.['id'] === element.firstChild?.['id'];
|
|
773
991
|
});
|
|
774
992
|
}
|
|
993
|
+
/** Gets the position index of modal overlay in the container. */
|
|
775
994
|
modalOverlayPosition() {
|
|
776
995
|
return Array.from(this.overlayContainer.getContainerElement().childNodes).findIndex((childNode) => childNode.classList.contains('kbq-modal-overlay'));
|
|
777
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Creates an observable of actions that should close the select panel.
|
|
999
|
+
* Includes outside pointer events and overlay detachments.
|
|
1000
|
+
*/
|
|
778
1001
|
closingActions() {
|
|
779
1002
|
// used for calling toggle on select from outside of component
|
|
780
1003
|
const outsidePointerEvents = this.overlayDir
|
|
@@ -788,15 +1011,18 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
788
1011
|
}));
|
|
789
1012
|
return merge(outsidePointerEvents, this.overlayDir.overlayRef.detachments());
|
|
790
1013
|
}
|
|
1014
|
+
/** Gets the height of the options container element. */
|
|
791
1015
|
getHeightOfOptionsContainer() {
|
|
792
1016
|
return this.optionsContainer.nativeElement.getClientRects()[0]?.height;
|
|
793
1017
|
}
|
|
1018
|
+
/** Updates the keyboard manager scroll size based on options container height. */
|
|
794
1019
|
updateScrollSize() {
|
|
795
1020
|
if (!this.options.first) {
|
|
796
1021
|
return;
|
|
797
1022
|
}
|
|
798
1023
|
this.keyManager.withScrollSize(Math.floor(this.getHeightOfOptionsContainer() / this.options.first.getHeight()));
|
|
799
1024
|
}
|
|
1025
|
+
/** Calculates the total width of all selected items in the matcher. */
|
|
800
1026
|
getTotalItemsWidthInMatcher() {
|
|
801
1027
|
const triggerClone = this.buildTriggerClone();
|
|
802
1028
|
triggerClone.querySelector('.kbq-select__match-hidden-text')?.remove();
|
|
@@ -807,6 +1033,11 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
807
1033
|
triggerClone.remove();
|
|
808
1034
|
return totalItemsWidth;
|
|
809
1035
|
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Calculates the width of a single item including margins.
|
|
1038
|
+
* @param element The DOM element to measure.
|
|
1039
|
+
* @returns Total width including margins and gap.
|
|
1040
|
+
*/
|
|
810
1041
|
getItemWidth(element) {
|
|
811
1042
|
const computedStyle = this.window.getComputedStyle(element);
|
|
812
1043
|
const width = parseInt(computedStyle.width);
|
|
@@ -828,7 +1059,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
828
1059
|
this.keyManager.onKeydown(event);
|
|
829
1060
|
}
|
|
830
1061
|
}
|
|
831
|
-
/** Handles keyboard events when the
|
|
1062
|
+
/** Handles keyboard events when the select is open. */
|
|
832
1063
|
handleOpenKeydown(event) {
|
|
833
1064
|
const keyCode = event.keyCode;
|
|
834
1065
|
const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;
|
|
@@ -879,6 +1110,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
879
1110
|
}
|
|
880
1111
|
}
|
|
881
1112
|
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Initializes the selection based on the current value.
|
|
1115
|
+
* Defers execution to avoid change detection errors.
|
|
1116
|
+
*/
|
|
882
1117
|
initializeSelection() {
|
|
883
1118
|
// Defer setting the value in order to avoid the "Expression
|
|
884
1119
|
// has changed after it was checked" errors from Angular.
|
|
@@ -887,8 +1122,9 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
887
1122
|
});
|
|
888
1123
|
}
|
|
889
1124
|
/**
|
|
890
|
-
* Sets the selected option based on a value.
|
|
891
|
-
* found with the designated value, the select trigger is cleared.
|
|
1125
|
+
* Sets the selected option based on a value.
|
|
1126
|
+
* If no option can be found with the designated value, the select trigger is cleared.
|
|
1127
|
+
* @param value The value to select. Can be a single value or array for multiple selection.
|
|
892
1128
|
*/
|
|
893
1129
|
setSelectionByValue(value) {
|
|
894
1130
|
this.previousSelectionModelSelected = this.selectionModel.selected;
|
|
@@ -911,6 +1147,11 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
911
1147
|
}
|
|
912
1148
|
this._changeDetectorRef.markForCheck();
|
|
913
1149
|
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Finds the option that corresponds to the given value.
|
|
1152
|
+
* @param value The value to find.
|
|
1153
|
+
* @returns The matching option or undefined if not found.
|
|
1154
|
+
*/
|
|
914
1155
|
getCorrespondOption(value) {
|
|
915
1156
|
return [
|
|
916
1157
|
...this.options.toArray(),
|
|
@@ -1013,7 +1254,7 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
1013
1254
|
}
|
|
1014
1255
|
this.stateChanges.next();
|
|
1015
1256
|
}
|
|
1016
|
-
/** Sorts the selected values
|
|
1257
|
+
/** Sorts the selected values based on their order in the panel. */
|
|
1017
1258
|
sortValues() {
|
|
1018
1259
|
if (this.multiSelection) {
|
|
1019
1260
|
const options = this.options.toArray();
|
|
@@ -1075,6 +1316,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
1075
1316
|
}
|
|
1076
1317
|
});
|
|
1077
1318
|
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Calculates the total width and count of visible items.
|
|
1321
|
+
* @returns Tuple of [totalVisibleItemsWidth, visibleItemsCount].
|
|
1322
|
+
*/
|
|
1078
1323
|
getTotalVisibleItems() {
|
|
1079
1324
|
const triggerClone = this.buildTriggerClone();
|
|
1080
1325
|
this._renderer.setStyle(triggerClone.querySelector('.kbq-select__match-hidden-text'), 'display', 'block');
|
|
@@ -1090,6 +1335,10 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
1090
1335
|
triggerClone.remove();
|
|
1091
1336
|
return [totalVisibleItemsWidth, visibleItemsCount];
|
|
1092
1337
|
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Creates a hidden clone of the trigger element for width calculations.
|
|
1340
|
+
* @returns Clone of the trigger element positioned off-screen.
|
|
1341
|
+
*/
|
|
1093
1342
|
buildTriggerClone() {
|
|
1094
1343
|
const triggerClone = this.trigger.nativeElement.cloneNode(true);
|
|
1095
1344
|
this._renderer.setStyle(triggerClone, 'position', 'absolute');
|
|
@@ -1098,17 +1347,31 @@ class KbqSelect extends KbqAbstractSelect {
|
|
|
1098
1347
|
this._renderer.setStyle(triggerClone, 'left', '0');
|
|
1099
1348
|
return triggerClone;
|
|
1100
1349
|
}
|
|
1101
|
-
/**
|
|
1102
|
-
|
|
1350
|
+
/** Adds the dropdown class to the overlay container when first select opens. */
|
|
1351
|
+
addClassToOverlayContainer() {
|
|
1352
|
+
const overlayContainer = this.overlayContainer?.getContainerElement();
|
|
1353
|
+
if (overlayContainer.childNodes.length === 1) {
|
|
1354
|
+
this.classAddedToOverlayContainer = true;
|
|
1355
|
+
this._renderer.addClass(overlayContainer, 'cdk-overlay-container_dropdown');
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
/** Removes the dropdown class from the overlay container when select closes. */
|
|
1359
|
+
removeClassFromOverlayContainer() {
|
|
1360
|
+
if (this.classAddedToOverlayContainer) {
|
|
1361
|
+
this._renderer.removeClass(this.overlayContainer.getContainerElement(), 'cdk-overlay-container_dropdown');
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelect, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1$1.ErrorStateMatcher }, { token: i0.ElementRef }, { token: i2.OverlayContainer }, { token: i3.Directionality, optional: true }, { token: i4.NgForm, optional: true }, { token: i4.FormGroupDirective, optional: true }, { token: i5.KbqFormField, host: true, optional: true }, { token: i4.NgControl, optional: true, self: true }, { token: KBQ_SELECT_SCROLL_STRATEGY }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1365
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: KbqSelect, isStandalone: true, selector: "kbq-select", inputs: { hiddenItemsText: "hiddenItemsText", panelClass: "panelClass", backdropClass: "backdropClass", errorStateMatcher: "errorStateMatcher", sortComparator: "sortComparator", multiline: ["multiline", "multiline", booleanAttribute], searchMinOptionsThreshold: "searchMinOptionsThreshold", hasBackdrop: "hasBackdrop", placeholder: "placeholder", required: "required", multiple: ["multiple", "multiple", booleanAttribute], compareWith: "compareWith", selectAllHandler: "selectAllHandler", panelWidth: "panelWidth", panelMinWidth: ["panelMinWidth", "panelMinWidth", numberAttribute], value: "value", id: "id", tabIndex: ["tabIndex", "tabIndex", numberAttribute], disabled: ["disabled", "disabled", booleanAttribute], hiddenItemsTextFormatter: "hiddenItemsTextFormatter" }, outputs: { openedChange: "openedChange", beforeOpened: "beforeOpened", openedStream: "opened", closedStream: "closed", selectionChange: "selectionChange", valueChange: "valueChange" }, host: { listeners: { "click": "toggle()", "keydown": "handleKeydown($event)", "focus": "onFocus()", "blur": "onBlur()" }, properties: { "attr.tabindex": "tabIndex", "attr.disabled": "disabled || null", "class.kbq-select_multiple": "multiple", "class.kbq-select_multiline": "multiline", "class.kbq-disabled": "disabled", "class.kbq-invalid": "errorState" }, classAttribute: "kbq-select" }, providers: [
|
|
1103
1366
|
{ provide: KbqFormFieldControl, useExisting: KbqSelect },
|
|
1104
1367
|
{ provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqSelect },
|
|
1105
1368
|
{ provide: KBQ_PARENT_POPUP, useExisting: KbqSelect }
|
|
1106
|
-
], 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, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n #trigger\n cdkOverlayOrigin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiline]=\"multiline\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n>\n @if (!!customMatcher) {\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" />\n } @else {\n <div class=\"kbq-select__matcher\">\n @if (empty) {\n <span class=\"kbq-select__placeholder\">\n {{ placeholder || '\\u00A0' }}\n </span>\n } @else {\n @if (!!customTrigger) {\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" />\n } @else {\n <div class=\"kbq-select__match-container\">\n @if (multiSelection) {\n <div\n [class.kbq-select__match-list]=\"!multiline\"\n [class.kbq-select__multiline-match-list]=\"multiline\"\n >\n @if (!customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <kbq-tag\n [color]=\"colorForState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n @if (!option.disabled && !disabled) {\n <i\n kbq-icon=\"kbq-xmark-s_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n }\n </kbq-tag>\n }\n }\n @if (customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <ng-container\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n />\n }\n }\n </div>\n\n @if (!multiline) {\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n }\n } @else {\n <span class=\"kbq-select__matcher-text\">\n {{ triggerValue }}\n </span>\n }\n </div>\n }\n }\n\n @if (canShowCleaner) {\n <div\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\" />\n </div>\n }\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"kbq-select__arrow\" [color]=\"colorForState\"></i>\n </div>\n </div>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"overlayMinWidth\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin || fallbackOverlayOrigin\"\n [cdkConnectedOverlayPanelClass]=\"overlayPanelClass\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n cdkMonitorSubtreeFocus\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n @if (search && shouldShowSearch()) {\n <div class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\" />\n </div>\n }\n\n <div\n #optionsContainer\n class=\"kbq-select__content\"\n [class.kbq-scrollbar]=\"!withVirtualScroll\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n >\n @if (isEmptySearchResult) {\n <div class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\" />\n </div>\n }\n <ng-content />\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\" />\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;min-height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline){height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline) .kbq-select__matcher{overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-grow:1;align-items:center}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.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:var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-right) var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-right) var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-left)}.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) - var(--kbq-select-size-multiple-padding-vertical) * 2);max-height:calc(var(--kbq-form-field-size-height) - var(--kbq-select-size-multiple-padding-vertical) * 2);gap:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__match-container{flex-direction:column}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__matcher{max-width:100%;padding:calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-right) calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__cleaner,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__arrow-wrapper{align-self:flex-start;align-items:center;height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-s));min-width:var(--kbq-form-field-size-addon-width)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__multiline-match-list{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));gap:var(--kbq-size-xxs)}.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 40px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));text-align:right}.kbq-select kbq-select-trigger,.kbq-select [kbq-select-trigger]{width:100%}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;justify-content:center;min-width:var(--kbq-form-field-size-addon-width)}.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, var(--kbq-size-border-radius))}.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, var(--kbq-size-3xl));cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));padding-right:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));border:var(--kbq-option-size-border-width, var(--kbq-size-3xs)) solid transparent}.kbq-select__panel .kbq-select__search-container{padding:var(--kbq-size-xxs);border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:var(--kbq-size-xxs);overflow:hidden auto}.kbq-select__panel .kbq-select__footer{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;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) var(--kbq-size-l)}.kbq-select__content{box-sizing:initial}.kbq-select__content .kbq-option{position:relative}.kbq-select__content .kbq-option:before,.kbq-select__content .kbq-option:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-select__content .kbq-option:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-select__content .kbq-option:after{left:calc(100% + var(--kbq-size-3xs))}.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}.kbq-select{color:var(--kbq-foreground-contrast)}.kbq-select.kbq-control_has-validate-directive.ng-invalid,.kbq-select.kbq-invalid{color:var(--kbq-foreground-error)}.kbq-select.kbq-control_has-validate-directive.ng-invalid .kbq-select__placeholder,.kbq-select.kbq-invalid .kbq-select__placeholder{color:var(--kbq-form-field-states-error-placeholder)}.kbq-select.kbq-disabled{color:var(--kbq-states-foreground-disabled)}.kbq-select.kbq-disabled .kbq-select__placeholder{color:var(--kbq-form-field-states-disabled-placeholder)}.kbq-select__placeholder{text-overflow:ellipsis;color:var(--kbq-form-field-default-placeholder)}.kbq-select__panel{box-shadow:var(--kbq-select-panel-dropdown-shadow);background:var(--kbq-select-panel-dropdown-background)}.kbq-select__panel .kbq-select__footer{border-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__search-container{border-bottom-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__no-options-message{color:var(--kbq-foreground-contrast-secondary)}.kbq-select,.kbq-select__panel{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-select,.kbq-tree-select,.kbq-select__panel{--kbq-select-size-single-padding-left: var(--kbq-form-field-size-infix-padding);--kbq-select-size-single-padding-right: var(--kbq-form-field-size-suffix-padding);--kbq-select-size-single-padding-vertical: var(--kbq-size-xs);--kbq-select-size-single-content-gap: var(--kbq-size-xxs);--kbq-select-size-multiple-padding-left: 0;--kbq-select-size-multiple-padding-right: 0;--kbq-select-size-multiple-padding-vertical: var(--kbq-size-xxs);--kbq-select-size-multiple-content-gap: var(--kbq-size-xxs);--kbq-select-panel-size-border-radius: var(--kbq-size-border-radius);--kbq-select-panel-size-max-height: 256px;--kbq-select-panel-dropdown-background: var(--kbq-background-card);--kbq-select-panel-dropdown-shadow: var(--kbq-shadow-popup)}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: ["editable", "preventEditSubmit", "selected", "value", "selectable", "removable", "tabindex", "disabled"], outputs: ["editChange", "selectionChange", "destroyed", "removed"], exportAs: ["kbqTag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: 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: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], animations: [
|
|
1369
|
+
], 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: "searchEmpty", first: true, predicate: KbqSelectSearchEmptyResult, 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, ngImport: i0, template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n #trigger\n cdkOverlayOrigin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiline]=\"multiline\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n>\n @if (!!customMatcher) {\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" />\n } @else {\n <div class=\"kbq-select__matcher\">\n @if (empty) {\n <span class=\"kbq-select__placeholder\">\n {{ placeholder || '\\u00A0' }}\n </span>\n } @else {\n @if (!!customTrigger) {\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" />\n } @else {\n <div class=\"kbq-select__match-container\">\n @if (multiSelection) {\n <div\n [class.kbq-select__match-list]=\"!multiline\"\n [class.kbq-select__multiline-match-list]=\"multiline\"\n >\n @if (!customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <kbq-tag\n [color]=\"colorForState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n @if (!option.disabled && !disabled) {\n <i\n kbq-icon=\"kbq-xmark-s_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n }\n </kbq-tag>\n }\n }\n @if (customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <ng-container\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n />\n }\n }\n </div>\n\n @if (!multiline) {\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n }\n } @else {\n <span class=\"kbq-select__matcher-text\">\n {{ triggerValue }}\n </span>\n }\n </div>\n }\n }\n\n @if (canShowCleaner) {\n <div\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\" />\n </div>\n }\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"kbq-select__arrow\" [color]=\"colorForState\"></i>\n </div>\n </div>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"overlayMinWidth\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin || fallbackOverlayOrigin\"\n [cdkConnectedOverlayPanelClass]=\"overlayPanelClass\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n cdkMonitorSubtreeFocus\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n @if (search && shouldShowSearch()) {\n <div class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\" />\n </div>\n }\n\n <div\n #optionsContainer\n class=\"kbq-select__content\"\n [class.kbq-scrollbar]=\"!withVirtualScroll\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n >\n @if (isEmptySearchResult) {\n <ng-content select=\"[kbq-select-search-empty-result]\" />\n }\n <ng-content />\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\" />\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;min-height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline){height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline) .kbq-select__matcher{overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-grow:1;align-items:center}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.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:var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-right) var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-right) var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-left)}.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) - var(--kbq-select-size-multiple-padding-vertical) * 2);max-height:calc(var(--kbq-form-field-size-height) - var(--kbq-select-size-multiple-padding-vertical) * 2);gap:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__match-container{flex-direction:column}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__matcher{max-width:100%;padding:calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-right) calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__cleaner,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__arrow-wrapper{align-self:flex-start;align-items:center;height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-s));min-width:var(--kbq-form-field-size-addon-width)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__multiline-match-list{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));gap:var(--kbq-size-xxs)}.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 40px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));text-align:right}.kbq-select kbq-select-trigger,.kbq-select [kbq-select-trigger]{width:100%}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;justify-content:center;min-width:var(--kbq-form-field-size-addon-width)}.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, var(--kbq-size-border-radius))}.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;position:relative;margin-bottom:var(--kbq-size-3xl);margin-top:var(--kbq-size-3xl);max-width:100%;height:var(--kbq-option-size-height, var(--kbq-size-3xl));cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));padding-right:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));border:var(--kbq-option-size-border-width, var(--kbq-size-3xs)) solid transparent}.kbq-select__panel .kbq-select__search-container{padding:var(--kbq-size-xxs);border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:var(--kbq-size-xxs);overflow:hidden auto}.kbq-select__panel .kbq-select__footer{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;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) var(--kbq-size-l)}.kbq-select__content{box-sizing:initial}.kbq-select__content .kbq-option{position:relative}.kbq-select__content .kbq-option:before,.kbq-select__content .kbq-option:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-select__content .kbq-option:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-select__content .kbq-option:after{left:calc(100% + var(--kbq-size-3xs))}.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}.kbq-select{color:var(--kbq-foreground-contrast)}.kbq-select.kbq-control_has-validate-directive.ng-invalid,.kbq-select.kbq-invalid{color:var(--kbq-foreground-error)}.kbq-select.kbq-control_has-validate-directive.ng-invalid .kbq-select__placeholder,.kbq-select.kbq-invalid .kbq-select__placeholder{color:var(--kbq-form-field-states-error-placeholder)}.kbq-select.kbq-disabled{color:var(--kbq-states-foreground-disabled)}.kbq-select.kbq-disabled .kbq-select__placeholder{color:var(--kbq-form-field-states-disabled-placeholder)}.kbq-select__placeholder{text-overflow:ellipsis;color:var(--kbq-form-field-default-placeholder)}.kbq-select__panel{box-shadow:var(--kbq-select-panel-dropdown-shadow);background:var(--kbq-select-panel-dropdown-background)}.kbq-select__panel .kbq-select__footer{border-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__search-container{border-bottom-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__no-options-message{color:var(--kbq-foreground-contrast-secondary)}.kbq-select,.kbq-select__panel{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-select,.kbq-tree-select,.kbq-select__panel{--kbq-select-size-single-padding-left: var(--kbq-form-field-size-infix-padding);--kbq-select-size-single-padding-right: var(--kbq-form-field-size-suffix-padding);--kbq-select-size-single-padding-vertical: var(--kbq-size-xs);--kbq-select-size-single-content-gap: var(--kbq-size-xxs);--kbq-select-size-multiple-padding-left: 0;--kbq-select-size-multiple-padding-right: 0;--kbq-select-size-multiple-padding-vertical: var(--kbq-size-xxs);--kbq-select-size-multiple-content-gap: var(--kbq-size-xxs);--kbq-select-panel-size-border-radius: var(--kbq-size-border-radius);--kbq-select-panel-size-max-height: 256px;--kbq-select-panel-dropdown-background: var(--kbq-background-card);--kbq-select-panel-dropdown-shadow: var(--kbq-shadow-popup)}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: KbqTag, selector: "kbq-tag, [kbq-tag], kbq-basic-tag, [kbq-basic-tag]", inputs: ["editable", "preventEditSubmit", "selected", "value", "selectable", "removable", "tabindex", "disabled"], outputs: ["editChange", "selectionChange", "destroyed", "removed"], exportAs: ["kbqTag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: 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: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i6.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], animations: [
|
|
1107
1370
|
kbqSelectAnimations.transformPanel,
|
|
1108
1371
|
kbqSelectAnimations.fadeInContent
|
|
1109
1372
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1110
1373
|
}
|
|
1111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelect, decorators: [{
|
|
1112
1375
|
type: Component,
|
|
1113
1376
|
args: [{ selector: 'kbq-select', imports: [
|
|
1114
1377
|
CdkOverlayOrigin,
|
|
@@ -1137,8 +1400,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1137
1400
|
{ provide: KbqFormFieldControl, useExisting: KbqSelect },
|
|
1138
1401
|
{ provide: KBQ_OPTION_PARENT_COMPONENT, useExisting: KbqSelect },
|
|
1139
1402
|
{ provide: KBQ_PARENT_POPUP, useExisting: KbqSelect }
|
|
1140
|
-
], template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n #trigger\n cdkOverlayOrigin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiline]=\"multiline\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n>\n @if (!!customMatcher) {\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" />\n } @else {\n <div class=\"kbq-select__matcher\">\n @if (empty) {\n <span class=\"kbq-select__placeholder\">\n {{ placeholder || '\\u00A0' }}\n </span>\n } @else {\n @if (!!customTrigger) {\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" />\n } @else {\n <div class=\"kbq-select__match-container\">\n @if (multiSelection) {\n <div\n [class.kbq-select__match-list]=\"!multiline\"\n [class.kbq-select__multiline-match-list]=\"multiline\"\n >\n @if (!customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <kbq-tag\n [color]=\"colorForState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n @if (!option.disabled && !disabled) {\n <i\n kbq-icon=\"kbq-xmark-s_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n }\n </kbq-tag>\n }\n }\n @if (customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <ng-container\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n />\n }\n }\n </div>\n\n @if (!multiline) {\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n }\n } @else {\n <span class=\"kbq-select__matcher-text\">\n {{ triggerValue }}\n </span>\n }\n </div>\n }\n }\n\n @if (canShowCleaner) {\n <div\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\" />\n </div>\n }\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"kbq-select__arrow\" [color]=\"colorForState\"></i>\n </div>\n </div>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"overlayMinWidth\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin || fallbackOverlayOrigin\"\n [cdkConnectedOverlayPanelClass]=\"overlayPanelClass\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n cdkMonitorSubtreeFocus\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n @if (search && shouldShowSearch()) {\n <div class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\" />\n </div>\n }\n\n <div\n #optionsContainer\n class=\"kbq-select__content\"\n [class.kbq-scrollbar]=\"!withVirtualScroll\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n >\n @if (isEmptySearchResult) {\n <div class=\"kbq-select__no-options-message\">\n <ng-content select=\"[kbq-select-search-empty-result]\" />\n </div>\n }\n <ng-content />\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\" />\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;min-height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline){height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline) .kbq-select__matcher{overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-grow:1;align-items:center}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.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:var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-right) var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-right) var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-left)}.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) - var(--kbq-select-size-multiple-padding-vertical) * 2);max-height:calc(var(--kbq-form-field-size-height) - var(--kbq-select-size-multiple-padding-vertical) * 2);gap:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__match-container{flex-direction:column}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__matcher{max-width:100%;padding:calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-right) calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__cleaner,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__arrow-wrapper{align-self:flex-start;align-items:center;height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-s));min-width:var(--kbq-form-field-size-addon-width)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__multiline-match-list{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));gap:var(--kbq-size-xxs)}.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 40px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));text-align:right}.kbq-select kbq-select-trigger,.kbq-select [kbq-select-trigger]{width:100%}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;justify-content:center;min-width:var(--kbq-form-field-size-addon-width)}.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, var(--kbq-size-border-radius))}.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:var(--kbq-option-size-height, var(--kbq-size-3xl));cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));padding-right:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));border:var(--kbq-option-size-border-width, var(--kbq-size-3xs)) solid transparent}.kbq-select__panel .kbq-select__search-container{padding:var(--kbq-size-xxs);border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:var(--kbq-size-xxs);overflow:hidden auto}.kbq-select__panel .kbq-select__footer{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;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) var(--kbq-size-l)}.kbq-select__content{box-sizing:initial}.kbq-select__content .kbq-option{position:relative}.kbq-select__content .kbq-option:before,.kbq-select__content .kbq-option:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-select__content .kbq-option:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-select__content .kbq-option:after{left:calc(100% + var(--kbq-size-3xs))}.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}.kbq-select{color:var(--kbq-foreground-contrast)}.kbq-select.kbq-control_has-validate-directive.ng-invalid,.kbq-select.kbq-invalid{color:var(--kbq-foreground-error)}.kbq-select.kbq-control_has-validate-directive.ng-invalid .kbq-select__placeholder,.kbq-select.kbq-invalid .kbq-select__placeholder{color:var(--kbq-form-field-states-error-placeholder)}.kbq-select.kbq-disabled{color:var(--kbq-states-foreground-disabled)}.kbq-select.kbq-disabled .kbq-select__placeholder{color:var(--kbq-form-field-states-disabled-placeholder)}.kbq-select__placeholder{text-overflow:ellipsis;color:var(--kbq-form-field-default-placeholder)}.kbq-select__panel{box-shadow:var(--kbq-select-panel-dropdown-shadow);background:var(--kbq-select-panel-dropdown-background)}.kbq-select__panel .kbq-select__footer{border-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__search-container{border-bottom-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__no-options-message{color:var(--kbq-foreground-contrast-secondary)}.kbq-select,.kbq-select__panel{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-select,.kbq-tree-select,.kbq-select__panel{--kbq-select-size-single-padding-left: var(--kbq-form-field-size-infix-padding);--kbq-select-size-single-padding-right: var(--kbq-form-field-size-suffix-padding);--kbq-select-size-single-padding-vertical: var(--kbq-size-xs);--kbq-select-size-single-content-gap: var(--kbq-size-xxs);--kbq-select-size-multiple-padding-left: 0;--kbq-select-size-multiple-padding-right: 0;--kbq-select-size-multiple-padding-vertical: var(--kbq-size-xxs);--kbq-select-size-multiple-content-gap: var(--kbq-size-xxs);--kbq-select-panel-size-border-radius: var(--kbq-size-border-radius);--kbq-select-panel-size-max-height: 256px;--kbq-select-panel-dropdown-background: var(--kbq-background-card);--kbq-select-panel-dropdown-shadow: var(--kbq-shadow-popup)}\n"] }]
|
|
1141
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1.ErrorStateMatcher }, { type: i0.ElementRef }, { type: i2.OverlayContainer }, { type: i3.Directionality, decorators: [{
|
|
1403
|
+
], template: "<div\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n #trigger\n cdkOverlayOrigin\n class=\"kbq-select__trigger\"\n [class.kbq-select__trigger_empty]=\"empty\"\n [class.kbq-select__trigger_multiline]=\"multiline\"\n [class.kbq-select__trigger_multiple]=\"multiple\"\n [class.kbq-select__trigger_single]=\"!multiple\"\n>\n @if (!!customMatcher) {\n <ng-content select=\"kbq-select-matcher, [kbq-select-matcher]\" />\n } @else {\n <div class=\"kbq-select__matcher\">\n @if (empty) {\n <span class=\"kbq-select__placeholder\">\n {{ placeholder || '\\u00A0' }}\n </span>\n } @else {\n @if (!!customTrigger) {\n <ng-content select=\"kbq-select-trigger, [kbq-select-trigger]\" />\n } @else {\n <div class=\"kbq-select__match-container\">\n @if (multiSelection) {\n <div\n [class.kbq-select__match-list]=\"!multiline\"\n [class.kbq-select__multiline-match-list]=\"multiline\"\n >\n @if (!customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <kbq-tag\n [color]=\"colorForState\"\n [disabled]=\"option.disabled || disabled\"\n [selectable]=\"false\"\n >\n {{ option.viewValue }}\n @if (!option.disabled && !disabled) {\n <i\n kbq-icon=\"kbq-xmark-s_16\"\n kbqTagRemove\n (click)=\"onRemoveMatcherItem(option, $event)\"\n ></i>\n }\n </kbq-tag>\n }\n }\n @if (customTagTemplateRef) {\n @for (option of triggerValues; track option) {\n <ng-container\n [ngTemplateOutlet]=\"$any(customTagTemplateRef)\"\n [ngTemplateOutletContext]=\"{ $implicit: option, select: this }\"\n />\n }\n }\n </div>\n\n @if (!multiline) {\n <div\n class=\"kbq-select__match-hidden-text\"\n [style.display]=\"hiddenItems > 0 ? 'block' : 'none'\"\n >\n {{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}\n </div>\n }\n } @else {\n <span class=\"kbq-select__matcher-text\">\n {{ triggerValue }}\n </span>\n }\n </div>\n }\n }\n\n @if (canShowCleaner) {\n <div\n class=\"kbq-select__cleaner\"\n (click)=\"clearValue($event)\"\n (keydown.enter)=\"clearValue($event)\"\n (keydown.space)=\"clearValue($event)\"\n >\n <ng-content select=\"kbq-cleaner\" />\n </div>\n }\n\n <div class=\"kbq-select__arrow-wrapper\">\n <i kbq-icon=\"kbq-chevron-down-s_16\" class=\"kbq-select__arrow\" [color]=\"colorForState\"></i>\n </div>\n </div>\n }\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayLockPosition\n [cdkConnectedOverlayBackdropClass]=\"backdropClass\"\n [cdkConnectedOverlayHasBackdrop]=\"hasBackdrop\"\n [cdkConnectedOverlayMinWidth]=\"overlayMinWidth\"\n [cdkConnectedOverlayOffsetY]=\"offsetY\"\n [cdkConnectedOverlayOpen]=\"panelOpen\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin || fallbackOverlayOrigin\"\n [cdkConnectedOverlayPanelClass]=\"overlayPanelClass\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayWidth]=\"overlayWidth\"\n (attach)=\"onAttached()\"\n (backdropClick)=\"close()\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"kbq-select__panel {{ getPanelTheme() }}\"\n cdkMonitorSubtreeFocus\n [ngClass]=\"panelClass\"\n [style.font-size.px]=\"triggerFontSize\"\n [style.transformOrigin]=\"transformOrigin\"\n (click)=\"handleClick($event)\"\n (keydown)=\"handleKeydown($event)\"\n >\n @if (search && shouldShowSearch()) {\n <div class=\"kbq-select__search-container\">\n <ng-content select=\"[kbqSelectSearch]\" />\n </div>\n }\n\n <div\n #optionsContainer\n class=\"kbq-select__content\"\n [class.kbq-scrollbar]=\"!withVirtualScroll\"\n [@fadeInContent]=\"'showing'\"\n (@fadeInContent.done)=\"panelDoneAnimatingStream.next($event.toState)\"\n >\n @if (isEmptySearchResult) {\n <ng-content select=\"[kbq-select-search-empty-result]\" />\n }\n <ng-content />\n </div>\n\n <ng-content select=\"kbq-select-footer,[kbq-select-footer]\" />\n </div>\n</ng-template>\n", styles: [".kbq-select{box-sizing:border-box;display:inline-block;width:100%;outline:none}.kbq-select .kbq-select__trigger{display:flex;box-sizing:border-box;position:relative;cursor:pointer;min-height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline){height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-border-width) * 2)}.kbq-select .kbq-select__trigger:not(.kbq-select__trigger_multiline) .kbq-select__matcher{overflow:hidden;white-space:nowrap}.kbq-select .kbq-select__matcher{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-grow:1;align-items:center}.kbq-select .kbq-select__matcher>span{flex:1;overflow:hidden}.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:var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-right) var(--kbq-select-size-single-padding-vertical) var(--kbq-select-size-single-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiple:not(.kbq-select__trigger_empty) .kbq-select__matcher{padding:var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-right) var(--kbq-select-size-multiple-padding-vertical) var(--kbq-select-size-multiple-padding-left)}.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) - var(--kbq-select-size-multiple-padding-vertical) * 2);max-height:calc(var(--kbq-form-field-size-height) - var(--kbq-select-size-multiple-padding-vertical) * 2);gap:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs))}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__match-container{flex-direction:column}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__matcher{max-width:100%;padding:calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-right) calc(var(--kbq-select-size-multiple-padding-vertical) - var(--kbq-size-border-width)) var(--kbq-select-size-multiple-padding-left)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__cleaner,.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__arrow-wrapper{align-self:flex-start;align-items:center;height:calc(var(--kbq-form-field-size-height) - var(--kbq-size-s));min-width:var(--kbq-form-field-size-addon-width)}.kbq-select .kbq-select__trigger.kbq-select__trigger_multiline:not(.kbq-select__trigger_empty) .kbq-select__multiline-match-list{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));gap:var(--kbq-size-xxs)}.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 40px;align-self:center;padding-left:4px;padding-right:var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));text-align:right}.kbq-select kbq-select-trigger,.kbq-select [kbq-select-trigger]{width:100%}.kbq-select .kbq-select__arrow-wrapper{display:flex;align-self:center;justify-content:center;min-width:var(--kbq-form-field-size-addon-width)}.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, var(--kbq-size-border-radius))}.kbq-select__panel .kbq-option{font-size:inherit}.kbq-select__panel .kbq-select__no-options-message{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;position:relative;margin-bottom:var(--kbq-size-3xl);margin-top:var(--kbq-size-3xl);max-width:100%;height:var(--kbq-option-size-height, var(--kbq-size-3xl));cursor:default;outline:none;padding-left:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));padding-right:var(--kbq-option-size-horizontal-padding, var(--kbq-size-m));border:var(--kbq-option-size-border-width, var(--kbq-size-3xs)) solid transparent}.kbq-select__panel .kbq-select__search-container{padding:var(--kbq-size-xxs);border-bottom-width:1px;border-bottom-style:solid}.kbq-select__content{max-height:var(--kbq-select-panel-size-max-height, 256px);padding:var(--kbq-size-xxs);overflow:hidden auto}.kbq-select__panel .kbq-select__footer{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;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) var(--kbq-size-l)}.kbq-select__content{box-sizing:initial}.kbq-select__content .kbq-option{position:relative}.kbq-select__content .kbq-option:before,.kbq-select__content .kbq-option:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-select__content .kbq-option:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-select__content .kbq-option:after{left:calc(100% + var(--kbq-size-3xs))}.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}.kbq-select{color:var(--kbq-foreground-contrast)}.kbq-select.kbq-control_has-validate-directive.ng-invalid,.kbq-select.kbq-invalid{color:var(--kbq-foreground-error)}.kbq-select.kbq-control_has-validate-directive.ng-invalid .kbq-select__placeholder,.kbq-select.kbq-invalid .kbq-select__placeholder{color:var(--kbq-form-field-states-error-placeholder)}.kbq-select.kbq-disabled{color:var(--kbq-states-foreground-disabled)}.kbq-select.kbq-disabled .kbq-select__placeholder{color:var(--kbq-form-field-states-disabled-placeholder)}.kbq-select__placeholder{text-overflow:ellipsis;color:var(--kbq-form-field-default-placeholder)}.kbq-select__panel{box-shadow:var(--kbq-select-panel-dropdown-shadow);background:var(--kbq-select-panel-dropdown-background)}.kbq-select__panel .kbq-select__footer{border-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__search-container{border-bottom-color:var(--kbq-divider-color, var(--kbq-line-contrast-less))}.kbq-select__no-options-message{color:var(--kbq-foreground-contrast-secondary)}.kbq-select,.kbq-select__panel{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-select,.kbq-tree-select,.kbq-select__panel{--kbq-select-size-single-padding-left: var(--kbq-form-field-size-infix-padding);--kbq-select-size-single-padding-right: var(--kbq-form-field-size-suffix-padding);--kbq-select-size-single-padding-vertical: var(--kbq-size-xs);--kbq-select-size-single-content-gap: var(--kbq-size-xxs);--kbq-select-size-multiple-padding-left: 0;--kbq-select-size-multiple-padding-right: 0;--kbq-select-size-multiple-padding-vertical: var(--kbq-size-xxs);--kbq-select-size-multiple-content-gap: var(--kbq-size-xxs);--kbq-select-panel-size-border-radius: var(--kbq-size-border-radius);--kbq-select-panel-size-max-height: 256px;--kbq-select-panel-dropdown-background: var(--kbq-background-card);--kbq-select-panel-dropdown-shadow: var(--kbq-shadow-popup)}\n"] }]
|
|
1404
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i1$1.ErrorStateMatcher }, { type: i0.ElementRef }, { type: i2.OverlayContainer }, { type: i3.Directionality, decorators: [{
|
|
1142
1405
|
type: Optional
|
|
1143
1406
|
}] }, { type: i4.NgForm, decorators: [{
|
|
1144
1407
|
type: Optional
|
|
@@ -1155,7 +1418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1155
1418
|
}] }, { type: undefined, decorators: [{
|
|
1156
1419
|
type: Inject,
|
|
1157
1420
|
args: [KBQ_SELECT_SCROLL_STRATEGY]
|
|
1158
|
-
}] }, { type: i1.KbqLocaleService, decorators: [{
|
|
1421
|
+
}] }, { type: i1$1.KbqLocaleService, decorators: [{
|
|
1159
1422
|
type: Optional
|
|
1160
1423
|
}, {
|
|
1161
1424
|
type: Inject,
|
|
@@ -1202,6 +1465,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1202
1465
|
}], search: [{
|
|
1203
1466
|
type: ContentChild,
|
|
1204
1467
|
args: [KbqSelectSearch, { static: false }]
|
|
1468
|
+
}], searchEmpty: [{
|
|
1469
|
+
type: ContentChild,
|
|
1470
|
+
args: [KbqSelectSearchEmptyResult, { static: false }]
|
|
1205
1471
|
}], hiddenItemsText: [{
|
|
1206
1472
|
type: Input
|
|
1207
1473
|
}], panelClass: [{
|
|
@@ -1262,8 +1528,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1262
1528
|
}] } });
|
|
1263
1529
|
|
|
1264
1530
|
class KbqSelectModule {
|
|
1265
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
1266
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
1531
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1532
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectModule, imports: [OverlayModule,
|
|
1267
1533
|
KbqOptionModule,
|
|
1268
1534
|
KbqIconModule,
|
|
1269
1535
|
KbqTagsModule,
|
|
@@ -1277,7 +1543,11 @@ class KbqSelectModule {
|
|
|
1277
1543
|
NgTemplateOutlet,
|
|
1278
1544
|
A11yModule,
|
|
1279
1545
|
KbqSelect,
|
|
1280
|
-
KbqOptionTooltip
|
|
1546
|
+
KbqOptionTooltip,
|
|
1547
|
+
KbqSelectLoading,
|
|
1548
|
+
KbqSelectError,
|
|
1549
|
+
KbqSelectNoOptions,
|
|
1550
|
+
KbqSelectErrorText], exports: [KbqSelect,
|
|
1281
1551
|
KbqOptionTooltip,
|
|
1282
1552
|
KbqOptionModule,
|
|
1283
1553
|
KbqSelectSearch,
|
|
@@ -1285,17 +1555,22 @@ class KbqSelectModule {
|
|
|
1285
1555
|
KbqSelectMatcher,
|
|
1286
1556
|
KbqSelectTrigger,
|
|
1287
1557
|
KbqSelectSearchEmptyResult,
|
|
1288
|
-
|
|
1289
|
-
|
|
1558
|
+
KbqSelectLoading,
|
|
1559
|
+
KbqFormFieldModule,
|
|
1560
|
+
KbqSelectError,
|
|
1561
|
+
KbqSelectNoOptions,
|
|
1562
|
+
KbqSelectErrorText] }); }
|
|
1563
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectModule, providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER], imports: [OverlayModule,
|
|
1290
1564
|
KbqOptionModule,
|
|
1291
1565
|
KbqIconModule,
|
|
1292
1566
|
KbqTagsModule,
|
|
1293
1567
|
KbqToolTipModule,
|
|
1294
1568
|
A11yModule,
|
|
1295
|
-
KbqSelect,
|
|
1569
|
+
KbqSelect,
|
|
1570
|
+
KbqSelectLoading, KbqOptionModule,
|
|
1296
1571
|
KbqFormFieldModule] }); }
|
|
1297
1572
|
}
|
|
1298
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: KbqSelectModule, decorators: [{
|
|
1299
1574
|
type: NgModule,
|
|
1300
1575
|
args: [{
|
|
1301
1576
|
imports: [
|
|
@@ -1313,7 +1588,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1313
1588
|
NgTemplateOutlet,
|
|
1314
1589
|
A11yModule,
|
|
1315
1590
|
KbqSelect,
|
|
1316
|
-
KbqOptionTooltip
|
|
1591
|
+
KbqOptionTooltip,
|
|
1592
|
+
KbqSelectLoading,
|
|
1593
|
+
KbqSelectError,
|
|
1594
|
+
KbqSelectNoOptions,
|
|
1595
|
+
KbqSelectErrorText
|
|
1317
1596
|
],
|
|
1318
1597
|
exports: [
|
|
1319
1598
|
KbqSelect,
|
|
@@ -1324,7 +1603,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1324
1603
|
KbqSelectMatcher,
|
|
1325
1604
|
KbqSelectTrigger,
|
|
1326
1605
|
KbqSelectSearchEmptyResult,
|
|
1327
|
-
|
|
1606
|
+
KbqSelectLoading,
|
|
1607
|
+
KbqFormFieldModule,
|
|
1608
|
+
KbqSelectError,
|
|
1609
|
+
KbqSelectNoOptions,
|
|
1610
|
+
KbqSelectErrorText
|
|
1328
1611
|
],
|
|
1329
1612
|
providers: [KBQ_SELECT_SCROLL_STRATEGY_PROVIDER]
|
|
1330
1613
|
}]
|
|
@@ -1334,5 +1617,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
|
|
|
1334
1617
|
* Generated bundle index. Do not edit.
|
|
1335
1618
|
*/
|
|
1336
1619
|
|
|
1337
|
-
export { KBQ_SELECT_OPTIONS, KbqOptionTooltip, KbqSelect, KbqSelectChange, KbqSelectModule, kbqSelectOptionsProvider };
|
|
1620
|
+
export { KBQ_SELECT_OPTIONS, KbqOptionTooltip, KbqSelect, KbqSelectChange, KbqSelectError, KbqSelectErrorText, KbqSelectLoading, KbqSelectModule, KbqSelectNoOptions, delayBeforeDisplayingResultWithoutOptions, kbqSelectOptionsProvider, minimumTimeToDisplayLoading };
|
|
1338
1621
|
//# sourceMappingURL=koobiq-components-select.mjs.map
|