@koobiq/components 21.0.0 → 21.0.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/fesm2022/koobiq-components-code-block.mjs +45 -17
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +1 -1
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +9 -5
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +37 -16
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +20 -5
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +218 -83
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/package.json +3 -3
- package/schematics/collection.json +94 -89
- package/schematics/migrations/accordion-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/actions-panel-overlay-container/{index.js → index.cjs} +5 -4
- package/schematics/migrations/alert-signals/{index.js → index.cjs} +14 -13
- package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
- package/schematics/migrations/app-switcher-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
- package/schematics/migrations/autocomplete-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/badge-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-state-and-styles/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-supported-colors/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-toggle-signals-and-aria/{index.js → index.cjs} +7 -6
- package/schematics/migrations/button-truncation/{index.js → index.cjs} +7 -6
- package/schematics/migrations/checkbox-signals/{index.js → index.cjs} +9 -8
- package/schematics/migrations/clamped-text-disclosure/{index.js → index.cjs} +5 -4
- package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
- package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
- package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
- package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
- package/schematics/migrations/code-block-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/color-signals/index.cjs +20 -0
- package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
- package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
- package/schematics/migrations/datepicker-signals/index.cjs +18 -0
- package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +8 -7
- package/schematics/migrations/design-tokens-v4/{index.js → index.cjs} +3 -2
- package/schematics/migrations/divider-signals-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/dl-attribute-coercion/{index.js → index.cjs} +7 -6
- package/schematics/migrations/dl-standalone-names/{index.js → index.cjs} +11 -10
- package/schematics/migrations/dropdown-demote-overlay/{index.js → index.cjs} +7 -6
- package/schematics/migrations/dropdown-signals/index.cjs +20 -0
- package/schematics/migrations/empty-state-error-color/{index.js → index.cjs} +5 -4
- package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/file-upload-cva-and-primitives/{index.js → index.cjs} +5 -4
- package/schematics/migrations/file-upload-deprecated-outputs/{index.js → index.cjs} +5 -4
- package/schematics/migrations/filter-bar-rename-action/{index.js → index.cjs} +5 -4
- package/schematics/migrations/filter-bar-signals/{index.js → index.cjs} +16 -15
- package/schematics/migrations/filter-bar-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/flag-inner-html/{index.js → index.cjs} +5 -4
- package/schematics/migrations/form-field-signals/{index.js → index.cjs} +18 -17
- package/schematics/migrations/icon-semantics-and-api/{data.js → data.cjs} +4 -4
- package/schematics/migrations/icon-semantics-and-api/{index.js → index.cjs} +6 -5
- package/schematics/migrations/icons-replacement/{index.js → index.cjs} +4 -3
- package/schematics/migrations/inline-edit-a11y-and-types/{index.js → index.cjs} +5 -4
- package/schematics/migrations/input-number-surface/{index.js → index.cjs} +5 -4
- package/schematics/migrations/input-signals/index.cjs +18 -0
- package/schematics/migrations/link-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/link-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/list-signals/index.cjs +18 -0
- package/schematics/migrations/list-tree-multiple-input/{index.js → index.cjs} +7 -6
- package/schematics/migrations/loader-overlay-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
- package/schematics/migrations/locale-configuration-providers/{index.js → index.cjs} +5 -4
- package/schematics/migrations/mandatory-peer-dependencies/{index.js → index.cjs} +3 -2
- package/schematics/migrations/markdown-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/modal-dialog-semantics/{index.js → index.cjs} +5 -4
- package/schematics/migrations/modal-signals/index.cjs +20 -0
- package/schematics/migrations/navbar-signals-and-aria/{index.js → index.cjs} +7 -6
- package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +8 -7
- package/schematics/migrations/notification-center-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/option-signals/index.cjs +20 -0
- package/schematics/migrations/popover-leave-delay/{index.js → index.cjs} +5 -4
- package/schematics/migrations/progress-bar-percentage-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/progress-spinner-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/query-list-signals/index.cjs +18 -0
- package/schematics/migrations/radio-signals-and-aria/{index.js → index.cjs} +9 -8
- package/schematics/migrations/read-state-dwell-handlers/{index.js → index.cjs} +5 -4
- package/schematics/migrations/scrollbar-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/select-signal-inputs/{index.js → index.cjs} +5 -4
- package/schematics/migrations/sidepanel-non-modal-behavior/{index.js → index.cjs} +5 -4
- package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
- package/schematics/migrations/split-button-optional-disabled/{index.js → index.cjs} +5 -4
- package/schematics/migrations/splitter-deprecated-path/{index.js → index.cjs} +4 -3
- package/schematics/migrations/state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/table-cell-content/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tabs-signals-and-aria/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tag-list-cleaner/{index.js → index.cjs} +7 -6
- package/schematics/migrations/tag-slots/{index.js → index.cjs} +6 -5
- package/schematics/migrations/tags-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/textarea-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/time-range-title-for/{index.js → index.cjs} +5 -4
- package/schematics/migrations/timepicker-signals/{index.js → index.cjs} +7 -6
- package/schematics/migrations/timezone-grouping-utils/{index.js → index.cjs} +5 -4
- package/schematics/migrations/title-encapsulation/{index.js → index.cjs} +5 -4
- package/schematics/migrations/toast-stack-and-defaults/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tooltip-pointer-events-and-types/{index.js → index.cjs} +5 -4
- package/schematics/migrations/top-bar-container-selectors/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-select-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-signals/{index.js → index.cjs} +5 -4
- package/schematics/migrations/tree-state-saving-default/{index.js → index.cjs} +5 -4
- package/schematics/migrations/username-pipe-injection/{index.js → index.cjs} +5 -4
- package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +7 -7
- package/schematics/migrations/v20-upgrade/index.cjs +19 -0
- package/schematics/migrations/v21-upgrade/{data.js → data.cjs} +22 -22
- package/schematics/migrations/v21-upgrade/{index.js → index.cjs} +11 -10
- package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
- package/schematics/migrations.json +87 -82
- package/schematics/ng-add/{index.js → index.cjs} +12 -286
- package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
- package/schematics/utils/{deprecated-path-migration.js → deprecated-path-migration.cjs} +4 -3
- package/schematics/utils/html-config.cjs +148 -0
- package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
- package/schematics/utils/list-item-pattern.cjs +16 -0
- package/schematics/utils/package-config.cjs +80 -0
- package/schematics/utils/project-files.cjs +25 -0
- package/schematics/utils/replacement-driver.cjs +337 -0
- package/schematics/utils/safe-rule.cjs +23 -0
- package/schematics/utils/signal-members-migration.cjs +779 -0
- package/schematics/utils/tag-patterns.cjs +21 -0
- package/schematics/utils/template-ref-access.cjs +155 -0
- package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
- package/schematics/utils/warn-only-migration.cjs +52 -0
- package/schematics/utils/workspace-styles.cjs +123 -0
- package/types/koobiq-components-code-block.d.ts +38 -11
- package/types/koobiq-components-filter-bar.d.ts +2 -2
- package/types/koobiq-components-tree-select.d.ts +11 -8
- package/types/koobiq-components-tree.d.ts +108 -59
- package/schematics/migrations/angular-animations-removal/index.js +0 -20
- package/schematics/migrations/color-signals/index.js +0 -19
- package/schematics/migrations/core-mixins-removal/index.js +0 -17
- package/schematics/migrations/datepicker-signals/index.js +0 -17
- package/schematics/migrations/dropdown-signals/index.js +0 -19
- package/schematics/migrations/input-signals/index.js +0 -17
- package/schematics/migrations/list-signals/index.js +0 -17
- package/schematics/migrations/modal-signals/index.js +0 -19
- package/schematics/migrations/option-signals/index.js +0 -19
- package/schematics/migrations/query-list-signals/index.js +0 -17
- package/schematics/migrations/signal-inputs-subclasses/index.js +0 -17
- package/schematics/migrations/v20-upgrade/index.js +0 -18
- package/schematics/migrations/zoneless-change-detection/index.js +0 -20
- package/schematics/utils/package-config.js +0 -13
- /package/schematics/migrations/accordion-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/actions-panel-overlay-container/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/alert-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/angular-animations-removal/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/app-switcher-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/autocomplete-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/badge-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-state-and-styles/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-supported-colors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-toggle-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/button-truncation/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/checkbox-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/clamped-text-disclosure/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/code-block-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/color-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/core-mixins-removal/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/datepicker-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/divider-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dl-attribute-coercion/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dl-standalone-names/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dropdown-demote-overlay/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/dropdown-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/empty-state-error-color/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/file-upload-cva-and-primitives/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/file-upload-deprecated-outputs/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-rename-action/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/filter-bar-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/flag-inner-html/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/form-field-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/inline-edit-a11y-and-types/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/input-number-surface/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/input-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/link-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/list-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/list-tree-multiple-input/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/loader-overlay-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/locale-configuration-providers/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/markdown-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/modal-dialog-semantics/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/modal-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/navbar-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/notification-center-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/option-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/popover-leave-delay/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/progress-bar-percentage-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/progress-spinner-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/query-list-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/radio-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/read-state-dwell-handlers/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/select-signal-inputs/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/sidepanel-non-modal-behavior/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/signal-inputs-subclasses/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/split-button-optional-disabled/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/table-cell-content/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tabs-signals-and-aria/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tag-list-cleaner/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tags-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/textarea-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/time-range-title-for/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/timepicker-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/timezone-grouping-utils/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/title-encapsulation/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/toast-stack-and-defaults/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tooltip-pointer-events-and-types/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/top-bar-container-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-select-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-signals/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/tree-state-saving-default/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/username-pipe-injection/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/zoneless-change-detection/{data.js → data.cjs} +0 -0
- /package/schematics/utils/{ast.js → ast.cjs} +0 -0
- /package/schematics/utils/{messages.js → messages.cjs} +0 -0
|
@@ -11,17 +11,24 @@ import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
|
11
11
|
import { ControlValueAccessor } from '@angular/forms';
|
|
12
12
|
import * as i2 from '@koobiq/components/icon';
|
|
13
13
|
|
|
14
|
+
/** Options of `FlatTreeControl` and `NestedTreeControl`. */
|
|
15
|
+
interface KbqTreeControlOptions<T, K> {
|
|
16
|
+
/** Initial value of the control's `trackBy`. */
|
|
17
|
+
trackBy?: (dataNode: T) => K;
|
|
18
|
+
}
|
|
14
19
|
/**
|
|
15
20
|
* Tree control interface. User can implement TreeControl to expand/collapse dataNodes in the tree.
|
|
16
21
|
* The Tree will use this TreeControl to expand/collapse a node.
|
|
17
22
|
* User can also use it outside the `<kbq-tree>` to control the expansion status of the tree.
|
|
18
23
|
*/
|
|
19
|
-
interface TreeControl<T> {
|
|
24
|
+
interface TreeControl<T, K = T> {
|
|
20
25
|
/** The saved tree nodes data for `expandAll` action. */
|
|
21
26
|
dataNodes: T[];
|
|
22
|
-
/** The expansion model */
|
|
23
|
-
expansionModel: SelectionModel<
|
|
27
|
+
/** The expansion model: the keys of the expanded data nodes, which are the nodes themselves by default. */
|
|
28
|
+
expansionModel: SelectionModel<K>;
|
|
24
29
|
filterModel: SelectionModel<T>;
|
|
30
|
+
/** Gives the key a data node is expanded by. Without it the node object is its own key. */
|
|
31
|
+
trackBy?: (dataNode: T) => K;
|
|
25
32
|
filterValue: BehaviorSubject<T[] | string | null>;
|
|
26
33
|
/** Get depth of a given data node, return the level number. This is for flat tree node. */
|
|
27
34
|
getLevel(dataNode: T): number;
|
|
@@ -55,10 +62,17 @@ interface TreeControl<T> {
|
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */
|
|
58
|
-
declare abstract class BaseTreeControl<T> implements TreeControl<T> {
|
|
65
|
+
declare abstract class BaseTreeControl<T, K = T> implements TreeControl<T, K> {
|
|
59
66
|
dataNodes: T[];
|
|
60
|
-
/** A selection model with multi-selection to track expansion status. */
|
|
61
|
-
expansionModel: SelectionModel<
|
|
67
|
+
/** A selection model with multi-selection to track expansion status: it holds the key of every expanded node. */
|
|
68
|
+
expansionModel: SelectionModel<K>;
|
|
69
|
+
/**
|
|
70
|
+
* Gives the key a data node is expanded by. Without it the node object is its own key, so a node
|
|
71
|
+
* rebuilt as a new object — as a flattener does whenever its data changes — comes back collapsed.
|
|
72
|
+
*
|
|
73
|
+
* Set it before anything is expanded: keys stored under another function no longer match.
|
|
74
|
+
*/
|
|
75
|
+
trackBy?: (dataNode: T) => K;
|
|
62
76
|
filterModel: SelectionModel<T>;
|
|
63
77
|
filterValue: BehaviorSubject<string | T[] | null>;
|
|
64
78
|
/** Get depth of a given data node, return the level number. This is for flat tree node. */
|
|
@@ -90,6 +104,8 @@ declare abstract class BaseTreeControl<T> implements TreeControl<T> {
|
|
|
90
104
|
expandDescendants(dataNode: T): void;
|
|
91
105
|
/** Collapses a subtree rooted at given data node recursively. */
|
|
92
106
|
collapseDescendants(dataNode: T): void;
|
|
107
|
+
/** The key `expansionModel` holds for a data node. */
|
|
108
|
+
protected expansionKey(dataNode: T): K;
|
|
93
109
|
}
|
|
94
110
|
|
|
95
111
|
declare const kbqTreeSelectAllValue = "selectAll";
|
|
@@ -102,10 +118,10 @@ interface FlatTreeControlFilter<T> {
|
|
|
102
118
|
*
|
|
103
119
|
* @docs-private
|
|
104
120
|
*/
|
|
105
|
-
declare class FilterByViewValue<T> implements FlatTreeControlFilter<T> {
|
|
121
|
+
declare class FilterByViewValue<T, K = T> implements FlatTreeControlFilter<T> {
|
|
106
122
|
private control;
|
|
107
123
|
result: T[];
|
|
108
|
-
constructor(control: FlatTreeControl<T>);
|
|
124
|
+
constructor(control: FlatTreeControl<T, K>);
|
|
109
125
|
handle(value: string | null): T[];
|
|
110
126
|
}
|
|
111
127
|
/**
|
|
@@ -114,17 +130,17 @@ declare class FilterByViewValue<T> implements FlatTreeControlFilter<T> {
|
|
|
114
130
|
*
|
|
115
131
|
* @docs-private
|
|
116
132
|
*/
|
|
117
|
-
declare class FilterParentsForNodes<T> implements FlatTreeControlFilter<T> {
|
|
133
|
+
declare class FilterParentsForNodes<T, K = T> implements FlatTreeControlFilter<T> {
|
|
118
134
|
private control;
|
|
119
135
|
result: T[];
|
|
120
|
-
constructor(control: FlatTreeControl<T>);
|
|
136
|
+
constructor(control: FlatTreeControl<T, K>);
|
|
121
137
|
handle(_: any, prevFilter: FlatTreeControlFilter<T>): T[];
|
|
122
138
|
}
|
|
123
|
-
declare class FilterByValues<T> implements FlatTreeControlFilter<T> {
|
|
139
|
+
declare class FilterByValues<T, K = T> implements FlatTreeControlFilter<T> {
|
|
124
140
|
private control;
|
|
125
141
|
result: T[];
|
|
126
142
|
private values;
|
|
127
|
-
constructor(control: FlatTreeControl<T>);
|
|
143
|
+
constructor(control: FlatTreeControl<T, K>);
|
|
128
144
|
handle(_: any, prevFilter?: FlatTreeControlFilter<T>): T[];
|
|
129
145
|
setValues: (values: string[]) => void;
|
|
130
146
|
getValues(): string[];
|
|
@@ -133,7 +149,7 @@ declare class FilterByValues<T> implements FlatTreeControlFilter<T> {
|
|
|
133
149
|
declare function defaultCompareValues(firstValue: string, secondValue: string): boolean;
|
|
134
150
|
declare function defaultCompareViewValues(firstViewValue: string, secondViewValue: string): boolean;
|
|
135
151
|
/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */
|
|
136
|
-
declare class FlatTreeControl<T> extends BaseTreeControl<T> {
|
|
152
|
+
declare class FlatTreeControl<T, K = T> extends BaseTreeControl<T, K> {
|
|
137
153
|
getLevel: (dataNode: T) => number;
|
|
138
154
|
isExpandable: (dataNode: T) => boolean;
|
|
139
155
|
/** getValue will be used to determine if the tree contains value or not. Used in method hasValue */
|
|
@@ -146,8 +162,9 @@ declare class FlatTreeControl<T> extends BaseTreeControl<T> {
|
|
|
146
162
|
compareViewValues: (firstViewValue: any, secondViewValue: any) => boolean;
|
|
147
163
|
/** isDisabled will be used to determine if the node is disabled. */
|
|
148
164
|
isDisabled: (dataNode: T) => boolean;
|
|
149
|
-
expandedItemsBeforeFiltration:
|
|
165
|
+
expandedItemsBeforeFiltration: K[];
|
|
150
166
|
private filters;
|
|
167
|
+
private readonly nodeIndexes;
|
|
151
168
|
/** Construct with flat tree data node functions getLevel, isExpandable, getValue and getViewValue. */
|
|
152
169
|
constructor(getLevel: (dataNode: T) => number, isExpandable: (dataNode: T) => boolean,
|
|
153
170
|
/** getValue will be used to determine if the tree contains value or not. Used in method hasValue */
|
|
@@ -159,7 +176,9 @@ declare class FlatTreeControl<T> extends BaseTreeControl<T> {
|
|
|
159
176
|
/** compareValues will be used to comparing values. */
|
|
160
177
|
compareViewValues?: (firstViewValue: any, secondViewValue: any) => boolean,
|
|
161
178
|
/** isDisabled will be used to determine if the node is disabled. */
|
|
162
|
-
isDisabled?: (dataNode: T) => boolean
|
|
179
|
+
isDisabled?: (dataNode: T) => boolean,
|
|
180
|
+
/** Further options: the `trackBy` the nodes are expanded by. */
|
|
181
|
+
options?: KbqTreeControlOptions<T, K>);
|
|
163
182
|
getFilters(): FlatTreeControlFilter<T>[];
|
|
164
183
|
setFilters(...filters: FlatTreeControlFilter<T>[]): void;
|
|
165
184
|
/**
|
|
@@ -193,10 +212,15 @@ declare class FlatTreeControl<T> extends BaseTreeControl<T> {
|
|
|
193
212
|
private updateFilterValue;
|
|
194
213
|
private saveExpansionState;
|
|
195
214
|
private restoreExpansionState;
|
|
215
|
+
/**
|
|
216
|
+
* Position of the node in `dataNodes`, constant-time while the index matches the array. With `trackBy` a node
|
|
217
|
+
* rebuilt as a new object since is found by its key, as the expansion methods accept it too.
|
|
218
|
+
*/
|
|
219
|
+
private indexOfNode;
|
|
196
220
|
}
|
|
197
221
|
|
|
198
222
|
/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */
|
|
199
|
-
declare class NestedTreeControl<T> extends BaseTreeControl<T> {
|
|
223
|
+
declare class NestedTreeControl<T, K = T> extends BaseTreeControl<T, K> {
|
|
200
224
|
getChildren: (dataNode: T) => Observable<T[]>;
|
|
201
225
|
/**
|
|
202
226
|
* Construct with nested tree function getChildren.
|
|
@@ -205,7 +229,7 @@ declare class NestedTreeControl<T> extends BaseTreeControl<T> {
|
|
|
205
229
|
* `getDescendants` walks the tree with `take(1)` and returns as soon as the recursion unwinds, so
|
|
206
230
|
* an asynchronous source yields an incomplete — usually empty — descendant list.
|
|
207
231
|
*/
|
|
208
|
-
constructor(getChildren: (dataNode: T) => Observable<T[]>);
|
|
232
|
+
constructor(getChildren: (dataNode: T) => Observable<T[]>, options?: KbqTreeControlOptions<T, K>);
|
|
209
233
|
/**
|
|
210
234
|
* Expands all dataNodes in the tree.
|
|
211
235
|
*
|
|
@@ -280,8 +304,10 @@ declare class KbqTreeFlattener<T, F> {
|
|
|
280
304
|
/**
|
|
281
305
|
* Expand flattened node with current expansion status.
|
|
282
306
|
* The returned list may have different length.
|
|
307
|
+
*
|
|
308
|
+
* Reads only `isExpanded` of the tree control, so it takes a control of any key type.
|
|
283
309
|
*/
|
|
284
|
-
expandFlattenedNodes(nodes: F[], treeControl: TreeControl<F>): F[];
|
|
310
|
+
expandFlattenedNodes(nodes: F[], treeControl: Pick<TreeControl<F>, 'isExpanded'>): F[];
|
|
285
311
|
}
|
|
286
312
|
/**
|
|
287
313
|
* Data source for flat tree.
|
|
@@ -290,7 +316,7 @@ declare class KbqTreeFlattener<T, F> {
|
|
|
290
316
|
* The nested tree nodes of type `T` are flattened through `KbqTreeFlattener`, and converted
|
|
291
317
|
* to type `F` for `KbqTree` to consume.
|
|
292
318
|
*/
|
|
293
|
-
declare class KbqTreeFlatDataSource<T, F> extends DataSource<F> {
|
|
319
|
+
declare class KbqTreeFlatDataSource<T, F, K = F> extends DataSource<F> {
|
|
294
320
|
private treeControl;
|
|
295
321
|
private treeFlattener;
|
|
296
322
|
flattenedData: BehaviorSubject<F[]>;
|
|
@@ -299,10 +325,10 @@ declare class KbqTreeFlatDataSource<T, F> extends DataSource<F> {
|
|
|
299
325
|
get data(): T[];
|
|
300
326
|
set data(value: T[]);
|
|
301
327
|
private readonly _data;
|
|
302
|
-
constructor(treeControl: FlatTreeControl<F>, treeFlattener: KbqTreeFlattener<T, F>, initialData?: T[]);
|
|
328
|
+
constructor(treeControl: FlatTreeControl<F, K>, treeFlattener: KbqTreeFlattener<T, F>, initialData?: T[]);
|
|
303
329
|
connect(collectionViewer: CollectionViewer): Observable<F[]>;
|
|
304
330
|
filterHandler(): F[];
|
|
305
|
-
expansionHandler(_change: SelectionChange<
|
|
331
|
+
expansionHandler(_change: SelectionChange<K>): F[];
|
|
306
332
|
disconnect(): void;
|
|
307
333
|
}
|
|
308
334
|
|
|
@@ -368,8 +394,10 @@ type KbqTreeState = string[];
|
|
|
368
394
|
* ported by hand.
|
|
369
395
|
*
|
|
370
396
|
* `C` narrows the tree control a concrete tree accepts, and so the type its `treeControl` binding is checked against.
|
|
397
|
+
* The bound leaves out `expansionModel` and `trackBy`, the members typed by the control's key, so that it admits
|
|
398
|
+
* a control of any key type: the model makes a control invariant in that type.
|
|
371
399
|
*/
|
|
372
|
-
declare class KbqTreeBase<T, C extends TreeControl<T> = TreeControl<T>> implements AfterContentChecked, AfterContentInit, CollectionViewer, OnDestroy, OnInit {
|
|
400
|
+
declare class KbqTreeBase<T, C extends Omit<TreeControl<T>, 'expansionModel' | 'trackBy'> = TreeControl<T>> implements AfterContentChecked, AfterContentInit, CollectionViewer, OnDestroy, OnInit {
|
|
373
401
|
protected differs: IterableDiffers;
|
|
374
402
|
protected changeDetectorRef: ChangeDetectorRef;
|
|
375
403
|
/**
|
|
@@ -391,6 +419,8 @@ declare class KbqTreeBase<T, C extends TreeControl<T> = TreeControl<T>> implemen
|
|
|
391
419
|
*
|
|
392
420
|
* Views are reused for nodes the function reports as unchanged, which a data source that rebuilds
|
|
393
421
|
* its node objects on every emission — a flattener among them — otherwise cannot get.
|
|
422
|
+
*
|
|
423
|
+
* Defaults to the `trackBy` of the tree control, read when the tree initializes and when the data source changes.
|
|
394
424
|
*/
|
|
395
425
|
readonly trackBy: _angular_core.InputSignal<TrackByFunction<T>>;
|
|
396
426
|
private readonly nodeOutletQuery;
|
|
@@ -438,7 +468,7 @@ declare class KbqTreeBase<T, C extends TreeControl<T> = TreeControl<T>> implemen
|
|
|
438
468
|
private warnedAboutTreeControl;
|
|
439
469
|
private warnedAboutValues;
|
|
440
470
|
/** @docs-private */
|
|
441
|
-
readonly dataSourceInput: _angular_core.InputSignal<
|
|
471
|
+
readonly dataSourceInput: _angular_core.InputSignal<T[] | DataSource<T> | Observable<T[]> | null | undefined>;
|
|
442
472
|
/**
|
|
443
473
|
* Provides a stream containing the latest data array to render. Influenced by the tree's
|
|
444
474
|
* stream of view window (what dataNodes are currently on screen).
|
|
@@ -530,7 +560,7 @@ declare class KbqTreeBase<T, C extends TreeControl<T> = TreeControl<T>> implemen
|
|
|
530
560
|
}
|
|
531
561
|
declare class KbqTreeNode<T> implements IFocusableOption, OnDestroy {
|
|
532
562
|
protected elementRef: ElementRef<HTMLElement>;
|
|
533
|
-
tree: KbqTreeBase<T, TreeControl<T>>;
|
|
563
|
+
tree: KbqTreeBase<T, TreeControl<T, T>>;
|
|
534
564
|
/**
|
|
535
565
|
* The most recently created `KbqTreeNode`, across every tree on the page.
|
|
536
566
|
*
|
|
@@ -567,7 +597,7 @@ declare class KbqTreeNode<T> implements IFocusableOption, OnDestroy {
|
|
|
567
597
|
|
|
568
598
|
declare class KbqTreeNodePadding<T> implements AfterViewInit {
|
|
569
599
|
protected treeNode: KbqTreeNode<T>;
|
|
570
|
-
protected tree: KbqTreeBase<T, _koobiq_components_tree.TreeControl<T>>;
|
|
600
|
+
protected tree: KbqTreeBase<T, _koobiq_components_tree.TreeControl<T, T>>;
|
|
571
601
|
private renderer;
|
|
572
602
|
private element;
|
|
573
603
|
private option;
|
|
@@ -666,6 +696,10 @@ interface KbqTreeOptionParent<T = any> {
|
|
|
666
696
|
selectionModel: SelectionModel<T>;
|
|
667
697
|
unorderedOptions: QueryList<KbqTreeOption<T>>;
|
|
668
698
|
setSelectedOptionsByClick(option: KbqTreeOption<T>, shiftKey: boolean, ctrlKey: boolean): void;
|
|
699
|
+
/** Called when an option takes focus. */
|
|
700
|
+
reportOptionFocus?(event: KbqTreeOptionEvent): void;
|
|
701
|
+
/** Called when an option loses focus. */
|
|
702
|
+
reportOptionBlur?(event: KbqTreeOptionEvent): void;
|
|
669
703
|
}
|
|
670
704
|
/** Injection token used to provide the parent component to options. */
|
|
671
705
|
declare const KBQ_TREE_OPTION_PARENT_COMPONENT: InjectionToken<KbqTreeOptionParent>;
|
|
@@ -677,10 +711,12 @@ declare class KbqTreeOptionChange {
|
|
|
677
711
|
/** The tree option that has been modified or selected. */
|
|
678
712
|
source: KbqTreeOption);
|
|
679
713
|
}
|
|
680
|
-
declare class KbqTreeOption<T = any> extends KbqTreeNode<T> implements AfterContentInit, DoCheck, KbqTitleTextRef {
|
|
714
|
+
declare class KbqTreeOption<T = any> extends KbqTreeNode<T> implements OnInit, AfterContentInit, DoCheck, KbqTitleTextRef {
|
|
681
715
|
private changeDetectorRef;
|
|
682
716
|
private readonly environmentInjector;
|
|
683
717
|
private readonly destroyRef;
|
|
718
|
+
private readonly ngZone;
|
|
719
|
+
private readonly renderer;
|
|
684
720
|
tree: KbqTreeOptionParent<T> & KbqTreeBase<T>;
|
|
685
721
|
private readonly focusEvents;
|
|
686
722
|
private readonly blurEvents;
|
|
@@ -762,6 +798,7 @@ declare class KbqTreeOption<T = any> extends KbqTreeNode<T> implements AfterCont
|
|
|
762
798
|
get hasFocus(): boolean;
|
|
763
799
|
set hasFocus(value: boolean);
|
|
764
800
|
private readonly focused;
|
|
801
|
+
private focusReported;
|
|
765
802
|
get isExpandable(): boolean;
|
|
766
803
|
/** The "select all" row sits above the tree at root depth; `getLevel` has no node to resolve for it. */
|
|
767
804
|
get level(): number;
|
|
@@ -786,6 +823,7 @@ declare class KbqTreeOption<T = any> extends KbqTreeNode<T> implements AfterCont
|
|
|
786
823
|
/** `aria-selected` of the row as of the last check. Options with a checkbox report `aria-checked` instead. */
|
|
787
824
|
protected get ariaSelected(): boolean | null;
|
|
788
825
|
constructor();
|
|
826
|
+
ngOnInit(): void;
|
|
789
827
|
ngDoCheck(): void;
|
|
790
828
|
ngAfterContentInit(): void;
|
|
791
829
|
/**
|
|
@@ -833,10 +871,10 @@ declare class KbqTreeOption<T = any> extends KbqTreeNode<T> implements AfterCont
|
|
|
833
871
|
}
|
|
834
872
|
|
|
835
873
|
declare const KBQ_SELECTION_TREE_VALUE_ACCESSOR: Provider;
|
|
836
|
-
declare class KbqTreeSelectAllEvent<T, N = any> {
|
|
837
|
-
source: KbqTreeSelection<N>;
|
|
874
|
+
declare class KbqTreeSelectAllEvent<T, N = any, K = N> {
|
|
875
|
+
source: KbqTreeSelection<N, K>;
|
|
838
876
|
options: T[];
|
|
839
|
-
constructor(source: KbqTreeSelection<N>, options: T[]);
|
|
877
|
+
constructor(source: KbqTreeSelection<N, K>, options: T[]);
|
|
840
878
|
}
|
|
841
879
|
/**
|
|
842
880
|
* Event class that occurs when copying an item from the KbqTreeSelection.
|
|
@@ -846,24 +884,24 @@ declare class KbqTreeSelectAllEvent<T, N = any> {
|
|
|
846
884
|
* @param option - instance of KbqTreeOption
|
|
847
885
|
* @param event - original keyboard event (optional) that triggered the copy
|
|
848
886
|
*/
|
|
849
|
-
declare class KbqTreeCopyEvent<T, N = any> {
|
|
850
|
-
source: KbqTreeSelection<N>;
|
|
887
|
+
declare class KbqTreeCopyEvent<T, N = any, K = N> {
|
|
888
|
+
source: KbqTreeSelection<N, K>;
|
|
851
889
|
option: T;
|
|
852
890
|
event?: KeyboardEvent | undefined;
|
|
853
|
-
constructor(source: KbqTreeSelection<N>, option: T, event?: KeyboardEvent | undefined);
|
|
891
|
+
constructor(source: KbqTreeSelection<N, K>, option: T, event?: KeyboardEvent | undefined);
|
|
854
892
|
}
|
|
855
|
-
declare class KbqTreeNavigationChange<T, N = any> {
|
|
856
|
-
source: KbqTreeSelection<N>;
|
|
893
|
+
declare class KbqTreeNavigationChange<T, N = any, K = N> {
|
|
894
|
+
source: KbqTreeSelection<N, K>;
|
|
857
895
|
option: T;
|
|
858
|
-
constructor(source: KbqTreeSelection<N>, option: T);
|
|
896
|
+
constructor(source: KbqTreeSelection<N, K>, option: T);
|
|
859
897
|
}
|
|
860
|
-
declare class KbqTreeSelectionChange<T, N = any> {
|
|
861
|
-
source: KbqTreeSelection<N>;
|
|
898
|
+
declare class KbqTreeSelectionChange<T, N = any, K = N> {
|
|
899
|
+
source: KbqTreeSelection<N, K>;
|
|
862
900
|
option: T;
|
|
863
901
|
options?: T[] | undefined;
|
|
864
|
-
constructor(source: KbqTreeSelection<N>, option: T, options?: T[] | undefined);
|
|
902
|
+
constructor(source: KbqTreeSelection<N, K>, option: T, options?: T[] | undefined);
|
|
865
903
|
}
|
|
866
|
-
declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T>> implements ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy {
|
|
904
|
+
declare class KbqTreeSelection<T = any, K = T> extends KbqTreeBase<T, FlatTreeControl<T, K>> implements ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy {
|
|
867
905
|
private elementRef;
|
|
868
906
|
private scheduler;
|
|
869
907
|
private clipboard;
|
|
@@ -905,7 +943,8 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
905
943
|
* a subscription taken on the model directly is left behind on the discarded instance.
|
|
906
944
|
*
|
|
907
945
|
* `T` is the type of the data nodes, inferred from `[treeControl]` in a template. A query names it:
|
|
908
|
-
* `viewChild.required<KbqTreeSelection<Node>>(KbqTreeSelection)
|
|
946
|
+
* `viewChild.required<KbqTreeSelection<Node>>(KbqTreeSelection)`, and a tree whose control has a `trackBy`
|
|
947
|
+
* names the key type too: `KbqTreeSelection<Node, string>`.
|
|
909
948
|
*/
|
|
910
949
|
selectionModel: SelectionModel<T>;
|
|
911
950
|
resetFocusedItemOnBlur: boolean;
|
|
@@ -921,30 +960,30 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
921
960
|
private readonly unorderedOptionsQuery;
|
|
922
961
|
private readonly unorderedOptionsList;
|
|
923
962
|
get unorderedOptions(): QueryList<KbqTreeOption<T>>;
|
|
924
|
-
readonly navigationChange: _angular_core.OutputEmitterRef<KbqTreeNavigationChange<KbqTreeOption<T>, T>>;
|
|
963
|
+
readonly navigationChange: _angular_core.OutputEmitterRef<KbqTreeNavigationChange<KbqTreeOption<T>, T, K>>;
|
|
925
964
|
/**
|
|
926
965
|
* Emits when the selection changes. A stream rather than an `output()`: `KbqTreeSelect` pipes it with rxjs.
|
|
927
966
|
*/
|
|
928
|
-
readonly selectionChange: EventEmitter<KbqTreeSelectionChange<KbqTreeOption<T>, T>>;
|
|
967
|
+
readonly selectionChange: EventEmitter<KbqTreeSelectionChange<KbqTreeOption<T>, T, K>>;
|
|
929
968
|
/** @docs-private */
|
|
930
|
-
readonly selectionChangeOutput: _angular_core.OutputRef<KbqTreeSelectionChange<KbqTreeOption<T>, T>>;
|
|
969
|
+
readonly selectionChangeOutput: _angular_core.OutputRef<KbqTreeSelectionChange<KbqTreeOption<T>, T, K>>;
|
|
931
970
|
/** Emits after "select all" ran, with the options it could act on. */
|
|
932
|
-
readonly selectAllChange: _angular_core.OutputEmitterRef<KbqTreeSelectAllEvent<KbqTreeOption<T>, T>>;
|
|
971
|
+
readonly selectAllChange: _angular_core.OutputEmitterRef<KbqTreeSelectAllEvent<KbqTreeOption<T>, T, K>>;
|
|
933
972
|
/** @deprecated Use `selectAllChange` instead. Will be removed in 22.0.0. */
|
|
934
|
-
readonly onSelectAll: _angular_core.OutputEmitterRef<KbqTreeSelectAllEvent<KbqTreeOption<T>, T>>;
|
|
973
|
+
readonly onSelectAll: _angular_core.OutputEmitterRef<KbqTreeSelectAllEvent<KbqTreeOption<T>, T, K>>;
|
|
935
974
|
/**
|
|
936
975
|
* Emits when the active option is copied with Ctrl/Cmd + C. Subscribing replaces the built-in
|
|
937
976
|
* clipboard handler, so the event has to stay an `EventEmitter`: the decision is made by reading
|
|
938
977
|
* `observed`, which `OutputEmitterRef` does not have. A template listener subscribes to it through
|
|
939
978
|
* the output below.
|
|
940
979
|
*/
|
|
941
|
-
readonly copyChange: EventEmitter<KbqTreeCopyEvent<KbqTreeOption<T>, T>>;
|
|
980
|
+
readonly copyChange: EventEmitter<KbqTreeCopyEvent<KbqTreeOption<T>, T, K>>;
|
|
942
981
|
/** @docs-private */
|
|
943
|
-
readonly copyChangeOutput: _angular_core.OutputRef<KbqTreeCopyEvent<KbqTreeOption<T>, T>>;
|
|
982
|
+
readonly copyChangeOutput: _angular_core.OutputRef<KbqTreeCopyEvent<KbqTreeOption<T>, T, K>>;
|
|
944
983
|
/** @deprecated Use `copyChange` instead. Will be removed in 22.0.0. */
|
|
945
|
-
readonly onCopy: EventEmitter<KbqTreeCopyEvent<KbqTreeOption<T>, T>>;
|
|
984
|
+
readonly onCopy: EventEmitter<KbqTreeCopyEvent<KbqTreeOption<T>, T, K>>;
|
|
946
985
|
/** @docs-private */
|
|
947
|
-
readonly onCopyOutput: _angular_core.OutputRef<KbqTreeCopyEvent<KbqTreeOption<T>, T>>;
|
|
986
|
+
readonly onCopyOutput: _angular_core.OutputRef<KbqTreeCopyEvent<KbqTreeOption<T>, T, K>>;
|
|
948
987
|
private sortedNodes;
|
|
949
988
|
private lastSyncedDataNodes;
|
|
950
989
|
/** @docs-private */
|
|
@@ -960,7 +999,11 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
960
999
|
*/
|
|
961
1000
|
get autoSelect(): boolean;
|
|
962
1001
|
set autoSelect(value: boolean);
|
|
1002
|
+
private readonly optionFocusEvents;
|
|
1003
|
+
private readonly optionBlurEvents;
|
|
1004
|
+
/** Emits when an option of the tree takes focus. */
|
|
963
1005
|
get optionFocusChanges(): Observable<KbqTreeOptionEvent>;
|
|
1006
|
+
/** Emits when an option of the tree loses focus. */
|
|
964
1007
|
get optionBlurChanges(): Observable<KbqTreeOptionEvent>;
|
|
965
1008
|
/**
|
|
966
1009
|
* Selection mode of the tree.
|
|
@@ -1063,9 +1106,8 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1063
1106
|
* reactive pass and would otherwise make a consumer's own node count race against that pass.
|
|
1064
1107
|
*/
|
|
1065
1108
|
get nodesCount(): number;
|
|
1066
|
-
private optionFocusSubscription;
|
|
1067
|
-
private optionBlurSubscription;
|
|
1068
1109
|
private selectionModelSubscription;
|
|
1110
|
+
private readonly selectionSweeps;
|
|
1069
1111
|
/** Whether a value report is queued for the end of the current tick. Cleared by `writeValue` to cancel it. */
|
|
1070
1112
|
private pendingValueReport;
|
|
1071
1113
|
/** The `multiple` binding the mode was last set from, see `applyMultipleInput`. */
|
|
@@ -1166,6 +1208,10 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1166
1208
|
/** @docs-private */
|
|
1167
1209
|
setSelectedOptionsByKey(option: KbqTreeOption<T>, shiftKey: boolean, ctrlKey: boolean): void;
|
|
1168
1210
|
/** @docs-private */
|
|
1211
|
+
reportOptionFocus(event: KbqTreeOptionEvent): void;
|
|
1212
|
+
/** @docs-private */
|
|
1213
|
+
reportOptionBlur(event: KbqTreeOptionEvent): void;
|
|
1214
|
+
/** @docs-private */
|
|
1169
1215
|
setSelectedOptionsByClick(option: KbqTreeOption<T>, shiftKey: boolean, ctrlKey: boolean): void;
|
|
1170
1216
|
/** @docs-private */
|
|
1171
1217
|
protected selectActiveOptions(): void;
|
|
@@ -1176,7 +1222,7 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1176
1222
|
/**
|
|
1177
1223
|
* Recomputes every option's checkbox state where no selection change follows to do it: after `dataNodes` is
|
|
1178
1224
|
* replaced, which moves the descendants a branch counts, and once a hidden checkbox appears. A microtask later, as
|
|
1179
|
-
* a
|
|
1225
|
+
* a consumer's data source can assign `dataNodes` after it emits.
|
|
1180
1226
|
*/
|
|
1181
1227
|
private scheduleCheckboxSync;
|
|
1182
1228
|
/** @docs-private */
|
|
@@ -1184,12 +1230,12 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1184
1230
|
/** @docs-private */
|
|
1185
1231
|
protected emitChangeEvent(option: KbqTreeOption<T>): void;
|
|
1186
1232
|
/** @docs-private */
|
|
1187
|
-
readonly selectAllHandlerInput: _angular_core.InputSignalWithTransform<((event: KeyboardEvent, tree: KbqTreeSelection<T>) => void) | undefined, ((event: KeyboardEvent, tree: KbqTreeSelection<T>) => void) | undefined>;
|
|
1233
|
+
readonly selectAllHandlerInput: _angular_core.InputSignalWithTransform<((event: KeyboardEvent, tree: KbqTreeSelection<T, K>) => void) | undefined, ((event: KeyboardEvent, tree: KbqTreeSelection<T, K>) => void) | undefined>;
|
|
1188
1234
|
/**
|
|
1189
1235
|
* Function for handling the combination Ctrl + A (select all). By default, the internal handler is used,
|
|
1190
1236
|
* which toggles the selection of all non-disabled, selectable options.
|
|
1191
1237
|
*/
|
|
1192
|
-
get selectAllHandler(): (event: KeyboardEvent, tree: KbqTreeSelection<T>) => void;
|
|
1238
|
+
get selectAllHandler(): (event: KeyboardEvent, tree: KbqTreeSelection<T, K>) => void;
|
|
1193
1239
|
private defaultSelectAllHandler;
|
|
1194
1240
|
selectAllOptions(allowDeselect?: boolean): void;
|
|
1195
1241
|
copyActiveOption(event: KeyboardEvent): void;
|
|
@@ -1259,10 +1305,13 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1259
1305
|
private getHeight;
|
|
1260
1306
|
/** A tree with nothing rendered leaves the tab order, unless a tab index other than `0` is bound. */
|
|
1261
1307
|
private updateTabIndex;
|
|
1308
|
+
/**
|
|
1309
|
+
* Whether the same options as before now stand for the rows in another order. A different count means rows were
|
|
1310
|
+
* added or removed, which the options query reports itself.
|
|
1311
|
+
*/
|
|
1312
|
+
private renderedOptionsOutOfOrder;
|
|
1262
1313
|
private updateRenderedOptions;
|
|
1263
1314
|
private getSortedNodes;
|
|
1264
|
-
private resetOptions;
|
|
1265
|
-
private dropSubscriptions;
|
|
1266
1315
|
private listenToOptionsFocus;
|
|
1267
1316
|
/**
|
|
1268
1317
|
* Utility to ensure all indexes are valid.
|
|
@@ -1276,8 +1325,8 @@ declare class KbqTreeSelection<T = any> extends KbqTreeBase<T, FlatTreeControl<T
|
|
|
1276
1325
|
private updateOptionsFocus;
|
|
1277
1326
|
private canDeselectLast;
|
|
1278
1327
|
private isFocusReceivedFromNestedOption;
|
|
1279
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqTreeSelection<any>, never>;
|
|
1280
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelection<any>, "kbq-tree-selection", ["kbqTreeSelection"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "autoSelectInput": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "multipleInput": { "alias": "multiple"; "required": false; "isSignal": true; }; "noUnselectLastInput": { "alias": "noUnselectLast"; "required": false; "isSignal": true; }; "typeAheadInput": { "alias": "typeAhead"; "required": false; "isSignal": true; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAllInput": { "alias": "selectAll"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabIndexInput": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "selectAllHandlerInput": { "alias": "selectAllHandler"; "required": false; "isSignal": true; }; }, { "navigationChange": "navigationChange"; "selectionChangeOutput": "selectionChange"; "selectAllChange": "selectAllChange"; "onSelectAll": "onSelectAll"; "copyChangeOutput": "copyChange"; "onCopyOutput": "onCopy"; }, ["unorderedOptionsQuery"], never, true, [{ directive: typeof i1.KbqStateSaving; inputs: { "useStateSaving": "useStateSaving"; "stateSavingKey": "stateSavingKey"; }; outputs: {}; }, { directive: typeof i1.KbqLocaleOverridesDirective; inputs: { "kbqLocaleOverrides": "localeOverrides"; }; outputs: {}; }]>;
|
|
1328
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqTreeSelection<any, any>, never>;
|
|
1329
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqTreeSelection<any, any>, "kbq-tree-selection", ["kbqTreeSelection"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "autoSelectInput": { "alias": "autoSelect"; "required": false; "isSignal": true; }; "multipleInput": { "alias": "multiple"; "required": false; "isSignal": true; }; "noUnselectLastInput": { "alias": "noUnselectLast"; "required": false; "isSignal": true; }; "typeAheadInput": { "alias": "typeAhead"; "required": false; "isSignal": true; }; "selectAllToggle": { "alias": "selectAllToggle"; "required": false; "isSignal": true; }; "selectAllInput": { "alias": "selectAll"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "tabIndexInput": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "selectAllHandlerInput": { "alias": "selectAllHandler"; "required": false; "isSignal": true; }; }, { "navigationChange": "navigationChange"; "selectionChangeOutput": "selectionChange"; "selectAllChange": "selectAllChange"; "onSelectAll": "onSelectAll"; "copyChangeOutput": "copyChange"; "onCopyOutput": "onCopy"; }, ["unorderedOptionsQuery"], never, true, [{ directive: typeof i1.KbqStateSaving; inputs: { "useStateSaving": "useStateSaving"; "stateSavingKey": "stateSavingKey"; }; outputs: {}; }, { directive: typeof i1.KbqLocaleOverridesDirective; inputs: { "kbqLocaleOverrides": "localeOverrides"; }; outputs: {}; }]>;
|
|
1281
1330
|
}
|
|
1282
1331
|
|
|
1283
1332
|
declare class KbqTreeModule {
|
|
@@ -1287,4 +1336,4 @@ declare class KbqTreeModule {
|
|
|
1287
1336
|
}
|
|
1288
1337
|
|
|
1289
1338
|
export { BaseTreeControl, FilterByValues, FilterByViewValue, FilterParentsForNodes, FlatTreeControl, KBQ_SELECTION_TREE_VALUE_ACCESSOR, KBQ_TREE_OPTION_PARENT_COMPONENT, KbqTree, KbqTreeBase, KbqTreeCopyEvent, KbqTreeFlatDataSource, KbqTreeFlattener, KbqTreeModule, KbqTreeNavigationChange, KbqTreeNestedDataSource, KbqTreeNode, KbqTreeNodeDef, KbqTreeNodeOutlet, KbqTreeNodeOutletContext, KbqTreeNodePadding, KbqTreeNodeToggleBaseDirective, KbqTreeNodeToggleComponent, KbqTreeNodeToggleDirective, KbqTreeOption, KbqTreeOptionChange, KbqTreeSelectAllEvent, KbqTreeSelection, KbqTreeSelectionChange, NestedTreeControl, defaultCompareValues, defaultCompareViewValues, kbqTreeSelectAllValue };
|
|
1290
|
-
export type { FlatTreeControlFilter, KbqTreeOptionEvent, KbqTreeOptionParent, KbqTreeState, TreeControl };
|
|
1339
|
+
export type { FlatTreeControlFilter, KbqTreeControlOptions, KbqTreeOptionEvent, KbqTreeOptionParent, KbqTreeState, TreeControl };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var warnOnlyMigration = require('../../warn-only-migration-BISJBODk.js');
|
|
6
|
-
var migrations_angularAnimationsRemoval_data = require('./data.js');
|
|
7
|
-
require('../../utils/messages.js');
|
|
8
|
-
require('../../package-config-BhU2TfC8.js');
|
|
9
|
-
require('@angular-devkit/schematics');
|
|
10
|
-
require('@schematics/angular/utility');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Reports the uses of the removed animation triggers and of the members that carried an `AnimationEvent`.
|
|
14
|
-
* Never writes: what replaces a member depends on what the code did with the event.
|
|
15
|
-
*/
|
|
16
|
-
function angularAnimationsRemoval(options) {
|
|
17
|
-
return warnOnlyMigration.warnOnlyRule({ label: '[angular-animations-removal]', warnPatterns: migrations_angularAnimationsRemoval_data.warnPatterns, summary: migrations_angularAnimationsRemoval_data.SUMMARY }, options);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
exports.default = angularAnimationsRemoval;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var signalMembersMigration = require('../../signal-members-migration-BoAJKutT.js');
|
|
6
|
-
var migrations_colorSignals_data = require('./data.js');
|
|
7
|
-
require('typescript');
|
|
8
|
-
require('../../utils/ast.js');
|
|
9
|
-
require('../../utils/messages.js');
|
|
10
|
-
require('../../package-config-BhU2TfC8.js');
|
|
11
|
-
require('@angular-devkit/schematics');
|
|
12
|
-
require('@schematics/angular/utility');
|
|
13
|
-
require('../../utils/typescript.js');
|
|
14
|
-
|
|
15
|
-
function colorSignals(options) {
|
|
16
|
-
return signalMembersMigration.signalMembersRule(migrations_colorSignals_data.config, options);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
exports.default = colorSignals;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var warnOnlyMigration = require('../../warn-only-migration-BISJBODk.js');
|
|
6
|
-
var migrations_coreMixinsRemoval_data = require('./data.js');
|
|
7
|
-
require('../../utils/messages.js');
|
|
8
|
-
require('../../package-config-BhU2TfC8.js');
|
|
9
|
-
require('@angular-devkit/schematics');
|
|
10
|
-
require('@schematics/angular/utility');
|
|
11
|
-
|
|
12
|
-
/** Reports the uses of the removed `mixinDisabled` and `mixinTabIndex`. Never writes. */
|
|
13
|
-
function coreMixinsRemoval(options) {
|
|
14
|
-
return warnOnlyMigration.warnOnlyRule({ label: '[core-mixins-removal]', warnPatterns: migrations_coreMixinsRemoval_data.warnPatterns, summary: migrations_coreMixinsRemoval_data.SUMMARY }, options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = coreMixinsRemoval;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var warnOnlyMigration = require('../../warn-only-migration-BISJBODk.js');
|
|
6
|
-
var migrations_datepickerSignals_data = require('./data.js');
|
|
7
|
-
require('../../utils/messages.js');
|
|
8
|
-
require('../../package-config-BhU2TfC8.js');
|
|
9
|
-
require('@angular-devkit/schematics');
|
|
10
|
-
require('@schematics/angular/utility');
|
|
11
|
-
|
|
12
|
-
/** Reports subclasses of the datepicker classes and direct calls of their `ngOnChanges`. Never writes. */
|
|
13
|
-
function datepickerSignals(options) {
|
|
14
|
-
return warnOnlyMigration.warnOnlyRule({ label: '[datepicker-signals]', warnPatterns: migrations_datepickerSignals_data.warnPatterns, summary: migrations_datepickerSignals_data.SUMMARY }, options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = datepickerSignals;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var signalMembersMigration = require('../../signal-members-migration-BoAJKutT.js');
|
|
6
|
-
var migrations_dropdownSignals_data = require('./data.js');
|
|
7
|
-
require('typescript');
|
|
8
|
-
require('../../utils/ast.js');
|
|
9
|
-
require('../../utils/messages.js');
|
|
10
|
-
require('../../package-config-BhU2TfC8.js');
|
|
11
|
-
require('@angular-devkit/schematics');
|
|
12
|
-
require('@schematics/angular/utility');
|
|
13
|
-
require('../../utils/typescript.js');
|
|
14
|
-
|
|
15
|
-
function dropdownSignals(options) {
|
|
16
|
-
return signalMembersMigration.signalMembersRule(migrations_dropdownSignals_data.config, options);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
exports.default = dropdownSignals;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var warnOnlyMigration = require('../../warn-only-migration-BISJBODk.js');
|
|
6
|
-
var migrations_inputSignals_data = require('./data.js');
|
|
7
|
-
require('../../utils/messages.js');
|
|
8
|
-
require('../../package-config-BhU2TfC8.js');
|
|
9
|
-
require('@angular-devkit/schematics');
|
|
10
|
-
require('@schematics/angular/utility');
|
|
11
|
-
|
|
12
|
-
/** Reports programmatic writes to the signal inputs of `KbqNumberInput` and `KbqInput`. Never writes. */
|
|
13
|
-
function inputSignals(options) {
|
|
14
|
-
return warnOnlyMigration.warnOnlyRule({ label: '[input-signals]', warnPatterns: migrations_inputSignals_data.warnPatterns, summary: migrations_inputSignals_data.SUMMARY }, options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = inputSignals;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var warnOnlyMigration = require('../../warn-only-migration-BISJBODk.js');
|
|
6
|
-
var migrations_listSignals_data = require('./data.js');
|
|
7
|
-
require('../../utils/messages.js');
|
|
8
|
-
require('../../package-config-BhU2TfC8.js');
|
|
9
|
-
require('@angular-devkit/schematics');
|
|
10
|
-
require('@schematics/angular/utility');
|
|
11
|
-
|
|
12
|
-
/** Reports programmatic writes to the signal inputs of `KbqListSelection` and `KbqListOption`. Never writes. */
|
|
13
|
-
function listSignals(options) {
|
|
14
|
-
return warnOnlyMigration.warnOnlyRule({ label: '[list-signals]', warnPatterns: migrations_listSignals_data.warnPatterns, summary: migrations_listSignals_data.SUMMARY }, options);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = listSignals;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var signalMembersMigration = require('../../signal-members-migration-BoAJKutT.js');
|
|
6
|
-
var migrations_modalSignals_data = require('./data.js');
|
|
7
|
-
require('typescript');
|
|
8
|
-
require('../../utils/ast.js');
|
|
9
|
-
require('../../utils/messages.js');
|
|
10
|
-
require('../../package-config-BhU2TfC8.js');
|
|
11
|
-
require('@angular-devkit/schematics');
|
|
12
|
-
require('@schematics/angular/utility');
|
|
13
|
-
require('../../utils/typescript.js');
|
|
14
|
-
|
|
15
|
-
function modalSignals(options) {
|
|
16
|
-
return signalMembersMigration.signalMembersRule(migrations_modalSignals_data.config, options);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
exports.default = modalSignals;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var signalMembersMigration = require('../../signal-members-migration-BoAJKutT.js');
|
|
6
|
-
var migrations_optionSignals_data = require('./data.js');
|
|
7
|
-
require('typescript');
|
|
8
|
-
require('../../utils/ast.js');
|
|
9
|
-
require('../../utils/messages.js');
|
|
10
|
-
require('../../package-config-BhU2TfC8.js');
|
|
11
|
-
require('@angular-devkit/schematics');
|
|
12
|
-
require('@schematics/angular/utility');
|
|
13
|
-
require('../../utils/typescript.js');
|
|
14
|
-
|
|
15
|
-
function optionSignals(options) {
|
|
16
|
-
return signalMembersMigration.signalMembersRule(migrations_optionSignals_data.config, options);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
exports.default = optionSignals;
|