Skip to content

FilterTreeService

Defined in: filtering/tree/filter-tree.service.ts:50

new FilterTreeService(): FilterTreeService

FilterTreeService

applyDrop(root, dragId, position): FilterNode

Defined in: filtering/tree/filter-tree.service.ts:61

Apply a drop operation to the tree and return a new root.

Deep-clones the incoming root first so the caller’s reference is never mutated. All splice / replace operations happen on the clone.

FilterNode

string

DropPosition

FilterNode


canRedo(history): boolean

Defined in: filtering/tree/filter-tree.service.ts:174

FilterTreeHistory

boolean


canUndo(history): boolean

Defined in: filtering/tree/filter-tree.service.ts:170

FilterTreeHistory

boolean


commitState(history, newRoot): FilterTreeHistory

Defined in: filtering/tree/filter-tree.service.ts:147

Push a new tree state onto the history stack. Truncates any redo states beyond the current index.

FilterTreeHistory

FilterNode

FilterTreeHistory


currentRoot(history): FilterNode

Defined in: filtering/tree/filter-tree.service.ts:166

The tree at the current history position.

FilterTreeHistory

FilterNode


deleteNode(root, nodeId): FilterNode

Defined in: filtering/tree/filter-tree.service.ts:126

Delete a node from the tree by ID.

Deep-clones the tree first, extracts the target node from the clone, enforces the >=2-children invariant, then returns the clone.

FilterNode

string

FilterNode


initHistory(root): FilterTreeHistory

Defined in: filtering/tree/filter-tree.service.ts:139

Create a fresh history with a single initial state.

FilterNode

FilterTreeHistory


redo(history): FilterTreeHistory | null

Defined in: filtering/tree/filter-tree.service.ts:160

Step forward one state. Returns null if already at the end.

FilterTreeHistory

FilterTreeHistory | null


toggleConjunction(root, branchId): FilterNode

Defined in: filtering/tree/filter-tree.service.ts:111

Toggle a branch’s conjunction between ”&&” and ”||”. Deep-clones the tree first so the original is never mutated.

FilterNode

string

FilterNode


undo(history): FilterTreeHistory | null

Defined in: filtering/tree/filter-tree.service.ts:154

Step back one state. Returns null if already at the beginning.

FilterTreeHistory

FilterTreeHistory | null