@koobiq/components 20.1.0 → 20.3.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-theme.scss +6 -2
- package/accordion/accordion-tokens.scss +3 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
- package/accordion/accordion.scss +71 -0
- package/accordion/index.d.ts +264 -121
- package/actions-panel/index.d.ts +25 -13
- package/alert/_alert-theme.scss +14 -0
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- package/app-switcher/app-switcher-dropdown-app.scss +7 -5
- package/app-switcher/app-switcher-dropdown-site.scss +6 -4
- package/app-switcher/index.d.ts +41 -4
- package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
- package/autocomplete/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +58 -37
- package/badge/index.d.ts +2 -3
- package/breadcrumbs/index.d.ts +1 -1
- package/button/index.d.ts +2 -2
- package/button-toggle/button-toggle-tokens.scss +2 -0
- package/button-toggle/button-toggle.scss +9 -0
- package/button-toggle/index.d.ts +5 -0
- package/checkbox/index.d.ts +33 -29
- package/clamped-text/index.d.ts +3 -2
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1217 -186
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +24 -0
- package/core/option/action.scss +7 -0
- package/core/styles/_core.scss +2 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_animation.scss +31 -24
- package/core/styles/common/_connected-overlay.scss +39 -0
- package/core/styles/common/_select.scss +19 -2
- package/core/styles/common/_tokens.scss +0 -9
- package/core/styles/theming/_index.scss +0 -1
- package/core/styles/theming/_theming.scss +34 -5
- package/datepicker/index.d.ts +46 -15
- package/dl/dl.scss +26 -0
- package/dl/index.d.ts +8 -1
- package/dropdown/_dropdown-theme.scss +28 -2
- package/dropdown/dropdown-item.scss +29 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +16 -1
- package/dropdown/index.d.ts +331 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +480 -317
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +98 -58
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +18 -17
- 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 +17 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +25 -25
- package/fesm2022/koobiq-components-checkbox.mjs +69 -92
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +56 -69
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +29 -29
- package/fesm2022/koobiq-components-core.mjs +2485 -735
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +168 -126
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +23 -15
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +814 -136
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +74 -42
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +7 -7
- package/fesm2022/koobiq-components-form-field.mjs +350 -162
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +52 -25
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +41 -24
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +8 -8
- package/fesm2022/koobiq-components-list.mjs +657 -143
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +14 -11
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +59 -35
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +177 -67
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +40 -24
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +31 -21
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +33 -14
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +450 -146
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +14 -14
- package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +10 -17
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +17 -17
- package/fesm2022/koobiq-components-table.mjs +15 -13
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +80 -68
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +283 -122
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +29 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +61 -30
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +77 -42
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +51 -26
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +72 -64
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +219 -28
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +222 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +302 -81
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/index.d.ts +25 -6
- package/file-upload/multiple-file-upload.component.scss +14 -0
- package/filter-bar/_filter-bar-theme.scss +0 -10
- package/filter-bar/filter-bar-tokens.scss +3 -0
- package/filter-bar/filters.scss +3 -2
- package/filter-bar/index.d.ts +281 -9
- package/filter-bar/pipes/base-pipe.scss +0 -11
- package/filter-bar/pipes/pipe-input.scss +10 -0
- package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
- package/filter-bar/pipes/pipe-multiselect.scss +0 -6
- package/filter-bar/pipes/pipe-tree-select.scss +0 -6
- package/form-field/_form-field-theme.scss +76 -20
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-tokens.scss +15 -1
- package/form-field/form-field.scss +15 -19
- package/form-field/index.d.ts +147 -65
- package/icon/icon-button.scss +3 -1
- package/icon/index.d.ts +45 -7
- package/inline-edit/index.d.ts +57 -4
- package/inline-edit/inline-edit.scss +10 -0
- package/input/index.d.ts +17 -2
- package/list/_list-theme.scss +42 -10
- package/list/index.d.ts +326 -79
- package/list/list-tokens.scss +43 -8
- package/list/list.scss +186 -12
- package/markdown/index.d.ts +1 -1
- package/modal/index.d.ts +21 -4
- package/modal/modal-tokens.scss +1 -1
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +54 -5
- package/navbar/navbar-brand.scss +23 -7
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/index.d.ts +2 -1
- package/notification-center/notification-item.scss +6 -0
- package/package.json +3 -6
- package/popover/index.d.ts +2 -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/resizer/index.d.ts +12 -0
- package/schematics/collection.json +10 -0
- package/schematics/migrations/alert-signals/README.md +64 -0
- package/schematics/migrations/alert-signals/data.js +70 -0
- package/schematics/migrations/alert-signals/index.js +350 -0
- package/schematics/migrations/alert-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
- package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +29 -4
- package/schematics/migrations/deprecated-icons/data.js +7 -0
- package/schematics/migrations/deprecated-icons/index.js +62 -35
- package/schematics/migrations/filter-bar-signals/README.md +1 -1
- package/schematics/migrations/new-icons-pack/README.md +37 -2
- package/schematics/migrations/new-icons-pack/data.js +8 -0
- package/schematics/migrations/new-icons-pack/index.js +144 -53
- package/schematics/migrations.json +11 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +41 -14
- package/schematics/utils/ast.js +31 -0
- package/schematics/utils/icon-migration.js +530 -0
- package/schematics/utils/typescript.js +44 -0
- package/scrollbar/index.d.ts +1 -1
- package/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +212 -40
- package/select/select-tokens.scss +0 -1
- package/select/select.scss +0 -2
- package/splitter/index.d.ts +1 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +2 -1
- package/table/table.scss +8 -0
- package/tabs/_tabs-common.scss +60 -31
- package/tabs/_tabs-theme.scss +12 -0
- package/tabs/index.d.ts +2 -2
- package/tabs/tab-header.scss +14 -0
- package/tabs/tab-nav-bar.scss +4 -0
- package/tabs/tabs-tokens.scss +1 -0
- package/tags/index.d.ts +128 -29
- package/textarea/index.d.ts +5 -0
- package/time-range/index.d.ts +1 -1
- package/timepicker/index.d.ts +4 -0
- package/timezone/index.d.ts +10 -8
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +119 -7
- package/tree/_tree-theme.scss +25 -5
- package/tree/index.d.ts +71 -3
- package/tree/tree-option.scss +2 -8
- package/tree-select/_tree-select-theme.scss +22 -0
- package/tree-select/index.d.ts +127 -36
- package/accordion/accordion.component.scss +0 -50
- package/core/styles/_tokens.kbq.import.scss +0 -4
- package/core/styles/theming/_components-theming.scss +0 -1927
- package/filter-bar/pipes/pipe-select.scss +0 -5
- package/overflow-items/overflow-items.scss +0 -20
package/toggle/index.d.ts
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { AfterViewInit, OnDestroy, ElementRef } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import
|
|
5
|
-
import { KbqColorDirective, KbqCheckedState } from '@koobiq/components/core';
|
|
6
|
-
import * as i1 from '@angular/cdk/a11y';
|
|
4
|
+
import * as i1 from '@koobiq/components/core';
|
|
5
|
+
import { KbqColorDirective, TransitionCheckState, KbqCheckableClickAction, KbqCheckedState } from '@koobiq/components/core';
|
|
6
|
+
import * as i1$1 from '@angular/cdk/a11y';
|
|
7
7
|
|
|
8
8
|
type ToggleLabelPositionType = 'left' | 'right';
|
|
9
9
|
declare class KbqToggleChange {
|
|
10
10
|
source: KbqToggleComponent;
|
|
11
11
|
checked: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Toggle click action when user click on input element. Alias of `KbqCheckableClickAction`.
|
|
15
|
+
*/
|
|
16
|
+
type KbqToggleClickAction = KbqCheckableClickAction;
|
|
13
17
|
declare class KbqToggleComponent extends KbqColorDirective implements AfterViewInit, ControlValueAccessor, OnDestroy {
|
|
14
|
-
private
|
|
15
|
-
private
|
|
18
|
+
private readonly changeDetectorRef;
|
|
19
|
+
private readonly focusMonitor;
|
|
20
|
+
private readonly checkable;
|
|
16
21
|
readonly big: _angular_core.InputSignal<boolean>;
|
|
17
22
|
readonly inputElement: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
18
23
|
readonly labelPosition: _angular_core.InputSignal<ToggleLabelPositionType>;
|
|
@@ -24,13 +29,10 @@ declare class KbqToggleComponent extends KbqColorDirective implements AfterViewI
|
|
|
24
29
|
readonly value: _angular_core.InputSignal<string>;
|
|
25
30
|
get disabled(): any;
|
|
26
31
|
set disabled(value: any);
|
|
27
|
-
private _disabled;
|
|
28
32
|
get tabIndex(): number;
|
|
29
33
|
set tabIndex(value: number);
|
|
30
|
-
private _tabIndex;
|
|
31
34
|
get checked(): boolean;
|
|
32
35
|
set checked(value: boolean);
|
|
33
|
-
private _checked;
|
|
34
36
|
/**
|
|
35
37
|
* Whether the toggle is indeterminate. This is also known as "mixed" mode and can be used to
|
|
36
38
|
* represent a checkbox with three states, e.g. a checkbox that represents a nested list of
|
|
@@ -39,7 +41,6 @@ declare class KbqToggleComponent extends KbqColorDirective implements AfterViewI
|
|
|
39
41
|
*/
|
|
40
42
|
get indeterminate(): boolean;
|
|
41
43
|
set indeterminate(value: boolean);
|
|
42
|
-
private _indeterminate;
|
|
43
44
|
/**
|
|
44
45
|
* Property for manually set loading state.
|
|
45
46
|
*/
|
|
@@ -50,7 +51,7 @@ declare class KbqToggleComponent extends KbqColorDirective implements AfterViewI
|
|
|
50
51
|
/** @docs-private */
|
|
51
52
|
protected currentCheckState: TransitionCheckState;
|
|
52
53
|
/** Defines the behavior when a user clicks on the toggle. */
|
|
53
|
-
clickAction:
|
|
54
|
+
clickAction: KbqToggleClickAction;
|
|
54
55
|
private uniqueId;
|
|
55
56
|
constructor();
|
|
56
57
|
ngAfterViewInit(): void;
|
|
@@ -60,25 +61,44 @@ declare class KbqToggleComponent extends KbqColorDirective implements AfterViewI
|
|
|
60
61
|
onChangeEvent(event: Event): void;
|
|
61
62
|
onLabelTextChange(): void;
|
|
62
63
|
onInputClick(event: MouseEvent): void;
|
|
64
|
+
/**
|
|
65
|
+
* Implemented as part of ControlValueAccessor.
|
|
66
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
67
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
68
|
+
*/
|
|
63
69
|
writeValue(value: any): void;
|
|
70
|
+
/**
|
|
71
|
+
* Implemented as part of ControlValueAccessor.
|
|
72
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
73
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
74
|
+
*/
|
|
64
75
|
registerOnChange(fn: any): void;
|
|
76
|
+
/**
|
|
77
|
+
* Implemented as part of ControlValueAccessor.
|
|
78
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
79
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
80
|
+
*/
|
|
65
81
|
registerOnTouched(fn: any): void;
|
|
82
|
+
/**
|
|
83
|
+
* Implemented as part of ControlValueAccessor.
|
|
84
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
85
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
86
|
+
*/
|
|
66
87
|
setDisabledState(isDisabled: boolean): void;
|
|
67
88
|
private setTransitionCheckState;
|
|
68
|
-
private onTouchedCallback;
|
|
69
|
-
private onChangeCallback;
|
|
70
89
|
private transitionCheckState;
|
|
71
90
|
private emitChangeEvent;
|
|
72
91
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqToggleComponent, never>;
|
|
73
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqToggleComponent, "kbq-toggle", ["kbqToggle"], { "big": { "alias": "big"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "clickAction": { "alias": "clickAction"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*", "kbq-hint"], true,
|
|
92
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqToggleComponent, "kbq-toggle", ["kbqToggle"], { "big": { "alias": "big"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "clickAction": { "alias": "clickAction"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*", "kbq-hint"], true, [{ directive: typeof i1.KbqCheckable; inputs: {}; outputs: {}; }]>;
|
|
74
93
|
static ngAcceptInputType_tabIndex: unknown;
|
|
75
94
|
static ngAcceptInputType_indeterminate: unknown;
|
|
76
95
|
}
|
|
77
96
|
|
|
78
97
|
declare class KbqToggleModule {
|
|
79
98
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqToggleModule, never>;
|
|
80
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KbqToggleModule, never, [typeof i1.A11yModule, typeof KbqToggleComponent], [typeof KbqToggleComponent]>;
|
|
99
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KbqToggleModule, never, [typeof i1$1.A11yModule, typeof KbqToggleComponent], [typeof KbqToggleComponent]>;
|
|
81
100
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<KbqToggleModule>;
|
|
82
101
|
}
|
|
83
102
|
|
|
84
103
|
export { KbqToggleChange, KbqToggleComponent, KbqToggleModule };
|
|
104
|
+
export type { KbqToggleClickAction };
|
package/tooltip/index.d.ts
CHANGED
|
@@ -1,10 +1,42 @@
|
|
|
1
|
-
import * as rxjs from 'rxjs';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { InjectionToken, ElementRef, AfterViewInit, OnChanges, OnDestroy, Renderer2, WritableSignal, TemplateRef, EventEmitter, SimpleChanges, Type } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
4
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
5
5
|
import { ScrollStrategy, Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
6
6
|
import { KbqPopUp, KbqPopUpTrigger, KbqParentPopup, KbqPopUpPlacementValues, KbqComponentColors } from '@koobiq/components/core';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Default value of the `kbqTooltipSingleInstance` input. Provide `false` at the application level to
|
|
10
|
+
* globally disable the "only one tooltip is visible at a time" behavior.
|
|
11
|
+
*/
|
|
12
|
+
declare const KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT: InjectionToken<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Contract of a tooltip taking part in the "only one tooltip is visible at a time" group.
|
|
15
|
+
* @docs-private
|
|
16
|
+
*/
|
|
17
|
+
interface KbqExclusiveTooltip {
|
|
18
|
+
/** Hides the tooltip because another tooltip — or a pop-up on the same element — has taken its place. */
|
|
19
|
+
hideAsInactive(): void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Keeps track of the single tooltip that is currently visible, so that showing a new one hides the
|
|
23
|
+
* previous. Holds the *trigger*, not the overlay component — the latter is re-created on every show.
|
|
24
|
+
*/
|
|
25
|
+
declare class KbqTooltipRegistry {
|
|
26
|
+
/** Tooltip that currently owns the screen, or `null` when nothing is visible. */
|
|
27
|
+
private visibleTooltip;
|
|
28
|
+
/** Marks the tooltip as the only visible one, hiding the previously visible tooltip. */
|
|
29
|
+
setVisible(tooltip: KbqExclusiveTooltip): void;
|
|
30
|
+
/**
|
|
31
|
+
* Clears the registry, but only when the given tooltip is still the registered one. The guard
|
|
32
|
+
* matters because hiding the previous tooltip is asynchronous: its `visibleChange(false)` arrives
|
|
33
|
+
* after the new tooltip has already been registered, and must not wipe that newer entry.
|
|
34
|
+
*/
|
|
35
|
+
clearVisible(tooltip: KbqExclusiveTooltip): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTooltipRegistry, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KbqTooltipRegistry>;
|
|
38
|
+
}
|
|
39
|
+
|
|
8
40
|
declare enum TooltipModifier {
|
|
9
41
|
Default = "default",
|
|
10
42
|
Warning = "warning",
|
|
@@ -48,11 +80,28 @@ declare const KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: {
|
|
|
48
80
|
* tooltip-specific inputs (content, placement, color, arrow, enter/leave delays, modifier and header) and
|
|
49
81
|
* behavior such as opening on keyboard focus only and positioning relative to the mouse cursor.
|
|
50
82
|
*/
|
|
51
|
-
declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> implements AfterViewInit, OnChanges, OnDestroy {
|
|
83
|
+
declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> implements AfterViewInit, OnChanges, OnDestroy, KbqExclusiveTooltip {
|
|
84
|
+
/** Registry holding the single tooltip that is currently visible. */
|
|
85
|
+
private readonly tooltipRegistry;
|
|
86
|
+
private readonly injectedScrollStrategy;
|
|
87
|
+
/**
|
|
88
|
+
* Per-instance override for the scroll strategy, taking precedence over `KBQ_TOOLTIP_SCROLL_STRATEGY`
|
|
89
|
+
* when set. An `@Input` rather than a DI override so it applies to this tooltip instance only, without
|
|
90
|
+
* leaking into other `kbqTooltip`s nested inside the same host (DI overrides are visible to every
|
|
91
|
+
* descendant in the element-injector tree, not just the element they're declared on).
|
|
92
|
+
* @docs-private
|
|
93
|
+
*/
|
|
94
|
+
readonly scrollStrategyOverride: i0.InputSignal<(() => ScrollStrategy) | undefined>;
|
|
52
95
|
/** @docs-private */
|
|
53
|
-
protected scrollStrategy: () => ScrollStrategy;
|
|
96
|
+
protected get scrollStrategy(): () => ScrollStrategy;
|
|
54
97
|
/** @docs-private */
|
|
55
98
|
protected parentPopup: KbqParentPopup | null;
|
|
99
|
+
/**
|
|
100
|
+
* Pop-ups anchored to the very same element — a popover, a dropdown, a select and so on. Resolved with
|
|
101
|
+
* `self` so a pop-up further up the tree (which the tooltip merely lives inside) is not picked up; that
|
|
102
|
+
* case is covered by `parentPopup`.
|
|
103
|
+
*/
|
|
104
|
+
private readonly siblingPopups;
|
|
56
105
|
/** @docs-private */
|
|
57
106
|
protected focusMonitor: FocusMonitor;
|
|
58
107
|
/** @docs-private */
|
|
@@ -72,6 +121,17 @@ declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> imp
|
|
|
72
121
|
* Defaults to `true`.
|
|
73
122
|
*/
|
|
74
123
|
readonly ignoreTooltipPointerEvents: i0.InputSignal<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Whether the tooltip takes part in the "only one tooltip is visible at a time" group: showing it
|
|
126
|
+
* hides the previously visible tooltip, and it is hidden when another tooltip is shown.
|
|
127
|
+
*
|
|
128
|
+
* Defaults to `true`; the default can be changed application-wide with the
|
|
129
|
+
* `KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT` token.
|
|
130
|
+
*
|
|
131
|
+
* Tooltips without an interactive `kbqTrigger` (`manual`, `none`, …) never take part in the group,
|
|
132
|
+
* regardless of this input — they are shown imperatively and are expected to stay pinned.
|
|
133
|
+
*/
|
|
134
|
+
readonly singleInstance: i0.InputSignalWithTransform<boolean, unknown>;
|
|
75
135
|
/**
|
|
76
136
|
* Changes hiding behavior. By default, tooltip is hidden on mouseleave from trigger.
|
|
77
137
|
* Setting hideWithTimeout to true will delay tooltip hiding and will not hide when the mouse moves from trigger
|
|
@@ -155,9 +215,39 @@ declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> imp
|
|
|
155
215
|
* the next show/hide cycle.
|
|
156
216
|
*/
|
|
157
217
|
ngOnChanges(changes: SimpleChanges): void;
|
|
218
|
+
/**
|
|
219
|
+
* Whether this tooltip takes part in the "only one tooltip is visible at a time" group.
|
|
220
|
+
*
|
|
221
|
+
* Read through the `trigger` getter on purpose: `KbqTitleDirective` always reports `hover`, so title
|
|
222
|
+
* tooltips participate, while `kbqValidationTooltip` consumers (datepicker, timepicker, inline-edit)
|
|
223
|
+
* assign `trigger = 'manual'` and therefore stay out of the group.
|
|
224
|
+
*/
|
|
225
|
+
private get participatesInSingleInstance();
|
|
226
|
+
/**
|
|
227
|
+
* Whether `kbqTrigger` contains at least one user-driven event, i.e. the tooltip is not driven purely
|
|
228
|
+
* imperatively. `manual`/`none` tooltips (the validation hints of datepicker, timepicker and inline-edit)
|
|
229
|
+
* bind no listeners and are expected to stay pinned while the user keeps interacting elsewhere.
|
|
230
|
+
*/
|
|
231
|
+
private get hasInteractiveTrigger();
|
|
232
|
+
/**
|
|
233
|
+
* Whether the tooltip is muted because a pop-up on the same element has taken over the anchor.
|
|
234
|
+
*
|
|
235
|
+
* Set when that pop-up opens and released only once the pointer or the focus genuinely leaves the host,
|
|
236
|
+
* never on the pop-up closing. Both matter: a pop-up restores focus to its trigger when it closes (see
|
|
237
|
+
* `KbqPopoverComponent.onEscape`), and removing its backdrop replays `mouseenter` on the trigger without
|
|
238
|
+
* the pointer having moved — either would otherwise pop the tooltip up out of nowhere.
|
|
239
|
+
*/
|
|
240
|
+
private mutedBySiblingPopup;
|
|
158
241
|
/**
|
|
159
242
|
* Sets up an effect that mirrors a `forDisabledComponent`'s disabled signal: when that component is disabled it
|
|
160
243
|
* makes the host focusable (so the tooltip can still be triggered) and enables the tooltip, otherwise disables it.
|
|
244
|
+
*
|
|
245
|
+
* Also joins the "only one tooltip is visible at a time" group and mutes the tooltip while a pop-up on the
|
|
246
|
+
* same element is open. All of this wiring lives here rather than in `ngAfterViewInit`/`ngOnDestroy` because
|
|
247
|
+
* several subclasses override those hooks: `KbqTitleDirective` and `KbqEllipsisCenterDirective` skip
|
|
248
|
+
* `super.ngAfterViewInit()`, and `KbqPasswordToggle` skips `super` in both hooks entirely. `destroyRef`
|
|
249
|
+
* additionally covers a trigger destroyed while its tooltip is still visible — that path disposes the
|
|
250
|
+
* overlay without emitting `visibleChange(false)`.
|
|
161
251
|
*/
|
|
162
252
|
constructor();
|
|
163
253
|
/**
|
|
@@ -168,10 +258,31 @@ declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> imp
|
|
|
168
258
|
/** Stops focus monitoring on the host element and runs the base-class teardown. */
|
|
169
259
|
ngOnDestroy(): void;
|
|
170
260
|
/**
|
|
171
|
-
* Shows the tooltip after `delay` ms. Suppresses showing
|
|
172
|
-
* the keyboard, and applies cursor-relative
|
|
261
|
+
* Shows the tooltip after `delay` ms. Suppresses showing while a pop-up on the same element holds the
|
|
262
|
+
* anchor or on a focus trigger that did not originate from the keyboard, and applies cursor-relative
|
|
263
|
+
* positioning when `relativeToPointer` is enabled.
|
|
173
264
|
*/
|
|
174
265
|
show(delay?: number): void;
|
|
266
|
+
/**
|
|
267
|
+
* Hides the tooltip after `delay` ms and, when the user has genuinely left the host, un-mutes a tooltip
|
|
268
|
+
* that a pop-up on the same element had muted.
|
|
269
|
+
*
|
|
270
|
+
* `mouseleave` and `blur` are the release signals because the base class binds `hide` to both regardless
|
|
271
|
+
* of whether the tooltip is currently visible. A pop-up that is still attached does not count: its
|
|
272
|
+
* backdrop steals the hover from the trigger while the pointer stands still, and that `mouseleave` must
|
|
273
|
+
* not be mistaken for the user leaving.
|
|
274
|
+
*/
|
|
275
|
+
hide(delay?: number): void;
|
|
276
|
+
/**
|
|
277
|
+
* Hides the tooltip because something else took its place — another tooltip became visible, or a pop-up
|
|
278
|
+
* anchored to the same element opened.
|
|
279
|
+
*
|
|
280
|
+
* Goes straight to the pop-up instead of `hide()`: `hide()` silently no-ops when the last recorded
|
|
281
|
+
* `triggerName` is `mouseleave` and the pop-up itself is hovered. Hiding through the instance keeps
|
|
282
|
+
* `visibleChange(false)` firing, so `isOpen`, `kbqVisibleChange` and the `kbqVisible` input stay in sync.
|
|
283
|
+
* Does nothing when the tooltip is already detached or when closing is prevented.
|
|
284
|
+
* @docs-private */
|
|
285
|
+
hideAsInactive(): void;
|
|
175
286
|
/** method allows to show the tooltip relative to the given mouse event.
|
|
176
287
|
* @docs-private */
|
|
177
288
|
showForMouseEvent(event: MouseEvent): void;
|
|
@@ -195,7 +306,7 @@ declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipComponent> imp
|
|
|
195
306
|
/** @docs-private */
|
|
196
307
|
protected applyRelativeToPointer(): void;
|
|
197
308
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTooltipTrigger, never>;
|
|
198
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTooltipTrigger, "[kbqTooltip]", ["kbqTooltip"], { "forDisabledComponent": { "alias": "forDisabledComponent"; "required": false; "isSignal": true; }; "ignoreTooltipPointerEvents": { "alias": "ignoreTooltipPointerEvents"; "required": false; "isSignal": true; }; "hideWithTimeout": { "alias": "hideWithTimeout"; "required": false; }; "tooltipVisible": { "alias": "kbqVisible"; "required": false; }; "tooltipPlacement": { "alias": "kbqPlacement"; "required": false; }; "relativeToPointer": { "alias": "kbqRelativeToPointer"; "required": false; }; "tooltipPlacementPriority": { "alias": "kbqPlacementPriority"; "required": false; }; "content": { "alias": "kbqTooltip"; "required": false; }; "disabled": { "alias": "kbqTooltipDisabled"; "required": false; }; "enterDelay": { "alias": "kbqEnterDelay"; "required": false; }; "leaveDelay": { "alias": "kbqLeaveDelay"; "required": false; }; "trigger": { "alias": "kbqTrigger"; "required": false; }; "customClass": { "alias": "kbqTooltipClass"; "required": false; }; "context": { "alias": "kbqTooltipContext"; "required": false; }; "color": { "alias": "kbqTooltipColor"; "required": false; }; "arrow": { "alias": "kbqTooltipArrow"; "required": false; }; "offset": { "alias": "kbqTooltipOffset"; "required": false; }; "modifier": { "alias": "kbqTooltipModifier"; "required": false; }; "header": { "alias": "kbqTooltipHeader"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
|
|
309
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTooltipTrigger, "[kbqTooltip]", ["kbqTooltip"], { "scrollStrategyOverride": { "alias": "kbqTooltipScrollStrategy"; "required": false; "isSignal": true; }; "forDisabledComponent": { "alias": "forDisabledComponent"; "required": false; "isSignal": true; }; "ignoreTooltipPointerEvents": { "alias": "ignoreTooltipPointerEvents"; "required": false; "isSignal": true; }; "singleInstance": { "alias": "kbqTooltipSingleInstance"; "required": false; "isSignal": true; }; "hideWithTimeout": { "alias": "hideWithTimeout"; "required": false; }; "tooltipVisible": { "alias": "kbqVisible"; "required": false; }; "tooltipPlacement": { "alias": "kbqPlacement"; "required": false; }; "relativeToPointer": { "alias": "kbqRelativeToPointer"; "required": false; }; "tooltipPlacementPriority": { "alias": "kbqPlacementPriority"; "required": false; }; "content": { "alias": "kbqTooltip"; "required": false; }; "disabled": { "alias": "kbqTooltipDisabled"; "required": false; }; "enterDelay": { "alias": "kbqEnterDelay"; "required": false; }; "leaveDelay": { "alias": "kbqLeaveDelay"; "required": false; }; "trigger": { "alias": "kbqTrigger"; "required": false; }; "customClass": { "alias": "kbqTooltipClass"; "required": false; }; "context": { "alias": "kbqTooltipContext"; "required": false; }; "color": { "alias": "kbqTooltipColor"; "required": false; }; "arrow": { "alias": "kbqTooltipArrow"; "required": false; }; "offset": { "alias": "kbqTooltipOffset"; "required": false; }; "modifier": { "alias": "kbqTooltipModifier"; "required": false; }; "header": { "alias": "kbqTooltipHeader"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
|
|
199
310
|
static ngAcceptInputType_hideWithTimeout: unknown;
|
|
200
311
|
static ngAcceptInputType_relativeToPointer: unknown;
|
|
201
312
|
static ngAcceptInputType_arrow: unknown;
|
|
@@ -208,4 +319,5 @@ declare class KbqToolTipModule {
|
|
|
208
319
|
static ɵinj: i0.ɵɵInjectorDeclaration<KbqToolTipModule>;
|
|
209
320
|
}
|
|
210
321
|
|
|
211
|
-
export { KBQ_TOOLTIP_OPEN_TIME, KBQ_TOOLTIP_OPEN_TIME_PROVIDER, KBQ_TOOLTIP_SCROLL_STRATEGY, KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqToolTipModule, KbqTooltipComponent, KbqTooltipTrigger, MIN_TIME_FOR_DELAY, TooltipModifier, kbqTooltipScrollStrategyFactory };
|
|
322
|
+
export { KBQ_TOOLTIP_OPEN_TIME, KBQ_TOOLTIP_OPEN_TIME_PROVIDER, KBQ_TOOLTIP_SCROLL_STRATEGY, KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER, KBQ_TOOLTIP_SINGLE_INSTANCE_DEFAULT, KbqToolTipModule, KbqTooltipComponent, KbqTooltipRegistry, KbqTooltipTrigger, MIN_TIME_FOR_DELAY, TooltipModifier, kbqTooltipScrollStrategyFactory };
|
|
323
|
+
export type { KbqExclusiveTooltip };
|
package/tree/_tree-theme.scss
CHANGED
|
@@ -37,6 +37,13 @@
|
|
|
37
37
|
@include kbq-tree-option(states-hover);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
&:active,
|
|
41
|
+
&.kbq-active {
|
|
42
|
+
--kbq-option-background: var(--kbq-tree-states-active-container-background);
|
|
43
|
+
|
|
44
|
+
background: var(--kbq-tree-states-active-container-background);
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
&.kbq-selected {
|
|
41
48
|
@include kbq-tree-option(states-selected);
|
|
42
49
|
|
|
@@ -44,6 +51,13 @@
|
|
|
44
51
|
&.kbq-hovered {
|
|
45
52
|
@include kbq-tree-option(states-selected-hover);
|
|
46
53
|
}
|
|
54
|
+
|
|
55
|
+
&:active,
|
|
56
|
+
&.kbq-active {
|
|
57
|
+
--kbq-option-background: var(--kbq-tree-states-selected-active-container-background);
|
|
58
|
+
|
|
59
|
+
background: var(--kbq-tree-states-selected-active-container-background);
|
|
60
|
+
}
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
&.kbq-checked:not(.kbq-selected),
|
|
@@ -58,6 +72,13 @@
|
|
|
58
72
|
|
|
59
73
|
background: var(--kbq-tree-multiple-states-selected-hover-container-background);
|
|
60
74
|
}
|
|
75
|
+
|
|
76
|
+
&:active,
|
|
77
|
+
&.kbq-active {
|
|
78
|
+
--kbq-option-background: var(--kbq-tree-multiple-states-selected-active-container-background);
|
|
79
|
+
|
|
80
|
+
background: var(--kbq-tree-multiple-states-selected-active-container-background);
|
|
81
|
+
}
|
|
61
82
|
}
|
|
62
83
|
}
|
|
63
84
|
|
|
@@ -70,13 +91,12 @@
|
|
|
70
91
|
}
|
|
71
92
|
}
|
|
72
93
|
|
|
73
|
-
|
|
94
|
+
// Scoped to the tree's own focus-monitored host, matching `kbq-option-action-visibility`. A bare
|
|
95
|
+
// `.cdk-keyboard-focused` would also match an outer monitored ancestor (e.g. the tree-select panel),
|
|
96
|
+
// drawing the focus ring on a row whose action button stays correctly hidden.
|
|
97
|
+
.kbq-tree-selection.cdk-keyboard-focused {
|
|
74
98
|
& .kbq-tree-option.kbq-focused:not(.kbq-action-button-focused) {
|
|
75
99
|
border-color: var(--kbq-tree-states-focused-focus-outline-color);
|
|
76
|
-
|
|
77
|
-
& .kbq-action-container {
|
|
78
|
-
display: flex;
|
|
79
|
-
}
|
|
80
100
|
}
|
|
81
101
|
}
|
|
82
102
|
}
|
package/tree/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectionModel, DataSource, CollectionViewer, SelectionChange } from '@angular/cdk/collections';
|
|
2
2
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { TemplateRef, ViewContainerRef, ChangeDetectorRef,
|
|
4
|
+
import { TemplateRef, ViewContainerRef, ChangeDetectorRef, AfterContentChecked, OnDestroy, OnInit, IterableDiffers, TrackByFunction, QueryList, IterableDiffer, DestroyRef, ElementRef, AfterViewInit, InjectionToken, AfterContentInit, EventEmitter } from '@angular/core';
|
|
5
5
|
import * as i1 from '@koobiq/components/core';
|
|
6
6
|
import { IFocusableOption, KbqTitleTextRef, KbqPseudoCheckbox, KbqOptionActionComponent, KbqPseudoCheckboxState, FocusKeyManager, MultipleMode } from '@koobiq/components/core';
|
|
7
7
|
import { FocusOrigin, FocusMonitor } from '@angular/cdk/a11y';
|
|
@@ -504,6 +504,7 @@ declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements AfterC
|
|
|
504
504
|
readonly onBlur: Subject<KbqTreeOptionEvent>;
|
|
505
505
|
preventBlur: boolean;
|
|
506
506
|
parentTextElement: ElementRef;
|
|
507
|
+
get textElement(): ElementRef;
|
|
507
508
|
readonly toggleElementDirective: i0.Signal<KbqTreeNodeToggleDirective<any> | undefined>;
|
|
508
509
|
readonly toggleElementComponent: i0.Signal<KbqTreeNodeToggleComponent<any> | undefined>;
|
|
509
510
|
readonly pseudoCheckbox: i0.Signal<KbqPseudoCheckbox | undefined>;
|
|
@@ -525,6 +526,16 @@ declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements AfterC
|
|
|
525
526
|
* Options that are not rendered (e.g. collapsed) are not checked by "select all".
|
|
526
527
|
*/
|
|
527
528
|
readonly selectable: i0.InputSignalWithTransform<boolean, unknown>;
|
|
529
|
+
/**
|
|
530
|
+
* Whether this option is the tree's "select all" row rather than a rendered data node.
|
|
531
|
+
*
|
|
532
|
+
* Such a row has no `data`, so everything that would resolve the option against the tree control
|
|
533
|
+
* (`getValue`, `isDisabled`, `isExpandable`, descendants) is skipped — those accessors belong to the
|
|
534
|
+
* consumer and must never be handed a node their data source has never seen. Its checkbox state and
|
|
535
|
+
* selection are driven from the outside instead.
|
|
536
|
+
* @docs-private
|
|
537
|
+
*/
|
|
538
|
+
readonly selectAllRow: i0.InputSignalWithTransform<boolean, unknown>;
|
|
528
539
|
get showCheckbox(): any;
|
|
529
540
|
set showCheckbox(value: any);
|
|
530
541
|
private _showCheckbox;
|
|
@@ -538,6 +549,8 @@ declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements AfterC
|
|
|
538
549
|
get viewValue(): string;
|
|
539
550
|
hasFocus: boolean;
|
|
540
551
|
get isExpandable(): boolean;
|
|
552
|
+
/** The "select all" row sits above the tree at root depth; `getLevel` has no node to resolve for it. */
|
|
553
|
+
get level(): number;
|
|
541
554
|
get toggleElement(): KbqTreeNodeToggleBaseDirective<KbqTreeOption> | undefined;
|
|
542
555
|
get isToggleInDefaultPlace(): boolean;
|
|
543
556
|
checkboxState: KbqPseudoCheckboxState;
|
|
@@ -563,7 +576,7 @@ declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements AfterC
|
|
|
563
576
|
/** @docs-private */
|
|
564
577
|
protected onMouseenter(): void;
|
|
565
578
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeOption, never>;
|
|
566
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeOption, "kbq-tree-option", ["kbqTreeOption"], { "checkboxThirdState": { "alias": "checkboxThirdState"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, ["toggleElementDirective", "toggleElementComponent", "pseudoCheckbox", "actionButton", "tooltipTrigger", "dropdownTrigger"], ["kbq-tree-node-toggle, [kbq-tree-node-toggle], [kbqTreeNodeToggle]", "kbq-pseudo-checkbox", "kbq-checkbox", "[kbq-icon]", "kbq-progress-spinner", "*", "kbq-option-action"], true, never>;
|
|
579
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeOption, "kbq-tree-option", ["kbqTreeOption"], { "checkboxThirdState": { "alias": "checkboxThirdState"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selectAllRow": { "alias": "selectAllRow"; "required": false; "isSignal": true; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, ["toggleElementDirective", "toggleElementComponent", "pseudoCheckbox", "actionButton", "tooltipTrigger", "dropdownTrigger"], ["kbq-tree-node-toggle, [kbq-tree-node-toggle], [kbqTreeNodeToggle]", "kbq-pseudo-checkbox", "kbq-checkbox", "[kbq-icon]", "kbq-progress-spinner", "*", "kbq-option-action"], true, never>;
|
|
567
580
|
}
|
|
568
581
|
|
|
569
582
|
declare const KBQ_SELECTION_TREE_VALUE_ACCESSOR: any;
|
|
@@ -622,6 +635,8 @@ declare class KbqTreeSelection extends KbqTreeBase<any> implements ControlValueA
|
|
|
622
635
|
userTabIndex: number | null;
|
|
623
636
|
optionShouldHoldFocusOnBlur: boolean;
|
|
624
637
|
nodeOutlet: KbqTreeNodeOutlet;
|
|
638
|
+
/** Reference to the built-in "select all" row, rendered only while `selectAll` is on. */
|
|
639
|
+
readonly selectAllOption: i0.Signal<KbqTreeOption | undefined>;
|
|
625
640
|
unorderedOptions: QueryList<KbqTreeOption>;
|
|
626
641
|
treeControl: FlatTreeControl<any>;
|
|
627
642
|
readonly navigationChange: i0.OutputEmitterRef<KbqTreeNavigationChange<KbqTreeOption>>;
|
|
@@ -641,6 +656,33 @@ declare class KbqTreeSelection extends KbqTreeBase<any> implements ControlValueA
|
|
|
641
656
|
private _noUnselectLast;
|
|
642
657
|
/** When `true`, a repeated Ctrl/Cmd+A deselects all options. Off by default (Ctrl+A only selects). */
|
|
643
658
|
readonly selectAllToggle: i0.InputSignalWithTransform<boolean, unknown>;
|
|
659
|
+
/**
|
|
660
|
+
* Whether to render the "select all" master checkbox above the nodes. Multiple selection only.
|
|
661
|
+
*
|
|
662
|
+
* Enabling it also makes Ctrl/Cmd + A a two-way toggle, so the shortcut and the checkbox never
|
|
663
|
+
* disagree (`selectAllToggle` is implied).
|
|
664
|
+
*/
|
|
665
|
+
get selectAll(): boolean;
|
|
666
|
+
set selectAll(value: boolean);
|
|
667
|
+
private readonly selectAllEnabled;
|
|
668
|
+
/** Whether the "select all" row is currently rendered. */
|
|
669
|
+
protected get showSelectAll(): boolean;
|
|
670
|
+
/** Whether every node "select all" can act on is selected. */
|
|
671
|
+
get allOptionsSelected(): boolean;
|
|
672
|
+
/** State of the "select all" master checkbox. */
|
|
673
|
+
get selectAllState(): KbqPseudoCheckboxState;
|
|
674
|
+
/** Label of the "select all" row. Kept in step with the locale service. */
|
|
675
|
+
protected selectAllText: string;
|
|
676
|
+
/**
|
|
677
|
+
* Data nodes "select all" acts on, and the ones its checkbox state is derived from.
|
|
678
|
+
*
|
|
679
|
+
* While a filter is active only the rendered nodes qualify — the hidden ones are not what the user
|
|
680
|
+
* is looking at, and selecting them would contradict a master checkbox that can only report on what
|
|
681
|
+
* is on screen. Without a filter the whole data set qualifies, collapsed branches included.
|
|
682
|
+
*/
|
|
683
|
+
private get selectAllTargets();
|
|
684
|
+
/** Adapter shared by the master checkbox and the Ctrl/Cmd + A handler, so the two cannot drift apart. */
|
|
685
|
+
private get selectAllAdapter();
|
|
644
686
|
get disabled(): boolean;
|
|
645
687
|
set disabled(rawValue: boolean);
|
|
646
688
|
private _disabled;
|
|
@@ -649,9 +691,20 @@ declare class KbqTreeSelection extends KbqTreeBase<any> implements ControlValueA
|
|
|
649
691
|
private _tabIndex;
|
|
650
692
|
get showCheckbox(): boolean;
|
|
651
693
|
get isEmpty(): boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Number of real, data-backed nodes currently rendered — unlike `renderedOptions.length`, never
|
|
696
|
+
* includes the "select all" row, which is appended to `renderedOptions` on its own, later-processed
|
|
697
|
+
* reactive pass and would otherwise make a consumer's own node count race against that pass.
|
|
698
|
+
*/
|
|
699
|
+
get nodesCount(): number;
|
|
652
700
|
private optionFocusSubscription;
|
|
653
701
|
private optionBlurSubscription;
|
|
702
|
+
private readonly localeService?;
|
|
703
|
+
/** Updates locale parameters from the locale service. */
|
|
704
|
+
private updateLocaleParams;
|
|
654
705
|
constructor();
|
|
706
|
+
/** Selects every node "select all" can act on, or deselects them all when they are already selected. */
|
|
707
|
+
protected toggleSelectAll(): void;
|
|
655
708
|
ngAfterContentInit(): void;
|
|
656
709
|
ngAfterViewInit(): void;
|
|
657
710
|
ngOnDestroy(): void;
|
|
@@ -699,6 +752,20 @@ declare class KbqTreeSelection extends KbqTreeBase<any> implements ControlValueA
|
|
|
699
752
|
getItemHeight(): number;
|
|
700
753
|
setStateChildren(option: KbqTreeOption, state: boolean): void;
|
|
701
754
|
private onCopyDefaultHandler;
|
|
755
|
+
/**
|
|
756
|
+
* Moves focus to the closest enabled ancestor of the active option — ArrowLeft on a leaf, on an
|
|
757
|
+
* already-collapsed node, or on a node whose toggle is disabled.
|
|
758
|
+
*
|
|
759
|
+
* Ancestors are resolved against `renderedOptions` rather than `treeControl.dataNodes`: every
|
|
760
|
+
* ancestor of a visible option is itself visible, options are rendered depth-first, and these are
|
|
761
|
+
* the indices `keyManager` navigates — so the walk starts from `keyManager.activeItemIndex`.
|
|
762
|
+
* Scanning backwards, the first option with a smaller level is the parent.
|
|
763
|
+
*
|
|
764
|
+
* A disabled option cannot take focus (`KbqTreeOption.focus` refuses it), so the walk steps over a
|
|
765
|
+
* disabled ancestor and narrows `level` to that ancestor's level. Without narrowing, the scan would
|
|
766
|
+
* continue against the original level and land on a preceding sibling of the parent.
|
|
767
|
+
*/
|
|
768
|
+
private setActiveParentOption;
|
|
702
769
|
private getHeight;
|
|
703
770
|
private updateTabIndex;
|
|
704
771
|
private updateRenderedOptions;
|
|
@@ -720,7 +787,8 @@ declare class KbqTreeSelection extends KbqTreeBase<any> implements ControlValueA
|
|
|
720
787
|
private canDeselectLast;
|
|
721
788
|
private isFocusReceivedFromNestedOption;
|
|
722
789
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeSelection, never>;
|
|
723
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeSelection, "kbq-tree-selection", ["kbqTreeSelection"], { "treeControl": { "alias": "treeControl"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "noUnselectLast": { "alias": "noUnselectLast"; "required": false; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; }, { "navigationChange": "navigationChange"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; "onCopy": "onCopy"; }, ["unorderedOptions"], never, true, never>;
|
|
790
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTreeSelection, "kbq-tree-selection", ["kbqTreeSelection"], { "treeControl": { "alias": "treeControl"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "noUnselectLast": { "alias": "noUnselectLast"; "required": false; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; }, { "navigationChange": "navigationChange"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; "onCopy": "onCopy"; }, ["unorderedOptions"], never, true, never>;
|
|
791
|
+
static ngAcceptInputType_selectAll: unknown;
|
|
724
792
|
}
|
|
725
793
|
|
|
726
794
|
declare class KbqTreeModule {
|
package/tree/tree-option.scss
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
@use '../core/option/action-container-mixins' as action-container;
|
|
1
2
|
@use '../core/styles/common';
|
|
2
3
|
@use '../core/styles/common/tokens' as *;
|
|
3
4
|
@use '../core/styles/common/vendor-prefixes';
|
|
4
5
|
|
|
5
6
|
.kbq-tree-option {
|
|
6
7
|
@include vendor-prefixes.user-select(none);
|
|
8
|
+
@include action-container.kbq-option-action-visibility('.kbq-tree-selection.cdk-keyboard-focused');
|
|
7
9
|
|
|
8
10
|
position: relative;
|
|
9
11
|
|
|
@@ -72,14 +74,6 @@
|
|
|
72
74
|
|
|
73
75
|
&:not(.kbq-disabled) {
|
|
74
76
|
cursor: pointer;
|
|
75
|
-
|
|
76
|
-
&:hover,
|
|
77
|
-
&.kbq-hovered,
|
|
78
|
-
&.kbq-action-button-focused {
|
|
79
|
-
& .kbq-action-container {
|
|
80
|
-
display: flex;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
&:is(.kbq-checked, .kbq-selected, .kbq-focused):has(+ :is(.kbq-checked, .kbq-selected, .kbq-focused)) {
|
|
@@ -45,6 +45,14 @@
|
|
|
45
45
|
@include tree-theme.kbq-tree-option(states-hover);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// `:not(.kbq-disabled)` raises specificity so pressed wins over the heavier `:hover:not(.kbq-focused)` rule
|
|
49
|
+
&:active:not(.kbq-disabled),
|
|
50
|
+
&.kbq-active:not(.kbq-disabled) {
|
|
51
|
+
--kbq-option-background: var(--kbq-tree-states-active-container-background);
|
|
52
|
+
|
|
53
|
+
background: var(--kbq-tree-states-active-container-background);
|
|
54
|
+
}
|
|
55
|
+
|
|
48
56
|
&.kbq-selected {
|
|
49
57
|
&:hover:not(.kbq-focused),
|
|
50
58
|
&.kbq-hovered:not(.kbq-focused) {
|
|
@@ -54,6 +62,13 @@
|
|
|
54
62
|
&.kbq-focused {
|
|
55
63
|
@include tree-theme.kbq-tree-option(states-selected-hover);
|
|
56
64
|
}
|
|
65
|
+
|
|
66
|
+
&:active:not(.kbq-disabled),
|
|
67
|
+
&.kbq-active:not(.kbq-disabled) {
|
|
68
|
+
--kbq-option-background: var(--kbq-tree-states-selected-active-container-background);
|
|
69
|
+
|
|
70
|
+
background: var(--kbq-tree-states-selected-active-container-background);
|
|
71
|
+
}
|
|
57
72
|
}
|
|
58
73
|
|
|
59
74
|
&.kbq-checked:not(.kbq-selected),
|
|
@@ -66,6 +81,13 @@
|
|
|
66
81
|
&.kbq-focused {
|
|
67
82
|
background: var(--kbq-tree-multiple-states-selected-hover-container-background);
|
|
68
83
|
}
|
|
84
|
+
|
|
85
|
+
&:active:not(.kbq-disabled),
|
|
86
|
+
&.kbq-active:not(.kbq-disabled) {
|
|
87
|
+
--kbq-option-background: var(--kbq-tree-multiple-states-selected-active-container-background);
|
|
88
|
+
|
|
89
|
+
background: var(--kbq-tree-multiple-states-selected-active-container-background);
|
|
90
|
+
}
|
|
69
91
|
}
|
|
70
92
|
|
|
71
93
|
&.kbq-focused:not(.kbq-action-button-focused) {
|