@mozaic-ds/angular 2.0.33 → 2.0.34
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
|
@@ -3645,6 +3645,7 @@ declare class TreeStateService<T = unknown> {
|
|
|
3645
3645
|
}
|
|
3646
3646
|
|
|
3647
3647
|
declare class TreeSelectionService<T = unknown> {
|
|
3648
|
+
private readonly stateService;
|
|
3648
3649
|
readonly selectedIds: _angular_core.WritableSignal<Set<string | number>>;
|
|
3649
3650
|
readonly selectionMode: _angular_core.WritableSignal<TreeSelectionMode>;
|
|
3650
3651
|
readonly rootNodes: _angular_core.WritableSignal<TreeNode<T>[]>;
|
|
@@ -3653,14 +3654,45 @@ declare class TreeSelectionService<T = unknown> {
|
|
|
3653
3654
|
setRootNodes(nodes: TreeNode<T>[]): void;
|
|
3654
3655
|
isSelected(id: string | number): boolean;
|
|
3655
3656
|
isDisabled(node: TreeNode<T>, ancestors: TreeNode<T>[]): boolean;
|
|
3657
|
+
/**
|
|
3658
|
+
* A node is indeterminate when it has loaded children AND
|
|
3659
|
+
* some (but not all) of its leaf-level descendants are selected.
|
|
3660
|
+
*/
|
|
3656
3661
|
isIndeterminate(node: TreeNode<T>): boolean;
|
|
3662
|
+
/**
|
|
3663
|
+
* A node is checked when:
|
|
3664
|
+
* - Leaf node (no children or children not loaded): its ID is in selectedIds
|
|
3665
|
+
* - Parent with loaded children: ALL leaf descendants are selected
|
|
3666
|
+
*/
|
|
3657
3667
|
isCheckedComputed(node: TreeNode<T>): boolean;
|
|
3668
|
+
/**
|
|
3669
|
+
* Select a node: add all leaf descendant IDs (or the node's own ID if leaf).
|
|
3670
|
+
*/
|
|
3658
3671
|
selectNode(node: TreeNode<T>): void;
|
|
3672
|
+
/**
|
|
3673
|
+
* Deselect a node: remove all leaf descendant IDs (or the node's own ID if leaf).
|
|
3674
|
+
* Also remove the node's own ID in case it's in the set from external sources.
|
|
3675
|
+
*/
|
|
3659
3676
|
deselectNode(node: TreeNode<T>): void;
|
|
3660
3677
|
toggleNode(node: TreeNode<T>): void;
|
|
3661
|
-
|
|
3662
|
-
|
|
3678
|
+
/**
|
|
3679
|
+
* Called when children are loaded for a node.
|
|
3680
|
+
* - If parent ID was in selectedIds: replace it with children's leaf IDs (propagate down).
|
|
3681
|
+
* - If parent ID was NOT in selectedIds: remove any orphan children IDs that
|
|
3682
|
+
* may have been left from a prior bulk operation (e.g. Select All → deselect parent).
|
|
3683
|
+
*/
|
|
3684
|
+
propagateOnChildrenLoaded(parentId: string | number): void;
|
|
3685
|
+
/**
|
|
3686
|
+
* Collect leaf-level IDs (terminal nodes that have no loaded children).
|
|
3687
|
+
* Returns empty array if the node itself is a leaf.
|
|
3688
|
+
*/
|
|
3689
|
+
private _collectLeafIds;
|
|
3690
|
+
/**
|
|
3691
|
+
* Collect ALL descendant IDs (both parents and leaves) for thorough cleanup on deselect.
|
|
3692
|
+
*/
|
|
3693
|
+
private _collectAllDescendantIds;
|
|
3663
3694
|
readonly allSelectedIds: _angular_core.Signal<Set<string | number>>;
|
|
3695
|
+
private _resolveNode;
|
|
3664
3696
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeSelectionService<any>, never>;
|
|
3665
3697
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TreeSelectionService<any>>;
|
|
3666
3698
|
}
|