@koobiq/components 19.4.1 → 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/LICENSE +1 -1
- package/accordion/accordion-content.d.ts +1 -1
- package/accordion/accordion-content.directive.d.ts +22 -7
- package/accordion/accordion-header.directive.d.ts +2 -2
- package/accordion/accordion-item.d.ts +74 -3
- package/accordion/accordion-trigger.component.d.ts +15 -2
- package/accordion/accordion-trigger.directive.d.ts +13 -5
- package/accordion/accordion.component.d.ts +67 -6
- package/accordion/accordion.component.scss +9 -27
- package/accordion/public-api.d.ts +0 -2
- 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/checkbox/checkbox.scss +5 -5
- package/clamped-text/clamped-list.d.ts +41 -0
- package/clamped-text/clamped-text.d.ts +10 -6
- package/clamped-text/constants.d.ts +21 -1
- package/clamped-text/index.d.ts +1 -0
- package/clamped-text/module.d.ts +2 -1
- package/code-block/code-block-tokens.scss +35 -16
- package/code-block/code-block.d.ts +17 -5
- package/code-block/code-block.module.d.ts +1 -1
- package/code-block/code-block.scss +1 -0
- package/code-block/types.d.ts +9 -0
- package/core/common-behaviors/flex.d.ts +4 -0
- package/core/common-behaviors/index.d.ts +1 -0
- package/core/error/error-state-matcher.d.ts +10 -0
- package/core/form-field/form-field-ref.d.ts +3 -1
- package/core/forms/_forms.scss +10 -3
- package/core/locales/en-US.d.ts +2 -0
- package/core/locales/es-LA.d.ts +2 -0
- package/core/locales/locale-service.d.ts +10 -0
- package/core/locales/pt-BR.d.ts +2 -0
- package/core/locales/ru-RU.d.ts +2 -0
- package/core/locales/tk-TM.d.ts +2 -0
- package/core/locales/types.d.ts +2 -0
- package/core/option/_option-action-theme.scss +1 -0
- package/core/option/_option-theme.scss +4 -17
- package/core/option/action-container.scss +4 -6
- package/core/option/option.d.ts +5 -1
- package/core/option/option.scss +5 -0
- package/core/pop-up/pop-up-trigger.d.ts +11 -2
- package/core/select/common.d.ts +4 -4
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +2 -2
- package/core/styles/common/_groups-mixins.scss +79 -0
- package/core/styles/common/_groups.scss +4 -34
- package/core/styles/common/_overlay.scss +5 -1
- 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/dropdown/dropdown.component.d.ts +2 -1
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -1
- package/fesm2022/koobiq-components-accordion.mjs +301 -237
- 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-breadcrumbs.mjs.map +1 -1
- 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 +18 -20
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +134 -47
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +54 -22
- 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 +313 -257
- 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 +48 -23
- 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 +118 -106
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +77 -65
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +32 -28
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +115 -65
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +28 -26
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +23 -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 +96 -63
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +34 -34
- package/fesm2022/koobiq-components-navbar.mjs +53 -46
- 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 +29 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- 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 +342 -58
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +50 -41
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +62 -13
- 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 +54 -54
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +44 -47
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +10 -9
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +25 -25
- 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 +95 -52
- 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 +15 -12
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +64 -52
- 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 +5 -16
- package/form-field/form-field.d.ts +25 -1
- package/form-field/form-field.scss +26 -2
- package/icon/icon-button.component.d.ts +3 -0
- package/icon/icon-button.scss +4 -0
- package/inline-edit/inline-edit-tokens.scss +3 -3
- package/inline-edit/inline-edit.d.ts +31 -11
- package/inline-edit/inline-edit.scss +28 -30
- package/input/input-password.d.ts +1 -0
- package/input/input.d.ts +1 -0
- package/link/_link-theme.scss +18 -8
- package/link/link-tokens.scss +9 -6
- package/link/link.component.d.ts +9 -5
- 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 +12 -7
- package/markdown/markdown.scss +0 -11
- package/modal/modal-ref.class.d.ts +1 -0
- package/modal/modal.component.d.ts +14 -8
- package/modal/modal.scss +1 -0
- package/modal/modal.type.d.ts +5 -0
- package/navbar/navbar-item.component.d.ts +3 -1
- package/navbar/navbar.scss +3 -0
- package/overflow-items/overflow-items.d.ts +8 -2
- 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 -6
- 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 +193 -29
- package/select/select.module.d.ts +3 -2
- package/sidepanel/_sidepanel-theme.scss +1 -7
- package/sidepanel/sidepanel-config.d.ts +10 -2
- package/sidepanel/sidepanel.service.d.ts +0 -1
- package/skeleton/skeleton.d.ts +12 -3
- package/skeleton/skeleton.scss +22 -7
- package/split-button/_split-button-theme.scss +2 -1
- package/tabs/_tabs-common.scss +2 -1
- package/tags/tag-input.d.ts +4 -3
- package/tags/tag-list.component.d.ts +1 -0
- package/tags/tag-tokens.scss +4 -4
- package/textarea/textarea.component.d.ts +1 -0
- 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 +22 -2
- package/top-bar/top-bar.scss +3 -0
- package/tree/_tree-theme.scss +0 -19
- package/tree/tree-option.component.d.ts +9 -3
- package/tree/tree-option.scss +9 -5
- package/tree/tree-selection.component.d.ts +2 -0
- package/tree-select/tree-select.component.d.ts +1 -0
- package/accordion/accordion-item.directive.d.ts +0 -72
- package/accordion/accordion-root.directive.d.ts +0 -64
|
@@ -39,9 +39,13 @@ export declare class KbqSearchExpandable implements ControlValueAccessor, AfterV
|
|
|
39
39
|
isEmitValueByEnterEnabled: boolean;
|
|
40
40
|
/** Timeout in milliseconds for emit event. The default value is taken from defaultEmitValueTimeout */
|
|
41
41
|
emitValueTimeout: number;
|
|
42
|
+
/** Tooltip text for the search button. When set, overrides localeData.tooltip */
|
|
43
|
+
get tooltipText(): string;
|
|
44
|
+
set tooltipText(value: string | null);
|
|
45
|
+
private _tooltipText;
|
|
42
46
|
/** Placeholder for input when expanded */
|
|
43
47
|
get placeholder(): string;
|
|
44
|
-
set placeholder(value: string);
|
|
48
|
+
set placeholder(value: string | null);
|
|
45
49
|
private _placeholder;
|
|
46
50
|
get disabled(): boolean;
|
|
47
51
|
set disabled(value: boolean);
|
|
@@ -77,7 +81,7 @@ export declare class KbqSearchExpandable implements ControlValueAccessor, AfterV
|
|
|
77
81
|
private runFocusMonitor;
|
|
78
82
|
private stopFocusMonitor;
|
|
79
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSearchExpandable, never>;
|
|
80
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSearchExpandable, "kbq-search-expandable", never, { "isOpened": { "alias": "isOpened"; "required": false; }; "isEmitValueByEnterEnabled": { "alias": "isEmitValueByEnterEnabled"; "required": false; }; "emitValueTimeout": { "alias": "emitValueTimeout"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "isOpenedChange": "isOpenedChange"; }, never, never, true, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSearchExpandable, "kbq-search-expandable", never, { "isOpened": { "alias": "isOpened"; "required": false; }; "isEmitValueByEnterEnabled": { "alias": "isEmitValueByEnterEnabled"; "required": false; }; "emitValueTimeout": { "alias": "emitValueTimeout"; "required": false; }; "tooltipText": { "alias": "tooltipText"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, { "isOpenedChange": "isOpenedChange"; }, never, never, true, never>;
|
|
81
85
|
static ngAcceptInputType_isOpened: unknown;
|
|
82
86
|
static ngAcceptInputType_emitValueTimeout: unknown;
|
|
83
87
|
static ngAcceptInputType_disabled: unknown;
|
package/select/public-api.d.ts
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class KbqSelectLoading {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectLoading, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelectLoading, "kbq-select-loading, [kbq-select-loading]", ["kbqSelectLoading"], {}, {}, never, ["kbq-progress-spinner"], true, never>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This component renders the error for a Select component.
|
|
8
|
+
* The error message can be displayed in two visual variants: a default centered layout (when [paging] is falsy)
|
|
9
|
+
* or a variant with left‑aligned text suitable for pagination controls (when [paging] is truthy).
|
|
10
|
+
*/
|
|
11
|
+
export declare class KbqSelectError {
|
|
12
|
+
/** Indicates whether styles for pagination controls should be used. */
|
|
13
|
+
paging: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectError, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelectError, "kbq-select-error, [kbq-select-error]", ["kbqSelectError"], { "paging": { "alias": "paging"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Marks an element as the error text container for a *KbqSelect* component.
|
|
19
|
+
*/
|
|
20
|
+
export declare class KbqSelectErrorText {
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectErrorText, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSelectErrorText, "[kbq-select-error-text]", ["kbqSelectErrorText"], {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Component that represents the empty state of a select dropdown.
|
|
26
|
+
*/
|
|
27
|
+
export declare class KbqSelectNoOptions {
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectNoOptions, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelectNoOptions, "kbq-select-no-options, [kbq-select-no-options]", ["kbqSelectNoOptions"], {}, {}, never, ["*"], true, never>;
|
|
30
|
+
}
|
|
@@ -5,7 +5,7 @@ import { CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
|
5
5
|
import { AfterContentInit, ChangeDetectorRef, DestroyRef, DoCheck, ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy, OnInit, Provider, QueryList, Renderer2, TemplateRef } from '@angular/core';
|
|
6
6
|
import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
|
|
7
7
|
import { ActiveDescendantKeyManager } from '@koobiq/cdk/a11y';
|
|
8
|
-
import { CanUpdateErrorState, ErrorStateMatcher, KbqAbstractSelect, KbqComponentColors, KbqLocaleService, KbqOptgroup, KbqOption, KbqOptionBase, KbqOptionSelectionChange, KbqSelectMatcher, KbqSelectSearch, KbqSelectTrigger } from '@koobiq/components/core';
|
|
8
|
+
import { CanUpdateErrorState, ErrorStateMatcher, KbqAbstractSelect, KbqComponentColors, KbqLocaleService, KbqOptgroup, KbqOption, KbqOptionBase, KbqOptionSelectionChange, KbqSelectMatcher, KbqSelectSearch, KbqSelectSearchEmptyResult, KbqSelectTrigger } from '@koobiq/components/core';
|
|
9
9
|
import { KbqCleaner, KbqFormField, KbqFormFieldControl } from '@koobiq/components/form-field';
|
|
10
10
|
import { KbqTag } from '@koobiq/components/tags';
|
|
11
11
|
import { Observable, Subject } from 'rxjs';
|
|
@@ -60,6 +60,10 @@ export declare const KBQ_SELECT_OPTIONS: InjectionToken<Partial<{
|
|
|
60
60
|
}>>;
|
|
61
61
|
/** Utility provider for `KBQ_SELECT_OPTIONS`. */
|
|
62
62
|
export declare const kbqSelectOptionsProvider: (options: KbqSelectOptions) => Provider;
|
|
63
|
+
/** Delay in milliseconds before displaying a result when there are no options. */
|
|
64
|
+
export declare const delayBeforeDisplayingResultWithoutOptions = 101;
|
|
65
|
+
/** Minimum time in milliseconds to display the loading state. */
|
|
66
|
+
export declare const minimumTimeToDisplayLoading = 300;
|
|
63
67
|
export declare class KbqSelect extends KbqAbstractSelect implements AfterContentInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<any>, CanUpdateErrorState {
|
|
64
68
|
private readonly _changeDetectorRef;
|
|
65
69
|
private readonly _ngZone;
|
|
@@ -74,6 +78,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
74
78
|
ngControl: NgControl;
|
|
75
79
|
private readonly scrollStrategyFactory;
|
|
76
80
|
protected localeService?: KbqLocaleService | undefined;
|
|
81
|
+
private readonly useLegacyValidation;
|
|
77
82
|
/** @docs-private */
|
|
78
83
|
protected readonly destroyRef: DestroyRef;
|
|
79
84
|
protected readonly isBrowser: boolean;
|
|
@@ -110,14 +115,15 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
110
115
|
hiddenItems: number;
|
|
111
116
|
/** The last measured value for the trigger's client bounding rect. */
|
|
112
117
|
triggerRect: DOMRect;
|
|
113
|
-
/** The cached font-size of the trigger element. */
|
|
118
|
+
/** The cached font-size of the trigger element in pixels. */
|
|
114
119
|
triggerFontSize: number;
|
|
115
|
-
/** Deals with the selection logic. */
|
|
120
|
+
/** Deals with the selection logic. Manages selected options and their states. */
|
|
116
121
|
selectionModel: SelectionModel<KbqOptionBase>;
|
|
122
|
+
/** Previously selected options before the current selection was made. */
|
|
117
123
|
previousSelectionModelSelected: KbqOptionBase[];
|
|
118
124
|
/** Manages keyboard events for options in the panel. */
|
|
119
125
|
keyManager: ActiveDescendantKeyManager<KbqOption>;
|
|
120
|
-
/** The value of the select panel's transform-origin property. */
|
|
126
|
+
/** The value of the select panel's transform-origin property for animations. */
|
|
121
127
|
transformOrigin: string;
|
|
122
128
|
/** Emits when the panel element is finished transforming in. */
|
|
123
129
|
panelDoneAnimatingStream: Subject<string>;
|
|
@@ -125,7 +131,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
125
131
|
scrollStrategy: any;
|
|
126
132
|
/**
|
|
127
133
|
* The y-offset of the overlay panel in relation to the trigger's top start corner.
|
|
128
|
-
* This must be adjusted to align the selected option text over the trigger text
|
|
134
|
+
* This must be adjusted to align the selected option text over the trigger text
|
|
129
135
|
* when the panel opens. Will change based on the y-position of the selected option.
|
|
130
136
|
*/
|
|
131
137
|
offsetY: number;
|
|
@@ -140,27 +146,41 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
140
146
|
* Trigger - is a clickable field to open select dropdown panel
|
|
141
147
|
*/
|
|
142
148
|
trigger: ElementRef;
|
|
149
|
+
/** Reference to the overlay panel element. */
|
|
143
150
|
panel: ElementRef;
|
|
151
|
+
/** Reference to the container element that holds the options. */
|
|
144
152
|
optionsContainer: ElementRef;
|
|
153
|
+
/** Reference to the CDK connected overlay directive. */
|
|
145
154
|
overlayDir: CdkConnectedOverlay;
|
|
155
|
+
/** Reference to the optional footer element in the panel. */
|
|
146
156
|
footer?: ElementRef;
|
|
157
|
+
/** Reference to the CDK virtual scroll directive for virtual scrolling support. */
|
|
147
158
|
cdkVirtualForOf?: CdkVirtualForOf<any>;
|
|
159
|
+
/** Query list of tags displayed in multiple selection mode. */
|
|
148
160
|
tags: QueryList<KbqTag>;
|
|
149
|
-
/** User-supplied override of the trigger element. */
|
|
161
|
+
/** User-supplied override of the trigger element for custom rendering. */
|
|
150
162
|
customTrigger: KbqSelectTrigger;
|
|
163
|
+
/** User-supplied matcher component for custom value matching logic. */
|
|
151
164
|
customMatcher: KbqSelectMatcher;
|
|
165
|
+
/** Custom template reference for rendering tag content. */
|
|
152
166
|
customTagTemplateRef: TemplateRef<any>;
|
|
167
|
+
/** Reference to the optional cleaner element for clearing selection. */
|
|
153
168
|
cleaner: KbqCleaner;
|
|
154
169
|
/** All of the defined select options. */
|
|
155
170
|
options: QueryList<KbqOption>;
|
|
156
171
|
/** All of the defined groups of options. */
|
|
157
172
|
optionGroups: QueryList<KbqOptgroup>;
|
|
173
|
+
/** Reference to the optional search component. */
|
|
158
174
|
search: KbqSelectSearch;
|
|
175
|
+
/** Reference to the optional empty search result component. */
|
|
176
|
+
searchEmpty: KbqSelectSearchEmptyResult;
|
|
177
|
+
/** Template string for hidden items text. Supports {{ number }} placeholder. */
|
|
159
178
|
hiddenItemsText: string;
|
|
160
179
|
/** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */
|
|
161
180
|
panelClass: string | string[] | Set<string> | {
|
|
162
181
|
[key: string]: any;
|
|
163
182
|
};
|
|
183
|
+
/** Classes to be passed to the overlay backdrop. */
|
|
164
184
|
backdropClass: string;
|
|
165
185
|
/** Object used to control when error messages are shown. */
|
|
166
186
|
errorStateMatcher: ErrorStateMatcher;
|
|
@@ -170,13 +190,14 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
170
190
|
*/
|
|
171
191
|
sortComparator: (a: KbqOptionBase, b: KbqOptionBase, options: KbqOptionBase[]) => number;
|
|
172
192
|
/**
|
|
173
|
-
* Whether to use a multiline matcher or not. Default is false
|
|
193
|
+
* Whether to use a multiline matcher or not. Default is false.
|
|
194
|
+
* When true, allows multiple lines of text in the selected value display.
|
|
174
195
|
*/
|
|
175
196
|
multiline: boolean;
|
|
176
197
|
/**
|
|
177
198
|
* Controls when the search functionality is displayed based on the number of available options.
|
|
178
199
|
*
|
|
179
|
-
* Automatically enables search hiding if value provided, even if `defaultOptions.
|
|
200
|
+
* Automatically enables search hiding if value provided, even if `defaultOptions.searchMinOptionsThreshold` is provided.
|
|
180
201
|
* @default undefined
|
|
181
202
|
*/
|
|
182
203
|
set searchMinOptionsThreshold(value: 'auto' | number | undefined);
|
|
@@ -184,8 +205,10 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
184
205
|
private _searchMinOptionsThreshold;
|
|
185
206
|
/** Combined stream of all of the child options' change events. */
|
|
186
207
|
readonly optionSelectionChanges: Observable<KbqOptionSelectionChange>;
|
|
187
|
-
/** Event emitted when the select panel has been toggled. */
|
|
208
|
+
/** Event emitted when the select panel has been toggled. Emits true when opened, false when closed. */
|
|
188
209
|
readonly openedChange: EventEmitter<boolean>;
|
|
210
|
+
/** Event emitted before the select panel starts opening. */
|
|
211
|
+
readonly beforeOpened: import("@angular/core").OutputEmitterRef<void>;
|
|
189
212
|
/** Event emitted when the select has been opened. */
|
|
190
213
|
readonly openedStream: Observable<void>;
|
|
191
214
|
/** Event emitted when the select has been closed. */
|
|
@@ -198,27 +221,47 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
198
221
|
* @docs-private
|
|
199
222
|
*/
|
|
200
223
|
readonly valueChange: EventEmitter<any>;
|
|
224
|
+
/**
|
|
225
|
+
* Whether the overlay should have a backdrop.
|
|
226
|
+
* When true, clicking the backdrop will close the select.
|
|
227
|
+
*/
|
|
201
228
|
get hasBackdrop(): boolean;
|
|
202
229
|
set hasBackdrop(value: boolean);
|
|
203
230
|
private _hasBackdrop;
|
|
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
|
+
*/
|
|
204
235
|
get placeholder(): string;
|
|
205
236
|
set placeholder(value: string);
|
|
206
237
|
private _placeholder;
|
|
238
|
+
/**
|
|
239
|
+
* Whether the select is required. Affects validation and display of placeholder.
|
|
240
|
+
*/
|
|
207
241
|
get required(): boolean;
|
|
208
242
|
set required(value: boolean);
|
|
209
243
|
private _required;
|
|
244
|
+
/**
|
|
245
|
+
* Whether multiple options can be selected.
|
|
246
|
+
* Note: This cannot be changed dynamically after initialization.
|
|
247
|
+
*/
|
|
210
248
|
get multiple(): boolean;
|
|
211
249
|
set multiple(value: boolean);
|
|
212
250
|
private _multiple;
|
|
213
251
|
/**
|
|
214
|
-
* Function to compare the option values with the selected values.
|
|
215
|
-
*
|
|
216
|
-
*
|
|
252
|
+
* Function to compare the option values with the selected values.
|
|
253
|
+
* The first argument is a value from an option.
|
|
254
|
+
* The second is a value from the selection.
|
|
255
|
+
* Should return true if the values match.
|
|
256
|
+
* Defaults to strict equality comparison.
|
|
217
257
|
*/
|
|
218
258
|
get compareWith(): (o1: any, o2: any) => boolean;
|
|
219
259
|
set compareWith(fn: (o1: any, o2: any) => boolean);
|
|
220
260
|
/**
|
|
221
|
-
* Function for handling the
|
|
261
|
+
* Function for handling the Ctrl + A (select all) keyboard combination.
|
|
262
|
+
* By default, the internal handler selects all options.
|
|
263
|
+
* @param event The keyboard event that triggered the handler.
|
|
264
|
+
* @param select Reference to this select component.
|
|
222
265
|
*/
|
|
223
266
|
get selectAllHandler(): (event: KeyboardEvent, select: KbqSelect) => void;
|
|
224
267
|
set selectAllHandler(fn: (event: KeyboardEvent, select: KbqSelect) => void);
|
|
@@ -228,71 +271,126 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
228
271
|
*/
|
|
229
272
|
panelWidth: KbqSelectPanelWidth;
|
|
230
273
|
/**
|
|
231
|
-
* Minimum width of the panel.
|
|
274
|
+
* Minimum width of the panel in pixels.
|
|
232
275
|
* If minWidth is larger than window width, it will be ignored.
|
|
233
276
|
*/
|
|
234
277
|
panelMinWidth: Exclude<KbqSelectPanelWidth, 'auto'>;
|
|
235
|
-
/** Value of the select control. */
|
|
278
|
+
/** Value of the select control. Can be a single value or array of values for multiple selection. */
|
|
236
279
|
get value(): any;
|
|
237
280
|
set value(newValue: any);
|
|
238
281
|
private _value;
|
|
282
|
+
/**
|
|
283
|
+
* Unique identifier for the select component.
|
|
284
|
+
* Auto-generates an ID if not provided.
|
|
285
|
+
*/
|
|
239
286
|
get id(): string;
|
|
240
287
|
set id(value: string);
|
|
241
288
|
private _id;
|
|
289
|
+
/**
|
|
290
|
+
* Sets the tabIndex of the select element.
|
|
291
|
+
* Automatically set to -1 when disabled.
|
|
292
|
+
*/
|
|
242
293
|
get tabIndex(): number;
|
|
243
294
|
set tabIndex(value: number);
|
|
244
295
|
private _tabIndex;
|
|
296
|
+
/**
|
|
297
|
+
* Whether the select is disabled.
|
|
298
|
+
* When disabled, the select cannot be opened and its value cannot be changed.
|
|
299
|
+
*/
|
|
245
300
|
get disabled(): boolean;
|
|
246
301
|
set disabled(value: boolean);
|
|
247
302
|
private _disabled;
|
|
248
303
|
/** Whether the select is focused. */
|
|
249
304
|
get focused(): boolean;
|
|
250
305
|
set focused(value: boolean);
|
|
306
|
+
/** Whether the select panel is currently open. */
|
|
251
307
|
panelOpen: boolean;
|
|
252
|
-
/**
|
|
308
|
+
/** Whether virtual scrolling is enabled for the options panel. */
|
|
253
309
|
withVirtualScroll: boolean;
|
|
254
310
|
private _focused;
|
|
311
|
+
/** Whether the search returned no results. */
|
|
255
312
|
get isEmptySearchResult(): boolean;
|
|
313
|
+
/** Whether the cleaner (clear button) should be shown. */
|
|
256
314
|
get canShowCleaner(): boolean;
|
|
315
|
+
/** Returns the currently selected option(s). Single value or array for multiple selection. */
|
|
257
316
|
get selected(): KbqOptionBase | KbqOptionBase[];
|
|
317
|
+
/** Returns the display value for the trigger element. */
|
|
258
318
|
get triggerValue(): string;
|
|
319
|
+
/** Returns all selected options in display order. */
|
|
259
320
|
get triggerValues(): KbqOptionBase[];
|
|
321
|
+
/** Whether no option is currently selected. */
|
|
260
322
|
get empty(): boolean;
|
|
323
|
+
/** Whether there are no options available. */
|
|
324
|
+
get noOptions(): boolean;
|
|
325
|
+
/** Returns the first selected option that is not disabled. */
|
|
261
326
|
get firstSelected(): KbqOptionBase | null;
|
|
327
|
+
/** Whether the first selected option is filtered (not visible in the list). */
|
|
262
328
|
get firstFiltered(): boolean;
|
|
263
329
|
/** @docs-private */
|
|
264
330
|
get colorForState(): KbqComponentColors;
|
|
265
|
-
/** Whether multiple choice is enabled
|
|
331
|
+
/** Whether multiple choice is enabled. True if multiple or multiline mode is active. */
|
|
266
332
|
get multiSelection(): boolean;
|
|
333
|
+
/** Subscription to the close event of the overlay. */
|
|
267
334
|
private closeSubscription;
|
|
268
335
|
/** The scroll position of the overlay panel, calculated to center the selected option. */
|
|
269
336
|
private scrollTop;
|
|
270
|
-
/** Unique id for this input. */
|
|
337
|
+
/** Unique id for this input. Auto-incremented for each instance. */
|
|
271
338
|
private readonly uid;
|
|
339
|
+
/** Subject that emits when the component visibility changes. */
|
|
272
340
|
private visibleChanges;
|
|
273
|
-
/** Width of the overlay panel. */
|
|
341
|
+
/** Width of the overlay panel in pixels or as a string. */
|
|
274
342
|
protected overlayWidth: string | number;
|
|
275
|
-
/**
|
|
343
|
+
/** Minimum width of the overlay panel in pixels. */
|
|
276
344
|
protected overlayMinWidth: string | number;
|
|
277
|
-
/** Origin for the overlay panel. */
|
|
345
|
+
/** Origin element for the overlay panel positioning. */
|
|
278
346
|
protected overlayOrigin?: CdkOverlayOrigin | ElementRef;
|
|
347
|
+
/** Flag indicating if the dropdown class has been added to the overlay container. */
|
|
348
|
+
private classAddedToOverlayContainer;
|
|
349
|
+
private openPanelTimeout;
|
|
279
350
|
constructor(_changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone, _renderer: Renderer2, defaultErrorStateMatcher: ErrorStateMatcher, elementRef: ElementRef<HTMLElement>, overlayContainer: OverlayContainer, _dir: Directionality, parentForm: NgForm, parentFormGroup: FormGroupDirective, parentFormField: KbqFormField, ngControl: NgControl, scrollStrategyFactory: any, localeService?: KbqLocaleService | undefined);
|
|
351
|
+
/** Lifecycle hook called after component initialization. Initializes selection model and subscriptions. */
|
|
280
352
|
ngOnInit(): void;
|
|
353
|
+
/** Lifecycle hook for change detection. Updates visibility and error state. */
|
|
281
354
|
ngDoCheck(): void;
|
|
355
|
+
/** Lifecycle hook after content initialization. Sets up key manager and option subscriptions. */
|
|
282
356
|
ngAfterContentInit(): void;
|
|
357
|
+
/** Lifecycle hook when component is destroyed. Cleans up subscriptions. */
|
|
283
358
|
ngOnDestroy(): void;
|
|
359
|
+
/** Updates the error state based on the error state matcher. */
|
|
284
360
|
updateErrorState(): void;
|
|
361
|
+
/**
|
|
362
|
+
* Formats the hidden items text with the number of hidden items.
|
|
363
|
+
* @param hiddenItemsText Template string with {{ number }} placeholder.
|
|
364
|
+
* @param hiddenItems Number of hidden items to display.
|
|
365
|
+
* @returns Formatted string with the number of hidden items.
|
|
366
|
+
*/
|
|
285
367
|
hiddenItemsTextFormatter(hiddenItemsText: string, hiddenItems: number): string;
|
|
368
|
+
/**
|
|
369
|
+
* Clears the current selection.
|
|
370
|
+
* @param $event Mouse event to prevent default behavior.
|
|
371
|
+
*/
|
|
286
372
|
clearValue($event: any): void;
|
|
287
373
|
/** `View -> model callback called when value changes` */
|
|
288
374
|
onChange: (value: any) => void;
|
|
289
375
|
/** `View -> model callback called when select has been touched` */
|
|
290
376
|
onTouched: () => void;
|
|
377
|
+
/** Resets the search component if present. */
|
|
291
378
|
resetSearch(): void;
|
|
292
379
|
/** Toggles the overlay panel open or closed. */
|
|
293
380
|
toggle(): void;
|
|
294
|
-
/**
|
|
381
|
+
/**
|
|
382
|
+
* Triggers the opening of the panel component.
|
|
383
|
+
* If the component is disabled or the panel is already open, the call is ignored.
|
|
384
|
+
* Otherwise, the (beforeOpened) event is emitted.
|
|
385
|
+
* When no options are available, the panel is opened after a short delay;
|
|
386
|
+
* if options exist, it opens immediately.
|
|
387
|
+
*/
|
|
295
388
|
open(): void;
|
|
389
|
+
/**
|
|
390
|
+
* Internal method to open the panel. Handles overlay positioning and sizing.
|
|
391
|
+
* Sets up the overlay dimensions based on trigger size and configured options.
|
|
392
|
+
*/
|
|
393
|
+
openPanel(): void;
|
|
296
394
|
/** Closes the overlay panel and focuses the host element. */
|
|
297
395
|
close(): void;
|
|
298
396
|
/**
|
|
@@ -325,8 +423,18 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
325
423
|
* @param isDisabled Sets whether the component is disabled.
|
|
326
424
|
*/
|
|
327
425
|
setDisabledState(isDisabled: boolean): void;
|
|
426
|
+
/**
|
|
427
|
+
* Checks if the current direction is RTL (right-to-left).
|
|
428
|
+
* @returns True if RTL mode is active, false otherwise.
|
|
429
|
+
*/
|
|
328
430
|
isRtl(): boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Handles all keyboard events for the select.
|
|
433
|
+
* Delegates to appropriate handler based on panel state.
|
|
434
|
+
* @param event The keyboard event to handle.
|
|
435
|
+
*/
|
|
329
436
|
handleKeydown(event: KeyboardEvent): void;
|
|
437
|
+
/** Handles focus event on the select element. */
|
|
330
438
|
onFocus(): void;
|
|
331
439
|
/**
|
|
332
440
|
* Calls the touched callback only if the panel is closed. Otherwise, the trigger will
|
|
@@ -335,9 +443,10 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
335
443
|
onBlur(): void;
|
|
336
444
|
/**
|
|
337
445
|
* Callback that is invoked when the overlay panel has been attached.
|
|
446
|
+
* Sets up position change subscription and closing actions.
|
|
338
447
|
*/
|
|
339
448
|
onAttached(): void;
|
|
340
|
-
/** Returns the theme to be used on the panel. */
|
|
449
|
+
/** Returns the theme to be used on the panel based on parent form field color. */
|
|
341
450
|
getPanelTheme(): string;
|
|
342
451
|
/** Focuses the select element. */
|
|
343
452
|
focus(): void;
|
|
@@ -346,34 +455,77 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
346
455
|
* @docs-private
|
|
347
456
|
*/
|
|
348
457
|
onContainerClick(): void;
|
|
349
|
-
/**
|
|
458
|
+
/**
|
|
459
|
+
* Handles removal of a matched item in the trigger.
|
|
460
|
+
* @param option The option to remove from selection.
|
|
461
|
+
* @param $event The mouse event that triggered the removal.
|
|
462
|
+
*/
|
|
350
463
|
onRemoveMatcherItem(option: KbqOptionBase, $event: any): void;
|
|
464
|
+
/**
|
|
465
|
+
* Calculates the number of hidden items in multiple selection mode.
|
|
466
|
+
* Updates the hiddenItems property and triggers change detection.
|
|
467
|
+
*/
|
|
351
468
|
calculateHiddenItems: () => void;
|
|
469
|
+
/**
|
|
470
|
+
* Gets the height of a single option item.
|
|
471
|
+
* @returns The height in pixels of the first option, or 0 if no options exist.
|
|
472
|
+
*/
|
|
352
473
|
getItemHeight(): number;
|
|
474
|
+
/**
|
|
475
|
+
* Handles click events on the select.
|
|
476
|
+
* Closes the panel if click is inside the footer.
|
|
477
|
+
* @param $event The mouse event to handle.
|
|
478
|
+
*/
|
|
353
479
|
handleClick($event: MouseEvent): void;
|
|
354
480
|
/** @docs-private */
|
|
355
481
|
setSelectedOptionsByClick(option: KbqOption): void;
|
|
356
482
|
/** @docs-private */
|
|
357
483
|
protected shouldShowSearch(): boolean;
|
|
484
|
+
/** Updates locale parameters from the locale service. */
|
|
358
485
|
private updateLocaleParams;
|
|
486
|
+
/** Checks if the component is currently visible in the viewport. */
|
|
359
487
|
private isVisible;
|
|
488
|
+
/** Gets the current overlay position index in the container. */
|
|
360
489
|
private currentOverlayPosition;
|
|
490
|
+
/** Gets the position index of modal overlay in the container. */
|
|
361
491
|
private modalOverlayPosition;
|
|
492
|
+
/**
|
|
493
|
+
* Creates an observable of actions that should close the select panel.
|
|
494
|
+
* Includes outside pointer events and overlay detachments.
|
|
495
|
+
*/
|
|
362
496
|
private closingActions;
|
|
497
|
+
/** Gets the height of the options container element. */
|
|
363
498
|
private getHeightOfOptionsContainer;
|
|
499
|
+
/** Updates the keyboard manager scroll size based on options container height. */
|
|
364
500
|
private updateScrollSize;
|
|
501
|
+
/** Calculates the total width of all selected items in the matcher. */
|
|
365
502
|
private getTotalItemsWidthInMatcher;
|
|
503
|
+
/**
|
|
504
|
+
* Calculates the width of a single item including margins.
|
|
505
|
+
* @param element The DOM element to measure.
|
|
506
|
+
* @returns Total width including margins and gap.
|
|
507
|
+
*/
|
|
366
508
|
private getItemWidth;
|
|
367
509
|
/** Handles keyboard events while the select is closed. */
|
|
368
510
|
private handleClosedKeydown;
|
|
369
|
-
/** Handles keyboard events when the
|
|
511
|
+
/** Handles keyboard events when the select is open. */
|
|
370
512
|
private handleOpenKeydown;
|
|
513
|
+
/**
|
|
514
|
+
* Initializes the selection based on the current value.
|
|
515
|
+
* Defers execution to avoid change detection errors.
|
|
516
|
+
*/
|
|
371
517
|
private initializeSelection;
|
|
372
518
|
/**
|
|
373
|
-
* Sets the selected option based on a value.
|
|
374
|
-
* found with the designated value, the select trigger is cleared.
|
|
519
|
+
* Sets the selected option based on a value.
|
|
520
|
+
* If no option can be found with the designated value, the select trigger is cleared.
|
|
521
|
+
* @param value The value to select. Can be a single value or array for multiple selection.
|
|
375
522
|
*/
|
|
376
523
|
private setSelectionByValue;
|
|
524
|
+
/**
|
|
525
|
+
* Finds the option that corresponds to the given value.
|
|
526
|
+
* @param value The value to find.
|
|
527
|
+
* @returns The matching option or undefined if not found.
|
|
528
|
+
*/
|
|
377
529
|
private getCorrespondOption;
|
|
378
530
|
/**
|
|
379
531
|
* Finds and selects and option based on its value.
|
|
@@ -386,7 +538,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
386
538
|
private resetOptions;
|
|
387
539
|
/** Invoked when an option is clicked. */
|
|
388
540
|
private onSelect;
|
|
389
|
-
/** Sorts the selected values
|
|
541
|
+
/** Sorts the selected values based on their order in the panel. */
|
|
390
542
|
private sortValues;
|
|
391
543
|
/** Emits change event to set the model value. */
|
|
392
544
|
private propagateChanges;
|
|
@@ -403,10 +555,22 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
403
555
|
private _compareWith;
|
|
404
556
|
/** Function for handling the combination Ctrl + A (select all). By default, the internal handler is used. */
|
|
405
557
|
private _selectAllHandler;
|
|
558
|
+
/**
|
|
559
|
+
* Calculates the total width and count of visible items.
|
|
560
|
+
* @returns Tuple of [totalVisibleItemsWidth, visibleItemsCount].
|
|
561
|
+
*/
|
|
406
562
|
private getTotalVisibleItems;
|
|
563
|
+
/**
|
|
564
|
+
* Creates a hidden clone of the trigger element for width calculations.
|
|
565
|
+
* @returns Clone of the trigger element positioned off-screen.
|
|
566
|
+
*/
|
|
407
567
|
private buildTriggerClone;
|
|
568
|
+
/** Adds the dropdown class to the overlay container when first select opens. */
|
|
569
|
+
private addClassToOverlayContainer;
|
|
570
|
+
/** Removes the dropdown class from the overlay container when select closes. */
|
|
571
|
+
private removeClassFromOverlayContainer;
|
|
408
572
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelect, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; host: true; }, { optional: true; self: true; }, null, { optional: true; }]>;
|
|
409
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelect, "kbq-select", ["kbqSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "searchMinOptionsThreshold": { "alias": "searchMinOptionsThreshold"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["footer", "cdkVirtualForOf", "customTrigger", "customMatcher", "customTagTemplateRef", "cleaner", "search", "options", "optionGroups"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "*", "kbq-select-footer,[kbq-select-footer]"], true, never>;
|
|
573
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqSelect, "kbq-select", ["kbqSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "searchMinOptionsThreshold": { "alias": "searchMinOptionsThreshold"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "beforeOpened": "beforeOpened"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "valueChange": "valueChange"; }, ["footer", "cdkVirtualForOf", "customTrigger", "customMatcher", "customTagTemplateRef", "cleaner", "search", "searchEmpty", "options", "optionGroups"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "*", "kbq-select-footer,[kbq-select-footer]"], true, never>;
|
|
410
574
|
static ngAcceptInputType_multiline: unknown;
|
|
411
575
|
static ngAcceptInputType_multiple: unknown;
|
|
412
576
|
static ngAcceptInputType_panelMinWidth: unknown;
|
|
@@ -8,9 +8,10 @@ import * as i6 from "@angular/common";
|
|
|
8
8
|
import * as i7 from "@angular/cdk/a11y";
|
|
9
9
|
import * as i8 from "./select.component";
|
|
10
10
|
import * as i9 from "./select-option.directive";
|
|
11
|
-
import * as i10 from "
|
|
11
|
+
import * as i10 from "./select-common";
|
|
12
|
+
import * as i11 from "@koobiq/components/form-field";
|
|
12
13
|
export declare class KbqSelectModule {
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSelectModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqSelectModule, never, [typeof i1.OverlayModule, typeof i2.KbqOptionModule, typeof i3.KbqIconModule, typeof i4.KbqTagsModule, typeof i5.KbqToolTipModule, typeof i2.KbqSelectSearch, typeof i2.KbqSelectFooter, typeof i2.KbqSelectMatcher, typeof i2.KbqSelectTrigger, typeof i2.KbqSelectSearchEmptyResult, typeof i6.NgClass, typeof i6.NgTemplateOutlet, typeof i7.A11yModule, typeof i8.KbqSelect, typeof i9.KbqOptionTooltip], [typeof i8.KbqSelect, typeof i9.KbqOptionTooltip, typeof i2.KbqOptionModule, typeof i2.KbqSelectSearch, typeof i2.KbqSelectFooter, typeof i2.KbqSelectMatcher, typeof i2.KbqSelectTrigger, typeof i2.KbqSelectSearchEmptyResult, typeof i10.KbqFormFieldModule]>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<KbqSelectModule, never, [typeof i1.OverlayModule, typeof i2.KbqOptionModule, typeof i3.KbqIconModule, typeof i4.KbqTagsModule, typeof i5.KbqToolTipModule, typeof i2.KbqSelectSearch, typeof i2.KbqSelectFooter, typeof i2.KbqSelectMatcher, typeof i2.KbqSelectTrigger, typeof i2.KbqSelectSearchEmptyResult, typeof i6.NgClass, typeof i6.NgTemplateOutlet, typeof i7.A11yModule, typeof i8.KbqSelect, typeof i9.KbqOptionTooltip, typeof i10.KbqSelectLoading, typeof i10.KbqSelectError, typeof i10.KbqSelectNoOptions, typeof i10.KbqSelectErrorText], [typeof i8.KbqSelect, typeof i9.KbqOptionTooltip, typeof i2.KbqOptionModule, typeof i2.KbqSelectSearch, typeof i2.KbqSelectFooter, typeof i2.KbqSelectMatcher, typeof i2.KbqSelectTrigger, typeof i2.KbqSelectSearchEmptyResult, typeof i10.KbqSelectLoading, typeof i11.KbqFormFieldModule, typeof i10.KbqSelectError, typeof i10.KbqSelectNoOptions, typeof i10.KbqSelectErrorText]>;
|
|
15
16
|
static ɵinj: i0.ɵɵInjectorDeclaration<KbqSelectModule>;
|
|
16
17
|
}
|
|
@@ -16,14 +16,8 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
// @TODO do proper animation (#DS-4539)
|
|
20
19
|
.kbq-overlay-dark-backdrop {
|
|
21
|
-
background:
|
|
22
|
-
|
|
23
|
-
&:not(:has(~ .kbq-overlay-dark-backdrop)) {
|
|
24
|
-
transition: unset;
|
|
25
|
-
background: var(--kbq-background-overlay) !important;
|
|
26
|
-
}
|
|
20
|
+
background: var(--kbq-background-overlay) !important;
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
1
|
+
import { InjectionToken, Injector } from '@angular/core';
|
|
2
2
|
/** Injection token that can be used to access the data that was passed in to a sidepanel. */
|
|
3
3
|
export declare const KBQ_SIDEPANEL_DATA: InjectionToken<any>;
|
|
4
4
|
export declare enum KbqSidepanelPosition {
|
|
@@ -26,10 +26,18 @@ export declare class KbqSidepanelConfig<D = any> {
|
|
|
26
26
|
/** Whether the sidepanel has a backdrop. */
|
|
27
27
|
hasBackdrop?: boolean;
|
|
28
28
|
backdropClass?: string;
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* When we open multiple sidepanels, backdrop appears only once, except cases then this flag is true.
|
|
31
|
+
* @deprecated used single shared backdrop instead.
|
|
32
|
+
*/
|
|
30
33
|
requiredBackdrop?: boolean;
|
|
31
34
|
/** Whether the user can use escape or clicking outside to close the sidepanel. */
|
|
32
35
|
disableClose?: boolean;
|
|
33
36
|
/** Custom class for the overlay pane. */
|
|
34
37
|
overlayPanelClass?: string | string[];
|
|
38
|
+
/**
|
|
39
|
+
* Injector used for the instantiation of the component to be attached.
|
|
40
|
+
* Allows to pass a custom injector to provide a dependency injection hierarchy for the sidepanel content.
|
|
41
|
+
*/
|
|
42
|
+
injector?: Injector;
|
|
35
43
|
}
|
package/skeleton/skeleton.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* Directive representing a skeleton placeholder.
|
|
4
5
|
*/
|
|
5
|
-
export declare class KbqSkeleton {
|
|
6
|
+
export declare class KbqSkeleton implements OnDestroy {
|
|
7
|
+
private readonly styleLoader;
|
|
8
|
+
private readonly element;
|
|
9
|
+
private readonly window;
|
|
10
|
+
/** Whether the skeleton is enabled. */
|
|
11
|
+
readonly enabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
12
|
+
constructor();
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
private syncAnimation;
|
|
6
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSkeleton, never>;
|
|
7
|
-
static
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqSkeleton, "kbq-skeleton, [kbqSkeleton]", ["kbqSkeleton"], { "enabled": { "alias": "kbqSkeleton"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8
17
|
}
|