@koobiq/components 20.2.0 → 20.3.1
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 +5 -1
- package/accordion/accordion-tokens.scss +2 -0
- package/accordion/accordion-trigger.scss +6 -0
- package/accordion/accordion.scss +21 -0
- package/accordion/index.d.ts +55 -8
- package/actions-panel/index.d.ts +25 -13
- 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/index.d.ts +24 -9
- 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 +1 -1
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1125 -199
- 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/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_connected-overlay.scss +6 -3
- package/core/styles/common/_select.scss +12 -0
- 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 +13 -0
- package/dropdown/dropdown.scss +7 -1
- package/dropdown/index.d.ts +264 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +106 -46
- 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 +16 -16
- 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 +54 -31
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +13 -13
- 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 +13 -13
- 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 +2454 -795
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +160 -121
- 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 +754 -155
- 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 +605 -192
- 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 +359 -165
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +39 -21
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +172 -27
- 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 +70 -38
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +69 -54
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +23 -22
- 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 +26 -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 +7 -7
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +420 -107
- 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 +7 -7
- 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 +56 -58
- 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 +58 -26
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +76 -39
- 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 +115 -36
- 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 +190 -56
- 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 -6
- package/filter-bar/index.d.ts +222 -9
- 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 +148 -68
- package/icon/index.d.ts +31 -6
- 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 +22 -5
- package/modal/modal-tokens.scss +1 -1
- package/navbar/index.d.ts +16 -1
- package/navbar/navbar-brand.scss +6 -0
- package/navbar/vertical-navbar.scss +6 -0
- 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/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/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/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +30 -12
- 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/select/index.d.ts +163 -18
- 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/index.d.ts +0 -1
- 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 +9 -5
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +54 -11
- 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 +83 -16
- 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/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) {
|
package/tree-select/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
2
|
+
import { InjectionToken, AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ElementRef, ChangeDetectorRef, QueryList, TemplateRef, EventEmitter, Provider } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_overlay_module_d from '@angular/cdk/overlay-module.d';
|
|
4
4
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
5
5
|
import * as i1 from '@angular/cdk/overlay';
|
|
6
6
|
import { ConnectedPosition, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
7
7
|
import { ControlValueAccessor, NgForm, FormGroupDirective, NgControl } from '@angular/forms';
|
|
8
8
|
import * as i5 from '@koobiq/components/core';
|
|
9
|
-
import { KbqPanelWidth, KbqPanelMinWidth, KbqPanelMaxWidth, KbqAbstractSelect, CanUpdateErrorState, ErrorStateMatcher, KbqSelectTrigger, KbqSelectMatcher, KbqSelectSearch, KbqSelectAllEvent, KbqComponentColors } from '@koobiq/components/core';
|
|
9
|
+
import { KbqPanelWidth, KbqPanelMinWidth, KbqPanelMaxWidth, KbqPanelMaxHeight, KbqAbstractSelect, CanUpdateErrorState, KbqSiblingPopup, ErrorStateMatcher, KbqSelectTrigger, KbqSelectMatcher, KbqSelectSearch, KbqSelectAllEvent, KbqComponentColors } from '@koobiq/components/core';
|
|
10
10
|
import * as i9 from '@koobiq/components/form-field';
|
|
11
11
|
import { KbqFormFieldControl, KbqCleaner } from '@koobiq/components/form-field';
|
|
12
12
|
import * as i4 from '@koobiq/components/tags';
|
|
@@ -45,6 +45,11 @@ type KbqTreeSelectOptions = Partial<{
|
|
|
45
45
|
* explicit `panelWidth`. If null, the `--kbq-panel-size-width-max` token applies.
|
|
46
46
|
*/
|
|
47
47
|
panelMaxWidth: KbqPanelMaxWidth;
|
|
48
|
+
/**
|
|
49
|
+
* Maximum height of the panel's scrollable option list. Does not include the search field or the
|
|
50
|
+
* footer. If null, the `--kbq-select-panel-size-max-height` token applies.
|
|
51
|
+
*/
|
|
52
|
+
panelMaxHeight: KbqPanelMaxHeight;
|
|
48
53
|
/**
|
|
49
54
|
* Whether to enable hiding search by default if options is less than minimum.
|
|
50
55
|
*
|
|
@@ -70,6 +75,11 @@ declare const KBQ_TREE_SELECT_OPTIONS: InjectionToken<Partial<{
|
|
|
70
75
|
* explicit `panelWidth`. If null, the `--kbq-panel-size-width-max` token applies.
|
|
71
76
|
*/
|
|
72
77
|
panelMaxWidth: KbqPanelMaxWidth;
|
|
78
|
+
/**
|
|
79
|
+
* Maximum height of the panel's scrollable option list. Does not include the search field or the
|
|
80
|
+
* footer. If null, the `--kbq-select-panel-size-max-height` token applies.
|
|
81
|
+
*/
|
|
82
|
+
panelMaxHeight: KbqPanelMaxHeight;
|
|
73
83
|
/**
|
|
74
84
|
* Whether to enable hiding search by default if options is less than minimum.
|
|
75
85
|
*
|
|
@@ -89,7 +99,7 @@ declare class KbqTreeSelectChange {
|
|
|
89
99
|
values?: unknown[] | undefined;
|
|
90
100
|
constructor(source: KbqTreeSelect, value: any, isUserInput?: boolean, values?: unknown[] | undefined);
|
|
91
101
|
}
|
|
92
|
-
declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<KbqTreeOption>, CanUpdateErrorState {
|
|
102
|
+
declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentInit, AfterViewInit, OnDestroy, OnInit, DoCheck, ControlValueAccessor, KbqFormFieldControl<KbqTreeOption>, CanUpdateErrorState, KbqSiblingPopup {
|
|
93
103
|
elementRef: ElementRef<HTMLElement>;
|
|
94
104
|
readonly changeDetectorRef: ChangeDetectorRef;
|
|
95
105
|
private readonly ngZone;
|
|
@@ -143,10 +153,10 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
143
153
|
*/
|
|
144
154
|
protected readonly viewportMargin: number;
|
|
145
155
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
156
|
+
* Opens the panel below the trigger, falling back to above it when it does not fit.
|
|
157
|
+
*
|
|
158
|
+
* A third position is appended at runtime by `updatePanelAnchor`: a multiline trigger that has grown
|
|
159
|
+
* taller than the panel gets it anchored to its first row and drawn over the rest of it.
|
|
150
160
|
*/
|
|
151
161
|
positions: ConnectedPosition[];
|
|
152
162
|
options: QueryList<KbqTreeOption>;
|
|
@@ -156,8 +166,14 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
156
166
|
readonly trigger: _angular_core.Signal<ElementRef<any>>;
|
|
157
167
|
/** Reference to the overlay panel element. */
|
|
158
168
|
readonly panel: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
169
|
+
/** Scrollable option list inside the panel. */
|
|
170
|
+
protected readonly optionsContainer: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
|
|
159
171
|
overlayDir: CdkConnectedOverlay;
|
|
160
172
|
tags: QueryList<KbqTag>;
|
|
173
|
+
/**
|
|
174
|
+
* Reference to the optional cleaner element for clearing selection.
|
|
175
|
+
* @docs-private
|
|
176
|
+
*/
|
|
161
177
|
readonly cleaner: _angular_core.Signal<KbqCleaner | undefined>;
|
|
162
178
|
/** User-supplied override of the trigger element. */
|
|
163
179
|
readonly customTrigger: _angular_core.Signal<KbqSelectTrigger | undefined>;
|
|
@@ -166,7 +182,12 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
166
182
|
readonly tree: _angular_core.Signal<KbqTreeSelection | undefined>;
|
|
167
183
|
readonly search: _angular_core.Signal<KbqSelectSearch | undefined>;
|
|
168
184
|
hiddenItemsText: string;
|
|
169
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Event emitted when the select panel has been toggled.
|
|
187
|
+
* Also serves as the `openedChange` member of the `KbqSiblingPopup` contract — a tooltip sharing
|
|
188
|
+
* this element's host reacts to it, so its emission timing (gated on `panelDoneAnimatingStream`, see
|
|
189
|
+
* `ngOnInit`) matters beyond this output's original consumers.
|
|
190
|
+
*/
|
|
170
191
|
readonly openedChange: EventEmitter<boolean>;
|
|
171
192
|
/** Event emitted when the select has been opened. */
|
|
172
193
|
readonly openedStream: Observable<void>;
|
|
@@ -175,8 +196,8 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
175
196
|
/** Event emitted when the selected value has been changed by the user. */
|
|
176
197
|
readonly selectionChange: _angular_core.OutputEmitterRef<KbqTreeSelectChange>;
|
|
177
198
|
/**
|
|
178
|
-
* Event emitted
|
|
179
|
-
*
|
|
199
|
+
* Event emitted whenever the tree's `selectAllOptions()` runs — a click on the `selectAll` master
|
|
200
|
+
* checkbox, the Ctrl/Cmd + A shortcut, or a custom `selectAllHandler` that delegates to it.
|
|
180
201
|
*/
|
|
181
202
|
readonly onSelectAll: _angular_core.OutputEmitterRef<KbqSelectAllEvent<KbqTreeOption, KbqTreeSelect>>;
|
|
182
203
|
/**
|
|
@@ -219,6 +240,15 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
219
240
|
private _autoSelect;
|
|
220
241
|
/** When `true`, a repeated Ctrl/Cmd+A deselects all options. Off by default (Ctrl+A only selects). */
|
|
221
242
|
readonly selectAllToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
243
|
+
/**
|
|
244
|
+
* Whether to render the "select all" master checkbox above the tree. Multiple selection only.
|
|
245
|
+
*
|
|
246
|
+
* The row acts on the nodes the user can actually toggle — enabled and selectable. Without a search
|
|
247
|
+
* query that covers the whole data set, collapsed branches included; while a query is active it
|
|
248
|
+
* covers only the matches. Enabling it also makes Ctrl/Cmd + A a two-way toggle, so the shortcut and
|
|
249
|
+
* the checkbox never disagree (`selectAllToggle` is implied).
|
|
250
|
+
*/
|
|
251
|
+
readonly selectAll: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
222
252
|
get value(): any;
|
|
223
253
|
get id(): string;
|
|
224
254
|
set id(value: string);
|
|
@@ -264,6 +294,20 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
264
294
|
* When null, the `--kbq-panel-size-width-max` token applies.
|
|
265
295
|
*/
|
|
266
296
|
readonly panelMaxWidth: _angular_core.InputSignalWithTransform<KbqPanelMaxWidth, unknown>;
|
|
297
|
+
/**
|
|
298
|
+
* Maximum height of the panel's scrollable option list, in pixels. Applied as the
|
|
299
|
+
* `--kbq-select-panel-size-max-height` custom property on the panel.
|
|
300
|
+
*
|
|
301
|
+
* The search field and the footer sit outside the scrollable area and add to the panel's total height.
|
|
302
|
+
* When null, the token default (256px) applies.
|
|
303
|
+
*/
|
|
304
|
+
readonly panelMaxHeight: _angular_core.InputSignalWithTransform<KbqPanelMaxHeight, unknown>;
|
|
305
|
+
/**
|
|
306
|
+
* `panelMaxHeight` rendered as a CSS length for the `--kbq-select-panel-size-max-height` token.
|
|
307
|
+
* A non-finite value (e.g. `null`) leaves the stylesheet default in place.
|
|
308
|
+
* @docs-private
|
|
309
|
+
*/
|
|
310
|
+
protected readonly panelMaxHeightToken: _angular_core.Signal<string | null>;
|
|
267
311
|
/**
|
|
268
312
|
* Controls when the search functionality is displayed based on the number of available options.
|
|
269
313
|
*
|
|
@@ -274,6 +318,12 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
274
318
|
get searchMinOptionsThreshold(): number | undefined;
|
|
275
319
|
private _searchMinOptionsThreshold;
|
|
276
320
|
get panelOpen(): boolean;
|
|
321
|
+
/** Whether the overlay panel is currently on screen. Part of the `KbqSiblingPopup` contract. */
|
|
322
|
+
get isAttached(): boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Whether the cleaner (clear button) should be shown.
|
|
325
|
+
* @docs-private
|
|
326
|
+
*/
|
|
277
327
|
get canShowCleaner(): boolean;
|
|
278
328
|
/** @docs-private */
|
|
279
329
|
get colorForState(): KbqComponentColors;
|
|
@@ -282,13 +332,12 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
282
332
|
private closeSubscription;
|
|
283
333
|
private _panelOpen;
|
|
284
334
|
private originalOnKeyDown;
|
|
285
|
-
/** The scroll
|
|
335
|
+
/** The scroll offset the panel is restored to when it attaches — the list always opens at the top. */
|
|
286
336
|
private scrollTop;
|
|
287
337
|
/** Unique id for this input. */
|
|
288
338
|
private readonly uid;
|
|
289
339
|
private tempValues;
|
|
290
340
|
private readonly destroyRef;
|
|
291
|
-
private readonly window;
|
|
292
341
|
constructor();
|
|
293
342
|
ngOnInit(): void;
|
|
294
343
|
ngDoCheck(): void;
|
|
@@ -297,7 +346,17 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
297
346
|
ngOnDestroy(): void;
|
|
298
347
|
updateErrorState(): void;
|
|
299
348
|
hiddenItemsTextFormatter(hiddenItemsText: string, hiddenItems: number): string;
|
|
300
|
-
|
|
349
|
+
/**
|
|
350
|
+
* Clears the current selection.
|
|
351
|
+
* @docs-private
|
|
352
|
+
*/
|
|
353
|
+
clear(): void;
|
|
354
|
+
/**
|
|
355
|
+
* Clears the current selection.
|
|
356
|
+
* @deprecated Activate the projected `KbqCleaner` instead.
|
|
357
|
+
* @docs-private
|
|
358
|
+
*/
|
|
359
|
+
clearValue(event: Event): void;
|
|
301
360
|
/** `View -> model callback called when value changes` */
|
|
302
361
|
onChange: (value: any) => void;
|
|
303
362
|
/** `View -> model callback called when select has been touched` */
|
|
@@ -352,6 +411,9 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
352
411
|
onBlur(): void;
|
|
353
412
|
/** Callback that is invoked when the overlay panel has been attached. */
|
|
354
413
|
onAttached(): void;
|
|
414
|
+
/** Element the overlay is positioned and sized against. */
|
|
415
|
+
protected getOverlayOriginElement(): HTMLElement | undefined;
|
|
416
|
+
protected isPanelOpen(): boolean;
|
|
355
417
|
/** Returns the theme to be used on the panel. */
|
|
356
418
|
getPanelTheme(): string;
|
|
357
419
|
/** Returns the full set of classes for the panel: base class, theme and custom `panelClass`. */
|
|
@@ -366,7 +428,7 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
366
428
|
onRemoveSelectedOption(selectedOption: any, $event: any): void;
|
|
367
429
|
calculateHiddenItems: () => void;
|
|
368
430
|
triggerKeydownHandler(event: KeyboardEvent): void;
|
|
369
|
-
panelKeydownHandler(event: KeyboardEvent):
|
|
431
|
+
panelKeydownHandler(event: KeyboardEvent): void;
|
|
370
432
|
/** @docs-private */
|
|
371
433
|
protected shouldShowSearch(): boolean;
|
|
372
434
|
private updateLocaleParams;
|
|
@@ -374,6 +436,12 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
374
436
|
private getTotalItemsWidthInMatcher;
|
|
375
437
|
private getTotalVisibleItems;
|
|
376
438
|
private buildTriggerClone;
|
|
439
|
+
/**
|
|
440
|
+
* Width of a single `kbq-tag` in the matcher, including margins and the inter-tag gap.
|
|
441
|
+
*
|
|
442
|
+
* Tags are `border-box` and carry horizontal padding, which `getComputedStyle().width` — always
|
|
443
|
+
* the used content-box width — leaves out. See the twin in `KbqSelect`.
|
|
444
|
+
*/
|
|
377
445
|
private getItemWidth;
|
|
378
446
|
private refreshTriggerValues;
|
|
379
447
|
/**
|
|
@@ -389,11 +457,10 @@ declare class KbqTreeSelect extends KbqAbstractSelect implements AfterContentIni
|
|
|
389
457
|
* the first item instead.
|
|
390
458
|
*/
|
|
391
459
|
private highlightCorrectOption;
|
|
392
|
-
/** Scrolls the active option into view. */
|
|
393
460
|
private scrollActiveOptionIntoView;
|
|
394
461
|
private subscribeOnSearchChanges;
|
|
395
462
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqTreeSelect, never>;
|
|
396
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelect, "kbq-tree-select", ["kbqTreeSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; "isSignal": true; }; "multiline": { "alias": "multiline"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "searchMinOptionsThreshold": { "alias": "searchMinOptionsThreshold"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; "valueChange": "valueChange"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], true, never>;
|
|
463
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelect, "kbq-tree-select", ["kbqTreeSelect"], { "hiddenItemsText": { "alias": "hiddenItemsText"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; "sortComparator": { "alias": "sortComparator"; "required": false; "isSignal": true; }; "multiline": { "alias": "multiline"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "autoSelect": { "alias": "autoSelect"; "required": false; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAll": { "alias": "selectAll"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selectAllHandler": { "alias": "selectAllHandler"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "panelMaxHeight": { "alias": "panelMaxHeight"; "required": false; "isSignal": true; }; "searchMinOptionsThreshold": { "alias": "searchMinOptionsThreshold"; "required": false; }; "hiddenItemsTextFormatter": { "alias": "hiddenItemsTextFormatter"; "required": false; }; }, { "openedChange": "openedChange"; "openedStream": "opened"; "closedStream": "closed"; "selectionChange": "selectionChange"; "onSelectAll": "onSelectAll"; "valueChange": "valueChange"; }, ["cleaner", "customTrigger", "customMatcher", "customTagTemplateRef", "tree", "search"], ["kbq-select-matcher, [kbq-select-matcher]", "kbq-select-trigger, [kbq-select-trigger]", "kbq-cleaner", "[kbqSelectSearch]", "[kbq-select-search-empty-result]", "kbq-tree-selection", "kbq-select-footer,[kbq-tree-select-footer]"], true, never>;
|
|
397
464
|
static ngAcceptInputType_multiple: unknown;
|
|
398
465
|
static ngAcceptInputType_disabled: unknown;
|
|
399
466
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
@import '../../../../node_modules/@koobiq/design-tokens/web/variables';
|
|
2
|
-
@import '../../../../node_modules/@koobiq/design-tokens/web/palette';
|
|
3
|
-
@import '../../../../node_modules/@koobiq/design-tokens/web/typography';
|
|
4
|
-
@import '../../../../node_modules/@koobiq/design-tokens/web/md-typography';
|