import * as _angular_core from '@angular/core'; import { OnInit, AfterViewInit, DoCheck, TemplateRef, OnChanges, OnDestroy, AfterViewChecked, TrackByFunction, Signal, SimpleChanges, ElementRef } from '@angular/core'; import { MenuItem } from '@siemens/element-ng/common'; import { MenuItem as MenuItem$1 } from '@siemens/element-ng/menu'; import { TranslatableString } from '@siemens/element-translate-ng/translate'; import { Subject, Observable } from 'rxjs'; import * as _siemens_element_ng_tree_view from '@siemens/element-ng/tree-view'; import { FocusableOption } from '@angular/cdk/a11y'; import { CdkMenuTrigger } from '@angular/cdk/menu'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; declare class SiTreeViewItemComponent implements OnInit, AfterViewInit, FocusableOption, DoCheck { private element; private siTreeViewService; private cdRef; private destroyRef; protected treeItemContext: { record: _angular_core.IterableChangeRecord>; parent: _siemens_element_ng_tree_view.SiTreeViewComponent; }; protected treeViewComponent: _siemens_element_ng_tree_view.SiTreeViewComponent; /** @internal */ get treeItem(): TreeItem; private scrollIntoView; private childrenLoaded; protected templates: _angular_core.Signal; private readonly _contextMenuItems; protected readonly contextMenuItems: _angular_core.WritableSignal<(MenuItem | MenuItem$1)[] | null>; protected readonly isContextMenuButtonVisible: _angular_core.Signal; protected readonly stickyEndItems: _angular_core.InputSignalWithTransform; protected icons: _angular_core.Signal<{ headerHome: string; headerArrow: string; itemMenu: string; itemCollapsed: string; itemCollapsedFlat: string; itemCollapsedLeft: string; itemExpanded: string; itemExpandedFlat: string; itemExpandedLeft: string; }>; private savedElement; private indentLevel; private nextSiblingElement; protected readonly menuTrigger: _angular_core.Signal; protected get ariaLevel(): number; protected get ariaSetsize(): number; protected ariaPosinset?: number; protected get ariaSelected(): boolean | null; protected get ariaChecked(): boolean | null; protected get ariaExpanded(): boolean | null; constructor(); ngOnInit(): void; ngDoCheck(): void; ngAfterViewInit(): void; protected readonly enableSelection: _angular_core.InputSignalWithTransform; protected readonly enableContextMenuButton: _angular_core.InputSignalWithTransform; protected readonly enableDataField1: _angular_core.InputSignalWithTransform; protected readonly enableDataField2: _angular_core.InputSignalWithTransform; protected readonly deleteChildrenOnCollapse: _angular_core.InputSignalWithTransform; private get indentation(); protected get paddingStart(): string; /** Indentation plus the space the start toggle occupies, so leaf items align with foldable ones. */ protected get biggerPaddingStart(): string; protected get negativeBiggerPaddingStart(): string; protected get isGroupedItem(): boolean; protected get showFolderStateStart(): boolean; protected get showFolderStateEnd(): boolean; protected get isExpanding(): boolean; protected readonly showStateIndicator: _angular_core.InputSignalWithTransform; protected readonly showIcon: _angular_core.Signal; protected get showCheckOrOptionBox(): boolean; private updateContextMenuItem; protected getItemFolderStateClass(): string; protected getStateIndicatorColor(): string; protected onItemFolderClicked(newState?: string): void; private childrenLoadingDone; private scrollChildNodeIntoViewPort; protected onItemClicked(event: Event): void; protected onMouseDownTreeItem(event: MouseEvent): void; protected onToggleContextMenuOpen(): void; protected onToggleContextMenuClose(): void; protected getInputType(): string; protected onBoxClicked(): void; protected renderMatchingTemplate(treeItem: TreeItem): TemplateRef; protected onContextMenu(event: Event): boolean; protected onKeydown(event: KeyboardEvent): void; private handleContextMenuEvent; /** * Focuses the tree item. */ focus(): void; /** * Get tree item label. */ getLabel(): string; /** * Called by the consumer when they want a node to be scrolled into view. */ private onScrollIntoViewByConsumer; private expandOnClick; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Implements a tree view with the following main capabilities: * Showing multiple trees. The data of the trees is set via the input property 'items'. * Showing the trees in a flat mode with navigation/breadcrumb on top. * A tree/list item is composed of a 'folder' icon, any item icon, the label, two additional datafields and a context menu button. * Children of parent nodes are lazy loaded upon request (in case they are not yet available in model.) * Context menu support via context menu item: the context menu items can be set via input properties. * Multi selection and focus support. * Checkboxes and / or option boxes per tree node. * Virtualization support: Input properties allow to set the page size and the number of pages to be virtualized. * Current limitation is roughly half a million of nodes. This is due to some 'strange' behavior with flex containers. * Set the input properties 'pageSize' and 'pagesVirtualized' to a reasonable amount of virtualized items. * The number of virtualized items is the product of the pageSize and the pagesVirtualized (number of pages virtualized). * Choose a value in the area of 50 virtualized items, dependent on the screen size. Check at runtime if appropriate! * Grouped List support: The component does also support grouped lists. * See the test client implementation of this package for all functionality. */ declare class SiTreeViewComponent implements OnInit, OnChanges, OnDestroy, AfterViewInit, AfterViewChecked { /** * The context menu items which are bound to the context menu of all tree items, * or a menu item provider function that is invoked for each tree item once. * * @defaultValue [] */ readonly contextMenuItems: _angular_core.InputSignal; /** * The indentation in pixel for the children in respect to its parent. * * @defaultValue DEFAULT_CHILDREN_INDENTATION */ readonly childrenIndentation: _angular_core.InputSignal; /** * Enable horizontal scrolling. When disabled (the default), an ellipsis is used for overflowing text * * @defaultValue false */ readonly horizontalScrolling: _angular_core.InputSignalWithTransform; /** * Enable the compact mode, making it more vertically compact. * * @defaultValue false */ readonly compactMode: _angular_core.InputSignalWithTransform; /** * Enable buttons for collapse and expand all. * Does not work when `flatTree` is enabled. * * @defaultValue false */ readonly expandCollapseAll: _angular_core.InputSignalWithTransform; /** * Tooltip text shown for the expand all icon. * * @defaultValue * ``` * t(() => $localize`:@@SI_TREE_VIEW.EXPAND_ALL:Expand all`) * ``` */ readonly expandAllTooltip: _angular_core.InputSignal; /** * Tooltip text shown for the collapse all icon. * * @defaultValue * ``` * t(() => $localize`:@@SI_TREE_VIEW.COLLAPSE_ALL:Collapse all`) * ``` */ readonly collapseAllTooltip: _angular_core.InputSignal; /** * Customize icons for treeview. */ readonly icons: _angular_core.InputSignal; /** * Number of rows per page. Used for the virtualization of rows (number of * rows per page). * @defaultValue 10 */ readonly pageSize: _angular_core.InputSignalWithTransform; /** * Number of pages which are virtualized. * @defaultValue 6 */ readonly pagesVirtualized: _angular_core.InputSignalWithTransform; /** * Sets if the folder state icon shall be shown on the left (in LTR) or on the right (in LTR) side * of the tree item. Per default the icon will be shown on the left (in LTR). Has no * effect if flatTree is enabled. * @defaultValue true */ readonly folderStateStart: _angular_core.InputSignalWithTransform; /** * Sets if the tree list shall virtualize the tree items. * This input field must be set at startup and shall not be changed afterwards. * @defaultValue true */ readonly isVirtualized: _angular_core.InputSignalWithTransform; /** * Sets the root tree items of all the trees (Required). * @defaultValue [] */ readonly items: _angular_core.InputSignal[]>; /** * Identifies tree items when the items input is replaced. Provide a stable key to retain * rendered item views for immutable data updates. * * @defaultValue * ``` * (_index, item) => item * ``` */ readonly trackBy: _angular_core.InputSignal>>; /** * Sets the tree item to be selected. */ readonly selectedItem: _angular_core.InputSignal | TreeItem[] | undefined>; /** * Sets if the tree shall force single tree item selection. * @defaultValue false */ readonly singleSelectMode: _angular_core.InputSignalWithTransform; /** * Shows or hides additional information below the label. * @defaultValue false */ readonly enableDataField1: _angular_core.InputSignalWithTransform; /** * Shows or hides additional information below the label. * @defaultValue false */ readonly enableDataField2: _angular_core.InputSignalWithTransform; /** * Shows or hides state pipe. * @defaultValue true */ readonly enableStateIndicator: _angular_core.InputSignalWithTransform; /** * Shows or hides icon * @defaultValue true */ readonly enableIcon: _angular_core.InputSignalWithTransform; /** * Shows or hides context menu button and also controls context menu visibility on right click. * @defaultValue true */ readonly enableContextMenuButton: _angular_core.InputSignalWithTransform; /** * Allows / disabled selecting of tree items by clicking on them. * @defaultValue false */ readonly enableSelection: _angular_core.InputSignalWithTransform; /** * Sets if children are deleted upon collapsing tree items. This feature might * be used, if children shall be lazy loaded always upon expanding a tree * item. * @defaultValue false */ readonly deleteChildrenOnCollapse: _angular_core.InputSignalWithTransform; /** * Sets if the tree view shall be displayed as flat tree list with a * breadcrumb. A flat tree only shows the one level at the time and lists the * tree items of the current level as a list. * @defaultValue false */ readonly flatTree: _angular_core.InputSignal; /** * Sets if the tree view is displayed as a grouped list. * Important: In this mode, only the first two hierarchies of the tree model * are considered! * @defaultValue false */ readonly groupedList: _angular_core.InputSignalWithTransform; /** * Sets if the tree items shall show a checkbox. * @defaultValue false */ readonly enableCheckbox: _angular_core.InputSignalWithTransform; /** * Sets if the tree items shall show an optionbox. * @defaultValue false */ readonly enableOptionbox: _angular_core.InputSignalWithTransform; /** * Sets if the tree items should expand/collapse when clicking on them. * Does not work when `flatTree` is enabled or the tree item is not selectable. * @defaultValue false */ readonly expandOnClick: _angular_core.InputSignalWithTransform; /** * Sets if the checkbox state of a tree item is inherited to its children/parent. * @defaultValue true */ readonly inheritChecked: _angular_core.InputSignalWithTransform; /** * String to be shown when there are no content actions. * * @defaultValue 'No actions available' */ readonly noActionsString: _angular_core.InputSignal; /** Aria label for the tree view. Needed for a11y, alternatively use {@link ariaLabelledBy}. */ readonly ariaLabel: _angular_core.InputSignal; /** Aria labelled by for the tree view. Needed for a11y, alternatively use {@link ariaLabel}. */ readonly ariaLabelledBy: _angular_core.InputSignal; /** * Triggered upon virtualization (or unvirtualization) of a tree item. */ readonly itemsVirtualizedChanged: _angular_core.OutputEmitterRef; /** * Triggered upon clicking the folder of a tree item. */ readonly treeItemFolderClicked: _angular_core.OutputEmitterRef; /** * Triggered upon a state change of the folder of a tree item. */ readonly treeItemFolderStateChanged: _angular_core.OutputEmitterRef; /** * Triggered upon clicking the label of a tree item. */ readonly treeItemClicked: _angular_core.OutputEmitterRef>; /** * Triggered upon clicking the checkbox of a tree item. */ readonly treeItemCheckboxClicked: _angular_core.OutputEmitterRef; /** * Triggered upon the request of loading the children of a tree item. */ readonly loadChildren: _angular_core.OutputEmitterRef; /** * Triggered upon the selection of a tree item (multi selection supported). */ readonly treeItemsSelected: _angular_core.OutputEmitterRef[]>; /** * The injected content with included SiTreeViewItemTemplateDirective. */ readonly templates: Signal; private initialized; private updateTreeItemHeightRequired; private updateGroupItemHeightRequired; private selectedTreeItems; private manuallySelectedTreeItems; private latestFolderChanged?; private breadCrumbTreeItems; private multiSelectionStart; private _multiSelectionActive; private domChangeObserver?; private scroll$; private element; private siTreeViewService; private siTreeViewConverterService; private siTreeViewVirtualizationService; private siTreeViewItemHeightService; private cdRef; private resizeObserver; private injector; private destroyRef; /** * Create a virtual root node so there is just a single root node. This makes sure the tree * can be fully traversed starting from any node. This is needed e.g. for recursively * removing the "active" state from other nodes. */ private virtualRoot; private readonly _items; protected readonly svgIcons: Record<"elementExpandAll" | "elementCollapseAll", string>; private updateTreeItemDefaults; /** * @internal */ readonly computedIcons: Signal<{ headerHome: string; headerArrow: string; itemMenu: string; itemCollapsed: string; itemCollapsedFlat: string; itemCollapsedLeft: string; itemExpanded: string; itemExpandedFlat: string; itemExpandedLeft: string; }>; /** @internal */ scrollChildIntoView: Subject; /** @internal */ childrenLoaded: Subject; /** * @internal * Used internally by `SiTreeViewItemDirective` to determine if the items have changed, * and render the new items. */ evaluateForTreeItemsDiffer: Subject; /** @internal */ hasAnyChildren: boolean; /** * Gets the height of the div above the virtualized rows. */ protected get heightBefore(): string; /** * Gets the height of the div below the virtualized rows. */ protected get heightAfter(): string; /** * @internal * This is meant to be used for internal purpose. * Returns the virtualized items in the tree list uses virtualization, otherwise all items are returned as a flat list. * Bind these to the HTML. */ get itemsVirtualized(): TreeItem[]; protected readonly children: Signal; protected readonly treeItemContentTemplate: Signal | undefined>; private readonly nextItems; private keyManager; /** * @internal * Returns index of the currently active Tree Item element in DOM * or null if there is no active tree item element */ get activeIndex(): number | null; /** Can be used for [cdkDropListData] when using cdk drag and drop. */ get dropListItems(): TreeItem[]; ngOnChanges(changes: SimpleChanges): void; ngOnInit(): void; ngAfterViewInit(): void; ngAfterViewChecked(): void; ngOnDestroy(): void; /** * Returns the last breadcrumb tree item. Can be null in case the flat tree * shows the root. */ protected get lastBreadCrumbItem(): TreeItem | null; /** * Returns true if the header shows the root/home of the tree. */ protected get headerShowsRoot(): boolean; /** * Called by the owner of the tree upon returning the retrieved children of a * 'load children' request. */ private childrenLoadingDone; protected onFlatTreeNavigateUp(): void; protected onFlatTreeNavigateHome(): void; private getChildren; private focusItem; private focusParentItem; private focusFirstChildItem; /** * Updates the tree to visualize the provided tree item by expanding all its parent items, collapsing all * other first level tree items and scroll to the provided item. * @param item - The tree item that shall be visible. */ showTreeItem(item: TreeItem): void; private doShowTreeItem; /** * Expands all tree items. * @param items - Optional param for recursion, will expand these items. If empty, all tree items will be expanded. */ expandAll(items?: TreeItem[]): void; /** * Expands the provided tree item. * @param item - The tree item to be expanded. */ expandTreeItem(item: TreeItem): void; /** * Collapses all tree items. * @param items - Optional param for recursion, will collapse these items. If empty, all tree items will be collapsed. */ collapseAll(items?: TreeItem[]): void; /** * Collapses the provided tree item. * @param item - The tree item to be collapsed. */ collapseTreeItem(item: TreeItem): void; /** * Add tree items as root elements or as children of an existing tree item. * @param children - Tree items to add. * @param parent - Optional parent tree item to which the items shall be added. * @param position - Optional position where to insert the tree items among their siblings. */ addChildItems(children: TreeItem[], parent?: TreeItem, position?: number): void; /** * Forces a refresh of the view considering the current tree item model. Needs * to be called when tree items have been added, removed, or updated via model * in ways that do not trigger an automatic update of the view. */ refresh(): void; /** * Scrolls the specified tree item into view. Tree items will be expanded if * required. */ scrollItemIntoView(treeItem: TreeItem): void; private evalListItemsForFlatTreeMode; private collapseChildrenFlatTreeModeOnly; private collapseChildren; protected onKeyUpShift(): void; protected onKeyUpCtrl(): void; protected onKeyUpMeta(): void; protected onMouseLeave(): void; protected handleKeydown(event: KeyboardEvent): void; private onItemClicked; private emitSelectedItems; private handleTreeMode; private evalLowestBreadCrumbNode; protected readonly treeViewInnerElement: Signal>; private onItemFolderClicked; private updateBreadCrumb; private pushParentItemsIntoBreadCrumbRecursive; private onItemCheckboxClicked; private onLoadChildren; private setFlatTreeSelectedFolder; private onBreadCrumbItemClicked; private onScroll; /** * Called by the consumer when he wants a node to be scrolled into view. */ private onScrollIntoViewByConsumer; private onScrollIntoView; private fillFlattenedTree; private focusFirstItemFlattened; private updateHasChildren; protected updateVirtualizedItemList(): void; private resetVirtualizedItemList; /** * Track class changes since adding classes like `.tree-sm` or `.tree-xs` change the item height. * Changes have to trigger the SiTreeViewItemHeightService otherwise the virtualized items are * calculated incorrectly which cause rendering issues. */ private addClassObserver; /** * Create an observable to track visible dimensions and item height of the tree view. * It's necessary to dynamically increase the `pageSize` to render the correct amount * of visible tree items. * @returns observable with the current tree dimensions. */ private monitorTreeSizeChanges; /** * Dynamically calculate and update the virtual pageSize to render the correct amount of tree items. * @param dimension - current tree dimensions. */ private updatePageSize; /** * Make sure to always have a single item for single selection or if there is only one item in the array. */ private coerceToSelectionType; private treeItemsUpdated; private selectTreeItems; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * The folder state of a tree item. */ type TreeItemFolderState = 'collapsed' | 'expanding' | 'expanded' | 'leaf'; /** * The check box state of a tree item. */ type CheckboxState = 'unchecked' | 'checked' | 'indeterminate'; type MenuItemsProvider = (item: TreeItem) => (MenuItem | MenuItem$1)[] | Observable<(MenuItem | MenuItem$1)[]> | null; /** * Defines the data for a tree item. All properties are optional. */ interface TreeItem { /** * Indicates if the item is active, the last clicked item is active always; only one item can be active. */ active?: boolean; /** * Defines the content of the optional badge. Should be a number or something like "100+". * If undefined or empty string, no badge is displayed. */ badge?: string | number; /** * Defines the background color of the badge. Use the status color names as * inputs. * @see https://element.siemens.io/components/status-notifications/badges/ */ badgeColor?: string; /** * The state of the checkbox/optionbox. */ checked?: CheckboxState; /** * The child tree items. */ children?: TreeItem[]; /** * Any custom data that can be used in custom templates. Not shown by default. */ customData?: T; /** * The text shown for the tree item data field 1. */ dataField1?: TranslatableString; /** * The text shown for the tree item data field 2. */ dataField2?: TranslatableString; /** * The hierarchy level of the node. This will be auto-calculated by the tree view control. */ level?: number; /** * The web font icon class name (e.g. element-building). The icon is shown on the left (in LTR) side of the label. */ icon?: string; /** * The text shown for the tree item label (header). */ label?: TranslatableString; /** * The parent tree item. This will be automatically set by the tree view control. */ parent?: TreeItem; /** * Indicates if the tree item is selectable or not. */ selectable?: boolean; /** * If the item is selected (note that the tree view component supports single and multi-selection). */ selected?: boolean; /** * If the tree item shall show a checkbox. */ showCheckbox?: boolean; /** * If the tree item shall show an optionbox. */ showOptionbox?: boolean; /** * The folder state of the tree item. */ state?: TreeItemFolderState; /** * The color of the state pipe; formatted as CSS value ('red' or '#FF0000' or 'rgb(255, 0, 0)'). */ stateIndicatorColor?: string; /** * The name of the template to apply. */ templateName?: string; } interface TreeViewIconSet { headerHome: string; headerArrow: string; itemMenu: string; itemCollapsed: string; itemCollapsedFlat: string; itemCollapsedLeft: string; itemExpanded: string; itemExpandedFlat: string; itemExpandedLeft: string; } declare class FolderStateEventArgs { treeItem: TreeItem; oldState: TreeItemFolderState; newState: TreeItemFolderState; constructor(treeItem: TreeItem, oldState: TreeItemFolderState, newState: TreeItemFolderState); } declare class CheckboxClickEventArgs { target: TreeItem; oldState: CheckboxState; newState: CheckboxState; constructor(target: TreeItem, oldState: CheckboxState, newState: CheckboxState); } declare class ClickEventArgs { target: TreeItem; mouseEvent: MouseEvent | KeyboardEvent; constructor(target: TreeItem, mouseEvent: MouseEvent | KeyboardEvent); } declare class LoadChildrenEventArgs { treeItem: TreeItem; callback: (treeItem: TreeItem, children: TreeItem[]) => void; constructor(treeItem: TreeItem, callback: (treeItem: TreeItem, children: TreeItem[]) => void); } declare class ItemsVirtualizedArgs { treeItems: TreeItem[]; virtualized: boolean; constructor(treeItems: TreeItem[], virtualized: boolean); } declare const DEFAULT_TREE_ICON_SET: TreeViewIconSet; declare const DEFAULT_CHILDREN_INDENTATION = 14; type TreeItemContext = { treeItem: TreeItem; index: number; parent: SiTreeViewComponent; }; /** * Tree view item template directive for defining custom item templates. * * @deprecated Use `siTreeViewItem` instead. * * This directive is deprecated and will be removed in a future version. * * @example * Migration Guide: * * Before (deprecated): * ```html * * *
Root {{ item.level }}
*
* *
Child {{ item.level }}
*
*
* ``` * * After (recommended): * ```html * * * *
* @if (item.level === 0) { * Root {{ item.level }} * } @else { * Child {{ item.level }} * } *
*
*
*
* ``` */ declare class SiTreeViewItemTemplateDirective { /** * Name of the tree item template. It is matched against a tree item's `templateName`. * * @defaultValue undefined */ readonly name: _angular_core.InputSignal; /** @internal */ template: TemplateRef; static ngTemplateContextGuard(dir: SiTreeViewItemTemplateDirective, ctx: any): ctx is { $implicit: TreeItem; }; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ declare class SiTreeViewItemDirective implements AfterViewInit, OnDestroy { private templateRef; private viewContainerRef; private parent; private differs; private cdRef; private differ; private trackBy?; private subscription; private itemsVirtualizedDirty; ngAfterViewInit(): void; ngOnDestroy(): void; private evaluateDiffer; private applyChanges; static ngTemplateContextGuard(_dir: SiTreeViewItemDirective, ctx: unknown): ctx is TreeItemContext; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class SiTreeViewModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ declare const ROOT_LEVEL = -1; declare const childrenLoaded: (item: TreeItem) => boolean; declare const hasChildren: (item: TreeItem) => boolean; declare const removeUndefinedState: (state?: TreeItemFolderState) => TreeItemFolderState; /** * Collapses the tree item except for leaf items. */ declare const collapse: (item: TreeItem) => void; /** * Expands the tree item except for leaf items. */ declare const expand: (item: TreeItem) => void; declare const expandRecursive: (item: TreeItem) => void; declare const boxClicked: (treeItem: TreeItem, inheritChecked: boolean) => void; /** * Changes the folder state to a new state based on the old state. * If a client calls this method, the same is responsible to load the children in case the new state is 'expanding'!!! * * @param deleteChildrenOnCollapse - If set to true, the children are deleted upon collapsing the item. */ declare const doFolderStateChange: (item: TreeItem, deleteChildrenOnCollapse: boolean, newState?: string) => void; declare const enableCheckboxRecursive: (item: TreeItem, enable: boolean) => void; declare const enableOptionboxRecursive: (item: TreeItem, enable: boolean) => void; declare const parentCountRecursive: (item: TreeItem, stackLevel: number) => number; declare const selectItemsBetween: (roots: TreeItem[], start: TreeItem, end: TreeItem) => TreeItem[] | undefined; declare const selectRecursive: (item: TreeItem, select: boolean) => void; declare const setBoxStateRecursive: (item: TreeItem, state: CheckboxState) => void; /** * Sets the item to be active or not; all other items of the tree are reset. */ declare const setActive: (item: TreeItem, active: boolean) => void; declare const resetActive: (item: TreeItem) => void; /** * Sets the treeItem as selectable or not */ declare const setSelectable: (item: TreeItem, selectable: boolean) => void; declare const deleteItem: (item: TreeItem) => void; declare const addChildItem: (parent: TreeItem, child: TreeItem, position?: number, callback?: (item: TreeItem) => void) => void; declare const addChildItems: (parent: TreeItem, children: TreeItem[], position?: number, callback?: (item: TreeItem) => void) => void; declare const initializeTreeItemsRecursive: (items: TreeItem[], parent: TreeItem, callback?: (item: TreeItem) => void) => void; declare const setTreeItemDefaults: (item: TreeItem, callback?: (item: TreeItem) => void) => void; /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * * @param treeItems - TreeItem array which is used with the si-tree-view. * @param event - event object which is emitted by cdkDropListDropped. * @returns reordered TreeItems list. */ declare const reorderTreeItem: (treeItems: TreeItem[], event: CdkDragDrop) => TreeItem[]; /** * * @param sourceTreeItems - TreeItem array of the source tree from where item is being dragged. * @param targetTreeItems - TreeItem array of the target tree where item is being dropped. * @param event - event object which is emitted by cdkDropListDropped. * @param removeFromSource - whether to remove item from its source tree after moving to target. * @returns modified TreeItems list of source and target trees. */ declare const transferTreeItem: (sourceTreeItems: TreeItem[], targetTreeItems: TreeItem[], event: CdkDragDrop, removeFromSource?: boolean) => { sourceTree: TreeItem[]; targetTree: TreeItem[]; }; /** * * @param sourceTree - TreeItems array from where item needs to be removed. * @param itemToRemove - TreeItem which needs to be removed. * @returns Updated TreeItems array. */ declare const removeItemFromTree: (sourceTree: TreeItem[], itemToRemove: TreeItem) => TreeItem[]; export { CheckboxClickEventArgs, ClickEventArgs, DEFAULT_CHILDREN_INDENTATION, DEFAULT_TREE_ICON_SET, FolderStateEventArgs, ItemsVirtualizedArgs, LoadChildrenEventArgs, ROOT_LEVEL, SiTreeViewComponent, SiTreeViewItemComponent, SiTreeViewItemDirective, SiTreeViewItemTemplateDirective, SiTreeViewModule, addChildItem, addChildItems, boxClicked, childrenLoaded, collapse, deleteItem, doFolderStateChange, enableCheckboxRecursive, enableOptionboxRecursive, expand, expandRecursive, hasChildren, initializeTreeItemsRecursive, parentCountRecursive, removeItemFromTree, removeUndefinedState, reorderTreeItem, resetActive, selectItemsBetween, selectRecursive, setActive, setBoxStateRecursive, setSelectable, setTreeItemDefaults, transferTreeItem }; export type { CheckboxState, MenuItemsProvider, TreeItem, TreeItemContext, TreeItemFolderState, TreeViewIconSet };