Skip to content

FilterTreeService

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

Pure tree-manipulation service used by the filter-tree UI.

new FilterTreeService(): FilterTreeService

FilterTreeService

applyDrop(root, dragId, position): FilterNode

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

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:179

FilterTreeHistory

boolean


canUndo(history): boolean

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

FilterTreeHistory

boolean


commitState(history, newRoot): FilterTreeHistory

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

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:171

The tree at the current history position.

FilterTreeHistory

FilterNode


deleteNode(root, nodeId): FilterNode

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

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:144

Create a fresh history with a single initial state.

FilterNode

FilterTreeHistory


redo(history): FilterTreeHistory | null

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

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:116

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:159

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

FilterTreeHistory

FilterTreeHistory | null