@mozaic-ds/angular 2.1.5 → 2.1.7
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/package.json
CHANGED
|
@@ -2599,6 +2599,15 @@ declare class TreeStateService<T = unknown> {
|
|
|
2599
2599
|
setExpanded(ids: Set<string | number>): void;
|
|
2600
2600
|
toggleExpanded(id: string | number): void;
|
|
2601
2601
|
expandAndLoad(node: TreeNode<T>): Observable<void>;
|
|
2602
|
+
/**
|
|
2603
|
+
* Loads a node's children on demand when they haven't been loaded yet.
|
|
2604
|
+
* Idempotent: a no-op (emits `[]`) when there is no `loadChildrenFn`, the
|
|
2605
|
+
* node is already loading, or its children are already present. This is the
|
|
2606
|
+
* single load primitive shared by the click-driven `expandAndLoad` and the
|
|
2607
|
+
* declarative auto-load effect in `MozTreeComponent` — so expanding a node
|
|
2608
|
+
* by clicking it and by writing to `expandedIds` go through the same path.
|
|
2609
|
+
*/
|
|
2610
|
+
loadChildrenFor(node: TreeNode<T>): Observable<TreeNode<T>[]>;
|
|
2602
2611
|
addLoading(id: string | number): void;
|
|
2603
2612
|
removeLoading(id: string | number): void;
|
|
2604
2613
|
patchChildren(nodeId: string | number, children: TreeNode<T>[]): void;
|
|
@@ -2704,7 +2713,7 @@ declare class MozTreeComponent<T = unknown> {
|
|
|
2704
2713
|
protected readonly keyboardService: TreeKeyboardService<any>;
|
|
2705
2714
|
readonly nodes: _angular_core.InputSignal<TreeNode<T>[]>;
|
|
2706
2715
|
readonly selectionMode: _angular_core.InputSignal<TreeSelectionMode>;
|
|
2707
|
-
readonly expandedIds: _angular_core.
|
|
2716
|
+
readonly expandedIds: _angular_core.ModelSignal<Set<string | number>>;
|
|
2708
2717
|
readonly selectedIds: _angular_core.InputSignal<Set<string | number>>;
|
|
2709
2718
|
readonly loadChildren: _angular_core.InputSignal<LoadChildrenFn<T> | null>;
|
|
2710
2719
|
readonly canSelect: _angular_core.InputSignal<((node: TreeNode<T>) => boolean) | null>;
|
|
@@ -2717,7 +2726,6 @@ declare class MozTreeComponent<T = unknown> {
|
|
|
2717
2726
|
readonly _typedTemplates: _angular_core.Signal<readonly MozTreeNodeTemplateDirective[]>;
|
|
2718
2727
|
readonly nodeTemplate: _angular_core.Signal<TemplateRef<TreeNodeContext<T>> | null>;
|
|
2719
2728
|
readonly nodeTemplates: _angular_core.Signal<Record<string, TemplateRef<TreeNodeContext<T>>> | null>;
|
|
2720
|
-
readonly expandedIdsChange: _angular_core.OutputEmitterRef<Set<string | number>>;
|
|
2721
2729
|
readonly selectionChange: _angular_core.OutputEmitterRef<Set<string | number>>;
|
|
2722
2730
|
readonly useVirtualScroll: _angular_core.Signal<boolean>;
|
|
2723
2731
|
readonly itemSize: _angular_core.Signal<number>;
|
|
@@ -2726,14 +2734,26 @@ declare class MozTreeComponent<T = unknown> {
|
|
|
2726
2734
|
onTreeFocus(): void;
|
|
2727
2735
|
onExpandChange(): void;
|
|
2728
2736
|
onSelectionChange(ids: Set<string | number>): void;
|
|
2737
|
+
/**
|
|
2738
|
+
* Convenience helper for the "expand a deep path, then scroll to it" pattern.
|
|
2739
|
+
* Adds every ancestor in `path` (all ids except the last) to `expandedIds`,
|
|
2740
|
+
* which lets the declarative auto-load effect fetch each lazy level, then
|
|
2741
|
+
* resolves once those levels have finished loading — so callers can safely
|
|
2742
|
+
* `scrollToNode(path.at(-1))` afterwards.
|
|
2743
|
+
*
|
|
2744
|
+
* Plain declarative usage — binding `[(expandedIds)]` and writing to it — does
|
|
2745
|
+
* not need this method; the tree loads expanded lazy nodes on its own. It
|
|
2746
|
+
* exists only to give an awaitable signal that the deep node is now visible.
|
|
2747
|
+
*/
|
|
2729
2748
|
expandPath(path: Array<string | number>): Promise<void>;
|
|
2749
|
+
private _waitForChildren;
|
|
2730
2750
|
scrollToNode(nodeId: string | number): void;
|
|
2731
2751
|
expandAll(): void;
|
|
2732
2752
|
collapseAll(): void;
|
|
2733
2753
|
trackNode(_index: number, node: TreeNode<T>): string | number;
|
|
2734
2754
|
trackFlatNode(_index: number, flat: FlatNode<T>): string | number;
|
|
2735
2755
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MozTreeComponent<any>, never>;
|
|
2736
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozTreeComponent<any>, "moz-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; "canSelect": { "alias": "canSelect"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; }, { "
|
|
2756
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MozTreeComponent<any>, "moz-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; "canSelect": { "alias": "canSelect"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; }, { "expandedIds": "expandedIdsChange"; "selectionChange": "selectionChange"; }, ["_defaultTemplate", "_typedTemplates"], never, true, never>;
|
|
2737
2757
|
}
|
|
2738
2758
|
|
|
2739
2759
|
declare class MozTreeNodeComponent<T = unknown> {
|