@siemens/element-ng 49.2.0 → 49.3.0
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/fesm2022/siemens-element-ng-accordion.mjs +2 -2
- package/fesm2022/siemens-element-ng-accordion.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-application-header.mjs +3 -3
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-auto-collapsable-list.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-circle-status.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-content-action-bar.mjs +2 -2
- package/fesm2022/siemens-element-ng-content-action-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-dashboard.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-date-range-filter.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-datepicker.mjs +22 -24
- package/fesm2022/siemens-element-ng-datepicker.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-file-uploader.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-filtered-search.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-form.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +2 -2
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-list-details.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-main-detail-container.mjs +21 -25
- package/fesm2022/siemens-element-ng-main-detail-container.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-menu.mjs +6 -6
- package/fesm2022/siemens-element-ng-menu.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs +8 -4
- package/fesm2022/siemens-element-ng-navbar-vertical.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-navbar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-number-input.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-phone-number.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs +1 -1
- package/fesm2022/siemens-element-ng-photo-upload.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-search-bar.mjs +7 -2
- package/fesm2022/siemens-element-ng-search-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-side-panel.mjs +164 -10
- package/fesm2022/siemens-element-ng-side-panel.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-split.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-bar.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs +1 -1
- package/fesm2022/siemens-element-ng-status-toggle.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-tree-view.mjs +11 -3
- package/fesm2022/siemens-element-ng-tree-view.mjs.map +1 -1
- package/fesm2022/siemens-element-ng-typeahead.mjs.map +1 -1
- package/package.json +3 -3
- package/schematics/vitest-setup.js +5 -0
- package/types/siemens-element-ng-application-header.d.ts +1 -1
- package/types/siemens-element-ng-auto-collapsable-list.d.ts +1 -1
- package/types/siemens-element-ng-avatar.d.ts +1 -1
- package/types/siemens-element-ng-circle-status.d.ts +1 -1
- package/types/siemens-element-ng-dashboard.d.ts +2 -2
- package/types/siemens-element-ng-date-range-filter.d.ts +1 -1
- package/types/siemens-element-ng-datepicker.d.ts +7 -7
- package/types/siemens-element-ng-file-uploader.d.ts +1 -1
- package/types/siemens-element-ng-filtered-search.d.ts +1 -1
- package/types/siemens-element-ng-form.d.ts +1 -1
- package/types/siemens-element-ng-list-details.d.ts +1 -1
- package/types/siemens-element-ng-main-detail-container.d.ts +10 -11
- package/types/siemens-element-ng-navbar-vertical.d.ts +7 -3
- package/types/siemens-element-ng-navbar.d.ts +1 -1
- package/types/siemens-element-ng-number-input.d.ts +1 -1
- package/types/siemens-element-ng-phone-number.d.ts +1 -1
- package/types/siemens-element-ng-photo-upload.d.ts +1 -1
- package/types/siemens-element-ng-search-bar.d.ts +1 -1
- package/types/siemens-element-ng-side-panel.d.ts +115 -5
- package/types/siemens-element-ng-split.d.ts +2 -2
- package/types/siemens-element-ng-status-bar.d.ts +1 -1
- package/types/siemens-element-ng-status-toggle.d.ts +1 -1
- package/types/siemens-element-ng-tree-view.d.ts +1 -1
- package/types/siemens-element-ng-typeahead.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siemens-element-ng-tree-view.mjs","sources":["../../../../projects/element-ng/tree-view/si-tree-view-item-template.directive.ts","../../../../projects/element-ng/tree-view/si-tree-view-item-context.ts","../../../../projects/element-ng/tree-view/si-tree-view.model.ts","../../../../projects/element-ng/tree-view/si-tree-view.utils.ts","../../../../projects/element-ng/tree-view/si-tree-view.service.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.component.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.component.html","../../../../projects/element-ng/tree-view/si-tree-view-converter.service.ts","../../../../projects/element-ng/tree-view/si-tree-view-item-height.service.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.directive.ts","../../../../projects/element-ng/tree-view/si-tree-view-virtualization.service.ts","../../../../projects/element-ng/tree-view/si-tree-view.component.ts","../../../../projects/element-ng/tree-view/si-tree-view.component.html","../../../../projects/element-ng/tree-view/si-tree-view.module.ts","../../../../projects/element-ng/tree-view/drag-drop.util.ts","../../../../projects/element-ng/tree-view/index.ts","../../../../projects/element-ng/tree-view/siemens-element-ng-tree-view.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject, input, TemplateRef } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\n\n/**\n * Tree view item template directive for defining custom item templates.\n *\n * @deprecated Use `siTreeViewItem` instead.\n *\n * This directive is deprecated and will be removed in a future version.\n *\n * @example\n * Migration Guide:\n *\n * Before (deprecated):\n * ```html\n * <si-tree-view>\n * <ng-template siTreeViewItemTemplate=\"root\" let-item>\n * <div class=\"custom-item\">Root {{ item.level }}</div>\n * </ng-template>\n * <ng-template siTreeViewItemTemplate=\"child\" let-item>\n * <div class=\"custom-item\">Child {{ item.level }}</div>\n * </ng-template>\n * </si-tree-view>\n * ```\n *\n * After (recommended):\n * ```html\n * <si-tree-view>\n * <ng-template siTreeViewItem let-item=\"treeItem\">\n * <si-tree-view-item>\n * <div class=\"custom-item\">\n * @if (item.level === 0) {\n * Root {{ item.level }}\n * } @else {\n * Child {{ item.level }}\n * }\n * </div>\n * </si-tree-view-item>\n * </ng-template>\n * </si-tree-view>\n * ```\n */\n@Directive({\n selector: '[siTreeViewItemTemplate]'\n})\nexport class SiTreeViewItemTemplateDirective {\n /** @defaultValue undefined */\n readonly name = input<string | undefined>(undefined, { alias: 'siTreeViewItemTemplate' });\n /** @internal */\n template = inject(TemplateRef<any>);\n\n static ngTemplateContextGuard(\n dir: SiTreeViewItemTemplateDirective,\n ctx: any\n ): ctx is { $implicit: TreeItem } {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken, IterableChangeRecord } from '@angular/core';\n\nimport type { SiTreeViewComponent } from './si-tree-view.component';\nimport type { TreeItem } from './si-tree-view.model';\n\nexport const TREE_ITEM_CONTEXT = new InjectionToken<{\n record: IterableChangeRecord<TreeItem<any>>;\n parent: SiTreeViewComponent;\n}>('TREE_ITEM_CONTEXT');\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Observable } from 'rxjs';\n\nimport type { SiTreeViewComponent } from './si-tree-view.component';\n\n/**\n * The folder state of a tree item.\n */\nexport type TreeItemFolderState = 'collapsed' | 'expanding' | 'expanded' | 'leaf';\n\n/**\n * The check box state of a tree item.\n */\nexport type CheckboxState = 'unchecked' | 'checked' | 'indeterminate';\n\nexport type MenuItemsProvider = (\n item: TreeItem\n) => (MenuItemLegacy | MenuItem)[] | Observable<(MenuItemLegacy | MenuItem)[]> | null;\n\n/**\n * Defines the data for a tree item. All properties are optional.\n */\nexport interface TreeItem<T = any> {\n /**\n * Indicates if the item is active, the last clicked item is active always; only one item can be active.\n */\n active?: boolean;\n\n /**\n * Defines the content of the optional badge. Should be a number or something like \"100+\".\n * If undefined or empty string, no badge is displayed.\n */\n badge?: string | number;\n\n /**\n * Defines the background color of the badge. Use the status color names as\n * inputs.\n * @see https://element.siemens.io/components/status-notifications/badges/\n */\n badgeColor?: string;\n\n /**\n * The state of the checkbox/optionbox.\n */\n checked?: CheckboxState;\n\n /**\n * The child tree items.\n */\n children?: TreeItem<T>[];\n\n /**\n * Any custom data that can be used in custom templates. Not shown by default.\n */\n customData?: T;\n\n /**\n * The text shown for the tree item data field 1.\n */\n dataField1?: TranslatableString;\n\n /**\n * The text shown for the tree item data field 2.\n */\n dataField2?: TranslatableString;\n\n /**\n * The hierarchy level of the node. This will be auto-calculated by the tree view control.\n */\n level?: number;\n\n /**\n * The web font icon class name (e.g. element-building). The icon is shown on the left (in LTR) side of the label.\n */\n icon?: string;\n\n /**\n * The text shown for the tree item label (header).\n */\n label?: TranslatableString;\n\n /**\n * The parent tree item. This will be automatically set by the tree view control.\n */\n parent?: TreeItem<T>;\n\n /**\n * Indicates if the tree item is selectable or not.\n */\n selectable?: boolean;\n\n /**\n * If the item is selected (note that the tree view component supports single and multi-selection).\n */\n selected?: boolean;\n\n /**\n * If the tree item shall show a checkbox.\n */\n showCheckbox?: boolean;\n\n /**\n * If the tree item shall show an optionbox.\n */\n showOptionbox?: boolean;\n\n /**\n * The folder state of the tree item.\n */\n state?: TreeItemFolderState;\n\n /**\n * The color of the state pipe; formatted as CSS value ('red' or '#FF0000' or 'rgb(255, 0, 0)').\n */\n stateIndicatorColor?: string;\n\n /**\n * The name of the template to apply.\n */\n templateName?: string;\n}\n\nexport interface TreeViewIconSet {\n headerHome: string;\n headerArrow: string;\n itemMenu: string;\n itemCollapsed: string;\n itemCollapsedFlat: string;\n itemCollapsedLeft: string;\n itemExpanded: string;\n itemExpandedFlat: string;\n itemExpandedLeft: string;\n}\n\nexport class FolderStateEventArgs {\n constructor(\n public treeItem: TreeItem,\n public oldState: TreeItemFolderState,\n public newState: TreeItemFolderState\n ) {}\n}\n\nexport class CheckboxClickEventArgs {\n public constructor(\n public target: TreeItem,\n public oldState: CheckboxState,\n public newState: CheckboxState\n ) {}\n}\n\nexport class ClickEventArgs {\n public constructor(\n public target: TreeItem,\n public mouseEvent: MouseEvent | KeyboardEvent\n ) {}\n}\n\nexport class LoadChildrenEventArgs {\n public constructor(\n public treeItem: TreeItem,\n public callback: (treeItem: TreeItem, children: TreeItem[]) => void\n ) {}\n}\n\nexport class ItemsVirtualizedArgs {\n public constructor(\n public treeItems: TreeItem[],\n public virtualized: boolean\n ) {}\n}\n\nexport const DEFAULT_TREE_ICON_SET: TreeViewIconSet = {\n headerHome: 'element-home',\n headerArrow: 'element-left-2 flip-rtl',\n itemMenu: 'element-options-vertical',\n itemCollapsed: 'element-down-2',\n itemCollapsedFlat: 'element-right-2 flip-rtl',\n itemCollapsedLeft: 'element-right-2 flip-rtl',\n itemExpanded: 'element-up-2',\n itemExpandedFlat: 'element-down-3',\n itemExpandedLeft: 'element-down-2'\n};\n\nexport const DEFAULT_CHILDREN_INDENTATION = 14;\n\nexport type TreeItemContext = {\n treeItem: TreeItem;\n index: number;\n parent: SiTreeViewComponent;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport type { CheckboxState, TreeItem, TreeItemFolderState } from './si-tree-view.model';\n\ninterface InBetweenState {\n startIsFirst: boolean;\n inBetween: boolean;\n done: boolean;\n}\n\nexport const ROOT_LEVEL = -1;\n\nexport const childrenLoaded = (item: TreeItem): boolean => (item.children?.length ?? 0) > 0;\n\nexport const hasChildren = (item: TreeItem): boolean => item.state !== 'leaf';\n\nexport const removeUndefinedState = (state?: TreeItemFolderState): TreeItemFolderState =>\n state ?? 'collapsed';\n\n/**\n * Collapses the tree item except for leaf items.\n */\nexport const collapse = (item: TreeItem): void => {\n if (item?.state !== 'leaf') {\n item.state = 'collapsed';\n }\n};\n\n/**\n * Expands the tree item except for leaf items.\n */\nexport const expand = (item: TreeItem): void => {\n if (item?.state !== 'leaf') {\n item.state = 'expanded';\n }\n};\n\nexport const expandRecursive = (item: TreeItem): void => {\n if (item.parent) {\n expand(item.parent);\n expandRecursive(item.parent);\n }\n};\n\nexport const boxClicked = (treeItem: TreeItem, inheritChecked: boolean): void => {\n if (treeItem.showCheckbox) {\n treeItem.checked = treeItem.checked === 'checked' ? 'unchecked' : 'checked';\n if (inheritChecked) {\n checkAllChildren(treeItem, treeItem.checked);\n updateCheckStateOfParents(treeItem);\n }\n }\n if (treeItem.showOptionbox && treeItem.checked === 'unchecked') {\n treeItem.parent?.children?.forEach(item => (item.checked = 'unchecked'));\n treeItem.checked = 'checked';\n }\n};\n\n/**\n * Changes the folder state to a new state based on the old state.\n * If a client calls this method, the same is responsible to load the children in case the new state is 'expanding'!!!\n *\n * @param deleteChildrenOnCollapse - If set to true, the children are deleted upon collapsing the item.\n */\nexport const doFolderStateChange = (\n item: TreeItem,\n deleteChildrenOnCollapse: boolean,\n newState?: string\n): void => {\n if (item?.state === 'collapsed' && (!newState || newState === 'expanded')) {\n item.state = childrenLoaded(item) ? 'expanded' : 'expanding';\n } else if (item?.state === 'expanding' && (!newState || newState === 'collapsed')) {\n item.state = 'collapsed';\n } else if (item?.state === 'expanded' && (!newState || newState === 'collapsed')) {\n if (deleteChildrenOnCollapse) {\n item.children = [];\n }\n item.state = 'collapsed';\n }\n};\n\nexport const enableCheckboxRecursive = (item: TreeItem, enable: boolean): void => {\n item.showCheckbox = enable;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => enableCheckboxRecursive(child, enable));\n }\n};\n\nexport const enableOptionboxRecursive = (item: TreeItem, enable: boolean): void => {\n item.showOptionbox = enable;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => enableOptionboxRecursive(child, enable));\n }\n};\n\nexport const parentCountRecursive = (item: TreeItem, stackLevel: number): number => {\n if (item?.parent && item.parent.level !== ROOT_LEVEL) {\n return parentCountRecursive(item.parent, stackLevel + 1);\n }\n return stackLevel;\n};\n\nexport const selectItemsBetween = <T = any>(\n roots: TreeItem<T>[],\n start: TreeItem<T>,\n end: TreeItem<T>\n): TreeItem<T>[] | undefined => {\n if (start === end) {\n return;\n }\n const foundItems: TreeItem<T>[] = [];\n const inBetweenState: InBetweenState = { startIsFirst: false, inBetween: false, done: false };\n for (const root of roots) {\n getItemsBetweenRecursive(foundItems, root, start, end, inBetweenState);\n if (inBetweenState.done) {\n break;\n }\n }\n foundItems.forEach(item => {\n if (item.selectable) {\n item.selected = true;\n }\n });\n return foundItems;\n};\n\nexport const selectRecursive = (item: TreeItem, select: boolean): void => {\n if (item.selectable) {\n item.selected = select;\n }\n if (childrenLoaded(item)) {\n item.children?.forEach(child => selectRecursive(child, select));\n }\n};\n\nexport const setBoxStateRecursive = (item: TreeItem, state: CheckboxState): void => {\n item.checked = state;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => setBoxStateRecursive(child, state));\n }\n};\n\n/**\n * Sets the item to be active or not; all other items of the tree are reset.\n */\nexport const setActive = (item: TreeItem, active: boolean): void => {\n const getRoot = (treeItem: TreeItem): TreeItem =>\n treeItem.parent ? getRoot(treeItem.parent) : treeItem;\n resetActive(getRoot(item));\n item.active = active;\n};\n\nexport const resetActive = (item: TreeItem): void => {\n item.active = false;\n if (childrenLoaded(item)) {\n item.children?.forEach(childItem => resetActive(childItem));\n }\n};\n\n/**\n * Sets the treeItem as selectable or not\n */\nexport const setSelectable = (item: TreeItem, selectable: boolean): void => {\n item.selectable = selectable;\n if (item.selected && !item.selectable) {\n item.selected = selectable;\n }\n};\n\nexport const deleteItem = (item: TreeItem): void => {\n if (item.parent) {\n const idx = item.parent.children?.indexOf(item) ?? -1;\n if (idx < 0) {\n return;\n }\n item.parent.children?.splice(idx, 1);\n }\n};\n\nexport const addChildItem = (\n parent: TreeItem,\n child: TreeItem,\n position?: number,\n callback?: (item: TreeItem) => void\n): void => {\n addChildItems(parent, [child], position, callback);\n};\n\nexport const addChildItems = (\n parent: TreeItem,\n children: TreeItem[],\n position?: number,\n callback?: (item: TreeItem) => void\n): void => {\n const itemCount = parent.children?.length ?? 0;\n position ??= itemCount;\n // Negative position insert items counting from the last item\n if (position < 0) {\n position = itemCount + (position % itemCount);\n }\n initializeTreeItemsRecursive(children, parent, callback);\n if (!parent.children) {\n parent.children = [];\n parent.children.push(...children);\n return;\n }\n if (position >= parent.children.length) {\n parent.children.push(...children);\n return;\n }\n parent.children.splice(position, 0, ...children);\n};\n\nexport const initializeTreeItemsRecursive = (\n items: TreeItem[],\n parent: TreeItem,\n callback?: (item: TreeItem) => void\n): void => {\n const level = (parent.level ?? -1) + 1;\n for (const item of items) {\n item.parent = parent;\n item.level = level;\n setTreeItemDefaults(item, callback);\n if (item.children?.length) {\n initializeTreeItemsRecursive(item.children, item, callback);\n }\n }\n};\n\nexport const setTreeItemDefaults = (item: TreeItem, callback?: (item: TreeItem) => void): void => {\n item.children ??= [];\n item.state ??= 'collapsed';\n item.active ??= false;\n item.checked ??= 'unchecked';\n item.selected ??= false;\n item.selectable ??= true;\n if (callback) {\n callback(item);\n }\n};\n\nconst checkAllChildren = (treeItem: TreeItem, check: CheckboxState): void => {\n if (childrenLoaded(treeItem)) {\n treeItem.children?.forEach(item => {\n item.checked = check;\n checkAllChildren(item, check);\n });\n }\n};\n\nconst getItemsBetweenRecursive = (\n found: TreeItem[],\n current: TreeItem,\n start: TreeItem,\n end: TreeItem,\n inBetweenState: InBetweenState\n): void => {\n if (inBetweenState.done) {\n return;\n }\n if (current === start && !inBetweenState.inBetween) {\n // This is the first found tree item within the selection, the start tree item (the item which is clicked first) is ordered\n // before the end tree item (the item which is clicked second).\n // The recursive function is from now on handling tree node which are in between the two selections.\n // Note, we don't need to select it, as it is already selected with previous click\n inBetweenState.startIsFirst = true;\n inBetweenState.inBetween = true;\n } else if (current === end && !inBetweenState.inBetween) {\n // This is the first found tree item within the selection, the end tree item (the item which is clicked second) is ordered\n // before the start tree item (the item which is clicked first).\n // The recursive function is from now on handling tree node which are in between the two selections.\n inBetweenState.startIsFirst = false;\n inBetweenState.inBetween = true;\n found.push(current);\n } else if (current === end && inBetweenState.inBetween) {\n found.push(current);\n inBetweenState.inBetween = false;\n inBetweenState.done = true;\n return; // the end of the search\n } else if (current === start && inBetweenState.inBetween) {\n inBetweenState.inBetween = false;\n inBetweenState.done = true;\n return; // the end of the search\n } else if (inBetweenState.inBetween) {\n found.push(current);\n }\n\n if (current.state === 'expanded') {\n current.children?.forEach(item =>\n getItemsBetweenRecursive(found, item, start, end, inBetweenState)\n );\n }\n};\n\nconst updateCheckStateOfParents = (treeItem: TreeItem): void => {\n if (treeItem.parent) {\n let allChecked = true;\n let allUnchecked = true;\n\n for (const item of treeItem.parent?.children ?? []) {\n if (item.checked === 'indeterminate') {\n treeItem.parent.checked = 'indeterminate';\n updateCheckStateOfParents(treeItem.parent);\n return;\n }\n if (item.checked === 'checked') {\n allUnchecked = false;\n }\n if (item.checked === 'unchecked') {\n allChecked = false;\n }\n if (!allChecked && !allUnchecked) {\n treeItem.parent.checked = 'indeterminate';\n updateCheckStateOfParents(treeItem.parent);\n return;\n }\n }\n\n if (allChecked) {\n treeItem.parent.checked = 'checked';\n } else {\n treeItem.parent.checked = 'unchecked';\n }\n updateCheckStateOfParents(treeItem.parent);\n }\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ElementRef, Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n FolderStateEventArgs,\n TreeItem\n} from './si-tree-view.model';\nimport { ROOT_LEVEL } from './si-tree-view.utils';\n\n/**\n * Supports communication between the TreeViewComponent and the TreeViewItemComponent and the services.\n * Stores tree specific settings.\n * One instance per TreeViewComponent exists.\n */\n@Injectable()\nexport class SiTreeViewService {\n /** Emits when a tree item is clicked. */\n clickEvent: Subject<ClickEventArgs> = new Subject<ClickEventArgs>();\n /** Emits when a folder item is clicked. */\n folderClickEvent: Subject<FolderStateEventArgs> = new Subject<FolderStateEventArgs>();\n /** Emits when checkbox is clicked. */\n checkboxClickEvent: Subject<CheckboxClickEventArgs> = new Subject<CheckboxClickEventArgs>();\n /** Emits when on tree item expansion to load child items. */\n loadChildrenEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /** Emits when the consumer want a node to be scrolled into view. */\n scrollIntoViewEvent: Subject<ElementRef> = new Subject<ElementRef>();\n /** Emits when the parent shall become focused. */\n focusParentEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /** Emits when the child shall become focused. */\n focusFirstChildEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /**\n * Shows or hides context menu button.\n *\n * @defaultValue true\n */\n enableContextMenuButton = true;\n /**\n * Child padding in pixel (px).\n *\n * @defaultValue 14\n */\n childrenIndentation = 14;\n /**\n * Visualize tree as grouped list, the child padding will have no effect.\n *\n * @defaultValue false\n */\n groupedList = false;\n /** @internal */\n triggerMarkForCheck: Subject<void> = new Subject<void>();\n /** @internal */\n scroll$!: Observable<Event>;\n /** Indicate whether item is a group item. */\n isGroupedItem(item: TreeItem): boolean {\n return (!item.parent || item.parent.level === ROOT_LEVEL) && this.groupedList;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { FocusableOption } from '@angular/cdk/a11y';\nimport { CdkContextMenuTrigger, CdkMenuTrigger } from '@angular/cdk/menu';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n computed,\n DoCheck,\n ElementRef,\n HostBinding,\n inject,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n viewChild\n} from '@angular/core';\nimport { correctKeyRTL, MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';\nimport { MenuItem, SiMenuFactoryComponent } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\nimport { asyncScheduler, Subject, Subscription } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { TREE_ITEM_CONTEXT } from '../si-tree-view-item-context';\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n FolderStateEventArgs,\n TreeItem\n} from '../si-tree-view.model';\nimport { SiTreeViewService } from '../si-tree-view.service';\nimport {\n boxClicked,\n doFolderStateChange,\n removeUndefinedState,\n setActive\n} from '../si-tree-view.utils';\n\n@Component({\n selector: 'si-tree-view-item',\n imports: [\n CdkContextMenuTrigger,\n CdkMenuTrigger,\n NgTemplateOutlet,\n SiIconComponent,\n SiLoadingSpinnerComponent,\n SiMenuFactoryComponent,\n SiTranslatePipe\n ],\n templateUrl: './si-tree-view-item.component.html',\n styleUrl: './si-tree-view-item.component.scss',\n host: {\n role: 'treeitem',\n '[attr.tabindex]':\n 'treeItemContext.record.currentIndex === treeViewComponent.activeIndex ? 0 : -1',\n '[class.focus-none]': 'true',\n '[class.si-tree-ellipsis]': 'treeViewComponent.horizontalScrolling()',\n '[class.si-tree-view-top-level-item]':\n '!treeViewComponent.compactMode() && (treeViewComponent.flatTree() || (treeItem.level ?? 0) < 1)',\n '[attr.aria-haspopup]': 'isContextMenuButtonVisible()',\n '(contextmenu)': 'onContextMenu($event)',\n '(keydown)': 'onKeydown($event)'\n }\n})\nexport class SiTreeViewItemComponent\n implements OnInit, OnDestroy, AfterViewInit, FocusableOption, DoCheck\n{\n private element = inject(ElementRef);\n private siTreeViewService = inject(SiTreeViewService);\n private cdRef = inject(ChangeDetectorRef);\n protected treeItemContext = inject(TREE_ITEM_CONTEXT);\n protected treeViewComponent = this.treeItemContext.parent;\n /** @internal */\n treeItem: TreeItem = this.treeItemContext.record.item;\n private scrollIntoView: Subject<TreeItem> = this.treeViewComponent.scrollChildIntoView;\n private childrenLoaded: Subject<TreeItem> = this.treeViewComponent.childrenLoaded;\n\n protected templates = this.treeViewComponent.templates;\n\n private readonly _contextMenuItems = this.treeViewComponent.contextMenuItems;\n\n protected readonly contextMenuItems = signal<(MenuItemLegacy | MenuItem)[] | null>([]);\n\n protected readonly isContextMenuButtonVisible = computed(() => {\n return (\n this.enableContextMenuButton() &&\n !!this._contextMenuItems() &&\n !!this.contextMenuItems()?.length\n );\n });\n\n protected readonly stickyEndItems = this.treeViewComponent.horizontalScrolling;\n\n protected icons = this.treeViewComponent.computedIcons;\n\n private savedElement: ElementRef | undefined;\n private subscriptions: Subscription[] = [];\n private indentLevel = this.treeItem.level ?? 0;\n private nextSiblingElement!: HTMLElement;\n protected readonly menuTrigger = viewChild(CdkMenuTrigger);\n\n @HostBinding('attr.aria-level')\n protected get ariaLevel(): number {\n return (this.treeItem.level ?? 0) + 1;\n }\n\n @HostBinding('attr.aria-setsize')\n protected get ariaSetsize(): number {\n return this.treeItem.parent?.children?.length ?? 1;\n }\n\n @HostBinding('attr.aria-posinset')\n protected ariaPosinset?: number;\n\n @HostBinding('attr.aria-selected')\n protected get ariaSelected(): boolean | null {\n return this.enableSelection() && this.treeItem.selectable ? !!this.treeItem.selected : null;\n }\n\n @HostBinding('attr.aria-checked')\n protected get ariaChecked(): boolean | null {\n return this.showCheckOrOptionBox && this.treeItem.selectable\n ? this.treeItem.checked === 'checked'\n : null;\n }\n\n @HostBinding('attr.aria-expanded')\n protected get ariaExpanded(): boolean | null {\n if (this.treeItem.state === 'leaf') {\n return null;\n }\n return this.treeItem.state === 'expanded';\n }\n\n ngOnInit(): void {\n this.subscriptions.push(\n this.scrollIntoView.subscribe(event => this.onScrollIntoViewByConsumer(event))\n );\n this.subscriptions.push(\n this.childrenLoaded.subscribe(event => this.childrenLoadingDone(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.triggerMarkForCheck.subscribe(() => this.cdRef.markForCheck())\n );\n\n this.updateContextMenuItem();\n }\n\n ngDoCheck(): void {\n if (this.treeItem.parent?.children && this.ariaPosinset) {\n if (this.treeItem.parent.children[this.ariaPosinset] !== this.treeItem) {\n this.ariaPosinset = this.treeItem.parent.children.indexOf(this.treeItem) + 1;\n }\n } else if (this.treeItem.parent?.children) {\n this.ariaPosinset = this.treeItem.parent.children.indexOf(this.treeItem) + 1;\n } else {\n this.ariaPosinset = 1;\n }\n }\n\n ngAfterViewInit(): void {\n if (this.savedElement) {\n this.siTreeViewService.scrollIntoViewEvent.next(this.savedElement);\n this.savedElement = undefined;\n }\n this.nextSiblingElement = this.element.nativeElement?.nextElementSibling;\n }\n\n ngOnDestroy(): void {\n this.subscriptions\n .filter(subscription => !!subscription)\n .forEach(subscription => subscription.unsubscribe());\n }\n\n protected readonly enableSelection = this.treeViewComponent.enableSelection;\n\n protected readonly enableContextMenuButton = this.treeViewComponent.enableContextMenuButton;\n\n protected readonly enableDataField1 = this.treeViewComponent.enableDataField1;\n\n protected readonly enableDataField2 = this.treeViewComponent.enableDataField2;\n\n protected readonly deleteChildrenOnCollapse = this.treeViewComponent.deleteChildrenOnCollapse;\n\n protected get paddingStart(): string {\n return this.siTreeViewService.groupedList\n ? '0'\n : this.indentLevel * this.siTreeViewService.childrenIndentation + 'px';\n }\n\n protected get biggerPaddingStart(): string {\n const basePadding = this.showFolderStateStart ? 24 : 0;\n return (\n (this.siTreeViewService.groupedList\n ? basePadding\n : this.indentLevel * this.siTreeViewService.childrenIndentation + basePadding) + 'px'\n );\n }\n\n protected get isGroupedItem(): boolean {\n return this.siTreeViewService.isGroupedItem(this.treeItem);\n }\n\n protected get showFolderStateStart(): boolean {\n return (\n this.treeViewComponent.hasAnyChildren &&\n this.treeViewComponent.folderStateStart() &&\n !this.treeViewComponent.flatTree() &&\n (!!this.isGroupedItem || !this.siTreeViewService.groupedList)\n );\n }\n\n protected get showFolderStateEnd(): boolean {\n return this.treeViewComponent.hasAnyChildren && !this.showFolderStateStart;\n }\n\n protected get isExpanding(): boolean {\n return this.treeItem.state === 'expanding';\n }\n\n protected readonly showStateIndicator = this.treeViewComponent.enableStateIndicator;\n\n protected readonly showIcon = computed(() => {\n return this.treeViewComponent.enableIcon() && !!this.treeItem.icon;\n });\n\n protected get showCheckOrOptionBox(): boolean {\n return !!this.treeItem.showCheckbox || !!this.treeItem.showOptionbox;\n }\n\n private updateContextMenuItem(): void {\n const contextMenuItems = this._contextMenuItems();\n if (contextMenuItems) {\n if (Array.isArray(contextMenuItems)) {\n this.contextMenuItems.set(contextMenuItems);\n } else {\n const menuItems = contextMenuItems(this.treeItem);\n if (Array.isArray(menuItems)) {\n this.contextMenuItems.set(menuItems);\n } else if (menuItems) {\n this.subscriptions.push(\n menuItems.subscribe(items => {\n this.contextMenuItems.set(items);\n })\n );\n }\n }\n }\n }\n\n protected getItemFolderStateClass(): string {\n if (this.treeItem.state === 'collapsed') {\n if (this.treeViewComponent.flatTree()) {\n // flat tree mode\n return this.icons().itemCollapsedFlat;\n } else if (this.treeViewComponent.folderStateStart()) {\n // normal tree mode; folder state icon shown on the left (in LTR) side\n return this.icons().itemCollapsedLeft; // si-tree-view-item-collapsed\n } else {\n // normal tree mode; folder state icon shown on the right (in LTR) side\n return this.icons().itemCollapsed; // si-tree-view-item-collapsed\n }\n } else if (this.treeItem.state === 'expanding') {\n return 'si-tree-view-item-expanding'; // because empty is treated as disabled\n } else if (this.treeItem.state === 'expanded') {\n if (this.treeViewComponent.flatTree()) {\n // flat tree mode\n return this.icons().itemExpandedFlat;\n } else if (this.treeViewComponent.folderStateStart()) {\n // normal tree mode; folder state icon shown on the left (in LTR) side\n return this.icons().itemExpandedLeft; // si-tree-view-item-expanded\n } else {\n // normal tree mode; folder state icon shown on the right (in LTR) side\n return this.icons().itemExpanded; // si-tree-view-item-expanded\n }\n }\n return '';\n }\n\n protected getStateIndicatorColor(): string {\n return this.treeItem ? (this.treeItem.stateIndicatorColor ?? '') : '';\n }\n\n protected onItemFolderClicked(newState?: string): void {\n this.nextSiblingElement = this.element.nativeElement?.nextElementSibling;\n const oldState = removeUndefinedState(this.treeItem.state);\n doFolderStateChange(this.treeItem, this.deleteChildrenOnCollapse(), newState);\n\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(this.treeItem, oldState, removeUndefinedState(this.treeItem.state))\n );\n\n if (this.treeItem.state === 'expanding') {\n this.siTreeViewService.loadChildrenEvent.next(this.treeItem);\n }\n\n if (this.treeItem.state === 'expanded') {\n this.scrollChildNodeIntoViewPort();\n }\n }\n\n private childrenLoadingDone(item: TreeItem): void {\n if (item === this.treeItem) {\n asyncScheduler.schedule(() => this.scrollChildNodeIntoViewPort(), 0);\n }\n }\n\n private scrollChildNodeIntoViewPort(): void {\n const task = (): void => {\n const container: HTMLElement = this.element.nativeElement.closest('.si-tree-view');\n const first: HTMLElement = this.element.nativeElement;\n this.nextSiblingElement =\n (this.nextSiblingElement?.previousElementSibling as HTMLElement) ?? this.nextSiblingElement;\n const last: HTMLElement = container?.contains(this.nextSiblingElement)\n ? this.nextSiblingElement\n : this.element.nativeElement.parentElement?.lastElementChild;\n const fits =\n container?.offsetHeight -\n (last?.offsetTop + last?.getBoundingClientRect().height - first?.offsetTop) >=\n 0;\n const targetElement = fits ? last : first;\n if (targetElement) {\n const observer: IntersectionObserver = new window.IntersectionObserver(\n ([entry]) => {\n requestAnimationFrame(() => {\n const scrollElement = (targetElement.firstChild as HTMLElement) ?? targetElement;\n if (fits) {\n scrollElement.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n } else {\n // scrollIntoView messes up with page scroll when body also has a scroll for { block : 'start' }\n const totalScrollTop =\n container?.scrollTop +\n first?.getBoundingClientRect().top -\n container?.getBoundingClientRect().top;\n container?.scrollTo({ top: totalScrollTop, behavior: 'smooth' });\n }\n });\n observer.disconnect();\n },\n {\n root: null,\n threshold: 1\n }\n );\n observer.observe(targetElement);\n }\n };\n asyncScheduler.schedule(task, 0);\n }\n\n protected onItemClicked(event: Event): void {\n const previousActive = this.treeItem.active;\n this.siTreeViewService.clickEvent.next(new ClickEventArgs(this.treeItem, event as MouseEvent));\n\n if (\n !this.enableSelection() &&\n (this.treeViewComponent.enableCheckbox() || this.treeViewComponent.enableOptionbox())\n ) {\n this.onBoxClicked();\n }\n\n // Toggle expand when item is collapsed, collapse only if the node is active\n const toggle =\n (this.treeItem.state === 'expanded' && previousActive) || this.treeItem.state === 'collapsed';\n if (this.expandOnClick() && toggle) {\n this.onItemFolderClicked();\n }\n }\n\n protected onMouseDownTreeItem(event: MouseEvent): void {\n if (event.shiftKey) {\n // let selection: Selection = window.getSelection();\n // selection.removeAllRanges();\n // we do not want the tree item text selected: thus we prevent the default behavior in this situation\n event.preventDefault();\n }\n }\n\n protected onToggleContextMenuOpen(): void {\n setActive(this.treeItem, true);\n this.siTreeViewService.scroll$\n .pipe(takeUntil(this.menuTrigger()!.closed), take(1))\n .subscribe(() => this.menuTrigger()?.close());\n }\n\n protected onToggleContextMenuClose(): void {\n setTimeout(() => this.element.nativeElement.focus());\n }\n\n protected getInputType(): string {\n // This method will be called only when either of the showCheckbox or showOptionBox is true, thus\n // following condition can be shortened\n return this.treeItem.showCheckbox ? 'checkbox' : 'radio';\n }\n\n protected onBoxClicked(): void {\n if (!this.treeItem.selectable) {\n return;\n }\n const oldState = this.treeItem.checked ?? 'unchecked';\n boxClicked(this.treeItem, this.treeViewComponent.inheritChecked());\n this.siTreeViewService.checkboxClickEvent.next(\n new CheckboxClickEventArgs(this.treeItem, oldState, this.treeItem.checked ?? 'unchecked')\n );\n }\n\n protected renderMatchingTemplate(treeItem: TreeItem): TemplateRef<any> {\n // we check in the HTML template if templates exist.\n const templateDirective = this.templates()!.find(td => td.name() === treeItem.templateName);\n return templateDirective ? templateDirective.template : this.templates()![0].template;\n }\n\n protected onContextMenu(event: Event): boolean {\n this.handleContextMenuEvent(event);\n return false;\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const rtlCorrectedKey = correctKeyRTL(event.key);\n if (rtlCorrectedKey === 'Enter') {\n event.preventDefault();\n this.onItemClicked(event);\n } else if (rtlCorrectedKey === 'ContextMenu' || (rtlCorrectedKey === 'F10' && event.shiftKey)) {\n this.handleContextMenuEvent(event);\n } else if (rtlCorrectedKey === 'ArrowLeft') {\n if (\n (!this.treeViewComponent.flatTree() &&\n this.showFolderStateStart &&\n (this.treeItem.state !== 'leaf' || this.isGroupedItem)) ||\n this.showFolderStateEnd\n ) {\n event.preventDefault();\n if (this.treeItem.state !== 'collapsed' && this.treeItem.state !== 'leaf') {\n this.onItemFolderClicked('collapsed');\n return;\n }\n }\n this.siTreeViewService.focusParentEvent.next(this.treeItem);\n } else if (rtlCorrectedKey === 'ArrowRight') {\n if (\n (this.showFolderStateStart && (this.treeItem.state !== 'leaf' || this.isGroupedItem)) ||\n this.showFolderStateEnd\n ) {\n event.preventDefault();\n if (this.treeItem.state !== 'expanded') {\n this.onItemFolderClicked('expanded');\n return;\n }\n }\n this.siTreeViewService.focusFirstChildEvent.next(this.treeItem);\n } else if (\n this.showCheckOrOptionBox &&\n (rtlCorrectedKey === 'Space' || rtlCorrectedKey === ' ')\n ) {\n event.preventDefault();\n this.onBoxClicked();\n }\n }\n\n private handleContextMenuEvent(event: Event): void {\n if (\n this.isContextMenuButtonVisible() &&\n this.contextMenuItems()?.some(\n item =>\n (!item.type && !item.disabled && !item.isHeading && item.title !== '-') ||\n (item.type !== 'divider' &&\n item.type !== 'header' &&\n (item.type !== 'radio-group' ||\n item.children.some(radioItem => radioItem.type === 'radio' && !radioItem.disabled)) &&\n item.type !== 'radio-group' &&\n !item.disabled)\n )\n ) {\n event.preventDefault();\n event.stopPropagation();\n // Without the setTimeout in Firefox native menu will open as well.\n // Event suppression does not work.\n // Re-check in the future if FF fixes it.\n setTimeout(() => {\n const menuTrigger = this.menuTrigger();\n menuTrigger?.open();\n menuTrigger?.getMenu()!.focusFirstItem('keyboard');\n });\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * Focuses the tree item.\n */\n focus(): void {\n this.element.nativeElement.focus();\n }\n\n /**\n * Get tree item label.\n */\n getLabel(): string {\n return this.treeItem?.label ?? '';\n }\n\n /**\n * Called by the consumer when they want a node to be scrolled into view.\n */\n private onScrollIntoViewByConsumer(item: TreeItem): void {\n if (item === this.treeItem) {\n this.savedElement = this.element;\n this.siTreeViewService.scrollIntoViewEvent.next(this.element);\n }\n }\n\n private expandOnClick(): boolean {\n return (\n this.treeViewComponent.expandOnClick() &&\n this.treeItem.state !== 'leaf' &&\n !!this.treeItem.selectable &&\n !this.treeViewComponent.flatTree()\n );\n }\n}\n","@if (!isGroupedItem) {\n <div\n #contextMenuTrigger=\"cdkContextMenuTriggerFor\"\n class=\"si-tree-view-li si-tree-view-li-item focus-direct-sub-inside\"\n [class.si-tree-view-item-context-menu-visible]=\"\n !!(contextMenuTrigger.isOpen() || menuTrigger()?.isOpen())\n \"\n [class.si-tree-view-item-active]=\"treeItem.active\"\n [class.si-tree-view-item-selected]=\"enableSelection() && treeItem.selected\"\n [class.si-tree-view-item-not-selectable]=\"!treeItem.selectable\"\n [style.padding-inline-start]=\"biggerPaddingStart\"\n [cdkContextMenuTriggerFor]=\"contextMenu\"\n [cdkContextMenuDisabled]=\"!isContextMenuButtonVisible() || !treeItem.selectable\"\n (cdkContextMenuOpened)=\"onToggleContextMenuOpen()\"\n (cdkContextMenuClosed)=\"onToggleContextMenuClose()\"\n >\n <div class=\"si-tree-view-item\" (mousedown)=\"onMouseDownTreeItem($event)\">\n @if (showFolderStateStart && treeItem.state !== 'leaf') {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n biggerPaddingStart: '-' + biggerPaddingStart,\n paddingStart: paddingStart,\n toggleIcon: 'si-tree-view-item-dropdown-caret'\n }\"\n />\n }\n <ng-container [ngTemplateOutlet]=\"checkboxOrOption\" />\n\n <div\n class=\"si-tree-view-item-main d-flex flex-grow-1 align-self-stretch grab-area\"\n (click)=\"onItemClicked($event)\"\n >\n @if (showIcon()) {\n <div class=\"si-tree-stretch-center\">\n <si-icon class=\"si-tree-view-item-icon\" [icon]=\"treeItem.icon!\" />\n </div>\n }\n <div\n class=\"si-tree-view-item-object-data d-flex flex-column justify-content-center overflow-hidden\"\n >\n @if (!templates().length) {\n <ng-content select=\":not(si-tree-view-item):not([dragPreview])\"\n ><div class=\"text-truncate\" [class.si-h5]=\"enableSelection() && treeItem.selected\">{{\n treeItem.label | translate\n }}</div></ng-content\n >\n } @else {\n <div>\n <ng-container\n *ngTemplateOutlet=\"\n renderMatchingTemplate(treeItem);\n context: { $implicit: treeItem }\n \"\n />\n </div>\n }\n @if (enableDataField1() && treeItem.dataField1) {\n <p class=\"si-tree-view-item-object-data-field-1 text-truncate\">{{\n treeItem.dataField1 | translate\n }}</p>\n }\n @if (enableDataField2() && treeItem.dataField2) {\n <p class=\"si-tree-view-item-object-data-field-2 text-truncate\">{{\n treeItem.dataField2 | translate\n }}</p>\n }\n </div>\n @if (treeItem.badge) {\n <span class=\"badge flex-shrink-0\" [class]=\"`bg-${treeItem.badgeColor || 'default'}`\">{{\n treeItem.badge\n }}</span>\n }\n </div>\n <div\n class=\"si-tree-view-item-end-icons d-flex ms-2 align-items-center\"\n [class.si-tree-view-item-end-icons-sticky]=\"stickyEndItems()\"\n >\n @if (showStateIndicator() && getStateIndicatorColor()) {\n <div\n class=\"si-tree-view-state-indicator\"\n [style.background-color]=\"getStateIndicatorColor()\"\n [class.si-tree-view-state-indicator-endmost]=\"\n !enableContextMenuButton() && !showFolderStateEnd\n \"\n ></div>\n }\n @if (isContextMenuButtonVisible()) {\n <div class=\"si-tree-stretch-center si-tree-context-menu-btn\">\n <div\n #menuTrigger=\"cdkMenuTriggerFor\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [cdkMenuTriggerFor]=\"contextMenu\"\n (cdkMenuOpened)=\"onToggleContextMenuOpen()\"\n (cdkMenuClosed)=\"onToggleContextMenuClose()\"\n >\n <i\n aria-hidden=\"true\"\n class=\"si-tree-view-item-icon si-tree-view-menu-btn\"\n [class]=\"icons().itemMenu\"\n ></i>\n </div>\n </div>\n }\n @if (showFolderStateEnd) {\n <ng-container\n [ngTemplateOutlet]=\"treeItem.state === 'leaf' ? spacerTemplate : toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon',\n positionEnd: true\n }\"\n />\n }\n </div>\n </div>\n </div>\n} @else {\n <div class=\"si-tree-view-li focus-direct-sub-inside\">\n <div class=\"si-tree-view-item-group\">\n @if (showFolderStateStart) {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon'\n }\"\n />\n }\n <ng-container\n [ngTemplateOutlet]=\"checkboxOrOption\"\n [ngTemplateOutletContext]=\"{ classNames: 'form-check' }\"\n />\n\n <p class=\"mb-0\">{{ treeItem.label | translate }}</p>\n @if (showFolderStateEnd) {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon'\n }\"\n />\n }\n </div>\n </div>\n}\n\n<ng-template #contextMenu>\n <si-menu-factory class=\"me-5\" [items]=\"contextMenuItems()!\" [actionParam]=\"treeItem\" />\n</ng-template>\n\n<ng-template #checkboxOrOption let-classNames=\"classNames\">\n @if (showCheckOrOptionBox) {\n <a class=\"input-box\" tabindex=\"-1\" [class]=\"classNames\">\n <input\n class=\"form-check-input\"\n tabindex=\"-1\"\n [type]=\"getInputType()\"\n [indeterminate]=\"this.treeItem.checked === 'indeterminate' ? true : null\"\n [checked]=\"this.treeItem.checked === 'checked'\"\n [disabled]=\"!treeItem.selectable\"\n [attr.aria-label]=\"treeItem.label | translate\"\n (click)=\"onBoxClicked()\"\n />\n </a>\n }\n</ng-template>\n\n<ng-template\n #toggleTemplate\n let-biggerPaddingStart=\"biggerPaddingStart\"\n let-paddingStart=\"paddingStart\"\n let-toggleIcon=\"toggleIcon\"\n let-positionEnd=\"positionEnd\"\n>\n @let folderStateClass = getItemFolderStateClass();\n <a\n class=\"si-tree-stretch-center si-tree-view-item-toggle\"\n tabindex=\"-1\"\n [class.si-tree-view-item-toggle-end]=\"positionEnd\"\n [class.disabled]=\"!folderStateClass\"\n [style.margin-inline-start]=\"biggerPaddingStart\"\n [style.padding-inline-start]=\"paddingStart\"\n (click)=\"onItemFolderClicked()\"\n >\n @if (isExpanding) {\n <si-loading-spinner />\n } @else {\n <i aria-hidden=\"true\" [class]=\"`${toggleIcon} ${folderStateClass}`\"></i>\n }\n </a>\n</ng-template>\n\n<ng-template #spacerTemplate let-positionEnd=\"positionEnd\">\n <div\n class=\"si-tree-stretch-center si-tree-view-item-toggle\"\n [class.si-tree-view-item-toggle-end]=\"positionEnd\"\n >\n <i aria-hidden=\"true\" class=\"si-tree-view-item-icon si-tree-view-item-icon-spacer\"></i>\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * Provides the functionality to flatten the hierarchical tree structure into a flat one dimensional array; called flattenedTrees.\n * The TreeViewComponent uses this flattened trees (the array) to bind the contained tree/list items to the GUI into a list.\n * In addition the service provides the number of 'normal' list items and the number of group items.\n * Important:\n * The coupling to the TreeViewComponent is high, thus the service is provided only by the TreeViewComponent.\n */\n@Injectable()\nexport class SiTreeViewConverterService {\n /**\n * The flattened tree array; filled upon calling the method 'fillFlattenedTree'\n *\n * @defaultValue []\n */\n flattenedTrees: TreeItem[] = [];\n\n /**\n * The number of group items of the flattened tree.\n *\n * @defaultValue 0\n */\n groupItemsCount = 0;\n\n /**\n * The total items count of the flattened tree.\n *\n * @defaultValue 0\n */\n itemsTotal = 0;\n\n private siTreeViewService = inject(SiTreeViewService);\n\n /**\n * Flattens the tree handed over as parameter.\n * Takes the mode of the tree into consideration:\n * In case of a flat tree: only the first level of the items parameter is copied into the flattenedTrees array.\n * In case of a grouped tree: only the first two levels are copied into the flattenedTrees array\n * In the other cases all tree nodes are copied into the flattenedTrees array.\n */\n fillFlattenedTree(items: TreeItem[], isFlatTree: boolean): void {\n if (isFlatTree === false) {\n this.flattenedTrees = [];\n if (this.siTreeViewService.groupedList) {\n this.fillFlattenedTreeRecursive(items, 2, 0);\n } else {\n this.fillFlattenedTreeRecursive(items);\n }\n } else {\n this.flattenedTrees = items;\n this.groupItemsCount = 0;\n }\n this.itemsTotal = items.length;\n }\n\n private fillFlattenedTreeRecursive(\n items: TreeItem[],\n noOfLevels?: number,\n stackLevel?: number\n ): void {\n if (noOfLevels !== undefined && stackLevel !== undefined && noOfLevels <= stackLevel) {\n return;\n }\n\n stackLevel = stackLevel ?? 0;\n\n for (const current of items) {\n this.flattenedTrees.push(current);\n if (this.siTreeViewService.isGroupedItem(current)) {\n this.groupItemsCount++;\n }\n if (current.state === 'expanded') {\n this.fillFlattenedTreeRecursive(current.children ?? [], noOfLevels, stackLevel + 1);\n }\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { EventEmitter, inject, Injectable } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * This service provides helper functionality for the tree view to read the height of the tree/list items and\n * the group list items out of the DOM.\n *\n * Important: The coupling to the TreeViewComponent is very high as the service contains knowledge on the HTML structure!!!\n * Thus the service is provided only by the TreeViewComponent.\n *\n * Constraint: The height of the items (DOM elements) must be all the same; The height of the grouped items (DOM elements)\n * must be all the same;\n */\n@Injectable()\nexport class SiTreeViewItemHeightService {\n /**\n * The height of a tree list item.\n * Can be undefined if the tree list has not been layout rendered yet.\n */\n itemHeight?: number;\n\n /**\n * The height of a grouped list item.\n * Can be undefined if the tree list has not been layout rendered yet or if it does not contain group items.\n */\n groupItemHeight?: number;\n\n /**\n * Emitter for itemHeight changes.\n */\n readonly itemHeightChange = new EventEmitter<number>();\n\n private siTreeViewService = inject(SiTreeViewService);\n\n /**\n * Updates the height of a list item, if an appropriate item is in the DOM.\n *\n * @returns The new height of the list item; or undefined if no list item is in the DOM yet.\n */\n updateItemHeight(\n elementList: Element,\n flattenedTrees: TreeItem[],\n itemsBase: number,\n virtualizedItems: number\n ): number | undefined {\n let newHeight: number | undefined;\n let itemsTop: number = itemsBase + virtualizedItems;\n if (itemsTop > flattenedTrees.length) {\n itemsTop = flattenedTrees.length;\n }\n for (let i: number = itemsBase; i < itemsTop; i++) {\n if (this.siTreeViewService.isGroupedItem(flattenedTrees[i]) === false) {\n newHeight = this.getItemHeightOfListElement(elementList, i - itemsBase);\n break;\n }\n }\n if (newHeight !== undefined && this.itemHeight !== newHeight) {\n this.itemHeight = newHeight;\n this.itemHeightChange.emit(newHeight);\n }\n\n return newHeight;\n }\n\n /**\n * Updates the height of a group item, if an appropriate item is in the DOM.\n *\n * @returns The new height of the group item; or undefined if no group item is in the DOM yet.\n */\n updateGroupedItemHeight(\n elementList: Element,\n flattenedTrees: TreeItem[],\n itemsBase: number,\n virtualizedItems: number\n ): number | undefined {\n let newHeight: number | undefined;\n let itemsTop: number = itemsBase + virtualizedItems;\n if (itemsTop > flattenedTrees.length) {\n itemsTop = flattenedTrees.length;\n }\n for (let i: number = itemsBase; i < itemsTop; i++) {\n if (this.siTreeViewService.isGroupedItem(flattenedTrees[i])) {\n newHeight = this.getItemHeightOfListElement(elementList, i - itemsBase);\n break;\n }\n }\n if (newHeight !== undefined) {\n this.groupItemHeight = newHeight;\n }\n\n return newHeight;\n }\n\n private getItemHeightOfListElement(elementList: Element, index: number): number | undefined {\n const items = elementList.querySelectorAll('si-tree-view-item');\n if (index < items.length) {\n return items.item(index).getBoundingClientRect().height;\n }\n return undefined;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OutputRefSubscription,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\n\nimport { TREE_ITEM_CONTEXT } from '../si-tree-view-item-context';\nimport { SiTreeViewComponent } from '../si-tree-view.component';\nimport { TreeItem, TreeItemContext } from '../si-tree-view.model';\n\n@Directive({\n selector: '[siTreeViewItem]'\n})\nexport class SiTreeViewItemDirective implements AfterViewInit, OnDestroy {\n private templateRef = inject(TemplateRef);\n private viewContainerRef = inject(ViewContainerRef);\n private parent = inject(SiTreeViewComponent);\n private differs = inject(IterableDiffers);\n private cdRef = inject(ChangeDetectorRef);\n private differ: IterableDiffer<TreeItem> | null = null;\n private subscription!: OutputRefSubscription;\n private itemsVirtualizedDirty = true;\n\n ngAfterViewInit(): void {\n if (this.itemsVirtualizedDirty) {\n this.itemsVirtualizedDirty = false;\n const value = this.parent.itemsVirtualized;\n if (!this.differ && value) {\n this.differ = this.differs.find(value).create((_index, item) => item);\n }\n }\n this.evaluateDiffer();\n\n this.subscription = this.parent.evaluateForTreeItemsDiffer.subscribe(_ =>\n this.evaluateDiffer()\n );\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n\n private evaluateDiffer(): void {\n if (this.differ) {\n const changes = this.differ.diff(this.parent.itemsVirtualized);\n if (changes) this.applyChanges(changes);\n }\n }\n\n private applyChanges(changes: IterableChanges<TreeItem>): void {\n const viewContainer = this.viewContainerRef;\n changes.forEachOperation(\n (\n record: IterableChangeRecord<TreeItem>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null\n ) => {\n if (record.previousIndex == null) {\n viewContainer.createEmbeddedView(\n this.templateRef,\n {\n treeItem: record.item,\n index: record.currentIndex,\n parent: this.parent\n },\n {\n injector: Injector.create({\n providers: [\n {\n provide: TREE_ITEM_CONTEXT,\n useValue: {\n record,\n parent: this.parent\n }\n }\n ]\n }),\n index: currentIndex ?? undefined\n }\n );\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex ?? undefined);\n } else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex)!;\n viewContainer.move(view, currentIndex);\n (view as EmbeddedViewRef<TreeItemContext>).context = {\n treeItem: record.item,\n index: record.currentIndex!,\n parent: this.parent\n };\n }\n this.cdRef.detectChanges();\n }\n );\n\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = viewContainer.get(i) as EmbeddedViewRef<TreeItemContext>;\n const context = viewRef.context;\n context.index = i;\n }\n\n changes.forEachIdentityChange((record: IterableChangeRecord<TreeItem>) => {\n if (record.currentIndex) {\n const viewRef = viewContainer.get(record.currentIndex) as EmbeddedViewRef<TreeItemContext>;\n viewRef.context = {\n treeItem: record.item,\n index: record.currentIndex,\n parent: this.parent\n };\n this.cdRef.detectChanges();\n }\n });\n }\n\n static ngTemplateContextGuard(\n _dir: SiTreeViewItemDirective,\n ctx: unknown\n ): ctx is TreeItemContext {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { SiTreeViewItemHeightService } from './si-tree-view-item-height.service';\nimport { ItemsVirtualizedArgs, TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * Provides helper functionality to virtualize a list of items.\n * The number of virtualized items is the product of the pageSize and the pagesVirtualized (no of pages virtualized);\n * The paging algorithm works as follows:\n * If scrolling down, between two and three pages are kept above the 'visible' area;\n * The trigger is therefore if more than three pages are above the visible area, one page is removed from the top and added at the bottom.\n * If scrolling up, between one and two pages are kept above the 'visible' area;\n * The trigger is therefore if less than one page is above the visible area, one page is added on top and removed from the bottom.\n * All remaining items which are not virtualized, need to be simulated with two div-elements whose height can be set with the calculated\n * properties heightBefore and heightAfter.\n * See the test client for further information on the usage.\n * Constraint:\n * The virtualization calculation works correct only when all list items are of the same height!\n * If the 'group' mode is enabled, the corresponding group-items can have a different height, but for all group-items it must be the same.\n */\n@Injectable()\nexport class SiTreeViewVirtualizationService {\n /**\n * The number of list items of a virtualized page.\n * Choose a value, which is roughly half of the number of items you expect to be displayed on the visible screen.\n *\n * @defaultValue 10\n */\n pageSize = 10;\n /**\n * The number of pages to be virtualized.\n *\n * @defaultValue 6\n */\n pagesVirtualized = 6;\n /**\n * Emits when the virtualized items have changed (added/removed).\n */\n itemsVirtualizedChanged: Subject<ItemsVirtualizedArgs> = new Subject<ItemsVirtualizedArgs>();\n /**\n * The total height of the 'simulated' list items which are ordered before the virtualized list items.\n */\n private _heightBefore = 0;\n /**\n * The total height of the 'simulated' list items which are ordered after the virtualized list items.\n */\n private _heightAfter = 0;\n private _pageBase = 0;\n private scrollTopPrev = 0;\n private _itemsVirtualized: TreeItem[] = [];\n private groupItemsCountBefore = 0;\n private listItemsCountBefore = 0;\n private groupItemsCountAfter = 0;\n private listItemsCountAfter = 0;\n private groupItemsCountVirtualized = 0;\n private listItemsCountVirtualized = 0;\n private listItemsPerVirtPage: number[] = [];\n private groupItemsPerVirtPage: number[] = [];\n\n private siTreeViewService = inject(SiTreeViewService);\n private siTreeViewItemHeightService = inject(SiTreeViewItemHeightService);\n\n /**\n * Returns the virtualized items.\n */\n get itemsVirtualized(): TreeItem[] {\n return this._itemsVirtualized;\n }\n\n /**\n * The total height of the 'simulated' list items which are ordered before the virtualized list items.\n */\n get heightBefore(): number {\n return this._heightBefore;\n }\n\n /**\n * The total height of the 'simulated' list items which are ordered after the virtualized list items.\n */\n get heightAfter(): number {\n return this._heightAfter;\n }\n\n /**\n * The index of the first (base) page being virtualized.\n */\n get pageBase(): number {\n return this._pageBase;\n }\n\n /**\n * The list item index of the base page.\n */\n get itemBaseIdx(): number {\n return this._pageBase * this.pageSize;\n }\n\n /**\n * Returns the number of virtualized items.\n */\n get itemsVirtualizedCount(): number {\n return this.itemsVirtualized.length;\n }\n\n /**\n * Call this method upon scroll handler notifications!\n *\n * @param scrollTop - the scrollTop value retrieved form the event target\n * @param itemsAll - all items of the list\n */\n handleScroll(scrollTop: number, itemsAll: TreeItem[]): void {\n if (this.siTreeViewService.groupedList) {\n this.handleScrollGrouped(scrollTop, itemsAll);\n } else {\n this.handleScrollSimple(scrollTop, itemsAll);\n }\n }\n\n /**\n * Resets the virtualization to 'show' the items of the first page onwards.\n */\n resetVirtualizedItemList(itemsAll: TreeItem[]): void {\n this._pageBase = 0;\n this.updateVirtualizedItemListIntern(itemsAll);\n }\n\n /**\n * Updates the virtualized items. Call this method for use cases such as:\n * - The list items array contains added or removed items which could be in the 'visible' area\n * - The item height has changed.\n */\n updateVirtualizedItemList(itemsAll: TreeItem[]): void {\n this.updateVirtualizedItemListIntern(itemsAll);\n }\n\n /**\n * Checks if the specified item is currently virtualized.\n * If not, the virtualization is recalculated in order that the item is part of the virtualized items.\n */\n virtualizeItem(item: TreeItem, itemsAll: TreeItem[]): void {\n if (this.checkIfItemDisplayed(item) === false) {\n this.setBasePageForItemToDisplay(item, itemsAll);\n }\n }\n\n /**\n * Calculates the first visible tree item based on current scroll position.\n */\n calculateFirstVisibleTreeItem(): TreeItem | undefined {\n let item: TreeItem | undefined;\n let totalItemHeight = 0;\n // Approx Y-position of the middle of the first visible (top) tree item\n const topItemPos =\n this.scrollTopPrev +\n (this.siTreeViewItemHeightService.itemHeight ?? 0) / 2 -\n this.heightBefore;\n for (let idx = 0; idx < this._itemsVirtualized.length && totalItemHeight < topItemPos; idx++) {\n item = this._itemsVirtualized[idx];\n totalItemHeight += this.isGroupItem(item)\n ? (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n : (this.siTreeViewItemHeightService.itemHeight ?? 0);\n }\n return item;\n }\n\n private get listItemsCountTotal(): number {\n return this.listItemsCountBefore + this.listItemsCountVirtualized + this.listItemsCountAfter;\n }\n\n private get groupItemsCountTotal(): number {\n return this.groupItemsCountBefore + this.groupItemsCountVirtualized + this.groupItemsCountAfter;\n }\n\n private get itemsCountTotal(): number {\n return this.listItemsCountTotal + this.groupItemsCountTotal;\n }\n\n private get itemsCountVirtualizedMax(): number {\n return this.pageSize * this.pagesVirtualized;\n }\n\n private updateVirtualizedItemListIntern(itemsAll: TreeItem[], scrolledPages?: number): void {\n // Note!!!:\n // The order of functionality within this method must be maintained as state of this object is changed!!!\n\n const itemsVirtualizedOld: TreeItem[] = this._itemsVirtualized.slice();\n\n this._itemsVirtualized = itemsAll.slice(\n this.pageBase * this.pageSize,\n this.itemsCountVirtualizedMax + this.pageBase * this.pageSize\n );\n\n this.updateItemsTypeCount(itemsAll, scrolledPages);\n\n if (this.siTreeViewService.groupedList) {\n this.calculateBeforeAndAfterForGroupList();\n } else {\n this.calculateBeforeAndAfter();\n }\n\n this.maintainVirtualizationNotifies(itemsVirtualizedOld);\n }\n\n /**\n * Notifies a consumer about changes of virtualized tree/list items in case of a pageBase change.\n * One notification is sent for every tree/list item\n * that went out of the virtualized items list or came into the virtualized items.\n */\n private maintainVirtualizationNotifies(itemsVirtualizedOld: TreeItem[]): void {\n const itemsAdded: TreeItem[] = [];\n const itemsRemoved: TreeItem[] = [];\n for (const item of itemsVirtualizedOld) {\n if (!this._itemsVirtualized.includes(item)) {\n itemsRemoved.push(item);\n }\n }\n for (const item of this._itemsVirtualized) {\n if (!itemsVirtualizedOld.includes(item)) {\n itemsAdded.push(item);\n }\n }\n if (itemsRemoved.length > 0) {\n this.itemsVirtualizedChanged.next(new ItemsVirtualizedArgs(itemsRemoved, false));\n }\n if (itemsAdded.length > 0) {\n this.itemsVirtualizedChanged.next(new ItemsVirtualizedArgs(itemsAdded, true));\n }\n }\n\n private calculateBasePage(idx: number): void {\n this._pageBase = Math.floor(idx / this.pageSize - this.pagesVirtualized / 2);\n if (this.pageBase < 0) {\n this._pageBase = 0;\n }\n }\n\n /**\n * Calculates the height [px] for the divs before and after the tree list in case of 'grouped' mode!\n */\n private calculateBeforeAndAfterForGroupList(): void {\n const groupItemHeight = this.siTreeViewItemHeightService.groupItemHeight ?? 0;\n const listItemHeight = this.siTreeViewItemHeightService.itemHeight ?? 0;\n\n const scrollHeight =\n this.listItemsCountTotal * listItemHeight + this.groupItemsCountTotal * groupItemHeight;\n\n this._heightBefore =\n this.listItemsCountBefore * listItemHeight + this.groupItemsCountBefore * groupItemHeight;\n\n this._heightAfter =\n scrollHeight -\n this.heightBefore -\n (this.listItemsCountVirtualized * listItemHeight +\n this.groupItemsCountVirtualized * groupItemHeight);\n }\n\n /**\n * Calculates the height [px] for the divs before and after the tree list in case of 'non-grouped' mode!\n */\n private calculateBeforeAndAfter(): void {\n if (\n this.siTreeViewItemHeightService.itemHeight === undefined ||\n this.siTreeViewItemHeightService.itemHeight === 0\n ) {\n return;\n }\n const scrollHeight: number = this.itemsCountTotal * this.siTreeViewItemHeightService.itemHeight;\n\n this._heightBefore =\n this.pageBase * this.pageSize * this.siTreeViewItemHeightService.itemHeight;\n this._heightAfter =\n scrollHeight -\n this.heightBefore -\n this.itemsVirtualizedCount * this.siTreeViewItemHeightService.itemHeight;\n }\n\n private checkIfItemDisplayed(currentItem: TreeItem): boolean {\n for (const item of this._itemsVirtualized) {\n if (item === currentItem) {\n return true;\n }\n }\n return false;\n }\n\n private setBasePageForItemToDisplay(item: TreeItem, itemsAll: TreeItem[]): void {\n for (let i = 0; i < itemsAll.length; i++) {\n if (itemsAll[i] === item) {\n this.calculateBasePage(i);\n this.updateVirtualizedItemListIntern(itemsAll);\n return;\n }\n }\n }\n\n /**\n * Updates the number of grouped items and list items for the whole list for the different areas:\n * - The not virtualized items on top of the list (represented by the 'beforeHeight')\n * - The virtualized items\n * - The not virtualized items on the bottom of the list (represented by the 'afterHeight')\n */\n private updateItemsTypeCount(itemsAll: TreeItem[], scrolledPages?: number): void {\n if (this.siTreeViewService.groupedList) {\n this.updateItemsTypeCountForGroupList(itemsAll, scrolledPages);\n } else {\n this.groupItemsCountBefore = 0;\n this.groupItemsCountVirtualized = 0;\n this.groupItemsCountAfter = 0;\n this.listItemsCountBefore = this.itemBaseIdx;\n this.listItemsCountVirtualized = this.itemsVirtualizedCount;\n this.listItemsCountAfter =\n itemsAll.length - this.listItemsCountBefore - this.listItemsCountVirtualized;\n }\n this.updateItemsTypeCountPerVirtPage();\n\n if (this.itemsCountTotal !== itemsAll.length) {\n console.error(\n 'TreeListVirtualizationService: updateVirtualizedItemList().updateListItemsTypeCount() calculation error!'\n );\n }\n }\n\n /**\n * Updates the number of grouped items and list items per virtualized page.\n */\n private updateItemsTypeCountPerVirtPage(): void {\n this.listItemsPerVirtPage = [];\n this.groupItemsPerVirtPage = [];\n for (let basePgIdx = 0; basePgIdx < this.pagesVirtualized; basePgIdx++) {\n const baseIdx: number = basePgIdx * this.pageSize;\n let groupItemsCount = 0;\n let listItemsCount = 0;\n for (let idx: number = baseIdx; idx < baseIdx + this.pageSize; idx++) {\n if (idx < this.itemsVirtualized.length) {\n const item: TreeItem = this.itemsVirtualized[idx];\n if (this.isGroupItem(item)) {\n groupItemsCount++;\n } else {\n listItemsCount++;\n }\n } else {\n break;\n }\n }\n this.listItemsPerVirtPage.push(listItemsCount);\n this.groupItemsPerVirtPage.push(groupItemsCount);\n }\n }\n\n private calculateVirtPageHeight(index: number): number {\n if (index >= this.groupItemsPerVirtPage.length) {\n return 0;\n }\n\n if (this.siTreeViewService.groupedList) {\n if (this.siTreeViewItemHeightService.itemHeight !== undefined) {\n return (\n this.listItemsPerVirtPage[index] * this.siTreeViewItemHeightService.itemHeight +\n this.groupItemsPerVirtPage[index] *\n (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n );\n } else {\n return (\n this.groupItemsPerVirtPage[index] *\n (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n );\n }\n } else {\n return this.listItemsPerVirtPage[index] * (this.siTreeViewItemHeightService.itemHeight ?? 0);\n }\n }\n\n private updateItemsTypeCountForGroupList(itemsAll: TreeItem[], scrolledPages?: number): void {\n if (scrolledPages !== undefined && scrolledPages !== 0) {\n this.updateItemsTypeCountForGroupListScrolling(itemsAll, scrolledPages);\n } else {\n this.updateListItemsTypeCountForGroupListFull(itemsAll);\n }\n }\n\n private updateItemsTypeCountForGroupListScrolling(\n itemsAll: TreeItem[],\n scrolledPages?: number\n ): void {\n // this method optimizes the update of the type counters in regards of performance in case of scrolling\n // the method considers the difference of the pageBase for the calculation of the counters.\n\n scrolledPages = scrolledPages ?? 0;\n\n const oldBaseIndex: number = (this.pageBase - scrolledPages) * this.pageSize;\n const newBaseIndex: number = this.pageBase * this.pageSize;\n this.groupItemsCountAfter = this.groupItemsCountAfter + this.groupItemsCountVirtualized;\n this.listItemsCountAfter = this.listItemsCountAfter + this.listItemsCountVirtualized;\n this.groupItemsCountVirtualized = 0;\n this.listItemsCountVirtualized = 0;\n if (scrolledPages > 0) {\n for (let idx: number = oldBaseIndex; idx < newBaseIndex; idx++) {\n if (this.isGroupItem(itemsAll[idx])) {\n this.groupItemsCountBefore++;\n this.groupItemsCountAfter--;\n } else {\n this.listItemsCountBefore++;\n this.listItemsCountAfter--;\n }\n }\n } else {\n for (let idx: number = newBaseIndex; idx < oldBaseIndex; idx++) {\n if (this.isGroupItem(itemsAll[idx])) {\n this.groupItemsCountBefore--;\n this.groupItemsCountAfter++;\n } else {\n this.listItemsCountBefore--;\n this.listItemsCountAfter++;\n }\n }\n }\n const upper: number = newBaseIndex + this.itemsVirtualizedCount;\n for (let vi: number = newBaseIndex; vi < upper; vi++) {\n if (this.isGroupItem(itemsAll[vi])) {\n this.groupItemsCountVirtualized++;\n } else {\n this.listItemsCountVirtualized++;\n }\n }\n this.groupItemsCountAfter = this.groupItemsCountAfter - this.groupItemsCountVirtualized;\n this.listItemsCountAfter = this.listItemsCountAfter - this.listItemsCountVirtualized;\n }\n\n private updateListItemsTypeCountForGroupListFull(itemsAll: TreeItem[]): void {\n // does fully update the counters for the whole list.\n\n this.groupItemsCountBefore = 0;\n this.groupItemsCountVirtualized = 0;\n this.groupItemsCountAfter = 0;\n const virtTop: number = this.itemBaseIdx + this.itemsVirtualizedCount;\n for (let i = 0; i < itemsAll.length; i++) {\n if (this.isGroupItem(itemsAll[i])) {\n if (i < this.itemBaseIdx) {\n this.groupItemsCountBefore++;\n } else if (i < virtTop) {\n this.groupItemsCountVirtualized++;\n } else {\n this.groupItemsCountAfter++;\n }\n }\n }\n this.listItemsCountBefore = this.itemBaseIdx - this.groupItemsCountBefore;\n this.listItemsCountVirtualized = this.itemsVirtualizedCount - this.groupItemsCountVirtualized;\n this.listItemsCountAfter =\n itemsAll.length -\n this.listItemsCountBefore -\n this.listItemsCountVirtualized -\n this.groupItemsCountBefore -\n this.groupItemsCountVirtualized -\n this.groupItemsCountAfter;\n }\n\n private isGroupItem(item: TreeItem): boolean {\n return !item.parent && this.siTreeViewService.groupedList;\n }\n\n private handleScrollSimple(scrollTop: number, itemsAll: TreeItem[]): void {\n // Notes:\n // This method is used in case all tree list items are of the same height.\n // This allows for an optimized and proper calculation of the pageBase.\n // pageBase stores the index of the first page which is virtualized.\n\n // totalDeltaScrollVirt corresponds to the total virtualized items height above the visible area\n const totalDeltaScrollVirt: number = scrollTop - this.heightBefore;\n let updateVirtList = false;\n const pageHeight: number = this.pageSize * (this.siTreeViewItemHeightService.itemHeight ?? 0);\n const pageBaseOld: number = this.pageBase;\n\n const pageChangeDownTrigger = 3;\n if (this.scrollTopPrev < scrollTop) {\n // Scroll down:\n // We do keep always between two and three pages virtualized above the view, when scrolling down.\n // => We remove pages from the top only when more than three pages are 'above' the visible view\n // => It is mandatory, that the trigger points are calculated exactly in order to get a nice scrolling behavior for all situations\n if (totalDeltaScrollVirt > pageChangeDownTrigger * pageHeight) {\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeight;\n // Two pages shall remain 'above' the view;\n // It is important that this number is higher than the trigger when scrolling up (which is one page, see the next else statement)\n // Thus we have a hysteresis of one page in order to avoid scrollbar jitters!!\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - (pageChangeDownTrigger - 1);\n updateVirtList = true;\n }\n } else if (this.scrollTopPrev > scrollTop) {\n // scroll up\n if (totalDeltaScrollVirt < pageHeight) {\n // we add pages to the top as soon as only one page (or smaller) is 'above' the visible view\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeight;\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - (pageChangeDownTrigger - 2);\n if (this.pageBase < 0) {\n this._pageBase = 0; // pageBase cannot be lower than 0; if pageBase=0 then we have no pages above the visible view.\n }\n if (this._pageBase !== pageBaseOld) {\n updateVirtList = true;\n }\n }\n }\n\n this.scrollTopPrev = scrollTop;\n if (updateVirtList) {\n this.updateVirtualizedItemListIntern(itemsAll, this.pageBase - pageBaseOld);\n }\n }\n\n private handleScrollGrouped(scrollTop: number, itemsAll: TreeItem[]): void {\n // Notes:\n // This method is used in case the tree list is grouped => the group items have a different height than the other items.\n // This allows for an optimized and averaged calculation of the new pageBase.\n // pageBase stores the index of the first page which is virtualized.\n\n // totalDeltaScrollVirt corresponds to the total virtualized items height above the visible area\n const totalDeltaScrollVirt: number = scrollTop - this.heightBefore;\n const pageHeightFirst3: number =\n this.calculateVirtPageHeight(0) +\n this.calculateVirtPageHeight(1) +\n this.calculateVirtPageHeight(2);\n\n let updateVirtList = false;\n const pageHeightFirst1: number = this.calculateVirtPageHeight(0);\n const pageHeightAvg: number = pageHeightFirst3 / 3;\n const pageBaseOld: number = this.pageBase;\n\n if (this.scrollTopPrev < scrollTop) {\n // Scroll down:\n // We do keep always between two and three pages virtualized above the view, when scrolling down.\n // => We remove pages from the top only when more than three pages are 'above' the visible view.\n // => It is mandatory, that the trigger points are calculated exactly in order to get a nice scrolling behavior for all situations.\n if (totalDeltaScrollVirt > pageHeightFirst3) {\n // Next calculation is averaged. It seems not needed to properly calculate it based on the all the real items.\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeightAvg;\n // Two pages shall remain 'above' the view;\n // It is important that this number is higher than the trigger when scrolling up (which is one page, see next else).\n // Thus we have a hysteresis of one page in order to avoid scrollbar jitters!!\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - 2;\n updateVirtList = true;\n }\n } else if (this.scrollTopPrev > scrollTop) {\n // scroll up\n if (totalDeltaScrollVirt < pageHeightFirst1) {\n // we add pages to the top as soon as only one page (or smaller) is 'above' the visible view\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeightAvg;\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - 1;\n if (this.pageBase < 0) {\n this._pageBase = 0; // pageBase cannot be lower than 0; if pageBase=0 then we have no pages above the visible view.\n }\n if (this._pageBase !== pageBaseOld) {\n updateVirtList = true;\n }\n }\n }\n\n this.scrollTopPrev = scrollTop;\n if (updateVirtList) {\n this.updateVirtualizedItemListIntern(itemsAll, this.pageBase - pageBaseOld);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/*\n * WARNING: Parts of this component are made to be used in conjunction with Bootstrap.\n * Bootstrap is not included with this package and has to be installed separately.\n */\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport {\n AfterViewChecked,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n computed,\n contentChild,\n contentChildren,\n ElementRef,\n inject,\n INJECTOR,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n signal,\n Signal,\n SimpleChanges,\n TemplateRef,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { ElementDimensions, ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { SiTranslatePipe, t, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { asyncScheduler, defer, fromEvent, merge, Observable, Subject, Subscription } from 'rxjs';\nimport { map, withLatestFrom } from 'rxjs/operators';\n\nimport { SiTreeViewConverterService } from './si-tree-view-converter.service';\nimport { SiTreeViewItemHeightService } from './si-tree-view-item-height.service';\nimport { SiTreeViewItemTemplateDirective } from './si-tree-view-item-template.directive';\nimport { SiTreeViewItemComponent } from './si-tree-view-item/si-tree-view-item.component';\nimport { SiTreeViewItemDirective } from './si-tree-view-item/si-tree-view-item.directive';\nimport { SiTreeViewVirtualizationService } from './si-tree-view-virtualization.service';\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n DEFAULT_CHILDREN_INDENTATION,\n DEFAULT_TREE_ICON_SET,\n FolderStateEventArgs,\n ItemsVirtualizedArgs,\n LoadChildrenEventArgs,\n MenuItemsProvider,\n TreeItem,\n TreeViewIconSet\n} from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\nimport {\n addChildItems,\n childrenLoaded,\n collapse,\n enableCheckboxRecursive,\n enableOptionboxRecursive,\n expand,\n hasChildren,\n initializeTreeItemsRecursive,\n removeUndefinedState,\n resetActive,\n ROOT_LEVEL,\n selectItemsBetween,\n selectRecursive,\n setActive,\n setTreeItemDefaults\n} from './si-tree-view.utils';\n\nconst rootDefaults: TreeItem = {\n label: 'root',\n level: ROOT_LEVEL,\n state: 'expanded',\n selectable: false\n};\n\n/**\n * Implements a tree view with the following main capabilities:\n * Showing multiple trees. The data of the trees is set via the input property 'items'.\n * Showing the trees in a flat mode with navigation/breadcrumb on top.\n * A tree/list item is composed of a 'folder' icon, any item icon, the label, two additional datafields and a context menu button.\n * Children of parent nodes are lazy loaded upon request (in case they are not yet available in model.)\n * Context menu support via context menu item: the context menu items can be set via input properties.\n * Multi selection and focus support.\n * Checkboxes and / or option boxes per tree node.\n * Virtualization support: Input properties allow to set the page size and the number of pages to be virtualized.\n * Current limitation is roughly half a million of nodes. This is due to some 'strange' behavior with flex containers.\n * Set the input properties 'pageSize' and 'pagesVirtualized' to a reasonable amount of virtualized items.\n * The number of virtualized items is the product of the pageSize and the pagesVirtualized (number of pages virtualized).\n * Choose a value in the area of 50 virtualized items, dependent on the screen size. Check at runtime if appropriate!\n * Grouped List support: The component does also support grouped lists.\n * See the test client implementation of this package for all functionality.\n */\n@Component({\n selector: 'si-tree-view',\n imports: [SiTranslatePipe, SiTreeViewItemComponent, CdkScrollableModule, SiTreeViewItemDirective],\n templateUrl: './si-tree-view.component.html',\n styleUrl: './si-tree-view.component.scss',\n providers: [\n SiTreeViewConverterService,\n SiTreeViewItemHeightService,\n SiTreeViewService,\n SiTreeViewVirtualizationService\n ],\n host: {\n '(document:keyup.shift)': 'onKeyUpShift()',\n '(document:keyup.control)': 'onKeyUpCtrl()',\n '(document:keyup.meta)': 'onKeyUpMeta()',\n '(document:mouseleave)': 'onMouseLeave()',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class SiTreeViewComponent\n implements OnInit, OnChanges, OnDestroy, AfterViewInit, AfterViewChecked\n{\n /**\n * The context menu items which are bound to the context menu of all tree items,\n * or a menu item provider function that is invoked for each tree item once.\n *\n * @defaultValue []\n */\n readonly contextMenuItems = input<(MenuItemLegacy | MenuItem)[] | MenuItemsProvider>([]);\n /**\n * The indentation in pixel for the children in respect to its parent.\n *\n * @defaultValue DEFAULT_CHILDREN_INDENTATION\n */\n readonly childrenIndentation = input<number>(DEFAULT_CHILDREN_INDENTATION);\n /**\n * Enable horizontal scrolling. When disabled (the default), an ellipsis is used for overflowing text\n *\n * @defaultValue false\n */\n readonly horizontalScrolling = input(false, { transform: booleanAttribute });\n /**\n * Enable the compact mode, making it more vertically compact.\n *\n * @defaultValue false\n */\n readonly compactMode = input(false, { transform: booleanAttribute });\n /**\n * Enable buttons for collapse and expand all.\n * Does not work when `flatTree` is enabled.\n *\n * @defaultValue false\n */\n readonly expandCollapseAll = input(false, { transform: booleanAttribute });\n /**\n * Tooltip text shown for the expand all icon.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TREE_VIEW.EXPAND_ALL:Expand all`)\n * ```\n */\n readonly expandAllTooltip = input(t(() => $localize`:@@SI_TREE_VIEW.EXPAND_ALL:Expand all`));\n /**\n * Tooltip text shown for the collapse all icon.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TREE_VIEW.COLLAPSE_ALL:Collapse all`)\n * ```\n */\n readonly collapseAllTooltip = input(\n t(() => $localize`:@@SI_TREE_VIEW.COLLAPSE_ALL:Collapse all`)\n );\n /**\n * Customize icons for treeview.\n */\n readonly icons = input<TreeViewIconSet>();\n\n /**\n * Number of rows per page. Used for the virtualization of rows (number of\n * rows per page).\n * @defaultValue 10\n * @defaultref {@link SiTreeViewVirtualizationService#pageSize}\n */\n readonly pageSize = input(10, {\n transform: (value: number) => (value < 5 ? 5 : value)\n });\n\n /**\n * Number of pages which are virtualized.\n * @defaultValue 6\n * @defaultref {@link SiTreeViewVirtualizationService#pagesVirtualized}\n */\n readonly pagesVirtualized = input(6, {\n transform: (value: number) => (value < 5 ? 5 : value)\n });\n\n /**\n * Sets if the folder state icon shall be shown on the left (in LTR) or on the right (in LTR) side\n * of the tree item. Per default the icon will be shown on the left (in LTR). Has no\n * effect if flatTree is enabled.\n * @defaultValue true\n */\n readonly folderStateStart = input(true, { transform: booleanAttribute });\n\n /**\n * Sets if the tree list shall virtualize the tree items.\n * This input field must be set at startup and shall not be changed afterwards.\n * @defaultValue true\n */\n readonly isVirtualized = input(true, { transform: booleanAttribute });\n\n /**\n * Sets the root tree items of all the trees (Required).\n * @defaultValue []\n * @defaultref {@link _items}\n */\n readonly items = input<TreeItem[]>([]);\n\n /**\n * Sets the tree item to be selected.\n */\n readonly selectedItem = input<TreeItem | TreeItem[] | undefined>();\n\n /**\n * Sets if the tree shall force single tree item selection.\n * @defaultValue false\n */\n readonly singleSelectMode = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides additional information below the label.\n * @defaultValue false\n */\n readonly enableDataField1 = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides additional information below the label.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#enableDataField2}\n */\n readonly enableDataField2 = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides state pipe.\n * @defaultValue true\n */\n readonly enableStateIndicator = input(true, { transform: booleanAttribute });\n\n /**\n * Shows or hides icon\n * @defaultValue true\n */\n readonly enableIcon = input(true, { transform: booleanAttribute });\n\n /**\n * Shows or hides context menu button and also controls context menu visibility on right click.\n * @defaultValue true\n * @defaultref {@link SiTreeViewService#enableContextMenuButton}\n */\n readonly enableContextMenuButton = input(true, { transform: booleanAttribute });\n\n /**\n * Allows / disabled selecting of tree items by clicking on them.\n * @defaultValue false\n */\n readonly enableSelection = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if children are deleted upon collapsing tree items. This feature might\n * be used, if children shall be lazy loaded always upon expanding a tree\n * item.\n * @defaultValue false\n */\n readonly deleteChildrenOnCollapse = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree view shall be displayed as flat tree list with a\n * breadcrumb. A flat tree only shows the one level at the time and lists the\n * tree items of the current level as a list.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#flatTree}\n */\n readonly flatTree = input(false);\n\n /**\n * Sets if the tree view is displayed as a grouped list.\n * Important: In this mode, only the first two hierarchies of the tree model\n * are considered!\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#groupedList}\n */\n readonly groupedList = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items shall show a checkbox.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#enableCheckbox}\n */\n readonly enableCheckbox = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items shall show an optionbox.\n * @defaultValue false\n */\n readonly enableOptionbox = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items should expand/collapse when clicking on them.\n * Does not work when `flatTree` is enabled or the tree item is not selectable.\n * @defaultValue false\n */\n readonly expandOnClick = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the checkbox state of a tree item is inherited to its children/parent.\n * @defaultValue true\n */\n readonly inheritChecked = input(true, { transform: booleanAttribute });\n\n /**\n * String to be shown when there are no content actions.\n *\n * @defaultValue 'No actions available'\n */\n readonly noActionsString = input('No actions available');\n\n /** Aria label for the tree view. Needed for a11y, alternatively use {@link ariaLabelledBy}. */\n readonly ariaLabel = input<TranslatableString>();\n\n /** Aria labelled by for the tree view. Needed for a11y, alternatively use {@link ariaLabel}. */\n readonly ariaLabelledBy = input<string>();\n\n /**\n * Triggered upon virtualization (or unvirtualization) of a tree item.\n */\n readonly itemsVirtualizedChanged = output<ItemsVirtualizedArgs>();\n /**\n * Triggered upon clicking the folder of a tree item.\n */\n readonly treeItemFolderClicked = output<FolderStateEventArgs>();\n /**\n * Triggered upon a state change of the folder of a tree item.\n */\n readonly treeItemFolderStateChanged = output<FolderStateEventArgs>();\n /**\n * Triggered upon clicking the label of a tree item.\n */\n readonly treeItemClicked = output<TreeItem>();\n /**\n * Triggered upon clicking the checkbox of a tree item.\n */\n readonly treeItemCheckboxClicked = output<CheckboxClickEventArgs>();\n /**\n * Triggered upon the request of loading the children of a tree item.\n */\n readonly loadChildren = output<LoadChildrenEventArgs>();\n /**\n * Triggered upon the selection of a tree item (multi selection supported).\n */\n readonly treeItemsSelected = output<TreeItem[]>();\n\n /**\n * The injected content with included SiTreeViewItemTemplateDirective.\n */\n readonly templates = contentChildren(SiTreeViewItemTemplateDirective);\n\n private initialized = false;\n private updateTreeItemHeightRequired = true; // must be set to true so the height is initially calculated once at least\n private updateGroupItemHeightRequired = true; // must be set to true so the height is initially calculated once at least\n private selectedTreeItems: TreeItem[] = [];\n private manuallySelectedTreeItems = false;\n private latestFolderChanged?: TreeItem;\n private breadCrumbTreeItems: TreeItem[] = [];\n private subscriptions: Subscription[] = [];\n private multiSelectionStart!: TreeItem;\n private _multiSelectionActive = false;\n private domChangeObserver?: MutationObserver;\n private scroll$!: Observable<Event>;\n\n private element = inject(ElementRef);\n private siTreeViewService = inject(SiTreeViewService);\n private siTreeViewConverterService = inject(SiTreeViewConverterService);\n private siTreeViewVirtualizationService = inject(SiTreeViewVirtualizationService);\n private siTreeViewItemHeightService = inject(SiTreeViewItemHeightService);\n private cdRef = inject(ChangeDetectorRef);\n private resizeObserver = inject(ResizeObserverService);\n private injector = inject(INJECTOR);\n /**\n * Create a virtual root node so there is just a single root node. This makes sure the tree\n * can be fully traversed starting from any node. This is needed e.g. for recursively\n * removing the \"active\" state from other nodes.\n */\n private virtualRoot: TreeItem = { ...rootDefaults };\n\n private readonly _items = signal(this.items());\n\n private updateTreeItemDefaults(item: TreeItem): void {\n item.showCheckbox ??= this.enableCheckbox();\n item.showOptionbox ??= this.enableOptionbox();\n }\n\n /**\n * @internal\n */\n readonly computedIcons = computed(() => {\n return {\n ...DEFAULT_TREE_ICON_SET,\n ...this.icons()\n };\n });\n\n /** @internal */\n scrollChildIntoView: Subject<TreeItem> = new Subject<TreeItem>();\n /** @internal */\n childrenLoaded: Subject<TreeItem> = new Subject<TreeItem>();\n /**\n * @internal\n * Used internally by `SiTreeViewItemDirective` to determine if the items have changed,\n * and render the new items.\n */\n evaluateForTreeItemsDiffer = new Subject<void>();\n /** @internal */\n hasAnyChildren = true;\n\n /**\n * Gets the height of the div above the virtualized rows.\n */\n protected get heightBefore(): string {\n return this.siTreeViewVirtualizationService.heightBefore + 'px';\n }\n\n /**\n * Gets the height of the div below the virtualized rows.\n */\n protected get heightAfter(): string {\n return this.siTreeViewVirtualizationService.heightAfter + 'px';\n }\n\n /**\n * @internal\n * This is meant to be used for internal purpose.\n * Returns the virtualized items in the tree list uses virtualization, otherwise all items are returned as a flat list.\n * Bind these to the HTML.\n */\n get itemsVirtualized(): TreeItem[] {\n return this.isVirtualized()\n ? this.siTreeViewVirtualizationService.itemsVirtualized\n : this.siTreeViewConverterService.flattenedTrees;\n }\n\n protected readonly children = viewChildren(SiTreeViewItemComponent);\n\n protected readonly treeItemContentTemplate = contentChild(SiTreeViewItemDirective, {\n read: TemplateRef\n });\n\n private readonly nextItems = contentChildren(SiTreeViewItemComponent, { descendants: true });\n\n private keyManager!: FocusKeyManager<SiTreeViewItemComponent>;\n\n /**\n * @internal\n * Returns index of the currently active Tree Item element in DOM\n * or null if there is no active tree item element\n */\n get activeIndex(): number | null {\n // This method is called before afterViewInit. Everywhere else keymanager can be expected to exist.\n return this.keyManager?.activeItemIndex;\n }\n\n /** Can be used for [cdkDropListData] when using cdk drag and drop. */\n get dropListItems(): TreeItem[] {\n return this.itemsVirtualized;\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Compact mode change the CSS margins so it is necessary to\n // re-calc the tree item height\n if (changes.compactMode || changes.enableDataField1 || changes.enableDataField2) {\n this.updateTreeItemHeightRequired = true;\n }\n\n if (changes.flatTree) {\n this.handleTreeMode();\n }\n\n if (changes.pageSize) {\n this.siTreeViewVirtualizationService.pageSize = this.pageSize();\n this.resetVirtualizedItemList();\n }\n\n if (changes.pagesVirtualized) {\n this.siTreeViewVirtualizationService.pagesVirtualized = this.pagesVirtualized();\n this.resetVirtualizedItemList();\n }\n\n if (changes.enableCheckbox) {\n for (const element of this._items()) {\n enableCheckboxRecursive(element, this.enableCheckbox());\n }\n }\n\n if (changes.enableOptionbox) {\n for (const element of this._items()) {\n enableOptionboxRecursive(element, this.enableOptionbox());\n }\n }\n\n if (changes.groupedList) {\n this.siTreeViewService.groupedList = this.groupedList();\n if (this.groupedList()) {\n this.updateGroupItemHeightRequired = true;\n }\n this.fillFlattenedTree(this._items(), true);\n }\n\n if (changes.items) {\n this.treeItemsUpdated();\n }\n\n if (changes.selectedItem) {\n this.selectTreeItems(this.selectedItem());\n }\n }\n\n ngOnInit(): void {\n this.scroll$ = defer(() => fromEvent(this.treeViewInnerElement().nativeElement, 'scroll'));\n this.siTreeViewService.scroll$ = this.scroll$;\n if (this.isVirtualized()) {\n this.subscriptions.push(this.scroll$.subscribe(event => this.onScroll(event)));\n }\n\n this.subscriptions.push(\n this.siTreeViewService.clickEvent.subscribe(event => this.onItemClicked(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.folderClickEvent.subscribe(event => this.onItemFolderClicked(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.checkboxClickEvent.subscribe(event =>\n this.onItemCheckboxClicked(event)\n )\n );\n this.subscriptions.push(\n this.siTreeViewService.loadChildrenEvent.subscribe(event => this.onLoadChildren(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.scrollIntoViewEvent.subscribe(event => this.onScrollIntoView(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.focusParentEvent.subscribe(event => {\n if (!this.flatTree()) {\n this.focusParentItem(event);\n return;\n }\n this.onFlatTreeNavigateUp();\n })\n );\n this.subscriptions.push(\n this.siTreeViewService.focusFirstChildEvent.subscribe(event =>\n this.focusFirstChildItem(event)\n )\n );\n this.subscriptions.push(\n this.siTreeViewVirtualizationService.itemsVirtualizedChanged.subscribe(\n (event: ItemsVirtualizedArgs) => {\n this.itemsVirtualizedChanged.emit(event);\n this.evaluateForTreeItemsDiffer.next();\n this.cdRef.markForCheck();\n }\n )\n );\n this.initialized = true;\n this.handleTreeMode();\n }\n\n ngAfterViewInit(): void {\n this.addClassObserver();\n this.subscriptions.push(this.monitorTreeSizeChanges().subscribe(d => this.updatePageSize(d)));\n this.keyManager = new FocusKeyManager(this.getChildren(), this.injector)\n .withWrap()\n .withAllowedModifierKeys(['shiftKey'])\n .withHomeAndEnd()\n .withTypeAhead();\n\n queueMicrotask(() => this.keyManager.updateActiveItem(0));\n }\n\n ngAfterViewChecked(): void {\n if (\n this.updateTreeItemHeightRequired &&\n this.siTreeViewConverterService.flattenedTrees.length > 0\n ) {\n const oldHeight = this.siTreeViewItemHeightService.itemHeight;\n let newHeight: number | undefined;\n if (this.isVirtualized()) {\n newHeight = this.siTreeViewItemHeightService.updateItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n this.siTreeViewVirtualizationService.itemBaseIdx,\n this.siTreeViewVirtualizationService.itemsVirtualizedCount\n );\n } else {\n newHeight = this.siTreeViewItemHeightService.updateItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n 0,\n this.siTreeViewConverterService.flattenedTrees.length\n );\n }\n\n if (newHeight !== undefined && newHeight > 0) {\n this.updateTreeItemHeightRequired = false;\n if (oldHeight !== newHeight) {\n const task: () => void = () => {\n this.updateVirtualizedItemList();\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n }\n\n if (\n this.updateGroupItemHeightRequired &&\n this.siTreeViewConverterService.flattenedTrees.length > 0\n ) {\n const oldHeight = this.siTreeViewItemHeightService.groupItemHeight;\n let newHeight: number | undefined;\n if (this.isVirtualized()) {\n newHeight = this.siTreeViewItemHeightService.updateGroupedItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n this.siTreeViewVirtualizationService.itemBaseIdx,\n this.siTreeViewVirtualizationService.itemsVirtualizedCount\n );\n } else {\n newHeight = this.siTreeViewItemHeightService.updateGroupedItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n 0,\n this.siTreeViewConverterService.flattenedTrees.length\n );\n }\n\n if (newHeight !== undefined) {\n this.updateGroupItemHeightRequired = false;\n if (oldHeight !== newHeight) {\n const task: () => void = () => {\n this.updateVirtualizedItemList();\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions\n .filter(subscription => !!subscription)\n .forEach(subscription => subscription.unsubscribe());\n this.domChangeObserver?.disconnect();\n }\n\n /**\n * Returns the last breadcrumb tree item. Can be null in case the flat tree\n * shows the root.\n */\n protected get lastBreadCrumbItem(): TreeItem | null {\n const item = this.breadCrumbTreeItems[this.breadCrumbTreeItems.length - 1];\n return item ? item : null;\n }\n\n /**\n * Returns true if the header shows the root/home of the tree.\n */\n protected get headerShowsRoot(): boolean {\n return this.lastBreadCrumbItem == null;\n }\n\n /**\n * Called by the owner of the tree upon returning the retrieved children of a\n * 'load children' request.\n */\n private childrenLoadingDone(item: TreeItem, children: TreeItem[]): void {\n const oldState = item.state ?? 'collapsed';\n if (item?.state === 'expanding') {\n initializeTreeItemsRecursive(children, item, itemToUpdate =>\n this.updateTreeItemDefaults(itemToUpdate)\n );\n item.children = children;\n item.state = 'expanded';\n }\n const newState = item.state ?? 'collapsed';\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n\n if (this.flatTree()) {\n this.fillFlattenedTree(children);\n this.focusFirstItemFlattened();\n } else {\n this.fillFlattenedTree(this._items());\n }\n if (oldState !== newState) {\n this.treeItemFolderStateChanged.emit(new FolderStateEventArgs(item, oldState, newState));\n }\n this.childrenLoaded.next(item);\n this.cdRef.markForCheck();\n }\n\n protected onFlatTreeNavigateUp(): void {\n if (this.lastBreadCrumbItem) {\n const last = this.lastBreadCrumbItem;\n this.onBreadCrumbItemClicked(last.parent);\n setTimeout(() => this.focusItem(last));\n }\n }\n\n protected onFlatTreeNavigateHome(): void {\n this.onBreadCrumbItemClicked();\n this.focusFirstItemFlattened();\n }\n\n private getChildren(): Signal<readonly SiTreeViewItemComponent[]> {\n return !this.treeItemContentTemplate() ? this.children : this.nextItems;\n }\n\n private focusItem(item: TreeItem): void {\n const children = this.getChildren();\n const component = children()?.find(child => child.treeItem === item);\n if (component) {\n this.keyManager.setActiveItem(component);\n }\n }\n\n private focusParentItem(item: TreeItem): void {\n const parent = item.parent;\n if (parent && parent.level !== ROOT_LEVEL) {\n this.focusItem(parent);\n }\n }\n\n private focusFirstChildItem(item: TreeItem): void {\n const firstChild = item.children?.[0];\n if (firstChild) {\n const children = this.getChildren();\n const firstChildComponent = children()?.find(child => child.treeItem === firstChild);\n if (firstChildComponent) {\n this.keyManager.setActiveItem(firstChildComponent);\n }\n }\n }\n\n /**\n * Updates the tree to visualize the provided tree item by expanding all its parent items, collapsing all\n * other first level tree items and scroll to the provided item.\n * @param item - The tree item that shall be visible.\n */\n showTreeItem(item: TreeItem): void {\n this.doShowTreeItem(item);\n const task: () => void = () => {\n this.scrollChildIntoView.next(item);\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n\n private doShowTreeItem(item: TreeItem, collapseOtherNodes = true): void {\n if (item.parent && item.parent.level !== ROOT_LEVEL) {\n this.expandTreeItem(item.parent);\n if (item.parent.parent && item.parent.parent.level !== ROOT_LEVEL) {\n this.doShowTreeItem(item.parent, collapseOtherNodes);\n } else if (collapseOtherNodes) {\n const myRoot = item.parent;\n for (const root of this._items()) {\n if (myRoot !== root) {\n this.collapseTreeItem(root);\n }\n }\n }\n }\n }\n\n /**\n * Expands all tree items.\n * @param items - Optional param for recursion, will expand these items. If empty, all tree items will be expanded.\n */\n expandAll(items?: TreeItem[]): void {\n (items ?? this._items()).forEach(item => {\n if (hasChildren(item) && childrenLoaded(item)) {\n if (item.state === 'collapsed') {\n this.expandTreeItem(item);\n }\n this.expandAll(item.children);\n }\n });\n }\n\n /**\n * Expands the provided tree item.\n * @param item - The tree item to be expanded.\n */\n expandTreeItem(item: TreeItem): void {\n const oldState = removeUndefinedState(item.state);\n expand(item);\n this.latestFolderChanged = item;\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(item, oldState, removeUndefinedState(item.state))\n );\n }\n\n /**\n * Collapses all tree items.\n * @param items - Optional param for recursion, will collapse these items. If empty, all tree items will be collapsed.\n */\n collapseAll(items?: TreeItem[]): void {\n (items ?? this._items()).forEach(item => {\n if (hasChildren(item)) {\n if (item.state === 'expanded' || item.state === 'expanding') {\n this.collapseTreeItem(item);\n }\n this.collapseAll(item.children);\n }\n });\n this.resetVirtualizedItemList();\n }\n\n /**\n * Collapses the provided tree item.\n * @param item - The tree item to be collapsed.\n */\n collapseTreeItem(item: TreeItem): void {\n const oldState = item.state ?? 'collapsed';\n collapse(item);\n this.latestFolderChanged = item;\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(item, oldState, removeUndefinedState(item.state))\n );\n }\n\n /**\n * Add tree items as root elements or as children of an existing tree item.\n * @param children - Tree items to add.\n * @param parent - Optional parent tree item to which the items shall be added.\n * @param position - Optional position where to insert the tree items among their siblings.\n */\n addChildItems(children: TreeItem[], parent?: TreeItem, position?: number): void {\n addChildItems(parent ?? this.virtualRoot, children, position, item =>\n this.updateTreeItemDefaults(item)\n );\n this.refresh();\n }\n\n /**\n * Forces a refresh of the view considering the current tree item model. Needs\n * to be called when tree items have been added, removed, or updated via model\n * in ways that do not trigger an automatic update of the view.\n */\n refresh(): void {\n if (!this.flatTree()) {\n this.fillFlattenedTree(this._items());\n } else {\n this.fillFlattenedTree(this.evalListItemsForFlatTreeMode());\n }\n this.cdRef.markForCheck();\n }\n\n /**\n * Scrolls the specified tree item into view. Tree items will be expanded if\n * required.\n */\n scrollItemIntoView(treeItem: TreeItem): void {\n this.onScrollIntoViewByConsumer(treeItem);\n }\n\n private evalListItemsForFlatTreeMode(): TreeItem[] {\n return this.lastBreadCrumbItem ? (this.lastBreadCrumbItem.children ?? []) : this._items();\n }\n\n private collapseChildrenFlatTreeModeOnly(items: TreeItem[]): void {\n this.collapseChildren(items, true);\n }\n\n private collapseChildren(items: TreeItem[], flatModeOnly: boolean = false): void {\n if (flatModeOnly && !this.flatTree()) {\n return;\n }\n\n for (const item of items) {\n if (item.state === 'expanded' || item.state === 'expanding') {\n const oldState = item.state;\n collapse(item);\n this.latestFolderChanged = item;\n this.treeItemFolderStateChanged.emit(new FolderStateEventArgs(item, oldState, item.state));\n }\n }\n }\n\n protected onKeyUpShift(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onKeyUpCtrl(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onKeyUpMeta(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onMouseLeave(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n\n private onItemClicked(event: ClickEventArgs): void {\n let skipFocus = false;\n\n if (!event.target.selectable) {\n return;\n }\n\n this.manuallySelectedTreeItems = true;\n\n if (\n (event.mouseEvent.ctrlKey ||\n (navigator.userAgent.includes('Mac') && event.mouseEvent.metaKey)) &&\n !this.singleSelectMode()\n ) {\n this._multiSelectionActive = true;\n this.multiSelectionStart = event.target;\n if (event.target.selected) {\n skipFocus = true;\n }\n event.target.selected = !event.target.selected;\n\n if (event.target.selected && !this.singleSelectMode()) {\n this.selectedTreeItems.push(event.target);\n } else {\n const idx: number = this.selectedTreeItems.indexOf(event.target);\n if (idx !== -1) {\n this.selectedTreeItems.splice(idx, 1);\n }\n }\n } else if (event.mouseEvent.shiftKey && !this.singleSelectMode()) {\n this._multiSelectionActive = true;\n\n // If the anchor has not been established, set it to the first item in the selected\n // items list if defined ELSE the first item in the tree\n if (!this.multiSelectionStart) {\n this.multiSelectionStart = this.selectedTreeItems?.[0] ?? this._items()?.[0];\n }\n\n // If the tree is in flat mode, ensure the anchor is inside the currently selected folder\n if (this.flatTree()) {\n const treeItems: TreeItem[] =\n (event.target.parent ? event.target.parent.children : this._items()) ?? [];\n if (treeItems.findIndex(ti => ti === this.multiSelectionStart) < 0) {\n // Move anchor to top-level item in current folder!\n this.multiSelectionStart = treeItems[0];\n }\n }\n\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n\n this.multiSelectionStart.selected = true;\n const selectedItems = selectItemsBetween(\n this._items(),\n this.multiSelectionStart,\n event.target\n );\n this.selectedTreeItems = [this.multiSelectionStart];\n\n if (selectedItems) {\n this.selectedTreeItems.push(...selectedItems);\n }\n } else {\n this.multiSelectionStart = event.target;\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n event.target.selected = true;\n this.selectedTreeItems = [event.target];\n }\n\n for (const element of this._items()) {\n resetActive(element);\n }\n\n if (!skipFocus) {\n setActive(event.target, true);\n }\n\n this.treeItemClicked.emit(event.target);\n if (!this._multiSelectionActive) {\n this.emitSelectedItems();\n // Note, if multi selection would be active, we would emit the selected items only upon 'keyup' event for Shift and Control\n // and upon document.mouseleave event\n }\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n }\n\n private emitSelectedItems(): void {\n if (this.enableSelection()) {\n if (this.siTreeViewService.groupedList) {\n const filtered: TreeItem[] = this.selectedTreeItems.filter(\n item => !this.siTreeViewService.isGroupedItem(item)\n );\n this.treeItemsSelected.emit(filtered);\n } else {\n this.treeItemsSelected.emit(this.selectedTreeItems);\n }\n }\n }\n\n private handleTreeMode(): void {\n let ti: TreeItem | undefined;\n\n if (this.isVirtualized()) {\n ti = this.siTreeViewVirtualizationService.calculateFirstVisibleTreeItem();\n }\n\n if (this.flatTree()) {\n this.siTreeViewService.childrenIndentation = 0;\n\n if (this.selectedTreeItems.length && this.manuallySelectedTreeItems) {\n // manually selected items => display the (children of) parent of the (highest or first) selected item,\n // if there is no parent display the root node\n const sorted = this.selectedTreeItems.sort(\n (itemA, itemB) => (itemA.level ?? 0) - (itemB.level ?? 0)\n );\n this.fillFlattenedTree(sorted[0].parent?.children ?? this._items(), true);\n } else if (!this.latestFolderChanged) {\n // no folder state change of any tree item so far => display the root item in the list\n this.fillFlattenedTree(this._items(), true);\n } else if (this.latestFolderChanged.state === 'expanded') {\n this.fillFlattenedTree(this.latestFolderChanged.children ?? [], true);\n } else if (this.latestFolderChanged.parent) {\n this.fillFlattenedTree(this.latestFolderChanged.parent?.children ?? [], true);\n } else {\n this.fillFlattenedTree(this._items(), true);\n }\n\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n if (ti && !this.siTreeViewConverterService.flattenedTrees.includes(ti, 0)) {\n ti = this.siTreeViewConverterService.flattenedTrees[0];\n }\n } else {\n this.siTreeViewService.childrenIndentation = this.childrenIndentation();\n this.fillFlattenedTree(this._items(), true);\n }\n\n this.onScrollIntoViewByConsumer(ti);\n }\n\n private evalLowestBreadCrumbNode(): TreeItem | undefined {\n if (this.latestFolderChanged) {\n return this.latestFolderChanged.state === 'expanded'\n ? this.latestFolderChanged\n : this.latestFolderChanged.parent;\n }\n return undefined;\n }\n\n protected readonly treeViewInnerElement =\n viewChild.required<ElementRef<HTMLDivElement>>('treeViewInner');\n\n private onItemFolderClicked(eventArgs: FolderStateEventArgs): void {\n this.treeItemFolderClicked.emit(eventArgs);\n this.treeItemFolderStateChanged.emit(eventArgs);\n this.latestFolderChanged = eventArgs.treeItem;\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n\n if (!this.flatTree()) {\n this.fillFlattenedTree(this._items());\n } else if (this.latestFolderChanged.state === 'expanded') {\n this.fillFlattenedTree(this.latestFolderChanged.children ?? []);\n this.focusFirstItemFlattened();\n }\n }\n\n private updateBreadCrumb(treeItem?: TreeItem): void {\n if (!treeItem || treeItem.level === ROOT_LEVEL) {\n this.breadCrumbTreeItems = [];\n } else {\n this.breadCrumbTreeItems = [treeItem];\n this.pushParentItemsIntoBreadCrumbRecursive(treeItem);\n this.breadCrumbTreeItems = this.breadCrumbTreeItems.reverse();\n }\n }\n\n private pushParentItemsIntoBreadCrumbRecursive(treeItem: TreeItem): void {\n if (treeItem?.parent && treeItem?.parent?.level !== ROOT_LEVEL) {\n this.breadCrumbTreeItems.push(treeItem.parent);\n this.pushParentItemsIntoBreadCrumbRecursive(treeItem.parent);\n }\n }\n\n private onItemCheckboxClicked(eventArgs: CheckboxClickEventArgs): void {\n this.siTreeViewService.triggerMarkForCheck.next();\n this.treeItemCheckboxClicked.emit(eventArgs);\n }\n\n private onLoadChildren(treeItem: TreeItem): void {\n this.loadChildren.emit(\n new LoadChildrenEventArgs(treeItem, (item, children) =>\n this.childrenLoadingDone(item, children)\n )\n );\n }\n\n private setFlatTreeSelectedFolder(treeItem?: TreeItem): void {\n if (this.flatTree()) {\n this.latestFolderChanged = treeItem;\n if (treeItem) {\n expand(treeItem);\n }\n this.onBreadCrumbItemClicked(treeItem);\n }\n }\n\n private onBreadCrumbItemClicked(treeItem?: TreeItem): void {\n if (treeItem && treeItem.level !== ROOT_LEVEL) {\n this.fillFlattenedTree(treeItem.children ?? [], true);\n this.focusFirstItemFlattened();\n } else {\n this.fillFlattenedTree(this._items(), true);\n this.focusFirstItemFlattened();\n }\n this.updateBreadCrumb(treeItem);\n }\n\n private onScroll(event: Event): void {\n if (this.isVirtualized()) {\n const scrollTop: number = (event.target as Element).scrollTop;\n this.siTreeViewVirtualizationService.handleScroll(\n scrollTop,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n }\n\n /**\n * Called by the consumer when he wants a node to be scrolled into view.\n */\n private onScrollIntoViewByConsumer(treeItem: TreeItem | undefined): void {\n if (treeItem) {\n if (this.isVirtualized()) {\n this.siTreeViewVirtualizationService.virtualizeItem(\n treeItem,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n // wait one cycle until the new children (in case of page virtualization) are created\n const task: () => void = () => {\n this.doShowTreeItem(treeItem, false); // keep previously opened nodes as it is\n asyncScheduler.schedule(() => {\n this.scrollChildIntoView.next(treeItem);\n this.cdRef.markForCheck();\n }, 0);\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n\n private onScrollIntoView(elementTreeItem: ElementRef): void {\n const clientRectNode = elementTreeItem.nativeElement.getBoundingClientRect();\n const clientRect = this.element.nativeElement.getBoundingClientRect();\n if (\n clientRectNode.top < clientRect.top ||\n clientRectNode.top + this.siTreeViewItemHeightService.itemHeight > clientRect.bottom\n ) {\n elementTreeItem.nativeElement.scrollIntoView();\n }\n this.cdRef.markForCheck();\n }\n\n private fillFlattenedTree(items: TreeItem[], resetVirtualization: boolean = false): void {\n this.collapseChildrenFlatTreeModeOnly(items);\n this.siTreeViewConverterService.fillFlattenedTree(items, this.flatTree());\n if (resetVirtualization) {\n this.resetVirtualizedItemList();\n } else {\n this.updateVirtualizedItemList();\n }\n this.evaluateForTreeItemsDiffer.next();\n }\n\n private focusFirstItemFlattened(): void {\n setTimeout(() => this.keyManager.setFirstItemActive());\n }\n\n private updateHasChildren(): void {\n this.hasAnyChildren = !!this.siTreeViewConverterService.flattenedTrees?.some(item =>\n hasChildren(item)\n );\n }\n\n protected updateVirtualizedItemList(): void {\n this.updateHasChildren();\n if (this.isVirtualized() && this.initialized) {\n this.siTreeViewVirtualizationService.updateVirtualizedItemList(\n this.siTreeViewConverterService.flattenedTrees\n );\n this.cdRef.markForCheck();\n }\n }\n\n private resetVirtualizedItemList(): void {\n this.updateHasChildren();\n if (this.isVirtualized() && this.initialized) {\n this.siTreeViewVirtualizationService.resetVirtualizedItemList(\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n }\n\n /**\n * Track class changes since adding classes like `.tree-sm` or `.tree-xs` change the item height.\n * Changes have to trigger the SiTreeViewItemHeightService otherwise the virtualized items are\n * calculated incorrectly which cause rendering issues.\n */\n private addClassObserver(): void {\n this.domChangeObserver = new MutationObserver((mutations: MutationRecord[]) => {\n mutations.forEach((mutation: MutationRecord) => {\n this.updateTreeItemHeightRequired = true;\n if (this.groupedList()) {\n this.updateGroupItemHeightRequired = true;\n }\n\n this.cdRef.markForCheck();\n });\n });\n\n this.domChangeObserver.observe(this.element.nativeElement, {\n attributeFilter: ['class', 'style']\n });\n }\n\n /**\n * Create an observable to track visible dimensions and item height of the tree view.\n * It's necessary to dynamically increase the `pageSize` to render the correct amount\n * of visible tree items.\n * @returns observable with the current tree dimensions.\n */\n private monitorTreeSizeChanges(): Observable<ElementDimensions> {\n const resize = this.resizeObserver.observe(this.element.nativeElement, 100, true, true);\n const merged = merge(resize, this.siTreeViewItemHeightService.itemHeightChange);\n return merged.pipe(\n withLatestFrom(resize),\n map(x => x[1])\n );\n }\n\n /**\n * Dynamically calculate and update the virtual pageSize to render the correct amount of tree items.\n * @param dimension - current tree dimensions.\n */\n private updatePageSize(dimension: ElementDimensions): void {\n if (this.isVirtualized()) {\n // Re-calc number of virtualized items based on the visible component dimensions\n const itemHeight = this.siTreeViewItemHeightService.itemHeight;\n // Proceeding with itemHeight==0 leads to an error in\n // SiTreeViewVirtualizationService.updateListItemsTypeCount. It happens\n // when the component is created but not yet visible.\n if (!itemHeight) {\n return;\n }\n // Set page size to half the no. of items visible on the screen following\n // the recommendations in SiTreeViewVirtualizationService.\n const pageSize = Math.floor(dimension.height / itemHeight / 2);\n // Once the pageSize is initialized we are only allowed to increase\n // the number of virtualized items but do never reduce the size.\n // Since this would lead to a incorrect calculation of heightAfter\n // (see calculateBeforeAndAfter)\n if (pageSize > 0 && pageSize > this.siTreeViewVirtualizationService.pageSize) {\n this.siTreeViewVirtualizationService.pageSize = pageSize;\n }\n }\n }\n\n /**\n * Make sure to always have a single item for single selection or if there is only one item in the array.\n */\n private coerceToSelectionType(\n treeItem: TreeItem[] | TreeItem | undefined\n ): TreeItem[] | TreeItem | undefined {\n if (Array.isArray(treeItem) && (treeItem.length <= 1 || this.singleSelectMode())) {\n // If array is empty, this will set it to undefined\n return treeItem[0];\n }\n return treeItem;\n }\n\n private treeItemsUpdated(): void {\n this.selectedTreeItems = [];\n const items = this.items();\n this._items.set(items);\n this.virtualRoot = { ...rootDefaults, children: items };\n setTreeItemDefaults(this.virtualRoot, item => this.updateTreeItemDefaults(item));\n initializeTreeItemsRecursive(items, this.virtualRoot, item =>\n this.updateTreeItemDefaults(item)\n );\n this.fillFlattenedTree(items, true);\n this.latestFolderChanged = items[0];\n }\n\n private selectTreeItems(treeItem: TreeItem | TreeItem[] | undefined): void {\n const items = this.coerceToSelectionType(treeItem);\n const isMultipleTreeItems = Array.isArray(items);\n if (\n (isMultipleTreeItems && items.length) ||\n (!isMultipleTreeItems && items) ||\n this.selectedTreeItems.length\n ) {\n this.manuallySelectedTreeItems = false;\n }\n if (!isMultipleTreeItems && items && !items.selectable) {\n return;\n }\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n this.selectedTreeItems = [];\n if (!items) {\n this.siTreeViewService.triggerMarkForCheck.next();\n return;\n }\n // If this is single select or multi select with only one item\n if (!isMultipleTreeItems) {\n items.selected = true;\n this.selectedTreeItems.push(items);\n this.setFlatTreeSelectedFolder(items.parent);\n\n if (this.isVirtualized()) {\n this.siTreeViewVirtualizationService.virtualizeItem(\n items,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n // wait one cycle until the new children (in case of page virtualization) are created\n const task: () => void = () => {\n this.scrollChildIntoView.next(items);\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n };\n asyncScheduler.schedule(task, 0);\n } else {\n // Multi select with multiple items\n const task: () => void = () => {\n for (const item of items) {\n if (item.selectable === false) {\n continue;\n }\n item.selected = true;\n this.selectedTreeItems.push(item);\n }\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n}\n","@if (!flatTree() && expandCollapseAll()) {\n <div class=\"si-tree-view-expand-collapse-container p-4\">\n <button\n class=\"btn btn-icon btn-tertiary element-expand-all\"\n type=\"button\"\n [title]=\"expandAllTooltip() | translate\"\n [attr.aria-label]=\"expandAllTooltip() | translate\"\n (click)=\"expandAll()\"\n >\n </button>\n <button\n class=\"btn btn-icon btn-tertiary ms-4 element-collapse-all\"\n type=\"button\"\n [title]=\"collapseAllTooltip() | translate\"\n [attr.aria-label]=\"collapseAllTooltip() | translate\"\n (click)=\"collapseAll()\"\n >\n </button>\n </div>\n}\n@if (flatTree()) {\n <div class=\"si-tree-view-header\">\n <span\n class=\"si-tree-view-header-btn si-tree-view-header-root\"\n tabindex=\"0\"\n [class]=\"computedIcons().headerHome\"\n [class.disabled]=\"headerShowsRoot\"\n (click)=\"onFlatTreeNavigateHome()\"\n (keydown.enter)=\"onFlatTreeNavigateHome()\"\n ></span>\n @if (lastBreadCrumbItem) {\n <span\n class=\"si-tree-view-header-btn\"\n tabindex=\"0\"\n [class]=\"computedIcons().headerArrow\"\n [class.disabled]=\"headerShowsRoot\"\n (click)=\"onFlatTreeNavigateUp()\"\n (keydown.enter)=\"onFlatTreeNavigateUp()\"\n ></span>\n <span class=\"text-center text-truncate\">{{ lastBreadCrumbItem.label | translate }}</span>\n }\n </div>\n}\n<div\n #treeViewInner\n cdkScrollable\n class=\"si-tree-view focus-inside\"\n role=\"tree\"\n [attr.aria-multiselectable]=\"!singleSelectMode()\"\n [attr.aria-label]=\"ariaLabel() ? (ariaLabel() | translate) : undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [class.si-tree-horizontal-scroll]=\"horizontalScrolling()\"\n [class.si-tree-view-flat]=\"flatTree()\"\n [class.si-tree-expand-collapse]=\"!flatTree() && expandCollapseAll()\"\n>\n @if (isVirtualized()) {\n <div [class.w-100]=\"horizontalScrolling()\" [style.height]=\"heightBefore\"></div>\n }\n @if (itemsVirtualized) {\n <div class=\"si-tree-view-root-ul\">\n <ng-content select=\"[cdkDropList], [siTreeViewItem]\" />\n @if (!treeItemContentTemplate()) {\n <si-tree-view-item *siTreeViewItem=\"let index = index; let treeItem = treeItem\" />\n }\n </div>\n }\n @if (isVirtualized()) {\n <div [class.w-100]=\"horizontalScrolling()\" [style.height]=\"heightAfter\"></div>\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTreeViewItemTemplateDirective } from './si-tree-view-item-template.directive';\nimport { SiTreeViewItemComponent } from './si-tree-view-item/si-tree-view-item.component';\nimport { SiTreeViewItemDirective } from './si-tree-view-item/si-tree-view-item.directive';\nimport { SiTreeViewComponent } from './si-tree-view.component';\n\n@NgModule({\n imports: [\n SiTreeViewComponent,\n SiTreeViewItemComponent,\n SiTreeViewItemDirective,\n SiTreeViewItemTemplateDirective\n ],\n exports: [\n SiTreeViewComponent,\n SiTreeViewItemComponent,\n SiTreeViewItemDirective,\n SiTreeViewItemTemplateDirective\n ]\n})\nexport class SiTreeViewModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport type { CdkDragDrop } from '@angular/cdk/drag-drop';\n\nimport type { TreeItem } from './si-tree-view.model';\n\n/**\n *\n * @param treeItems - TreeItem array which is used with the si-tree-view.\n * @param event - event object which is emitted by cdkDropListDropped.\n * @returns reordered TreeItems list.\n */\nexport const reorderTreeItem = (treeItems: TreeItem[], event: CdkDragDrop<any>): TreeItem[] => {\n if (event.currentIndex === event.previousIndex) {\n return treeItems;\n }\n const targetIndex =\n event.currentIndex < event.previousIndex ? event.currentIndex - 1 : event.currentIndex;\n modifyTreeStructure(treeItems, event, treeItems, targetIndex);\n return treeItems;\n};\n\n/**\n *\n * @param sourceTreeItems - TreeItem array of the source tree from where item is being dragged.\n * @param targetTreeItems - TreeItem array of the target tree where item is being dropped.\n * @param event - event object which is emitted by cdkDropListDropped.\n * @param removeFromSource - whether to remove item from its source tree after moving to target.\n * @returns modified TreeItems list of source and target trees.\n */\nexport const transferTreeItem = (\n sourceTreeItems: TreeItem[],\n targetTreeItems: TreeItem[],\n event: CdkDragDrop<TreeItem[]>,\n removeFromSource: boolean = false\n): {\n sourceTree: TreeItem[];\n targetTree: TreeItem[];\n} => {\n modifyTreeStructure(\n sourceTreeItems,\n event,\n targetTreeItems,\n event.currentIndex - 1,\n removeFromSource\n );\n return {\n sourceTree: sourceTreeItems,\n targetTree: targetTreeItems\n };\n};\n\n/**\n *\n * @param sourceTree - TreeItems array from where item needs to be removed.\n * @param itemToRemove - TreeItem which needs to be removed.\n * @returns Updated TreeItems array.\n */\nexport const removeItemFromTree = (sourceTree: TreeItem[], itemToRemove: TreeItem): TreeItem[] => {\n const sourceItem = findTreeItem(sourceTree, itemToRemove);\n const itemParent = sourceItem?.parent;\n if (!itemParent) {\n console.error('Item parent not found.');\n return sourceTree;\n }\n if (itemParent.children) {\n const itemIndex = itemParent.children.indexOf(itemToRemove);\n itemParent.children?.splice(itemIndex, 1);\n }\n return sourceTree;\n};\n\nconst findTreeItem = <T extends TreeItem>(array: T[], targetItem: T): T | null => {\n for (const obj of array) {\n // Check if the current item reference is the same as the target object reference\n if (obj === targetItem) {\n return obj; // Found the item, return it\n }\n // If the current item has nested children, recursively search within them\n const key = 'children';\n if (Array.isArray(obj[key])) {\n const found = findTreeItem(obj[key] as T[], targetItem);\n if (found) return found; // If found in nested array, return it\n }\n }\n return null; // Object not found\n};\n\nconst modifyTreeStructure = (\n sourceItems: TreeItem[],\n event: CdkDragDrop<TreeItem[]>,\n targetItems: TreeItem[],\n targetIndex: number,\n removeFromSource = true\n): void => {\n const sourceTreeItem = findTreeItem(\n sourceItems,\n event.previousContainer.data[event.previousIndex]\n );\n\n if (!sourceTreeItem) {\n console.error('Source tree item not found');\n return;\n }\n\n const sourceTreeItemCopy = structuredClone(sourceTreeItem);\n\n const targetTreeItem = findTreeItem<TreeItem>(\n targetItems,\n event.container.data[targetIndex < 0 ? 0 : targetIndex]\n );\n\n if (!targetTreeItem) {\n console.error('Target tree item not found');\n return;\n }\n\n if (findTreeItem(sourceTreeItem.children!, targetTreeItem)) {\n console.error('Cannot move parent into its own child');\n return;\n }\n\n const targetItemParent = targetTreeItem?.parent;\n if (targetIndex < 0) {\n sourceTreeItemCopy.parent = targetItemParent;\n sourceTreeItemCopy.level = targetItemParent?.level ? targetItemParent.level + 1 : 0;\n targetItemParent?.children?.splice(0, 0, sourceTreeItemCopy);\n } else if (targetTreeItem?.state === 'expanded') {\n sourceTreeItemCopy.parent = targetTreeItem;\n sourceTreeItemCopy.level = targetTreeItem.level ? targetTreeItem.level + 1 : 0;\n if (targetTreeItem.children?.length) {\n targetTreeItem.children = [sourceTreeItemCopy, ...targetTreeItem.children];\n } else {\n targetTreeItem.children = [sourceTreeItemCopy];\n }\n } else {\n if (targetItemParent) {\n const targetItemIndex = targetItemParent.children?.indexOf(targetTreeItem) ?? -1;\n sourceTreeItemCopy.parent = targetItemParent;\n sourceTreeItemCopy.level = targetItemParent.level ? targetItemParent.level + 1 : 0;\n targetItemParent?.children?.splice(targetItemIndex + 1, 0, sourceTreeItemCopy);\n }\n }\n const sourceTreeItemParent = sourceTreeItem.parent;\n if (removeFromSource && sourceTreeItemParent) {\n const sourceItemIndex = sourceTreeItemParent.children?.indexOf(sourceTreeItem) ?? -1;\n sourceTreeItemParent?.children?.splice(sourceItemIndex, 1);\n }\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-tree-view-item-template.directive';\nexport * from './si-tree-view-item/si-tree-view-item.component';\nexport * from './si-tree-view.component';\nexport * from './si-tree-view.module';\nexport * from './si-tree-view.model';\nexport * from './si-tree-view.utils';\nexport * from './si-tree-view-item/si-tree-view-item.directive';\nexport * from './drag-drop.util';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;AAGG;AAKH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;MAIU,+BAA+B,CAAA;;IAEjC,IAAI,GAAG,KAAK,CAAqB,SAAS,iDAAI,KAAK,EAAE,wBAAwB,EAAA,CAAG;;AAEzF,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAgB,EAAC;AAEnC,IAAA,OAAO,sBAAsB,CAC3B,GAAoC,EACpC,GAAQ,EAAA;AAER,QAAA,OAAO,IAAI;IACb;uGAXW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA/B,+BA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F,YAAA,kBAAkB,CAAC,MAAM,GAAG,gBAAgB;AAC5C,YAAA,kBAAkB,CAAC,KAAK,GAAG,gBAAgB,CAAC,KAAK,GAAG,gBAAgB,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC;AAClF,YAAA,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC,EAAE,kBAAkB,CAAC;QAChF;IACF;AACA,IAAA,MAAM,oBAAoB,GAAG,cAAc,CAAC,MAAM;AAClD,IAAA,IAAI,gBAAgB,IAAI,oBAAoB,EAAE;AAC5C,QAAA,MAAM,eAAe,GAAG,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACpF,oBAAoB,EAAE,QAAQ,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;IAC5D;AACF,CAAC;;ACtJD;;;AAGG;;ACHH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"siemens-element-ng-tree-view.mjs","sources":["../../../../projects/element-ng/tree-view/si-tree-view-item-template.directive.ts","../../../../projects/element-ng/tree-view/si-tree-view-item-context.ts","../../../../projects/element-ng/tree-view/si-tree-view.model.ts","../../../../projects/element-ng/tree-view/si-tree-view.utils.ts","../../../../projects/element-ng/tree-view/si-tree-view.service.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.component.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.component.html","../../../../projects/element-ng/tree-view/si-tree-view-converter.service.ts","../../../../projects/element-ng/tree-view/si-tree-view-item-height.service.ts","../../../../projects/element-ng/tree-view/si-tree-view.token.ts","../../../../projects/element-ng/tree-view/si-tree-view-item/si-tree-view-item.directive.ts","../../../../projects/element-ng/tree-view/si-tree-view-virtualization.service.ts","../../../../projects/element-ng/tree-view/si-tree-view.component.ts","../../../../projects/element-ng/tree-view/si-tree-view.component.html","../../../../projects/element-ng/tree-view/si-tree-view.module.ts","../../../../projects/element-ng/tree-view/drag-drop.util.ts","../../../../projects/element-ng/tree-view/index.ts","../../../../projects/element-ng/tree-view/siemens-element-ng-tree-view.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject, input, TemplateRef } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\n\n/**\n * Tree view item template directive for defining custom item templates.\n *\n * @deprecated Use `siTreeViewItem` instead.\n *\n * This directive is deprecated and will be removed in a future version.\n *\n * @example\n * Migration Guide:\n *\n * Before (deprecated):\n * ```html\n * <si-tree-view>\n * <ng-template siTreeViewItemTemplate=\"root\" let-item>\n * <div class=\"custom-item\">Root {{ item.level }}</div>\n * </ng-template>\n * <ng-template siTreeViewItemTemplate=\"child\" let-item>\n * <div class=\"custom-item\">Child {{ item.level }}</div>\n * </ng-template>\n * </si-tree-view>\n * ```\n *\n * After (recommended):\n * ```html\n * <si-tree-view>\n * <ng-template siTreeViewItem let-item=\"treeItem\">\n * <si-tree-view-item>\n * <div class=\"custom-item\">\n * @if (item.level === 0) {\n * Root {{ item.level }}\n * } @else {\n * Child {{ item.level }}\n * }\n * </div>\n * </si-tree-view-item>\n * </ng-template>\n * </si-tree-view>\n * ```\n */\n@Directive({\n selector: '[siTreeViewItemTemplate]'\n})\nexport class SiTreeViewItemTemplateDirective {\n /** @defaultValue undefined */\n readonly name = input<string | undefined>(undefined, { alias: 'siTreeViewItemTemplate' });\n /** @internal */\n template = inject(TemplateRef<any>);\n\n static ngTemplateContextGuard(\n dir: SiTreeViewItemTemplateDirective,\n ctx: any\n ): ctx is { $implicit: TreeItem } {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken, IterableChangeRecord } from '@angular/core';\n\nimport type { SiTreeViewComponent } from './si-tree-view.component';\nimport type { TreeItem } from './si-tree-view.model';\n\nexport const TREE_ITEM_CONTEXT = new InjectionToken<{\n record: IterableChangeRecord<TreeItem<any>>;\n parent: SiTreeViewComponent;\n}>('TREE_ITEM_CONTEXT');\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { Observable } from 'rxjs';\n\nimport type { SiTreeViewComponent } from './si-tree-view.component';\n\n/**\n * The folder state of a tree item.\n */\nexport type TreeItemFolderState = 'collapsed' | 'expanding' | 'expanded' | 'leaf';\n\n/**\n * The check box state of a tree item.\n */\nexport type CheckboxState = 'unchecked' | 'checked' | 'indeterminate';\n\nexport type MenuItemsProvider = (\n item: TreeItem\n) => (MenuItemLegacy | MenuItem)[] | Observable<(MenuItemLegacy | MenuItem)[]> | null;\n\n/**\n * Defines the data for a tree item. All properties are optional.\n */\nexport interface TreeItem<T = any> {\n /**\n * Indicates if the item is active, the last clicked item is active always; only one item can be active.\n */\n active?: boolean;\n\n /**\n * Defines the content of the optional badge. Should be a number or something like \"100+\".\n * If undefined or empty string, no badge is displayed.\n */\n badge?: string | number;\n\n /**\n * Defines the background color of the badge. Use the status color names as\n * inputs.\n * @see https://element.siemens.io/components/status-notifications/badges/\n */\n badgeColor?: string;\n\n /**\n * The state of the checkbox/optionbox.\n */\n checked?: CheckboxState;\n\n /**\n * The child tree items.\n */\n children?: TreeItem<T>[];\n\n /**\n * Any custom data that can be used in custom templates. Not shown by default.\n */\n customData?: T;\n\n /**\n * The text shown for the tree item data field 1.\n */\n dataField1?: TranslatableString;\n\n /**\n * The text shown for the tree item data field 2.\n */\n dataField2?: TranslatableString;\n\n /**\n * The hierarchy level of the node. This will be auto-calculated by the tree view control.\n */\n level?: number;\n\n /**\n * The web font icon class name (e.g. element-building). The icon is shown on the left (in LTR) side of the label.\n */\n icon?: string;\n\n /**\n * The text shown for the tree item label (header).\n */\n label?: TranslatableString;\n\n /**\n * The parent tree item. This will be automatically set by the tree view control.\n */\n parent?: TreeItem<T>;\n\n /**\n * Indicates if the tree item is selectable or not.\n */\n selectable?: boolean;\n\n /**\n * If the item is selected (note that the tree view component supports single and multi-selection).\n */\n selected?: boolean;\n\n /**\n * If the tree item shall show a checkbox.\n */\n showCheckbox?: boolean;\n\n /**\n * If the tree item shall show an optionbox.\n */\n showOptionbox?: boolean;\n\n /**\n * The folder state of the tree item.\n */\n state?: TreeItemFolderState;\n\n /**\n * The color of the state pipe; formatted as CSS value ('red' or '#FF0000' or 'rgb(255, 0, 0)').\n */\n stateIndicatorColor?: string;\n\n /**\n * The name of the template to apply.\n */\n templateName?: string;\n}\n\nexport interface TreeViewIconSet {\n headerHome: string;\n headerArrow: string;\n itemMenu: string;\n itemCollapsed: string;\n itemCollapsedFlat: string;\n itemCollapsedLeft: string;\n itemExpanded: string;\n itemExpandedFlat: string;\n itemExpandedLeft: string;\n}\n\nexport class FolderStateEventArgs {\n constructor(\n public treeItem: TreeItem,\n public oldState: TreeItemFolderState,\n public newState: TreeItemFolderState\n ) {}\n}\n\nexport class CheckboxClickEventArgs {\n public constructor(\n public target: TreeItem,\n public oldState: CheckboxState,\n public newState: CheckboxState\n ) {}\n}\n\nexport class ClickEventArgs {\n public constructor(\n public target: TreeItem,\n public mouseEvent: MouseEvent | KeyboardEvent\n ) {}\n}\n\nexport class LoadChildrenEventArgs {\n public constructor(\n public treeItem: TreeItem,\n public callback: (treeItem: TreeItem, children: TreeItem[]) => void\n ) {}\n}\n\nexport class ItemsVirtualizedArgs {\n public constructor(\n public treeItems: TreeItem[],\n public virtualized: boolean\n ) {}\n}\n\nexport const DEFAULT_TREE_ICON_SET: TreeViewIconSet = {\n headerHome: 'element-home',\n headerArrow: 'element-left-2 flip-rtl',\n itemMenu: 'element-options-vertical',\n itemCollapsed: 'element-down-2',\n itemCollapsedFlat: 'element-right-2 flip-rtl',\n itemCollapsedLeft: 'element-right-2 flip-rtl',\n itemExpanded: 'element-up-2',\n itemExpandedFlat: 'element-down-3',\n itemExpandedLeft: 'element-down-2'\n};\n\nexport const DEFAULT_CHILDREN_INDENTATION = 14;\n\nexport type TreeItemContext = {\n treeItem: TreeItem;\n index: number;\n parent: SiTreeViewComponent;\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport type { CheckboxState, TreeItem, TreeItemFolderState } from './si-tree-view.model';\n\ninterface InBetweenState {\n startIsFirst: boolean;\n inBetween: boolean;\n done: boolean;\n}\n\nexport const ROOT_LEVEL = -1;\n\nexport const childrenLoaded = (item: TreeItem): boolean => (item.children?.length ?? 0) > 0;\n\nexport const hasChildren = (item: TreeItem): boolean => item.state !== 'leaf';\n\nexport const removeUndefinedState = (state?: TreeItemFolderState): TreeItemFolderState =>\n state ?? 'collapsed';\n\n/**\n * Collapses the tree item except for leaf items.\n */\nexport const collapse = (item: TreeItem): void => {\n if (item?.state !== 'leaf') {\n item.state = 'collapsed';\n }\n};\n\n/**\n * Expands the tree item except for leaf items.\n */\nexport const expand = (item: TreeItem): void => {\n if (item?.state !== 'leaf') {\n item.state = 'expanded';\n }\n};\n\nexport const expandRecursive = (item: TreeItem): void => {\n if (item.parent) {\n expand(item.parent);\n expandRecursive(item.parent);\n }\n};\n\nexport const boxClicked = (treeItem: TreeItem, inheritChecked: boolean): void => {\n if (treeItem.showCheckbox) {\n treeItem.checked = treeItem.checked === 'checked' ? 'unchecked' : 'checked';\n if (inheritChecked) {\n checkAllChildren(treeItem, treeItem.checked);\n updateCheckStateOfParents(treeItem);\n }\n }\n if (treeItem.showOptionbox && treeItem.checked === 'unchecked') {\n treeItem.parent?.children?.forEach(item => (item.checked = 'unchecked'));\n treeItem.checked = 'checked';\n }\n};\n\n/**\n * Changes the folder state to a new state based on the old state.\n * If a client calls this method, the same is responsible to load the children in case the new state is 'expanding'!!!\n *\n * @param deleteChildrenOnCollapse - If set to true, the children are deleted upon collapsing the item.\n */\nexport const doFolderStateChange = (\n item: TreeItem,\n deleteChildrenOnCollapse: boolean,\n newState?: string\n): void => {\n if (item?.state === 'collapsed' && (!newState || newState === 'expanded')) {\n item.state = childrenLoaded(item) ? 'expanded' : 'expanding';\n } else if (item?.state === 'expanding' && (!newState || newState === 'collapsed')) {\n item.state = 'collapsed';\n } else if (item?.state === 'expanded' && (!newState || newState === 'collapsed')) {\n if (deleteChildrenOnCollapse) {\n item.children = [];\n }\n item.state = 'collapsed';\n }\n};\n\nexport const enableCheckboxRecursive = (item: TreeItem, enable: boolean): void => {\n item.showCheckbox = enable;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => enableCheckboxRecursive(child, enable));\n }\n};\n\nexport const enableOptionboxRecursive = (item: TreeItem, enable: boolean): void => {\n item.showOptionbox = enable;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => enableOptionboxRecursive(child, enable));\n }\n};\n\nexport const parentCountRecursive = (item: TreeItem, stackLevel: number): number => {\n if (item?.parent && item.parent.level !== ROOT_LEVEL) {\n return parentCountRecursive(item.parent, stackLevel + 1);\n }\n return stackLevel;\n};\n\nexport const selectItemsBetween = <T = any>(\n roots: TreeItem<T>[],\n start: TreeItem<T>,\n end: TreeItem<T>\n): TreeItem<T>[] | undefined => {\n if (start === end) {\n return;\n }\n const foundItems: TreeItem<T>[] = [];\n const inBetweenState: InBetweenState = { startIsFirst: false, inBetween: false, done: false };\n for (const root of roots) {\n getItemsBetweenRecursive(foundItems, root, start, end, inBetweenState);\n if (inBetweenState.done) {\n break;\n }\n }\n foundItems.forEach(item => {\n if (item.selectable) {\n item.selected = true;\n }\n });\n return foundItems;\n};\n\nexport const selectRecursive = (item: TreeItem, select: boolean): void => {\n if (item.selectable) {\n item.selected = select;\n }\n if (childrenLoaded(item)) {\n item.children?.forEach(child => selectRecursive(child, select));\n }\n};\n\nexport const setBoxStateRecursive = (item: TreeItem, state: CheckboxState): void => {\n item.checked = state;\n if (childrenLoaded(item)) {\n item.children?.forEach(child => setBoxStateRecursive(child, state));\n }\n};\n\n/**\n * Sets the item to be active or not; all other items of the tree are reset.\n */\nexport const setActive = (item: TreeItem, active: boolean): void => {\n const getRoot = (treeItem: TreeItem): TreeItem =>\n treeItem.parent ? getRoot(treeItem.parent) : treeItem;\n resetActive(getRoot(item));\n item.active = active;\n};\n\nexport const resetActive = (item: TreeItem): void => {\n item.active = false;\n if (childrenLoaded(item)) {\n item.children?.forEach(childItem => resetActive(childItem));\n }\n};\n\n/**\n * Sets the treeItem as selectable or not\n */\nexport const setSelectable = (item: TreeItem, selectable: boolean): void => {\n item.selectable = selectable;\n if (item.selected && !item.selectable) {\n item.selected = selectable;\n }\n};\n\nexport const deleteItem = (item: TreeItem): void => {\n if (item.parent) {\n const idx = item.parent.children?.indexOf(item) ?? -1;\n if (idx < 0) {\n return;\n }\n item.parent.children?.splice(idx, 1);\n }\n};\n\nexport const addChildItem = (\n parent: TreeItem,\n child: TreeItem,\n position?: number,\n callback?: (item: TreeItem) => void\n): void => {\n addChildItems(parent, [child], position, callback);\n};\n\nexport const addChildItems = (\n parent: TreeItem,\n children: TreeItem[],\n position?: number,\n callback?: (item: TreeItem) => void\n): void => {\n const itemCount = parent.children?.length ?? 0;\n position ??= itemCount;\n // Negative position insert items counting from the last item\n if (position < 0) {\n position = itemCount + (position % itemCount);\n }\n initializeTreeItemsRecursive(children, parent, callback);\n if (!parent.children) {\n parent.children = [];\n parent.children.push(...children);\n return;\n }\n if (position >= parent.children.length) {\n parent.children.push(...children);\n return;\n }\n parent.children.splice(position, 0, ...children);\n};\n\nexport const initializeTreeItemsRecursive = (\n items: TreeItem[],\n parent: TreeItem,\n callback?: (item: TreeItem) => void\n): void => {\n const level = (parent.level ?? -1) + 1;\n for (const item of items) {\n item.parent = parent;\n item.level = level;\n setTreeItemDefaults(item, callback);\n if (item.children?.length) {\n initializeTreeItemsRecursive(item.children, item, callback);\n }\n }\n};\n\nexport const setTreeItemDefaults = (item: TreeItem, callback?: (item: TreeItem) => void): void => {\n item.children ??= [];\n item.state ??= 'collapsed';\n item.active ??= false;\n item.checked ??= 'unchecked';\n item.selected ??= false;\n item.selectable ??= true;\n if (callback) {\n callback(item);\n }\n};\n\nconst checkAllChildren = (treeItem: TreeItem, check: CheckboxState): void => {\n if (childrenLoaded(treeItem)) {\n treeItem.children?.forEach(item => {\n item.checked = check;\n checkAllChildren(item, check);\n });\n }\n};\n\nconst getItemsBetweenRecursive = (\n found: TreeItem[],\n current: TreeItem,\n start: TreeItem,\n end: TreeItem,\n inBetweenState: InBetweenState\n): void => {\n if (inBetweenState.done) {\n return;\n }\n if (current === start && !inBetweenState.inBetween) {\n // This is the first found tree item within the selection, the start tree item (the item which is clicked first) is ordered\n // before the end tree item (the item which is clicked second).\n // The recursive function is from now on handling tree node which are in between the two selections.\n // Note, we don't need to select it, as it is already selected with previous click\n inBetweenState.startIsFirst = true;\n inBetweenState.inBetween = true;\n } else if (current === end && !inBetweenState.inBetween) {\n // This is the first found tree item within the selection, the end tree item (the item which is clicked second) is ordered\n // before the start tree item (the item which is clicked first).\n // The recursive function is from now on handling tree node which are in between the two selections.\n inBetweenState.startIsFirst = false;\n inBetweenState.inBetween = true;\n found.push(current);\n } else if (current === end && inBetweenState.inBetween) {\n found.push(current);\n inBetweenState.inBetween = false;\n inBetweenState.done = true;\n return; // the end of the search\n } else if (current === start && inBetweenState.inBetween) {\n inBetweenState.inBetween = false;\n inBetweenState.done = true;\n return; // the end of the search\n } else if (inBetweenState.inBetween) {\n found.push(current);\n }\n\n if (current.state === 'expanded') {\n current.children?.forEach(item =>\n getItemsBetweenRecursive(found, item, start, end, inBetweenState)\n );\n }\n};\n\nconst updateCheckStateOfParents = (treeItem: TreeItem): void => {\n if (treeItem.parent) {\n let allChecked = true;\n let allUnchecked = true;\n\n for (const item of treeItem.parent?.children ?? []) {\n if (item.checked === 'indeterminate') {\n treeItem.parent.checked = 'indeterminate';\n updateCheckStateOfParents(treeItem.parent);\n return;\n }\n if (item.checked === 'checked') {\n allUnchecked = false;\n }\n if (item.checked === 'unchecked') {\n allChecked = false;\n }\n if (!allChecked && !allUnchecked) {\n treeItem.parent.checked = 'indeterminate';\n updateCheckStateOfParents(treeItem.parent);\n return;\n }\n }\n\n if (allChecked) {\n treeItem.parent.checked = 'checked';\n } else {\n treeItem.parent.checked = 'unchecked';\n }\n updateCheckStateOfParents(treeItem.parent);\n }\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ElementRef, Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n FolderStateEventArgs,\n TreeItem\n} from './si-tree-view.model';\nimport { ROOT_LEVEL } from './si-tree-view.utils';\n\n/**\n * Supports communication between the TreeViewComponent and the TreeViewItemComponent and the services.\n * Stores tree specific settings.\n * One instance per TreeViewComponent exists.\n */\n@Injectable()\nexport class SiTreeViewService {\n /** Emits when a tree item is clicked. */\n clickEvent: Subject<ClickEventArgs> = new Subject<ClickEventArgs>();\n /** Emits when a folder item is clicked. */\n folderClickEvent: Subject<FolderStateEventArgs> = new Subject<FolderStateEventArgs>();\n /** Emits when checkbox is clicked. */\n checkboxClickEvent: Subject<CheckboxClickEventArgs> = new Subject<CheckboxClickEventArgs>();\n /** Emits when on tree item expansion to load child items. */\n loadChildrenEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /** Emits when the consumer want a node to be scrolled into view. */\n scrollIntoViewEvent: Subject<ElementRef> = new Subject<ElementRef>();\n /** Emits when the parent shall become focused. */\n focusParentEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /** Emits when the child shall become focused. */\n focusFirstChildEvent: Subject<TreeItem> = new Subject<TreeItem>();\n /**\n * Shows or hides context menu button.\n *\n * @defaultValue true\n */\n enableContextMenuButton = true;\n /**\n * Child padding in pixel (px).\n *\n * @defaultValue 14\n */\n childrenIndentation = 14;\n /**\n * Visualize tree as grouped list, the child padding will have no effect.\n *\n * @defaultValue false\n */\n groupedList = false;\n /** @internal */\n triggerMarkForCheck: Subject<void> = new Subject<void>();\n /** @internal */\n scroll$!: Observable<Event>;\n /** Indicate whether item is a group item. */\n isGroupedItem(item: TreeItem): boolean {\n return (!item.parent || item.parent.level === ROOT_LEVEL) && this.groupedList;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { FocusableOption } from '@angular/cdk/a11y';\nimport { CdkContextMenuTrigger, CdkMenuTrigger } from '@angular/cdk/menu';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n computed,\n DoCheck,\n ElementRef,\n HostBinding,\n inject,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n viewChild\n} from '@angular/core';\nimport { correctKeyRTL, MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiLoadingSpinnerComponent } from '@siemens/element-ng/loading-spinner';\nimport { MenuItem, SiMenuFactoryComponent } from '@siemens/element-ng/menu';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\nimport { asyncScheduler, Subject, Subscription } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { TREE_ITEM_CONTEXT } from '../si-tree-view-item-context';\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n FolderStateEventArgs,\n TreeItem\n} from '../si-tree-view.model';\nimport { SiTreeViewService } from '../si-tree-view.service';\nimport {\n boxClicked,\n doFolderStateChange,\n removeUndefinedState,\n setActive\n} from '../si-tree-view.utils';\n\n@Component({\n selector: 'si-tree-view-item',\n imports: [\n CdkContextMenuTrigger,\n CdkMenuTrigger,\n NgTemplateOutlet,\n SiIconComponent,\n SiLoadingSpinnerComponent,\n SiMenuFactoryComponent,\n SiTranslatePipe\n ],\n templateUrl: './si-tree-view-item.component.html',\n styleUrl: './si-tree-view-item.component.scss',\n host: {\n role: 'treeitem',\n '[attr.tabindex]':\n 'treeItemContext.record.currentIndex === treeViewComponent.activeIndex ? 0 : -1',\n '[class.focus-none]': 'true',\n '[class.si-tree-ellipsis]': 'treeViewComponent.horizontalScrolling()',\n '[class.si-tree-view-top-level-item]':\n '!treeViewComponent.compactMode() && (treeViewComponent.flatTree() || (treeItem.level ?? 0) < 1)',\n '[attr.aria-haspopup]': 'isContextMenuButtonVisible()',\n '(contextmenu)': 'onContextMenu($event)',\n '(keydown)': 'onKeydown($event)'\n }\n})\nexport class SiTreeViewItemComponent\n implements OnInit, OnDestroy, AfterViewInit, FocusableOption, DoCheck\n{\n private element = inject(ElementRef);\n private siTreeViewService = inject(SiTreeViewService);\n private cdRef = inject(ChangeDetectorRef);\n protected treeItemContext = inject(TREE_ITEM_CONTEXT);\n protected treeViewComponent = this.treeItemContext.parent;\n /** @internal */\n treeItem: TreeItem = this.treeItemContext.record.item;\n private scrollIntoView: Subject<TreeItem> = this.treeViewComponent.scrollChildIntoView;\n private childrenLoaded: Subject<TreeItem> = this.treeViewComponent.childrenLoaded;\n\n protected templates = this.treeViewComponent.templates;\n\n private readonly _contextMenuItems = this.treeViewComponent.contextMenuItems;\n\n protected readonly contextMenuItems = signal<(MenuItemLegacy | MenuItem)[] | null>([]);\n\n protected readonly isContextMenuButtonVisible = computed(() => {\n return (\n this.enableContextMenuButton() &&\n !!this._contextMenuItems() &&\n !!this.contextMenuItems()?.length\n );\n });\n\n protected readonly stickyEndItems = this.treeViewComponent.horizontalScrolling;\n\n protected icons = this.treeViewComponent.computedIcons;\n\n private savedElement: ElementRef | undefined;\n private subscriptions: Subscription[] = [];\n private indentLevel = this.treeItem.level ?? 0;\n private nextSiblingElement!: HTMLElement;\n protected readonly menuTrigger = viewChild(CdkMenuTrigger);\n\n @HostBinding('attr.aria-level')\n protected get ariaLevel(): number {\n return (this.treeItem.level ?? 0) + 1;\n }\n\n @HostBinding('attr.aria-setsize')\n protected get ariaSetsize(): number {\n return this.treeItem.parent?.children?.length ?? 1;\n }\n\n @HostBinding('attr.aria-posinset')\n protected ariaPosinset?: number;\n\n @HostBinding('attr.aria-selected')\n protected get ariaSelected(): boolean | null {\n return this.enableSelection() && this.treeItem.selectable ? !!this.treeItem.selected : null;\n }\n\n @HostBinding('attr.aria-checked')\n protected get ariaChecked(): boolean | null {\n return this.showCheckOrOptionBox && this.treeItem.selectable\n ? this.treeItem.checked === 'checked'\n : null;\n }\n\n @HostBinding('attr.aria-expanded')\n protected get ariaExpanded(): boolean | null {\n if (this.treeItem.state === 'leaf') {\n return null;\n }\n return this.treeItem.state === 'expanded';\n }\n\n ngOnInit(): void {\n this.subscriptions.push(\n this.scrollIntoView.subscribe(event => this.onScrollIntoViewByConsumer(event))\n );\n this.subscriptions.push(\n this.childrenLoaded.subscribe(event => this.childrenLoadingDone(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.triggerMarkForCheck.subscribe(() => this.cdRef.markForCheck())\n );\n\n this.updateContextMenuItem();\n }\n\n ngDoCheck(): void {\n if (this.treeItem.parent?.children && this.ariaPosinset) {\n if (this.treeItem.parent.children[this.ariaPosinset] !== this.treeItem) {\n this.ariaPosinset = this.treeItem.parent.children.indexOf(this.treeItem) + 1;\n }\n } else if (this.treeItem.parent?.children) {\n this.ariaPosinset = this.treeItem.parent.children.indexOf(this.treeItem) + 1;\n } else {\n this.ariaPosinset = 1;\n }\n }\n\n ngAfterViewInit(): void {\n if (this.savedElement) {\n this.siTreeViewService.scrollIntoViewEvent.next(this.savedElement);\n this.savedElement = undefined;\n }\n this.nextSiblingElement = this.element.nativeElement?.nextElementSibling;\n }\n\n ngOnDestroy(): void {\n this.subscriptions\n .filter(subscription => !!subscription)\n .forEach(subscription => subscription.unsubscribe());\n }\n\n protected readonly enableSelection = this.treeViewComponent.enableSelection;\n\n protected readonly enableContextMenuButton = this.treeViewComponent.enableContextMenuButton;\n\n protected readonly enableDataField1 = this.treeViewComponent.enableDataField1;\n\n protected readonly enableDataField2 = this.treeViewComponent.enableDataField2;\n\n protected readonly deleteChildrenOnCollapse = this.treeViewComponent.deleteChildrenOnCollapse;\n\n protected get paddingStart(): string {\n return this.siTreeViewService.groupedList\n ? '0'\n : this.indentLevel * this.siTreeViewService.childrenIndentation + 'px';\n }\n\n protected get biggerPaddingStart(): string {\n const basePadding = this.showFolderStateStart ? 24 : 0;\n return (\n (this.siTreeViewService.groupedList\n ? basePadding\n : this.indentLevel * this.siTreeViewService.childrenIndentation + basePadding) + 'px'\n );\n }\n\n protected get isGroupedItem(): boolean {\n return this.siTreeViewService.isGroupedItem(this.treeItem);\n }\n\n protected get showFolderStateStart(): boolean {\n return (\n this.treeViewComponent.hasAnyChildren &&\n this.treeViewComponent.folderStateStart() &&\n !this.treeViewComponent.flatTree() &&\n (!!this.isGroupedItem || !this.siTreeViewService.groupedList)\n );\n }\n\n protected get showFolderStateEnd(): boolean {\n return this.treeViewComponent.hasAnyChildren && !this.showFolderStateStart;\n }\n\n protected get isExpanding(): boolean {\n return this.treeItem.state === 'expanding';\n }\n\n protected readonly showStateIndicator = this.treeViewComponent.enableStateIndicator;\n\n protected readonly showIcon = computed(() => {\n return this.treeViewComponent.enableIcon() && !!this.treeItem.icon;\n });\n\n protected get showCheckOrOptionBox(): boolean {\n return !!this.treeItem.showCheckbox || !!this.treeItem.showOptionbox;\n }\n\n private updateContextMenuItem(): void {\n const contextMenuItems = this._contextMenuItems();\n if (contextMenuItems) {\n if (Array.isArray(contextMenuItems)) {\n this.contextMenuItems.set(contextMenuItems);\n } else {\n const menuItems = contextMenuItems(this.treeItem);\n if (Array.isArray(menuItems)) {\n this.contextMenuItems.set(menuItems);\n } else if (menuItems) {\n this.subscriptions.push(\n menuItems.subscribe(items => {\n this.contextMenuItems.set(items);\n })\n );\n }\n }\n }\n }\n\n protected getItemFolderStateClass(): string {\n if (this.treeItem.state === 'collapsed') {\n if (this.treeViewComponent.flatTree()) {\n // flat tree mode\n return this.icons().itemCollapsedFlat;\n } else if (this.treeViewComponent.folderStateStart()) {\n // normal tree mode; folder state icon shown on the left (in LTR) side\n return this.icons().itemCollapsedLeft; // si-tree-view-item-collapsed\n } else {\n // normal tree mode; folder state icon shown on the right (in LTR) side\n return this.icons().itemCollapsed; // si-tree-view-item-collapsed\n }\n } else if (this.treeItem.state === 'expanding') {\n return 'si-tree-view-item-expanding'; // because empty is treated as disabled\n } else if (this.treeItem.state === 'expanded') {\n if (this.treeViewComponent.flatTree()) {\n // flat tree mode\n return this.icons().itemExpandedFlat;\n } else if (this.treeViewComponent.folderStateStart()) {\n // normal tree mode; folder state icon shown on the left (in LTR) side\n return this.icons().itemExpandedLeft; // si-tree-view-item-expanded\n } else {\n // normal tree mode; folder state icon shown on the right (in LTR) side\n return this.icons().itemExpanded; // si-tree-view-item-expanded\n }\n }\n return '';\n }\n\n protected getStateIndicatorColor(): string {\n return this.treeItem ? (this.treeItem.stateIndicatorColor ?? '') : '';\n }\n\n protected onItemFolderClicked(newState?: string): void {\n this.nextSiblingElement = this.element.nativeElement?.nextElementSibling;\n const oldState = removeUndefinedState(this.treeItem.state);\n doFolderStateChange(this.treeItem, this.deleteChildrenOnCollapse(), newState);\n\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(this.treeItem, oldState, removeUndefinedState(this.treeItem.state))\n );\n\n if (this.treeItem.state === 'expanding') {\n this.siTreeViewService.loadChildrenEvent.next(this.treeItem);\n }\n\n if (this.treeItem.state === 'expanded') {\n this.scrollChildNodeIntoViewPort();\n }\n }\n\n private childrenLoadingDone(item: TreeItem): void {\n if (item === this.treeItem) {\n asyncScheduler.schedule(() => this.scrollChildNodeIntoViewPort(), 0);\n }\n }\n\n private scrollChildNodeIntoViewPort(): void {\n const task = (): void => {\n const container: HTMLElement = this.element.nativeElement.closest('.si-tree-view');\n const first: HTMLElement = this.element.nativeElement;\n this.nextSiblingElement =\n (this.nextSiblingElement?.previousElementSibling as HTMLElement) ?? this.nextSiblingElement;\n const last: HTMLElement = container?.contains(this.nextSiblingElement)\n ? this.nextSiblingElement\n : this.element.nativeElement.parentElement?.lastElementChild;\n const fits =\n container?.offsetHeight -\n (last?.offsetTop + last?.getBoundingClientRect().height - first?.offsetTop) >=\n 0;\n const targetElement = fits ? last : first;\n if (targetElement) {\n const observer: IntersectionObserver = new window.IntersectionObserver(\n ([entry]) => {\n requestAnimationFrame(() => {\n const scrollElement = (targetElement.firstChild as HTMLElement) ?? targetElement;\n if (fits) {\n scrollElement.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\n } else {\n // scrollIntoView messes up with page scroll when body also has a scroll for { block : 'start' }\n const totalScrollTop =\n container?.scrollTop +\n first?.getBoundingClientRect().top -\n container?.getBoundingClientRect().top;\n container?.scrollTo({ top: totalScrollTop, behavior: 'smooth' });\n }\n });\n observer.disconnect();\n },\n {\n root: null,\n threshold: 1\n }\n );\n observer.observe(targetElement);\n }\n };\n asyncScheduler.schedule(task, 0);\n }\n\n protected onItemClicked(event: Event): void {\n const previousActive = this.treeItem.active;\n this.siTreeViewService.clickEvent.next(new ClickEventArgs(this.treeItem, event as MouseEvent));\n\n if (\n !this.enableSelection() &&\n (this.treeViewComponent.enableCheckbox() || this.treeViewComponent.enableOptionbox())\n ) {\n this.onBoxClicked();\n }\n\n // Toggle expand when item is collapsed, collapse only if the node is active\n const toggle =\n (this.treeItem.state === 'expanded' && previousActive) || this.treeItem.state === 'collapsed';\n if (this.expandOnClick() && toggle) {\n this.onItemFolderClicked();\n }\n }\n\n protected onMouseDownTreeItem(event: MouseEvent): void {\n if (event.shiftKey) {\n // let selection: Selection = window.getSelection();\n // selection.removeAllRanges();\n // we do not want the tree item text selected: thus we prevent the default behavior in this situation\n event.preventDefault();\n }\n }\n\n protected onToggleContextMenuOpen(): void {\n setActive(this.treeItem, true);\n this.siTreeViewService.scroll$\n .pipe(takeUntil(this.menuTrigger()!.closed), take(1))\n .subscribe(() => this.menuTrigger()?.close());\n }\n\n protected onToggleContextMenuClose(): void {\n setTimeout(() => this.element.nativeElement.focus());\n }\n\n protected getInputType(): string {\n // This method will be called only when either of the showCheckbox or showOptionBox is true, thus\n // following condition can be shortened\n return this.treeItem.showCheckbox ? 'checkbox' : 'radio';\n }\n\n protected onBoxClicked(): void {\n if (!this.treeItem.selectable) {\n return;\n }\n const oldState = this.treeItem.checked ?? 'unchecked';\n boxClicked(this.treeItem, this.treeViewComponent.inheritChecked());\n this.siTreeViewService.checkboxClickEvent.next(\n new CheckboxClickEventArgs(this.treeItem, oldState, this.treeItem.checked ?? 'unchecked')\n );\n }\n\n protected renderMatchingTemplate(treeItem: TreeItem): TemplateRef<any> {\n // we check in the HTML template if templates exist.\n const templateDirective = this.templates()!.find(td => td.name() === treeItem.templateName);\n return templateDirective ? templateDirective.template : this.templates()![0].template;\n }\n\n protected onContextMenu(event: Event): boolean {\n this.handleContextMenuEvent(event);\n return false;\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const rtlCorrectedKey = correctKeyRTL(event.key);\n if (rtlCorrectedKey === 'Enter') {\n event.preventDefault();\n this.onItemClicked(event);\n } else if (rtlCorrectedKey === 'ContextMenu' || (rtlCorrectedKey === 'F10' && event.shiftKey)) {\n this.handleContextMenuEvent(event);\n } else if (rtlCorrectedKey === 'ArrowLeft') {\n if (\n (!this.treeViewComponent.flatTree() &&\n this.showFolderStateStart &&\n (this.treeItem.state !== 'leaf' || this.isGroupedItem)) ||\n this.showFolderStateEnd\n ) {\n event.preventDefault();\n if (this.treeItem.state !== 'collapsed' && this.treeItem.state !== 'leaf') {\n this.onItemFolderClicked('collapsed');\n return;\n }\n }\n this.siTreeViewService.focusParentEvent.next(this.treeItem);\n } else if (rtlCorrectedKey === 'ArrowRight') {\n if (\n (this.showFolderStateStart && (this.treeItem.state !== 'leaf' || this.isGroupedItem)) ||\n this.showFolderStateEnd\n ) {\n event.preventDefault();\n if (this.treeItem.state !== 'expanded') {\n this.onItemFolderClicked('expanded');\n return;\n }\n }\n this.siTreeViewService.focusFirstChildEvent.next(this.treeItem);\n } else if (\n this.showCheckOrOptionBox &&\n (rtlCorrectedKey === 'Space' || rtlCorrectedKey === ' ')\n ) {\n event.preventDefault();\n this.onBoxClicked();\n }\n }\n\n private handleContextMenuEvent(event: Event): void {\n if (\n this.isContextMenuButtonVisible() &&\n this.contextMenuItems()?.some(\n item =>\n (!item.type && !item.disabled && !item.isHeading && item.title !== '-') ||\n (item.type !== 'divider' &&\n item.type !== 'header' &&\n (item.type !== 'radio-group' ||\n item.children.some(radioItem => radioItem.type === 'radio' && !radioItem.disabled)) &&\n item.type !== 'radio-group' &&\n !item.disabled)\n )\n ) {\n event.preventDefault();\n event.stopPropagation();\n // Without the setTimeout in Firefox native menu will open as well.\n // Event suppression does not work.\n // Re-check in the future if FF fixes it.\n setTimeout(() => {\n const menuTrigger = this.menuTrigger();\n menuTrigger?.open();\n menuTrigger?.getMenu()!.focusFirstItem('keyboard');\n });\n } else {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /**\n * Focuses the tree item.\n */\n focus(): void {\n this.element.nativeElement.focus();\n }\n\n /**\n * Get tree item label.\n */\n getLabel(): string {\n return this.treeItem?.label ?? '';\n }\n\n /**\n * Called by the consumer when they want a node to be scrolled into view.\n */\n private onScrollIntoViewByConsumer(item: TreeItem): void {\n if (item === this.treeItem) {\n this.savedElement = this.element;\n this.siTreeViewService.scrollIntoViewEvent.next(this.element);\n }\n }\n\n private expandOnClick(): boolean {\n return (\n this.treeViewComponent.expandOnClick() &&\n this.treeItem.state !== 'leaf' &&\n !!this.treeItem.selectable &&\n !this.treeViewComponent.flatTree()\n );\n }\n}\n","@if (!isGroupedItem) {\n <div\n #contextMenuTrigger=\"cdkContextMenuTriggerFor\"\n class=\"si-tree-view-li si-tree-view-li-item focus-direct-sub-inside\"\n [class.si-tree-view-item-context-menu-visible]=\"\n !!(contextMenuTrigger.isOpen() || menuTrigger()?.isOpen())\n \"\n [class.si-tree-view-item-active]=\"treeItem.active\"\n [class.si-tree-view-item-selected]=\"enableSelection() && treeItem.selected\"\n [class.si-tree-view-item-not-selectable]=\"!treeItem.selectable\"\n [style.padding-inline-start]=\"biggerPaddingStart\"\n [cdkContextMenuTriggerFor]=\"contextMenu\"\n [cdkContextMenuDisabled]=\"!isContextMenuButtonVisible() || !treeItem.selectable\"\n (cdkContextMenuOpened)=\"onToggleContextMenuOpen()\"\n (cdkContextMenuClosed)=\"onToggleContextMenuClose()\"\n >\n <div class=\"si-tree-view-item\" (mousedown)=\"onMouseDownTreeItem($event)\">\n @if (showFolderStateStart && treeItem.state !== 'leaf') {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n biggerPaddingStart: '-' + biggerPaddingStart,\n paddingStart: paddingStart,\n toggleIcon: 'si-tree-view-item-dropdown-caret'\n }\"\n />\n }\n <ng-container [ngTemplateOutlet]=\"checkboxOrOption\" />\n\n <div\n class=\"si-tree-view-item-main d-flex flex-grow-1 align-self-stretch grab-area\"\n (click)=\"onItemClicked($event)\"\n >\n @if (showIcon()) {\n <div class=\"si-tree-stretch-center\">\n <si-icon class=\"si-tree-view-item-icon\" [icon]=\"treeItem.icon!\" />\n </div>\n }\n <div\n class=\"si-tree-view-item-object-data d-flex flex-column justify-content-center overflow-hidden\"\n >\n @if (!templates().length) {\n <ng-content select=\":not(si-tree-view-item):not([dragPreview])\"\n ><div class=\"text-truncate\" [class.si-h5]=\"enableSelection() && treeItem.selected\">{{\n treeItem.label | translate\n }}</div></ng-content\n >\n } @else {\n <div>\n <ng-container\n *ngTemplateOutlet=\"\n renderMatchingTemplate(treeItem);\n context: { $implicit: treeItem }\n \"\n />\n </div>\n }\n @if (enableDataField1() && treeItem.dataField1) {\n <p class=\"si-tree-view-item-object-data-field-1 text-truncate\">{{\n treeItem.dataField1 | translate\n }}</p>\n }\n @if (enableDataField2() && treeItem.dataField2) {\n <p class=\"si-tree-view-item-object-data-field-2 text-truncate\">{{\n treeItem.dataField2 | translate\n }}</p>\n }\n </div>\n @if (treeItem.badge) {\n <span class=\"badge flex-shrink-0\" [class]=\"`bg-${treeItem.badgeColor || 'default'}`\">{{\n treeItem.badge\n }}</span>\n }\n </div>\n <div\n class=\"si-tree-view-item-end-icons d-flex ms-2 align-items-center\"\n [class.si-tree-view-item-end-icons-sticky]=\"stickyEndItems()\"\n >\n @if (showStateIndicator() && getStateIndicatorColor()) {\n <div\n class=\"si-tree-view-state-indicator\"\n [style.background-color]=\"getStateIndicatorColor()\"\n [class.si-tree-view-state-indicator-endmost]=\"\n !enableContextMenuButton() && !showFolderStateEnd\n \"\n ></div>\n }\n @if (isContextMenuButtonVisible()) {\n <div class=\"si-tree-stretch-center si-tree-context-menu-btn\">\n <div\n #menuTrigger=\"cdkMenuTriggerFor\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n [cdkMenuTriggerFor]=\"contextMenu\"\n (cdkMenuOpened)=\"onToggleContextMenuOpen()\"\n (cdkMenuClosed)=\"onToggleContextMenuClose()\"\n >\n <i\n aria-hidden=\"true\"\n class=\"si-tree-view-item-icon si-tree-view-menu-btn\"\n [class]=\"icons().itemMenu\"\n ></i>\n </div>\n </div>\n }\n @if (showFolderStateEnd) {\n <ng-container\n [ngTemplateOutlet]=\"treeItem.state === 'leaf' ? spacerTemplate : toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon',\n positionEnd: true\n }\"\n />\n }\n </div>\n </div>\n </div>\n} @else {\n <div class=\"si-tree-view-li focus-direct-sub-inside\">\n <div class=\"si-tree-view-item-group\">\n @if (showFolderStateStart) {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon'\n }\"\n />\n }\n <ng-container\n [ngTemplateOutlet]=\"checkboxOrOption\"\n [ngTemplateOutletContext]=\"{ classNames: 'form-check' }\"\n />\n\n <p class=\"mb-0\">{{ treeItem.label | translate }}</p>\n @if (showFolderStateEnd) {\n <ng-container\n [ngTemplateOutlet]=\"toggleTemplate\"\n [ngTemplateOutletContext]=\"{\n toggleIcon: 'si-tree-view-item-icon'\n }\"\n />\n }\n </div>\n </div>\n}\n\n<ng-template #contextMenu>\n <si-menu-factory class=\"me-5\" [items]=\"contextMenuItems()!\" [actionParam]=\"treeItem\" />\n</ng-template>\n\n<ng-template #checkboxOrOption let-classNames=\"classNames\">\n @if (showCheckOrOptionBox) {\n <a class=\"input-box\" tabindex=\"-1\" [class]=\"classNames\">\n <input\n class=\"form-check-input\"\n tabindex=\"-1\"\n [type]=\"getInputType()\"\n [indeterminate]=\"this.treeItem.checked === 'indeterminate' ? true : null\"\n [checked]=\"this.treeItem.checked === 'checked'\"\n [disabled]=\"!treeItem.selectable\"\n [attr.aria-label]=\"treeItem.label | translate\"\n (click)=\"onBoxClicked()\"\n />\n </a>\n }\n</ng-template>\n\n<ng-template\n #toggleTemplate\n let-biggerPaddingStart=\"biggerPaddingStart\"\n let-paddingStart=\"paddingStart\"\n let-toggleIcon=\"toggleIcon\"\n let-positionEnd=\"positionEnd\"\n>\n @let folderStateClass = getItemFolderStateClass();\n <a\n class=\"si-tree-stretch-center si-tree-view-item-toggle\"\n tabindex=\"-1\"\n [class.si-tree-view-item-toggle-end]=\"positionEnd\"\n [class.disabled]=\"!folderStateClass\"\n [style.margin-inline-start]=\"biggerPaddingStart\"\n [style.padding-inline-start]=\"paddingStart\"\n (click)=\"onItemFolderClicked()\"\n >\n @if (isExpanding) {\n <si-loading-spinner />\n } @else {\n <i aria-hidden=\"true\" [class]=\"`${toggleIcon} ${folderStateClass}`\"></i>\n }\n </a>\n</ng-template>\n\n<ng-template #spacerTemplate let-positionEnd=\"positionEnd\">\n <div\n class=\"si-tree-stretch-center si-tree-view-item-toggle\"\n [class.si-tree-view-item-toggle-end]=\"positionEnd\"\n >\n <i aria-hidden=\"true\" class=\"si-tree-view-item-icon si-tree-view-item-icon-spacer\"></i>\n </div>\n</ng-template>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * Provides the functionality to flatten the hierarchical tree structure into a flat one dimensional array; called flattenedTrees.\n * The TreeViewComponent uses this flattened trees (the array) to bind the contained tree/list items to the GUI into a list.\n * In addition the service provides the number of 'normal' list items and the number of group items.\n * Important:\n * The coupling to the TreeViewComponent is high, thus the service is provided only by the TreeViewComponent.\n */\n@Injectable()\nexport class SiTreeViewConverterService {\n /**\n * The flattened tree array; filled upon calling the method 'fillFlattenedTree'\n *\n * @defaultValue []\n */\n flattenedTrees: TreeItem[] = [];\n\n /**\n * The number of group items of the flattened tree.\n *\n * @defaultValue 0\n */\n groupItemsCount = 0;\n\n /**\n * The total items count of the flattened tree.\n *\n * @defaultValue 0\n */\n itemsTotal = 0;\n\n private siTreeViewService = inject(SiTreeViewService);\n\n /**\n * Flattens the tree handed over as parameter.\n * Takes the mode of the tree into consideration:\n * In case of a flat tree: only the first level of the items parameter is copied into the flattenedTrees array.\n * In case of a grouped tree: only the first two levels are copied into the flattenedTrees array\n * In the other cases all tree nodes are copied into the flattenedTrees array.\n */\n fillFlattenedTree(items: TreeItem[], isFlatTree: boolean): void {\n if (isFlatTree === false) {\n this.flattenedTrees = [];\n if (this.siTreeViewService.groupedList) {\n this.fillFlattenedTreeRecursive(items, 2, 0);\n } else {\n this.fillFlattenedTreeRecursive(items);\n }\n } else {\n this.flattenedTrees = items;\n this.groupItemsCount = 0;\n }\n this.itemsTotal = items.length;\n }\n\n private fillFlattenedTreeRecursive(\n items: TreeItem[],\n noOfLevels?: number,\n stackLevel?: number\n ): void {\n if (noOfLevels !== undefined && stackLevel !== undefined && noOfLevels <= stackLevel) {\n return;\n }\n\n stackLevel = stackLevel ?? 0;\n\n for (const current of items) {\n this.flattenedTrees.push(current);\n if (this.siTreeViewService.isGroupedItem(current)) {\n this.groupItemsCount++;\n }\n if (current.state === 'expanded') {\n this.fillFlattenedTreeRecursive(current.children ?? [], noOfLevels, stackLevel + 1);\n }\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { EventEmitter, inject, Injectable } from '@angular/core';\n\nimport { TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * This service provides helper functionality for the tree view to read the height of the tree/list items and\n * the group list items out of the DOM.\n *\n * Important: The coupling to the TreeViewComponent is very high as the service contains knowledge on the HTML structure!!!\n * Thus the service is provided only by the TreeViewComponent.\n *\n * Constraint: The height of the items (DOM elements) must be all the same; The height of the grouped items (DOM elements)\n * must be all the same;\n */\n@Injectable()\nexport class SiTreeViewItemHeightService {\n /**\n * The height of a tree list item.\n * Can be undefined if the tree list has not been layout rendered yet.\n */\n itemHeight?: number;\n\n /**\n * The height of a grouped list item.\n * Can be undefined if the tree list has not been layout rendered yet or if it does not contain group items.\n */\n groupItemHeight?: number;\n\n /**\n * Emitter for itemHeight changes.\n */\n readonly itemHeightChange = new EventEmitter<number>();\n\n private siTreeViewService = inject(SiTreeViewService);\n\n /**\n * Updates the height of a list item, if an appropriate item is in the DOM.\n *\n * @returns The new height of the list item; or undefined if no list item is in the DOM yet.\n */\n updateItemHeight(\n elementList: Element,\n flattenedTrees: TreeItem[],\n itemsBase: number,\n virtualizedItems: number\n ): number | undefined {\n let newHeight: number | undefined;\n let itemsTop: number = itemsBase + virtualizedItems;\n if (itemsTop > flattenedTrees.length) {\n itemsTop = flattenedTrees.length;\n }\n for (let i: number = itemsBase; i < itemsTop; i++) {\n if (this.siTreeViewService.isGroupedItem(flattenedTrees[i]) === false) {\n newHeight = this.getItemHeightOfListElement(elementList, i - itemsBase);\n break;\n }\n }\n if (newHeight !== undefined && this.itemHeight !== newHeight) {\n this.itemHeight = newHeight;\n this.itemHeightChange.emit(newHeight);\n }\n\n return newHeight;\n }\n\n /**\n * Updates the height of a group item, if an appropriate item is in the DOM.\n *\n * @returns The new height of the group item; or undefined if no group item is in the DOM yet.\n */\n updateGroupedItemHeight(\n elementList: Element,\n flattenedTrees: TreeItem[],\n itemsBase: number,\n virtualizedItems: number\n ): number | undefined {\n let newHeight: number | undefined;\n let itemsTop: number = itemsBase + virtualizedItems;\n if (itemsTop > flattenedTrees.length) {\n itemsTop = flattenedTrees.length;\n }\n for (let i: number = itemsBase; i < itemsTop; i++) {\n if (this.siTreeViewService.isGroupedItem(flattenedTrees[i])) {\n newHeight = this.getItemHeightOfListElement(elementList, i - itemsBase);\n break;\n }\n }\n if (newHeight !== undefined) {\n this.groupItemHeight = newHeight;\n }\n\n return newHeight;\n }\n\n private getItemHeightOfListElement(elementList: Element, index: number): number | undefined {\n const items = elementList.querySelectorAll('si-tree-view-item');\n if (index < items.length) {\n return items.item(index).getBoundingClientRect().height;\n }\n return undefined;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { InjectionToken } from '@angular/core';\n\nimport type { SiTreeViewComponent } from './si-tree-view.component';\n\nexport const SI_TREE_VIEW = new InjectionToken<SiTreeViewComponent>('SI_TREE_VIEW');\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OutputRefSubscription,\n TemplateRef,\n ViewContainerRef\n} from '@angular/core';\n\nimport { TREE_ITEM_CONTEXT } from '../si-tree-view-item-context';\nimport { TreeItem, TreeItemContext } from '../si-tree-view.model';\nimport { SI_TREE_VIEW } from '../si-tree-view.token';\n\n@Directive({\n selector: '[siTreeViewItem]'\n})\nexport class SiTreeViewItemDirective implements AfterViewInit, OnDestroy {\n private templateRef = inject(TemplateRef);\n private viewContainerRef = inject(ViewContainerRef);\n private parent = inject(SI_TREE_VIEW);\n private differs = inject(IterableDiffers);\n private cdRef = inject(ChangeDetectorRef);\n private differ: IterableDiffer<TreeItem> | null = null;\n private subscription!: OutputRefSubscription;\n private itemsVirtualizedDirty = true;\n\n ngAfterViewInit(): void {\n if (this.itemsVirtualizedDirty) {\n this.itemsVirtualizedDirty = false;\n const value = this.parent.itemsVirtualized;\n if (!this.differ && value) {\n this.differ = this.differs.find(value).create((_index, item) => item);\n }\n }\n this.evaluateDiffer();\n\n this.subscription = this.parent.evaluateForTreeItemsDiffer.subscribe(_ =>\n this.evaluateDiffer()\n );\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n\n private evaluateDiffer(): void {\n if (this.differ) {\n const changes = this.differ.diff(this.parent.itemsVirtualized);\n if (changes) this.applyChanges(changes);\n }\n }\n\n private applyChanges(changes: IterableChanges<TreeItem>): void {\n const viewContainer = this.viewContainerRef;\n changes.forEachOperation(\n (\n record: IterableChangeRecord<TreeItem>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null\n ) => {\n if (record.previousIndex == null) {\n viewContainer.createEmbeddedView(\n this.templateRef,\n {\n treeItem: record.item,\n index: record.currentIndex,\n parent: this.parent\n },\n {\n injector: Injector.create({\n providers: [\n {\n provide: TREE_ITEM_CONTEXT,\n useValue: {\n record,\n parent: this.parent\n }\n }\n ]\n }),\n index: currentIndex ?? undefined\n }\n );\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex ?? undefined);\n } else if (adjustedPreviousIndex !== null) {\n const view = viewContainer.get(adjustedPreviousIndex)!;\n viewContainer.move(view, currentIndex);\n (view as EmbeddedViewRef<TreeItemContext>).context = {\n treeItem: record.item,\n index: record.currentIndex!,\n parent: this.parent\n };\n }\n this.cdRef.detectChanges();\n }\n );\n\n for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n const viewRef = viewContainer.get(i) as EmbeddedViewRef<TreeItemContext>;\n const context = viewRef.context;\n context.index = i;\n }\n\n changes.forEachIdentityChange((record: IterableChangeRecord<TreeItem>) => {\n if (record.currentIndex) {\n const viewRef = viewContainer.get(record.currentIndex) as EmbeddedViewRef<TreeItemContext>;\n viewRef.context = {\n treeItem: record.item,\n index: record.currentIndex,\n parent: this.parent\n };\n this.cdRef.detectChanges();\n }\n });\n }\n\n static ngTemplateContextGuard(\n _dir: SiTreeViewItemDirective,\n ctx: unknown\n ): ctx is TreeItemContext {\n return true;\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { inject, Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { SiTreeViewItemHeightService } from './si-tree-view-item-height.service';\nimport { ItemsVirtualizedArgs, TreeItem } from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\n\n/**\n * Provides helper functionality to virtualize a list of items.\n * The number of virtualized items is the product of the pageSize and the pagesVirtualized (no of pages virtualized);\n * The paging algorithm works as follows:\n * If scrolling down, between two and three pages are kept above the 'visible' area;\n * The trigger is therefore if more than three pages are above the visible area, one page is removed from the top and added at the bottom.\n * If scrolling up, between one and two pages are kept above the 'visible' area;\n * The trigger is therefore if less than one page is above the visible area, one page is added on top and removed from the bottom.\n * All remaining items which are not virtualized, need to be simulated with two div-elements whose height can be set with the calculated\n * properties heightBefore and heightAfter.\n * See the test client for further information on the usage.\n * Constraint:\n * The virtualization calculation works correct only when all list items are of the same height!\n * If the 'group' mode is enabled, the corresponding group-items can have a different height, but for all group-items it must be the same.\n */\n@Injectable()\nexport class SiTreeViewVirtualizationService {\n /**\n * The number of list items of a virtualized page.\n * Choose a value, which is roughly half of the number of items you expect to be displayed on the visible screen.\n *\n * @defaultValue 10\n */\n pageSize = 10;\n /**\n * The number of pages to be virtualized.\n *\n * @defaultValue 6\n */\n pagesVirtualized = 6;\n /**\n * Emits when the virtualized items have changed (added/removed).\n */\n itemsVirtualizedChanged: Subject<ItemsVirtualizedArgs> = new Subject<ItemsVirtualizedArgs>();\n /**\n * The total height of the 'simulated' list items which are ordered before the virtualized list items.\n */\n private _heightBefore = 0;\n /**\n * The total height of the 'simulated' list items which are ordered after the virtualized list items.\n */\n private _heightAfter = 0;\n private _pageBase = 0;\n private scrollTopPrev = 0;\n private _itemsVirtualized: TreeItem[] = [];\n private groupItemsCountBefore = 0;\n private listItemsCountBefore = 0;\n private groupItemsCountAfter = 0;\n private listItemsCountAfter = 0;\n private groupItemsCountVirtualized = 0;\n private listItemsCountVirtualized = 0;\n private listItemsPerVirtPage: number[] = [];\n private groupItemsPerVirtPage: number[] = [];\n\n private siTreeViewService = inject(SiTreeViewService);\n private siTreeViewItemHeightService = inject(SiTreeViewItemHeightService);\n\n /**\n * Returns the virtualized items.\n */\n get itemsVirtualized(): TreeItem[] {\n return this._itemsVirtualized;\n }\n\n /**\n * The total height of the 'simulated' list items which are ordered before the virtualized list items.\n */\n get heightBefore(): number {\n return this._heightBefore;\n }\n\n /**\n * The total height of the 'simulated' list items which are ordered after the virtualized list items.\n */\n get heightAfter(): number {\n return this._heightAfter;\n }\n\n /**\n * The index of the first (base) page being virtualized.\n */\n get pageBase(): number {\n return this._pageBase;\n }\n\n /**\n * The list item index of the base page.\n */\n get itemBaseIdx(): number {\n return this._pageBase * this.pageSize;\n }\n\n /**\n * Returns the number of virtualized items.\n */\n get itemsVirtualizedCount(): number {\n return this.itemsVirtualized.length;\n }\n\n /**\n * Call this method upon scroll handler notifications!\n *\n * @param scrollTop - the scrollTop value retrieved form the event target\n * @param itemsAll - all items of the list\n */\n handleScroll(scrollTop: number, itemsAll: TreeItem[]): void {\n if (this.siTreeViewService.groupedList) {\n this.handleScrollGrouped(scrollTop, itemsAll);\n } else {\n this.handleScrollSimple(scrollTop, itemsAll);\n }\n }\n\n /**\n * Resets the virtualization to 'show' the items of the first page onwards.\n */\n resetVirtualizedItemList(itemsAll: TreeItem[]): void {\n this._pageBase = 0;\n this.updateVirtualizedItemListIntern(itemsAll);\n }\n\n /**\n * Updates the virtualized items. Call this method for use cases such as:\n * - The list items array contains added or removed items which could be in the 'visible' area\n * - The item height has changed.\n */\n updateVirtualizedItemList(itemsAll: TreeItem[]): void {\n this.updateVirtualizedItemListIntern(itemsAll);\n }\n\n /**\n * Checks if the specified item is currently virtualized.\n * If not, the virtualization is recalculated in order that the item is part of the virtualized items.\n */\n virtualizeItem(item: TreeItem, itemsAll: TreeItem[]): void {\n if (this.checkIfItemDisplayed(item) === false) {\n this.setBasePageForItemToDisplay(item, itemsAll);\n }\n }\n\n /**\n * Calculates the first visible tree item based on current scroll position.\n */\n calculateFirstVisibleTreeItem(): TreeItem | undefined {\n let item: TreeItem | undefined;\n let totalItemHeight = 0;\n // Approx Y-position of the middle of the first visible (top) tree item\n const topItemPos =\n this.scrollTopPrev +\n (this.siTreeViewItemHeightService.itemHeight ?? 0) / 2 -\n this.heightBefore;\n for (let idx = 0; idx < this._itemsVirtualized.length && totalItemHeight < topItemPos; idx++) {\n item = this._itemsVirtualized[idx];\n totalItemHeight += this.isGroupItem(item)\n ? (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n : (this.siTreeViewItemHeightService.itemHeight ?? 0);\n }\n return item;\n }\n\n private get listItemsCountTotal(): number {\n return this.listItemsCountBefore + this.listItemsCountVirtualized + this.listItemsCountAfter;\n }\n\n private get groupItemsCountTotal(): number {\n return this.groupItemsCountBefore + this.groupItemsCountVirtualized + this.groupItemsCountAfter;\n }\n\n private get itemsCountTotal(): number {\n return this.listItemsCountTotal + this.groupItemsCountTotal;\n }\n\n private get itemsCountVirtualizedMax(): number {\n return this.pageSize * this.pagesVirtualized;\n }\n\n private updateVirtualizedItemListIntern(itemsAll: TreeItem[], scrolledPages?: number): void {\n // Note!!!:\n // The order of functionality within this method must be maintained as state of this object is changed!!!\n\n const itemsVirtualizedOld: TreeItem[] = this._itemsVirtualized.slice();\n\n this._itemsVirtualized = itemsAll.slice(\n this.pageBase * this.pageSize,\n this.itemsCountVirtualizedMax + this.pageBase * this.pageSize\n );\n\n this.updateItemsTypeCount(itemsAll, scrolledPages);\n\n if (this.siTreeViewService.groupedList) {\n this.calculateBeforeAndAfterForGroupList();\n } else {\n this.calculateBeforeAndAfter();\n }\n\n this.maintainVirtualizationNotifies(itemsVirtualizedOld);\n }\n\n /**\n * Notifies a consumer about changes of virtualized tree/list items in case of a pageBase change.\n * One notification is sent for every tree/list item\n * that went out of the virtualized items list or came into the virtualized items.\n */\n private maintainVirtualizationNotifies(itemsVirtualizedOld: TreeItem[]): void {\n const itemsAdded: TreeItem[] = [];\n const itemsRemoved: TreeItem[] = [];\n for (const item of itemsVirtualizedOld) {\n if (!this._itemsVirtualized.includes(item)) {\n itemsRemoved.push(item);\n }\n }\n for (const item of this._itemsVirtualized) {\n if (!itemsVirtualizedOld.includes(item)) {\n itemsAdded.push(item);\n }\n }\n if (itemsRemoved.length > 0) {\n this.itemsVirtualizedChanged.next(new ItemsVirtualizedArgs(itemsRemoved, false));\n }\n if (itemsAdded.length > 0) {\n this.itemsVirtualizedChanged.next(new ItemsVirtualizedArgs(itemsAdded, true));\n }\n }\n\n private calculateBasePage(idx: number): void {\n this._pageBase = Math.floor(idx / this.pageSize - this.pagesVirtualized / 2);\n if (this.pageBase < 0) {\n this._pageBase = 0;\n }\n }\n\n /**\n * Calculates the height [px] for the divs before and after the tree list in case of 'grouped' mode!\n */\n private calculateBeforeAndAfterForGroupList(): void {\n const groupItemHeight = this.siTreeViewItemHeightService.groupItemHeight ?? 0;\n const listItemHeight = this.siTreeViewItemHeightService.itemHeight ?? 0;\n\n const scrollHeight =\n this.listItemsCountTotal * listItemHeight + this.groupItemsCountTotal * groupItemHeight;\n\n this._heightBefore =\n this.listItemsCountBefore * listItemHeight + this.groupItemsCountBefore * groupItemHeight;\n\n this._heightAfter =\n scrollHeight -\n this.heightBefore -\n (this.listItemsCountVirtualized * listItemHeight +\n this.groupItemsCountVirtualized * groupItemHeight);\n }\n\n /**\n * Calculates the height [px] for the divs before and after the tree list in case of 'non-grouped' mode!\n */\n private calculateBeforeAndAfter(): void {\n if (\n this.siTreeViewItemHeightService.itemHeight === undefined ||\n this.siTreeViewItemHeightService.itemHeight === 0\n ) {\n return;\n }\n const scrollHeight: number = this.itemsCountTotal * this.siTreeViewItemHeightService.itemHeight;\n\n this._heightBefore =\n this.pageBase * this.pageSize * this.siTreeViewItemHeightService.itemHeight;\n this._heightAfter =\n scrollHeight -\n this.heightBefore -\n this.itemsVirtualizedCount * this.siTreeViewItemHeightService.itemHeight;\n }\n\n private checkIfItemDisplayed(currentItem: TreeItem): boolean {\n for (const item of this._itemsVirtualized) {\n if (item === currentItem) {\n return true;\n }\n }\n return false;\n }\n\n private setBasePageForItemToDisplay(item: TreeItem, itemsAll: TreeItem[]): void {\n for (let i = 0; i < itemsAll.length; i++) {\n if (itemsAll[i] === item) {\n this.calculateBasePage(i);\n this.updateVirtualizedItemListIntern(itemsAll);\n return;\n }\n }\n }\n\n /**\n * Updates the number of grouped items and list items for the whole list for the different areas:\n * - The not virtualized items on top of the list (represented by the 'beforeHeight')\n * - The virtualized items\n * - The not virtualized items on the bottom of the list (represented by the 'afterHeight')\n */\n private updateItemsTypeCount(itemsAll: TreeItem[], scrolledPages?: number): void {\n if (this.siTreeViewService.groupedList) {\n this.updateItemsTypeCountForGroupList(itemsAll, scrolledPages);\n } else {\n this.groupItemsCountBefore = 0;\n this.groupItemsCountVirtualized = 0;\n this.groupItemsCountAfter = 0;\n this.listItemsCountBefore = this.itemBaseIdx;\n this.listItemsCountVirtualized = this.itemsVirtualizedCount;\n this.listItemsCountAfter =\n itemsAll.length - this.listItemsCountBefore - this.listItemsCountVirtualized;\n }\n this.updateItemsTypeCountPerVirtPage();\n\n if (this.itemsCountTotal !== itemsAll.length) {\n console.error(\n 'TreeListVirtualizationService: updateVirtualizedItemList().updateListItemsTypeCount() calculation error!'\n );\n }\n }\n\n /**\n * Updates the number of grouped items and list items per virtualized page.\n */\n private updateItemsTypeCountPerVirtPage(): void {\n this.listItemsPerVirtPage = [];\n this.groupItemsPerVirtPage = [];\n for (let basePgIdx = 0; basePgIdx < this.pagesVirtualized; basePgIdx++) {\n const baseIdx: number = basePgIdx * this.pageSize;\n let groupItemsCount = 0;\n let listItemsCount = 0;\n for (let idx: number = baseIdx; idx < baseIdx + this.pageSize; idx++) {\n if (idx < this.itemsVirtualized.length) {\n const item: TreeItem = this.itemsVirtualized[idx];\n if (this.isGroupItem(item)) {\n groupItemsCount++;\n } else {\n listItemsCount++;\n }\n } else {\n break;\n }\n }\n this.listItemsPerVirtPage.push(listItemsCount);\n this.groupItemsPerVirtPage.push(groupItemsCount);\n }\n }\n\n private calculateVirtPageHeight(index: number): number {\n if (index >= this.groupItemsPerVirtPage.length) {\n return 0;\n }\n\n if (this.siTreeViewService.groupedList) {\n if (this.siTreeViewItemHeightService.itemHeight !== undefined) {\n return (\n this.listItemsPerVirtPage[index] * this.siTreeViewItemHeightService.itemHeight +\n this.groupItemsPerVirtPage[index] *\n (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n );\n } else {\n return (\n this.groupItemsPerVirtPage[index] *\n (this.siTreeViewItemHeightService.groupItemHeight ?? 0)\n );\n }\n } else {\n return this.listItemsPerVirtPage[index] * (this.siTreeViewItemHeightService.itemHeight ?? 0);\n }\n }\n\n private updateItemsTypeCountForGroupList(itemsAll: TreeItem[], scrolledPages?: number): void {\n if (scrolledPages !== undefined && scrolledPages !== 0) {\n this.updateItemsTypeCountForGroupListScrolling(itemsAll, scrolledPages);\n } else {\n this.updateListItemsTypeCountForGroupListFull(itemsAll);\n }\n }\n\n private updateItemsTypeCountForGroupListScrolling(\n itemsAll: TreeItem[],\n scrolledPages?: number\n ): void {\n // this method optimizes the update of the type counters in regards of performance in case of scrolling\n // the method considers the difference of the pageBase for the calculation of the counters.\n\n scrolledPages = scrolledPages ?? 0;\n\n const oldBaseIndex: number = (this.pageBase - scrolledPages) * this.pageSize;\n const newBaseIndex: number = this.pageBase * this.pageSize;\n this.groupItemsCountAfter = this.groupItemsCountAfter + this.groupItemsCountVirtualized;\n this.listItemsCountAfter = this.listItemsCountAfter + this.listItemsCountVirtualized;\n this.groupItemsCountVirtualized = 0;\n this.listItemsCountVirtualized = 0;\n if (scrolledPages > 0) {\n for (let idx: number = oldBaseIndex; idx < newBaseIndex; idx++) {\n if (this.isGroupItem(itemsAll[idx])) {\n this.groupItemsCountBefore++;\n this.groupItemsCountAfter--;\n } else {\n this.listItemsCountBefore++;\n this.listItemsCountAfter--;\n }\n }\n } else {\n for (let idx: number = newBaseIndex; idx < oldBaseIndex; idx++) {\n if (this.isGroupItem(itemsAll[idx])) {\n this.groupItemsCountBefore--;\n this.groupItemsCountAfter++;\n } else {\n this.listItemsCountBefore--;\n this.listItemsCountAfter++;\n }\n }\n }\n const upper: number = newBaseIndex + this.itemsVirtualizedCount;\n for (let vi: number = newBaseIndex; vi < upper; vi++) {\n if (this.isGroupItem(itemsAll[vi])) {\n this.groupItemsCountVirtualized++;\n } else {\n this.listItemsCountVirtualized++;\n }\n }\n this.groupItemsCountAfter = this.groupItemsCountAfter - this.groupItemsCountVirtualized;\n this.listItemsCountAfter = this.listItemsCountAfter - this.listItemsCountVirtualized;\n }\n\n private updateListItemsTypeCountForGroupListFull(itemsAll: TreeItem[]): void {\n // does fully update the counters for the whole list.\n\n this.groupItemsCountBefore = 0;\n this.groupItemsCountVirtualized = 0;\n this.groupItemsCountAfter = 0;\n const virtTop: number = this.itemBaseIdx + this.itemsVirtualizedCount;\n for (let i = 0; i < itemsAll.length; i++) {\n if (this.isGroupItem(itemsAll[i])) {\n if (i < this.itemBaseIdx) {\n this.groupItemsCountBefore++;\n } else if (i < virtTop) {\n this.groupItemsCountVirtualized++;\n } else {\n this.groupItemsCountAfter++;\n }\n }\n }\n this.listItemsCountBefore = this.itemBaseIdx - this.groupItemsCountBefore;\n this.listItemsCountVirtualized = this.itemsVirtualizedCount - this.groupItemsCountVirtualized;\n this.listItemsCountAfter =\n itemsAll.length -\n this.listItemsCountBefore -\n this.listItemsCountVirtualized -\n this.groupItemsCountBefore -\n this.groupItemsCountVirtualized -\n this.groupItemsCountAfter;\n }\n\n private isGroupItem(item: TreeItem): boolean {\n return !item.parent && this.siTreeViewService.groupedList;\n }\n\n private handleScrollSimple(scrollTop: number, itemsAll: TreeItem[]): void {\n // Notes:\n // This method is used in case all tree list items are of the same height.\n // This allows for an optimized and proper calculation of the pageBase.\n // pageBase stores the index of the first page which is virtualized.\n\n // totalDeltaScrollVirt corresponds to the total virtualized items height above the visible area\n const totalDeltaScrollVirt: number = scrollTop - this.heightBefore;\n let updateVirtList = false;\n const pageHeight: number = this.pageSize * (this.siTreeViewItemHeightService.itemHeight ?? 0);\n const pageBaseOld: number = this.pageBase;\n\n const pageChangeDownTrigger = 3;\n if (this.scrollTopPrev < scrollTop) {\n // Scroll down:\n // We do keep always between two and three pages virtualized above the view, when scrolling down.\n // => We remove pages from the top only when more than three pages are 'above' the visible view\n // => It is mandatory, that the trigger points are calculated exactly in order to get a nice scrolling behavior for all situations\n if (totalDeltaScrollVirt > pageChangeDownTrigger * pageHeight) {\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeight;\n // Two pages shall remain 'above' the view;\n // It is important that this number is higher than the trigger when scrolling up (which is one page, see the next else statement)\n // Thus we have a hysteresis of one page in order to avoid scrollbar jitters!!\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - (pageChangeDownTrigger - 1);\n updateVirtList = true;\n }\n } else if (this.scrollTopPrev > scrollTop) {\n // scroll up\n if (totalDeltaScrollVirt < pageHeight) {\n // we add pages to the top as soon as only one page (or smaller) is 'above' the visible view\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeight;\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - (pageChangeDownTrigger - 2);\n if (this.pageBase < 0) {\n this._pageBase = 0; // pageBase cannot be lower than 0; if pageBase=0 then we have no pages above the visible view.\n }\n if (this._pageBase !== pageBaseOld) {\n updateVirtList = true;\n }\n }\n }\n\n this.scrollTopPrev = scrollTop;\n if (updateVirtList) {\n this.updateVirtualizedItemListIntern(itemsAll, this.pageBase - pageBaseOld);\n }\n }\n\n private handleScrollGrouped(scrollTop: number, itemsAll: TreeItem[]): void {\n // Notes:\n // This method is used in case the tree list is grouped => the group items have a different height than the other items.\n // This allows for an optimized and averaged calculation of the new pageBase.\n // pageBase stores the index of the first page which is virtualized.\n\n // totalDeltaScrollVirt corresponds to the total virtualized items height above the visible area\n const totalDeltaScrollVirt: number = scrollTop - this.heightBefore;\n const pageHeightFirst3: number =\n this.calculateVirtPageHeight(0) +\n this.calculateVirtPageHeight(1) +\n this.calculateVirtPageHeight(2);\n\n let updateVirtList = false;\n const pageHeightFirst1: number = this.calculateVirtPageHeight(0);\n const pageHeightAvg: number = pageHeightFirst3 / 3;\n const pageBaseOld: number = this.pageBase;\n\n if (this.scrollTopPrev < scrollTop) {\n // Scroll down:\n // We do keep always between two and three pages virtualized above the view, when scrolling down.\n // => We remove pages from the top only when more than three pages are 'above' the visible view.\n // => It is mandatory, that the trigger points are calculated exactly in order to get a nice scrolling behavior for all situations.\n if (totalDeltaScrollVirt > pageHeightFirst3) {\n // Next calculation is averaged. It seems not needed to properly calculate it based on the all the real items.\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeightAvg;\n // Two pages shall remain 'above' the view;\n // It is important that this number is higher than the trigger when scrolling up (which is one page, see next else).\n // Thus we have a hysteresis of one page in order to avoid scrollbar jitters!!\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - 2;\n updateVirtList = true;\n }\n } else if (this.scrollTopPrev > scrollTop) {\n // scroll up\n if (totalDeltaScrollVirt < pageHeightFirst1) {\n // we add pages to the top as soon as only one page (or smaller) is 'above' the visible view\n const pagesOutsideView: number = totalDeltaScrollVirt / pageHeightAvg;\n this._pageBase = this.pageBase + Math.floor(pagesOutsideView) - 1;\n if (this.pageBase < 0) {\n this._pageBase = 0; // pageBase cannot be lower than 0; if pageBase=0 then we have no pages above the visible view.\n }\n if (this._pageBase !== pageBaseOld) {\n updateVirtList = true;\n }\n }\n }\n\n this.scrollTopPrev = scrollTop;\n if (updateVirtList) {\n this.updateVirtualizedItemListIntern(itemsAll, this.pageBase - pageBaseOld);\n }\n }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\n/*\n * WARNING: Parts of this component are made to be used in conjunction with Bootstrap.\n * Bootstrap is not included with this package and has to be installed separately.\n */\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport {\n AfterViewChecked,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n computed,\n contentChild,\n contentChildren,\n ElementRef,\n inject,\n INJECTOR,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n output,\n signal,\n Signal,\n SimpleChanges,\n TemplateRef,\n viewChild,\n viewChildren\n} from '@angular/core';\nimport { MenuItem as MenuItemLegacy } from '@siemens/element-ng/common';\nimport { MenuItem } from '@siemens/element-ng/menu';\nimport { ElementDimensions, ResizeObserverService } from '@siemens/element-ng/resize-observer';\nimport { SiTranslatePipe, t, TranslatableString } from '@siemens/element-translate-ng/translate';\nimport { asyncScheduler, defer, fromEvent, merge, Observable, Subject, Subscription } from 'rxjs';\nimport { map, withLatestFrom } from 'rxjs/operators';\n\nimport { SiTreeViewConverterService } from './si-tree-view-converter.service';\nimport { SiTreeViewItemHeightService } from './si-tree-view-item-height.service';\nimport { SiTreeViewItemTemplateDirective } from './si-tree-view-item-template.directive';\nimport { SiTreeViewItemComponent } from './si-tree-view-item/si-tree-view-item.component';\nimport { SiTreeViewItemDirective } from './si-tree-view-item/si-tree-view-item.directive';\nimport { SiTreeViewVirtualizationService } from './si-tree-view-virtualization.service';\nimport {\n CheckboxClickEventArgs,\n ClickEventArgs,\n DEFAULT_CHILDREN_INDENTATION,\n DEFAULT_TREE_ICON_SET,\n FolderStateEventArgs,\n ItemsVirtualizedArgs,\n LoadChildrenEventArgs,\n MenuItemsProvider,\n TreeItem,\n TreeViewIconSet\n} from './si-tree-view.model';\nimport { SiTreeViewService } from './si-tree-view.service';\nimport { SI_TREE_VIEW } from './si-tree-view.token';\nimport {\n addChildItems,\n childrenLoaded,\n collapse,\n enableCheckboxRecursive,\n enableOptionboxRecursive,\n expand,\n hasChildren,\n initializeTreeItemsRecursive,\n removeUndefinedState,\n resetActive,\n ROOT_LEVEL,\n selectItemsBetween,\n selectRecursive,\n setActive,\n setTreeItemDefaults\n} from './si-tree-view.utils';\n\nconst rootDefaults: TreeItem = {\n label: 'root',\n level: ROOT_LEVEL,\n state: 'expanded',\n selectable: false\n};\n\n/**\n * Implements a tree view with the following main capabilities:\n * Showing multiple trees. The data of the trees is set via the input property 'items'.\n * Showing the trees in a flat mode with navigation/breadcrumb on top.\n * A tree/list item is composed of a 'folder' icon, any item icon, the label, two additional datafields and a context menu button.\n * Children of parent nodes are lazy loaded upon request (in case they are not yet available in model.)\n * Context menu support via context menu item: the context menu items can be set via input properties.\n * Multi selection and focus support.\n * Checkboxes and / or option boxes per tree node.\n * Virtualization support: Input properties allow to set the page size and the number of pages to be virtualized.\n * Current limitation is roughly half a million of nodes. This is due to some 'strange' behavior with flex containers.\n * Set the input properties 'pageSize' and 'pagesVirtualized' to a reasonable amount of virtualized items.\n * The number of virtualized items is the product of the pageSize and the pagesVirtualized (number of pages virtualized).\n * Choose a value in the area of 50 virtualized items, dependent on the screen size. Check at runtime if appropriate!\n * Grouped List support: The component does also support grouped lists.\n * See the test client implementation of this package for all functionality.\n */\n@Component({\n selector: 'si-tree-view',\n imports: [SiTranslatePipe, SiTreeViewItemComponent, CdkScrollableModule, SiTreeViewItemDirective],\n templateUrl: './si-tree-view.component.html',\n styleUrl: './si-tree-view.component.scss',\n providers: [\n SiTreeViewConverterService,\n SiTreeViewItemHeightService,\n SiTreeViewService,\n SiTreeViewVirtualizationService,\n { provide: SI_TREE_VIEW, useExisting: SiTreeViewComponent }\n ],\n host: {\n '(document:keyup.shift)': 'onKeyUpShift()',\n '(document:keyup.control)': 'onKeyUpCtrl()',\n '(document:keyup.meta)': 'onKeyUpMeta()',\n '(document:mouseleave)': 'onMouseLeave()',\n '(keydown)': 'handleKeydown($event)'\n }\n})\nexport class SiTreeViewComponent\n implements OnInit, OnChanges, OnDestroy, AfterViewInit, AfterViewChecked\n{\n /**\n * The context menu items which are bound to the context menu of all tree items,\n * or a menu item provider function that is invoked for each tree item once.\n *\n * @defaultValue []\n */\n readonly contextMenuItems = input<(MenuItemLegacy | MenuItem)[] | MenuItemsProvider>([]);\n /**\n * The indentation in pixel for the children in respect to its parent.\n *\n * @defaultValue DEFAULT_CHILDREN_INDENTATION\n */\n readonly childrenIndentation = input<number>(DEFAULT_CHILDREN_INDENTATION);\n /**\n * Enable horizontal scrolling. When disabled (the default), an ellipsis is used for overflowing text\n *\n * @defaultValue false\n */\n readonly horizontalScrolling = input(false, { transform: booleanAttribute });\n /**\n * Enable the compact mode, making it more vertically compact.\n *\n * @defaultValue false\n */\n readonly compactMode = input(false, { transform: booleanAttribute });\n /**\n * Enable buttons for collapse and expand all.\n * Does not work when `flatTree` is enabled.\n *\n * @defaultValue false\n */\n readonly expandCollapseAll = input(false, { transform: booleanAttribute });\n /**\n * Tooltip text shown for the expand all icon.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TREE_VIEW.EXPAND_ALL:Expand all`)\n * ```\n */\n readonly expandAllTooltip = input(t(() => $localize`:@@SI_TREE_VIEW.EXPAND_ALL:Expand all`));\n /**\n * Tooltip text shown for the collapse all icon.\n *\n * @defaultValue\n * ```\n * t(() => $localize`:@@SI_TREE_VIEW.COLLAPSE_ALL:Collapse all`)\n * ```\n */\n readonly collapseAllTooltip = input(\n t(() => $localize`:@@SI_TREE_VIEW.COLLAPSE_ALL:Collapse all`)\n );\n /**\n * Customize icons for treeview.\n */\n readonly icons = input<TreeViewIconSet>();\n\n /**\n * Number of rows per page. Used for the virtualization of rows (number of\n * rows per page).\n * @defaultValue 10\n * @defaultref {@link SiTreeViewVirtualizationService#pageSize}\n */\n readonly pageSize = input(10, {\n transform: (value: number) => (value < 5 ? 5 : value)\n });\n\n /**\n * Number of pages which are virtualized.\n * @defaultValue 6\n * @defaultref {@link SiTreeViewVirtualizationService#pagesVirtualized}\n */\n readonly pagesVirtualized = input(6, {\n transform: (value: number) => (value < 5 ? 5 : value)\n });\n\n /**\n * Sets if the folder state icon shall be shown on the left (in LTR) or on the right (in LTR) side\n * of the tree item. Per default the icon will be shown on the left (in LTR). Has no\n * effect if flatTree is enabled.\n * @defaultValue true\n */\n readonly folderStateStart = input(true, { transform: booleanAttribute });\n\n /**\n * Sets if the tree list shall virtualize the tree items.\n * This input field must be set at startup and shall not be changed afterwards.\n * @defaultValue true\n */\n readonly isVirtualized = input(true, { transform: booleanAttribute });\n\n /**\n * Sets the root tree items of all the trees (Required).\n * @defaultValue []\n * @defaultref {@link _items}\n */\n readonly items = input<TreeItem[]>([]);\n\n /**\n * Sets the tree item to be selected.\n */\n readonly selectedItem = input<TreeItem | TreeItem[] | undefined>();\n\n /**\n * Sets if the tree shall force single tree item selection.\n * @defaultValue false\n */\n readonly singleSelectMode = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides additional information below the label.\n * @defaultValue false\n */\n readonly enableDataField1 = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides additional information below the label.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#enableDataField2}\n */\n readonly enableDataField2 = input(false, { transform: booleanAttribute });\n\n /**\n * Shows or hides state pipe.\n * @defaultValue true\n */\n readonly enableStateIndicator = input(true, { transform: booleanAttribute });\n\n /**\n * Shows or hides icon\n * @defaultValue true\n */\n readonly enableIcon = input(true, { transform: booleanAttribute });\n\n /**\n * Shows or hides context menu button and also controls context menu visibility on right click.\n * @defaultValue true\n * @defaultref {@link SiTreeViewService#enableContextMenuButton}\n */\n readonly enableContextMenuButton = input(true, { transform: booleanAttribute });\n\n /**\n * Allows / disabled selecting of tree items by clicking on them.\n * @defaultValue false\n */\n readonly enableSelection = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if children are deleted upon collapsing tree items. This feature might\n * be used, if children shall be lazy loaded always upon expanding a tree\n * item.\n * @defaultValue false\n */\n readonly deleteChildrenOnCollapse = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree view shall be displayed as flat tree list with a\n * breadcrumb. A flat tree only shows the one level at the time and lists the\n * tree items of the current level as a list.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#flatTree}\n */\n readonly flatTree = input(false);\n\n /**\n * Sets if the tree view is displayed as a grouped list.\n * Important: In this mode, only the first two hierarchies of the tree model\n * are considered!\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#groupedList}\n */\n readonly groupedList = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items shall show a checkbox.\n * @defaultValue false\n * @defaultref {@link SiTreeViewService#enableCheckbox}\n */\n readonly enableCheckbox = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items shall show an optionbox.\n * @defaultValue false\n */\n readonly enableOptionbox = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the tree items should expand/collapse when clicking on them.\n * Does not work when `flatTree` is enabled or the tree item is not selectable.\n * @defaultValue false\n */\n readonly expandOnClick = input(false, { transform: booleanAttribute });\n\n /**\n * Sets if the checkbox state of a tree item is inherited to its children/parent.\n * @defaultValue true\n */\n readonly inheritChecked = input(true, { transform: booleanAttribute });\n\n /**\n * String to be shown when there are no content actions.\n *\n * @defaultValue 'No actions available'\n */\n readonly noActionsString = input('No actions available');\n\n /** Aria label for the tree view. Needed for a11y, alternatively use {@link ariaLabelledBy}. */\n readonly ariaLabel = input<TranslatableString>();\n\n /** Aria labelled by for the tree view. Needed for a11y, alternatively use {@link ariaLabel}. */\n readonly ariaLabelledBy = input<string>();\n\n /**\n * Triggered upon virtualization (or unvirtualization) of a tree item.\n */\n readonly itemsVirtualizedChanged = output<ItemsVirtualizedArgs>();\n /**\n * Triggered upon clicking the folder of a tree item.\n */\n readonly treeItemFolderClicked = output<FolderStateEventArgs>();\n /**\n * Triggered upon a state change of the folder of a tree item.\n */\n readonly treeItemFolderStateChanged = output<FolderStateEventArgs>();\n /**\n * Triggered upon clicking the label of a tree item.\n */\n readonly treeItemClicked = output<TreeItem>();\n /**\n * Triggered upon clicking the checkbox of a tree item.\n */\n readonly treeItemCheckboxClicked = output<CheckboxClickEventArgs>();\n /**\n * Triggered upon the request of loading the children of a tree item.\n */\n readonly loadChildren = output<LoadChildrenEventArgs>();\n /**\n * Triggered upon the selection of a tree item (multi selection supported).\n */\n readonly treeItemsSelected = output<TreeItem[]>();\n\n /**\n * The injected content with included SiTreeViewItemTemplateDirective.\n */\n readonly templates = contentChildren(SiTreeViewItemTemplateDirective);\n\n private initialized = false;\n private updateTreeItemHeightRequired = true; // must be set to true so the height is initially calculated once at least\n private updateGroupItemHeightRequired = true; // must be set to true so the height is initially calculated once at least\n private selectedTreeItems: TreeItem[] = [];\n private manuallySelectedTreeItems = false;\n private latestFolderChanged?: TreeItem;\n private breadCrumbTreeItems: TreeItem[] = [];\n private subscriptions: Subscription[] = [];\n private multiSelectionStart!: TreeItem;\n private _multiSelectionActive = false;\n private domChangeObserver?: MutationObserver;\n private scroll$!: Observable<Event>;\n\n private element = inject(ElementRef);\n private siTreeViewService = inject(SiTreeViewService);\n private siTreeViewConverterService = inject(SiTreeViewConverterService);\n private siTreeViewVirtualizationService = inject(SiTreeViewVirtualizationService);\n private siTreeViewItemHeightService = inject(SiTreeViewItemHeightService);\n private cdRef = inject(ChangeDetectorRef);\n private resizeObserver = inject(ResizeObserverService);\n private injector = inject(INJECTOR);\n /**\n * Create a virtual root node so there is just a single root node. This makes sure the tree\n * can be fully traversed starting from any node. This is needed e.g. for recursively\n * removing the \"active\" state from other nodes.\n */\n private virtualRoot: TreeItem = { ...rootDefaults };\n\n private readonly _items = signal(this.items());\n\n private updateTreeItemDefaults(item: TreeItem): void {\n item.showCheckbox ??= this.enableCheckbox();\n item.showOptionbox ??= this.enableOptionbox();\n }\n\n /**\n * @internal\n */\n readonly computedIcons = computed(() => {\n return {\n ...DEFAULT_TREE_ICON_SET,\n ...this.icons()\n };\n });\n\n /** @internal */\n scrollChildIntoView: Subject<TreeItem> = new Subject<TreeItem>();\n /** @internal */\n childrenLoaded: Subject<TreeItem> = new Subject<TreeItem>();\n /**\n * @internal\n * Used internally by `SiTreeViewItemDirective` to determine if the items have changed,\n * and render the new items.\n */\n evaluateForTreeItemsDiffer = new Subject<void>();\n /** @internal */\n hasAnyChildren = true;\n\n /**\n * Gets the height of the div above the virtualized rows.\n */\n protected get heightBefore(): string {\n return this.siTreeViewVirtualizationService.heightBefore + 'px';\n }\n\n /**\n * Gets the height of the div below the virtualized rows.\n */\n protected get heightAfter(): string {\n return this.siTreeViewVirtualizationService.heightAfter + 'px';\n }\n\n /**\n * @internal\n * This is meant to be used for internal purpose.\n * Returns the virtualized items in the tree list uses virtualization, otherwise all items are returned as a flat list.\n * Bind these to the HTML.\n */\n get itemsVirtualized(): TreeItem[] {\n return this.isVirtualized()\n ? this.siTreeViewVirtualizationService.itemsVirtualized\n : this.siTreeViewConverterService.flattenedTrees;\n }\n\n protected readonly children = viewChildren(SiTreeViewItemComponent);\n\n protected readonly treeItemContentTemplate = contentChild(SiTreeViewItemDirective, {\n read: TemplateRef\n });\n\n private readonly nextItems = contentChildren(SiTreeViewItemComponent, { descendants: true });\n\n private keyManager!: FocusKeyManager<SiTreeViewItemComponent>;\n\n /**\n * @internal\n * Returns index of the currently active Tree Item element in DOM\n * or null if there is no active tree item element\n */\n get activeIndex(): number | null {\n // This method is called before afterViewInit. Everywhere else keymanager can be expected to exist.\n return this.keyManager?.activeItemIndex;\n }\n\n /** Can be used for [cdkDropListData] when using cdk drag and drop. */\n get dropListItems(): TreeItem[] {\n return this.itemsVirtualized;\n }\n\n ngOnChanges(changes: SimpleChanges<this>): void {\n // Compact mode change the CSS margins so it is necessary to\n // re-calc the tree item height\n if (changes.compactMode || changes.enableDataField1 || changes.enableDataField2) {\n this.updateTreeItemHeightRequired = true;\n }\n\n if (changes.flatTree) {\n this.handleTreeMode();\n }\n\n if (changes.pageSize) {\n this.siTreeViewVirtualizationService.pageSize = this.pageSize();\n this.resetVirtualizedItemList();\n }\n\n if (changes.pagesVirtualized) {\n this.siTreeViewVirtualizationService.pagesVirtualized = this.pagesVirtualized();\n this.resetVirtualizedItemList();\n }\n\n if (changes.enableCheckbox) {\n for (const element of this._items()) {\n enableCheckboxRecursive(element, this.enableCheckbox());\n }\n }\n\n if (changes.enableOptionbox) {\n for (const element of this._items()) {\n enableOptionboxRecursive(element, this.enableOptionbox());\n }\n }\n\n if (changes.groupedList) {\n this.siTreeViewService.groupedList = this.groupedList();\n if (this.groupedList()) {\n this.updateGroupItemHeightRequired = true;\n }\n this.fillFlattenedTree(this._items(), true);\n }\n\n if (changes.items) {\n this.treeItemsUpdated();\n }\n\n if (changes.selectedItem) {\n this.selectTreeItems(this.selectedItem());\n }\n }\n\n ngOnInit(): void {\n this.scroll$ = defer(() => fromEvent(this.treeViewInnerElement().nativeElement, 'scroll'));\n this.siTreeViewService.scroll$ = this.scroll$;\n if (this.isVirtualized()) {\n this.subscriptions.push(this.scroll$.subscribe(event => this.onScroll(event)));\n }\n\n this.subscriptions.push(\n this.siTreeViewService.clickEvent.subscribe(event => this.onItemClicked(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.folderClickEvent.subscribe(event => this.onItemFolderClicked(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.checkboxClickEvent.subscribe(event =>\n this.onItemCheckboxClicked(event)\n )\n );\n this.subscriptions.push(\n this.siTreeViewService.loadChildrenEvent.subscribe(event => this.onLoadChildren(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.scrollIntoViewEvent.subscribe(event => this.onScrollIntoView(event))\n );\n this.subscriptions.push(\n this.siTreeViewService.focusParentEvent.subscribe(event => {\n if (!this.flatTree()) {\n this.focusParentItem(event);\n return;\n }\n this.onFlatTreeNavigateUp();\n })\n );\n this.subscriptions.push(\n this.siTreeViewService.focusFirstChildEvent.subscribe(event =>\n this.focusFirstChildItem(event)\n )\n );\n this.subscriptions.push(\n this.siTreeViewVirtualizationService.itemsVirtualizedChanged.subscribe(\n (event: ItemsVirtualizedArgs) => {\n this.itemsVirtualizedChanged.emit(event);\n this.evaluateForTreeItemsDiffer.next();\n this.cdRef.markForCheck();\n }\n )\n );\n this.initialized = true;\n this.handleTreeMode();\n }\n\n ngAfterViewInit(): void {\n this.addClassObserver();\n this.subscriptions.push(this.monitorTreeSizeChanges().subscribe(d => this.updatePageSize(d)));\n this.keyManager = new FocusKeyManager(this.getChildren(), this.injector)\n .withWrap()\n .withAllowedModifierKeys(['shiftKey'])\n .withHomeAndEnd()\n .withTypeAhead();\n\n queueMicrotask(() => this.keyManager.updateActiveItem(0));\n }\n\n ngAfterViewChecked(): void {\n if (\n this.updateTreeItemHeightRequired &&\n this.siTreeViewConverterService.flattenedTrees.length > 0\n ) {\n const oldHeight = this.siTreeViewItemHeightService.itemHeight;\n let newHeight: number | undefined;\n if (this.isVirtualized()) {\n newHeight = this.siTreeViewItemHeightService.updateItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n this.siTreeViewVirtualizationService.itemBaseIdx,\n this.siTreeViewVirtualizationService.itemsVirtualizedCount\n );\n } else {\n newHeight = this.siTreeViewItemHeightService.updateItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n 0,\n this.siTreeViewConverterService.flattenedTrees.length\n );\n }\n\n if (newHeight !== undefined && newHeight > 0) {\n this.updateTreeItemHeightRequired = false;\n if (oldHeight !== newHeight) {\n const task: () => void = () => {\n this.updateVirtualizedItemList();\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n }\n\n if (\n this.updateGroupItemHeightRequired &&\n this.siTreeViewConverterService.flattenedTrees.length > 0\n ) {\n const oldHeight = this.siTreeViewItemHeightService.groupItemHeight;\n let newHeight: number | undefined;\n if (this.isVirtualized()) {\n newHeight = this.siTreeViewItemHeightService.updateGroupedItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n this.siTreeViewVirtualizationService.itemBaseIdx,\n this.siTreeViewVirtualizationService.itemsVirtualizedCount\n );\n } else {\n newHeight = this.siTreeViewItemHeightService.updateGroupedItemHeight(\n this.treeViewInnerElement().nativeElement,\n this.siTreeViewConverterService.flattenedTrees,\n 0,\n this.siTreeViewConverterService.flattenedTrees.length\n );\n }\n\n if (newHeight !== undefined) {\n this.updateGroupItemHeightRequired = false;\n if (oldHeight !== newHeight) {\n const task: () => void = () => {\n this.updateVirtualizedItemList();\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions\n .filter(subscription => !!subscription)\n .forEach(subscription => subscription.unsubscribe());\n this.domChangeObserver?.disconnect();\n }\n\n /**\n * Returns the last breadcrumb tree item. Can be null in case the flat tree\n * shows the root.\n */\n protected get lastBreadCrumbItem(): TreeItem | null {\n const item = this.breadCrumbTreeItems[this.breadCrumbTreeItems.length - 1];\n return item ? item : null;\n }\n\n /**\n * Returns true if the header shows the root/home of the tree.\n */\n protected get headerShowsRoot(): boolean {\n return this.lastBreadCrumbItem == null;\n }\n\n /**\n * Called by the owner of the tree upon returning the retrieved children of a\n * 'load children' request.\n */\n private childrenLoadingDone(item: TreeItem, children: TreeItem[]): void {\n const oldState = item.state ?? 'collapsed';\n if (item?.state === 'expanding') {\n initializeTreeItemsRecursive(children, item, itemToUpdate =>\n this.updateTreeItemDefaults(itemToUpdate)\n );\n item.children = children;\n item.state = 'expanded';\n }\n const newState = item.state ?? 'collapsed';\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n\n if (this.flatTree()) {\n this.fillFlattenedTree(children);\n this.focusFirstItemFlattened();\n } else {\n this.fillFlattenedTree(this._items());\n }\n if (oldState !== newState) {\n this.treeItemFolderStateChanged.emit(new FolderStateEventArgs(item, oldState, newState));\n }\n this.childrenLoaded.next(item);\n this.cdRef.markForCheck();\n }\n\n protected onFlatTreeNavigateUp(): void {\n if (this.lastBreadCrumbItem) {\n const last = this.lastBreadCrumbItem;\n this.onBreadCrumbItemClicked(last.parent);\n setTimeout(() => this.focusItem(last));\n }\n }\n\n protected onFlatTreeNavigateHome(): void {\n this.onBreadCrumbItemClicked();\n this.focusFirstItemFlattened();\n }\n\n private getChildren(): Signal<readonly SiTreeViewItemComponent[]> {\n return !this.treeItemContentTemplate() ? this.children : this.nextItems;\n }\n\n private focusItem(item: TreeItem): void {\n const children = this.getChildren();\n const component = children()?.find(child => child.treeItem === item);\n if (component) {\n this.keyManager.setActiveItem(component);\n }\n }\n\n private focusParentItem(item: TreeItem): void {\n const parent = item.parent;\n if (parent && parent.level !== ROOT_LEVEL) {\n this.focusItem(parent);\n }\n }\n\n private focusFirstChildItem(item: TreeItem): void {\n const firstChild = item.children?.[0];\n if (firstChild) {\n const children = this.getChildren();\n const firstChildComponent = children()?.find(child => child.treeItem === firstChild);\n if (firstChildComponent) {\n this.keyManager.setActiveItem(firstChildComponent);\n }\n }\n }\n\n /**\n * Updates the tree to visualize the provided tree item by expanding all its parent items, collapsing all\n * other first level tree items and scroll to the provided item.\n * @param item - The tree item that shall be visible.\n */\n showTreeItem(item: TreeItem): void {\n this.doShowTreeItem(item);\n const task: () => void = () => {\n this.scrollChildIntoView.next(item);\n this.cdRef.markForCheck();\n };\n asyncScheduler.schedule(task, 0);\n }\n\n private doShowTreeItem(item: TreeItem, collapseOtherNodes = true): void {\n if (item.parent && item.parent.level !== ROOT_LEVEL) {\n this.expandTreeItem(item.parent);\n if (item.parent.parent && item.parent.parent.level !== ROOT_LEVEL) {\n this.doShowTreeItem(item.parent, collapseOtherNodes);\n } else if (collapseOtherNodes) {\n const myRoot = item.parent;\n for (const root of this._items()) {\n if (myRoot !== root) {\n this.collapseTreeItem(root);\n }\n }\n }\n }\n }\n\n /**\n * Expands all tree items.\n * @param items - Optional param for recursion, will expand these items. If empty, all tree items will be expanded.\n */\n expandAll(items?: TreeItem[]): void {\n (items ?? this._items()).forEach(item => {\n if (hasChildren(item) && childrenLoaded(item)) {\n if (item.state === 'collapsed') {\n this.expandTreeItem(item);\n }\n this.expandAll(item.children);\n }\n });\n }\n\n /**\n * Expands the provided tree item.\n * @param item - The tree item to be expanded.\n */\n expandTreeItem(item: TreeItem): void {\n const oldState = removeUndefinedState(item.state);\n expand(item);\n this.latestFolderChanged = item;\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(item, oldState, removeUndefinedState(item.state))\n );\n }\n\n /**\n * Collapses all tree items.\n * @param items - Optional param for recursion, will collapse these items. If empty, all tree items will be collapsed.\n */\n collapseAll(items?: TreeItem[]): void {\n (items ?? this._items()).forEach(item => {\n if (hasChildren(item)) {\n if (item.state === 'expanded' || item.state === 'expanding') {\n this.collapseTreeItem(item);\n }\n this.collapseAll(item.children);\n }\n });\n this.resetVirtualizedItemList();\n }\n\n /**\n * Collapses the provided tree item.\n * @param item - The tree item to be collapsed.\n */\n collapseTreeItem(item: TreeItem): void {\n const oldState = item.state ?? 'collapsed';\n collapse(item);\n this.latestFolderChanged = item;\n this.siTreeViewService.folderClickEvent.next(\n new FolderStateEventArgs(item, oldState, removeUndefinedState(item.state))\n );\n }\n\n /**\n * Add tree items as root elements or as children of an existing tree item.\n * @param children - Tree items to add.\n * @param parent - Optional parent tree item to which the items shall be added.\n * @param position - Optional position where to insert the tree items among their siblings.\n */\n addChildItems(children: TreeItem[], parent?: TreeItem, position?: number): void {\n addChildItems(parent ?? this.virtualRoot, children, position, item =>\n this.updateTreeItemDefaults(item)\n );\n this.refresh();\n }\n\n /**\n * Forces a refresh of the view considering the current tree item model. Needs\n * to be called when tree items have been added, removed, or updated via model\n * in ways that do not trigger an automatic update of the view.\n */\n refresh(): void {\n if (!this.flatTree()) {\n this.fillFlattenedTree(this._items());\n } else {\n this.fillFlattenedTree(this.evalListItemsForFlatTreeMode());\n }\n this.cdRef.markForCheck();\n }\n\n /**\n * Scrolls the specified tree item into view. Tree items will be expanded if\n * required.\n */\n scrollItemIntoView(treeItem: TreeItem): void {\n this.onScrollIntoViewByConsumer(treeItem);\n }\n\n private evalListItemsForFlatTreeMode(): TreeItem[] {\n return this.lastBreadCrumbItem ? (this.lastBreadCrumbItem.children ?? []) : this._items();\n }\n\n private collapseChildrenFlatTreeModeOnly(items: TreeItem[]): void {\n this.collapseChildren(items, true);\n }\n\n private collapseChildren(items: TreeItem[], flatModeOnly: boolean = false): void {\n if (flatModeOnly && !this.flatTree()) {\n return;\n }\n\n for (const item of items) {\n if (item.state === 'expanded' || item.state === 'expanding') {\n const oldState = item.state;\n collapse(item);\n this.latestFolderChanged = item;\n this.treeItemFolderStateChanged.emit(new FolderStateEventArgs(item, oldState, item.state));\n }\n }\n }\n\n protected onKeyUpShift(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onKeyUpCtrl(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onKeyUpMeta(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected onMouseLeave(): void {\n if (this._multiSelectionActive) {\n this._multiSelectionActive = false;\n this.emitSelectedItems();\n }\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n this.keyManager.onKeydown(event);\n }\n\n private onItemClicked(event: ClickEventArgs): void {\n let skipFocus = false;\n\n if (!event.target.selectable) {\n return;\n }\n\n this.manuallySelectedTreeItems = true;\n\n if (\n (event.mouseEvent.ctrlKey ||\n (navigator.userAgent.includes('Mac') && event.mouseEvent.metaKey)) &&\n !this.singleSelectMode()\n ) {\n this._multiSelectionActive = true;\n this.multiSelectionStart = event.target;\n if (event.target.selected) {\n skipFocus = true;\n }\n event.target.selected = !event.target.selected;\n\n if (event.target.selected && !this.singleSelectMode()) {\n this.selectedTreeItems.push(event.target);\n } else {\n const idx: number = this.selectedTreeItems.indexOf(event.target);\n if (idx !== -1) {\n this.selectedTreeItems.splice(idx, 1);\n }\n }\n } else if (event.mouseEvent.shiftKey && !this.singleSelectMode()) {\n this._multiSelectionActive = true;\n\n // If the anchor has not been established, set it to the first item in the selected\n // items list if defined ELSE the first item in the tree\n if (!this.multiSelectionStart) {\n this.multiSelectionStart = this.selectedTreeItems?.[0] ?? this._items()?.[0];\n }\n\n // If the tree is in flat mode, ensure the anchor is inside the currently selected folder\n if (this.flatTree()) {\n const treeItems: TreeItem[] =\n (event.target.parent ? event.target.parent.children : this._items()) ?? [];\n if (treeItems.findIndex(ti => ti === this.multiSelectionStart) < 0) {\n // Move anchor to top-level item in current folder!\n this.multiSelectionStart = treeItems[0];\n }\n }\n\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n\n this.multiSelectionStart.selected = true;\n const selectedItems = selectItemsBetween(\n this._items(),\n this.multiSelectionStart,\n event.target\n );\n this.selectedTreeItems = [this.multiSelectionStart];\n\n if (selectedItems) {\n this.selectedTreeItems.push(...selectedItems);\n }\n } else {\n this.multiSelectionStart = event.target;\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n event.target.selected = true;\n this.selectedTreeItems = [event.target];\n }\n\n for (const element of this._items()) {\n resetActive(element);\n }\n\n if (!skipFocus) {\n setActive(event.target, true);\n }\n\n this.treeItemClicked.emit(event.target);\n if (!this._multiSelectionActive) {\n this.emitSelectedItems();\n // Note, if multi selection would be active, we would emit the selected items only upon 'keyup' event for Shift and Control\n // and upon document.mouseleave event\n }\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n }\n\n private emitSelectedItems(): void {\n if (this.enableSelection()) {\n if (this.siTreeViewService.groupedList) {\n const filtered: TreeItem[] = this.selectedTreeItems.filter(\n item => !this.siTreeViewService.isGroupedItem(item)\n );\n this.treeItemsSelected.emit(filtered);\n } else {\n this.treeItemsSelected.emit(this.selectedTreeItems);\n }\n }\n }\n\n private handleTreeMode(): void {\n let ti: TreeItem | undefined;\n\n if (this.isVirtualized()) {\n ti = this.siTreeViewVirtualizationService.calculateFirstVisibleTreeItem();\n }\n\n if (this.flatTree()) {\n this.siTreeViewService.childrenIndentation = 0;\n\n if (this.selectedTreeItems.length && this.manuallySelectedTreeItems) {\n // manually selected items => display the (children of) parent of the (highest or first) selected item,\n // if there is no parent display the root node\n const sorted = this.selectedTreeItems.sort(\n (itemA, itemB) => (itemA.level ?? 0) - (itemB.level ?? 0)\n );\n this.fillFlattenedTree(sorted[0].parent?.children ?? this._items(), true);\n } else if (!this.latestFolderChanged) {\n // no folder state change of any tree item so far => display the root item in the list\n this.fillFlattenedTree(this._items(), true);\n } else if (this.latestFolderChanged.state === 'expanded') {\n this.fillFlattenedTree(this.latestFolderChanged.children ?? [], true);\n } else if (this.latestFolderChanged.parent) {\n this.fillFlattenedTree(this.latestFolderChanged.parent?.children ?? [], true);\n } else {\n this.fillFlattenedTree(this._items(), true);\n }\n\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n if (ti && !this.siTreeViewConverterService.flattenedTrees.includes(ti, 0)) {\n ti = this.siTreeViewConverterService.flattenedTrees[0];\n }\n } else {\n this.siTreeViewService.childrenIndentation = this.childrenIndentation();\n this.fillFlattenedTree(this._items(), true);\n }\n\n this.onScrollIntoViewByConsumer(ti);\n }\n\n private evalLowestBreadCrumbNode(): TreeItem | undefined {\n if (this.latestFolderChanged) {\n return this.latestFolderChanged.state === 'expanded'\n ? this.latestFolderChanged\n : this.latestFolderChanged.parent;\n }\n return undefined;\n }\n\n protected readonly treeViewInnerElement =\n viewChild.required<ElementRef<HTMLDivElement>>('treeViewInner');\n\n private onItemFolderClicked(eventArgs: FolderStateEventArgs): void {\n this.treeItemFolderClicked.emit(eventArgs);\n this.treeItemFolderStateChanged.emit(eventArgs);\n this.latestFolderChanged = eventArgs.treeItem;\n this.updateBreadCrumb(this.evalLowestBreadCrumbNode());\n\n if (!this.flatTree()) {\n this.fillFlattenedTree(this._items());\n } else if (this.latestFolderChanged.state === 'expanded') {\n this.fillFlattenedTree(this.latestFolderChanged.children ?? []);\n this.focusFirstItemFlattened();\n }\n }\n\n private updateBreadCrumb(treeItem?: TreeItem): void {\n if (!treeItem || treeItem.level === ROOT_LEVEL) {\n this.breadCrumbTreeItems = [];\n } else {\n this.breadCrumbTreeItems = [treeItem];\n this.pushParentItemsIntoBreadCrumbRecursive(treeItem);\n this.breadCrumbTreeItems = this.breadCrumbTreeItems.reverse();\n }\n }\n\n private pushParentItemsIntoBreadCrumbRecursive(treeItem: TreeItem): void {\n if (treeItem?.parent && treeItem?.parent?.level !== ROOT_LEVEL) {\n this.breadCrumbTreeItems.push(treeItem.parent);\n this.pushParentItemsIntoBreadCrumbRecursive(treeItem.parent);\n }\n }\n\n private onItemCheckboxClicked(eventArgs: CheckboxClickEventArgs): void {\n this.siTreeViewService.triggerMarkForCheck.next();\n this.treeItemCheckboxClicked.emit(eventArgs);\n }\n\n private onLoadChildren(treeItem: TreeItem): void {\n this.loadChildren.emit(\n new LoadChildrenEventArgs(treeItem, (item, children) =>\n this.childrenLoadingDone(item, children)\n )\n );\n }\n\n private setFlatTreeSelectedFolder(treeItem?: TreeItem): void {\n if (this.flatTree()) {\n this.latestFolderChanged = treeItem;\n if (treeItem) {\n expand(treeItem);\n }\n this.onBreadCrumbItemClicked(treeItem);\n }\n }\n\n private onBreadCrumbItemClicked(treeItem?: TreeItem): void {\n if (treeItem && treeItem.level !== ROOT_LEVEL) {\n this.fillFlattenedTree(treeItem.children ?? [], true);\n this.focusFirstItemFlattened();\n } else {\n this.fillFlattenedTree(this._items(), true);\n this.focusFirstItemFlattened();\n }\n this.updateBreadCrumb(treeItem);\n }\n\n private onScroll(event: Event): void {\n if (this.isVirtualized()) {\n const scrollTop: number = (event.target as Element).scrollTop;\n this.siTreeViewVirtualizationService.handleScroll(\n scrollTop,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n }\n\n /**\n * Called by the consumer when he wants a node to be scrolled into view.\n */\n private onScrollIntoViewByConsumer(treeItem: TreeItem | undefined): void {\n if (treeItem) {\n if (this.isVirtualized()) {\n this.siTreeViewVirtualizationService.virtualizeItem(\n treeItem,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n // wait one cycle until the new children (in case of page virtualization) are created\n const task: () => void = () => {\n this.doShowTreeItem(treeItem, false); // keep previously opened nodes as it is\n asyncScheduler.schedule(() => {\n this.scrollChildIntoView.next(treeItem);\n this.cdRef.markForCheck();\n }, 0);\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n\n private onScrollIntoView(elementTreeItem: ElementRef): void {\n const clientRectNode = elementTreeItem.nativeElement.getBoundingClientRect();\n const clientRect = this.element.nativeElement.getBoundingClientRect();\n if (\n clientRectNode.top < clientRect.top ||\n clientRectNode.top + this.siTreeViewItemHeightService.itemHeight > clientRect.bottom\n ) {\n elementTreeItem.nativeElement.scrollIntoView();\n }\n this.cdRef.markForCheck();\n }\n\n private fillFlattenedTree(items: TreeItem[], resetVirtualization: boolean = false): void {\n this.collapseChildrenFlatTreeModeOnly(items);\n this.siTreeViewConverterService.fillFlattenedTree(items, this.flatTree());\n if (resetVirtualization) {\n this.resetVirtualizedItemList();\n } else {\n this.updateVirtualizedItemList();\n }\n this.evaluateForTreeItemsDiffer.next();\n }\n\n private focusFirstItemFlattened(): void {\n setTimeout(() => this.keyManager.setFirstItemActive());\n }\n\n private updateHasChildren(): void {\n this.hasAnyChildren = !!this.siTreeViewConverterService.flattenedTrees?.some(item =>\n hasChildren(item)\n );\n }\n\n protected updateVirtualizedItemList(): void {\n this.updateHasChildren();\n if (this.isVirtualized() && this.initialized) {\n this.siTreeViewVirtualizationService.updateVirtualizedItemList(\n this.siTreeViewConverterService.flattenedTrees\n );\n this.cdRef.markForCheck();\n }\n }\n\n private resetVirtualizedItemList(): void {\n this.updateHasChildren();\n if (this.isVirtualized() && this.initialized) {\n this.siTreeViewVirtualizationService.resetVirtualizedItemList(\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n }\n\n /**\n * Track class changes since adding classes like `.tree-sm` or `.tree-xs` change the item height.\n * Changes have to trigger the SiTreeViewItemHeightService otherwise the virtualized items are\n * calculated incorrectly which cause rendering issues.\n */\n private addClassObserver(): void {\n this.domChangeObserver = new MutationObserver((mutations: MutationRecord[]) => {\n mutations.forEach((mutation: MutationRecord) => {\n this.updateTreeItemHeightRequired = true;\n if (this.groupedList()) {\n this.updateGroupItemHeightRequired = true;\n }\n\n this.cdRef.markForCheck();\n });\n });\n\n this.domChangeObserver.observe(this.element.nativeElement, {\n attributeFilter: ['class', 'style']\n });\n }\n\n /**\n * Create an observable to track visible dimensions and item height of the tree view.\n * It's necessary to dynamically increase the `pageSize` to render the correct amount\n * of visible tree items.\n * @returns observable with the current tree dimensions.\n */\n private monitorTreeSizeChanges(): Observable<ElementDimensions> {\n const resize = this.resizeObserver.observe(this.element.nativeElement, 100, true, true);\n const merged = merge(resize, this.siTreeViewItemHeightService.itemHeightChange);\n return merged.pipe(\n withLatestFrom(resize),\n map(x => x[1])\n );\n }\n\n /**\n * Dynamically calculate and update the virtual pageSize to render the correct amount of tree items.\n * @param dimension - current tree dimensions.\n */\n private updatePageSize(dimension: ElementDimensions): void {\n if (this.isVirtualized()) {\n // Re-calc number of virtualized items based on the visible component dimensions\n const itemHeight = this.siTreeViewItemHeightService.itemHeight;\n // Proceeding with itemHeight==0 leads to an error in\n // SiTreeViewVirtualizationService.updateListItemsTypeCount. It happens\n // when the component is created but not yet visible.\n if (!itemHeight) {\n return;\n }\n // Set page size to half the no. of items visible on the screen following\n // the recommendations in SiTreeViewVirtualizationService.\n const pageSize = Math.floor(dimension.height / itemHeight / 2);\n // Once the pageSize is initialized we are only allowed to increase\n // the number of virtualized items but do never reduce the size.\n // Since this would lead to a incorrect calculation of heightAfter\n // (see calculateBeforeAndAfter)\n if (pageSize > 0 && pageSize > this.siTreeViewVirtualizationService.pageSize) {\n this.siTreeViewVirtualizationService.pageSize = pageSize;\n }\n }\n }\n\n /**\n * Make sure to always have a single item for single selection or if there is only one item in the array.\n */\n private coerceToSelectionType(\n treeItem: TreeItem[] | TreeItem | undefined\n ): TreeItem[] | TreeItem | undefined {\n if (Array.isArray(treeItem) && (treeItem.length <= 1 || this.singleSelectMode())) {\n // If array is empty, this will set it to undefined\n return treeItem[0];\n }\n return treeItem;\n }\n\n private treeItemsUpdated(): void {\n this.selectedTreeItems = [];\n const items = this.items();\n this._items.set(items);\n this.virtualRoot = { ...rootDefaults, children: items };\n setTreeItemDefaults(this.virtualRoot, item => this.updateTreeItemDefaults(item));\n initializeTreeItemsRecursive(items, this.virtualRoot, item =>\n this.updateTreeItemDefaults(item)\n );\n this.fillFlattenedTree(items, true);\n this.latestFolderChanged = items[0];\n }\n\n private selectTreeItems(treeItem: TreeItem | TreeItem[] | undefined): void {\n const items = this.coerceToSelectionType(treeItem);\n const isMultipleTreeItems = Array.isArray(items);\n if (\n (isMultipleTreeItems && items.length) ||\n (!isMultipleTreeItems && items) ||\n this.selectedTreeItems.length\n ) {\n this.manuallySelectedTreeItems = false;\n }\n if (!isMultipleTreeItems && items && !items.selectable) {\n return;\n }\n for (const element of this._items()) {\n selectRecursive(element, false);\n }\n this.selectedTreeItems = [];\n if (!items) {\n this.siTreeViewService.triggerMarkForCheck.next();\n return;\n }\n // If this is single select or multi select with only one item\n if (!isMultipleTreeItems) {\n items.selected = true;\n this.selectedTreeItems.push(items);\n this.setFlatTreeSelectedFolder(items.parent);\n\n if (this.isVirtualized()) {\n this.siTreeViewVirtualizationService.virtualizeItem(\n items,\n this.siTreeViewConverterService.flattenedTrees\n );\n }\n // wait one cycle until the new children (in case of page virtualization) are created\n const task: () => void = () => {\n this.scrollChildIntoView.next(items);\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n };\n asyncScheduler.schedule(task, 0);\n } else {\n // Multi select with multiple items\n const task: () => void = () => {\n for (const item of items) {\n if (item.selectable === false) {\n continue;\n }\n item.selected = true;\n this.selectedTreeItems.push(item);\n }\n this.cdRef.markForCheck();\n this.siTreeViewService.triggerMarkForCheck.next();\n };\n asyncScheduler.schedule(task, 0);\n }\n }\n}\n","@if (!flatTree() && expandCollapseAll()) {\n <div class=\"si-tree-view-expand-collapse-container p-4\">\n <button\n class=\"btn btn-icon btn-tertiary element-expand-all\"\n type=\"button\"\n [title]=\"expandAllTooltip() | translate\"\n [attr.aria-label]=\"expandAllTooltip() | translate\"\n (click)=\"expandAll()\"\n >\n </button>\n <button\n class=\"btn btn-icon btn-tertiary ms-4 element-collapse-all\"\n type=\"button\"\n [title]=\"collapseAllTooltip() | translate\"\n [attr.aria-label]=\"collapseAllTooltip() | translate\"\n (click)=\"collapseAll()\"\n >\n </button>\n </div>\n}\n@if (flatTree()) {\n <div class=\"si-tree-view-header\">\n <span\n class=\"si-tree-view-header-btn si-tree-view-header-root\"\n tabindex=\"0\"\n [class]=\"computedIcons().headerHome\"\n [class.disabled]=\"headerShowsRoot\"\n (click)=\"onFlatTreeNavigateHome()\"\n (keydown.enter)=\"onFlatTreeNavigateHome()\"\n ></span>\n @if (lastBreadCrumbItem) {\n <span\n class=\"si-tree-view-header-btn\"\n tabindex=\"0\"\n [class]=\"computedIcons().headerArrow\"\n [class.disabled]=\"headerShowsRoot\"\n (click)=\"onFlatTreeNavigateUp()\"\n (keydown.enter)=\"onFlatTreeNavigateUp()\"\n ></span>\n <span class=\"text-center text-truncate\">{{ lastBreadCrumbItem.label | translate }}</span>\n }\n </div>\n}\n<div\n #treeViewInner\n cdkScrollable\n class=\"si-tree-view focus-inside\"\n role=\"tree\"\n [attr.aria-multiselectable]=\"!singleSelectMode()\"\n [attr.aria-label]=\"ariaLabel() ? (ariaLabel() | translate) : undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [class.si-tree-horizontal-scroll]=\"horizontalScrolling()\"\n [class.si-tree-view-flat]=\"flatTree()\"\n [class.si-tree-expand-collapse]=\"!flatTree() && expandCollapseAll()\"\n>\n @if (isVirtualized()) {\n <div [class.w-100]=\"horizontalScrolling()\" [style.height]=\"heightBefore\"></div>\n }\n @if (itemsVirtualized) {\n <div class=\"si-tree-view-root-ul\">\n <ng-content select=\"[cdkDropList], [siTreeViewItem]\" />\n @if (!treeItemContentTemplate()) {\n <si-tree-view-item *siTreeViewItem=\"let index = index; let treeItem = treeItem\" />\n }\n </div>\n }\n @if (isVirtualized()) {\n <div [class.w-100]=\"horizontalScrolling()\" [style.height]=\"heightAfter\"></div>\n }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { NgModule } from '@angular/core';\n\nimport { SiTreeViewItemTemplateDirective } from './si-tree-view-item-template.directive';\nimport { SiTreeViewItemComponent } from './si-tree-view-item/si-tree-view-item.component';\nimport { SiTreeViewItemDirective } from './si-tree-view-item/si-tree-view-item.directive';\nimport { SiTreeViewComponent } from './si-tree-view.component';\n\n@NgModule({\n imports: [\n SiTreeViewComponent,\n SiTreeViewItemComponent,\n SiTreeViewItemDirective,\n SiTreeViewItemTemplateDirective\n ],\n exports: [\n SiTreeViewComponent,\n SiTreeViewItemComponent,\n SiTreeViewItemDirective,\n SiTreeViewItemTemplateDirective\n ]\n})\nexport class SiTreeViewModule {}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport type { CdkDragDrop } from '@angular/cdk/drag-drop';\n\nimport type { TreeItem } from './si-tree-view.model';\n\n/**\n *\n * @param treeItems - TreeItem array which is used with the si-tree-view.\n * @param event - event object which is emitted by cdkDropListDropped.\n * @returns reordered TreeItems list.\n */\nexport const reorderTreeItem = (treeItems: TreeItem[], event: CdkDragDrop<any>): TreeItem[] => {\n if (event.currentIndex === event.previousIndex) {\n return treeItems;\n }\n const targetIndex =\n event.currentIndex < event.previousIndex ? event.currentIndex - 1 : event.currentIndex;\n modifyTreeStructure(treeItems, event, treeItems, targetIndex);\n return treeItems;\n};\n\n/**\n *\n * @param sourceTreeItems - TreeItem array of the source tree from where item is being dragged.\n * @param targetTreeItems - TreeItem array of the target tree where item is being dropped.\n * @param event - event object which is emitted by cdkDropListDropped.\n * @param removeFromSource - whether to remove item from its source tree after moving to target.\n * @returns modified TreeItems list of source and target trees.\n */\nexport const transferTreeItem = (\n sourceTreeItems: TreeItem[],\n targetTreeItems: TreeItem[],\n event: CdkDragDrop<TreeItem[]>,\n removeFromSource: boolean = false\n): {\n sourceTree: TreeItem[];\n targetTree: TreeItem[];\n} => {\n modifyTreeStructure(\n sourceTreeItems,\n event,\n targetTreeItems,\n event.currentIndex - 1,\n removeFromSource\n );\n return {\n sourceTree: sourceTreeItems,\n targetTree: targetTreeItems\n };\n};\n\n/**\n *\n * @param sourceTree - TreeItems array from where item needs to be removed.\n * @param itemToRemove - TreeItem which needs to be removed.\n * @returns Updated TreeItems array.\n */\nexport const removeItemFromTree = (sourceTree: TreeItem[], itemToRemove: TreeItem): TreeItem[] => {\n const sourceItem = findTreeItem(sourceTree, itemToRemove);\n const itemParent = sourceItem?.parent;\n if (!itemParent) {\n console.error('Item parent not found.');\n return sourceTree;\n }\n if (itemParent.children) {\n const itemIndex = itemParent.children.indexOf(itemToRemove);\n itemParent.children?.splice(itemIndex, 1);\n }\n return sourceTree;\n};\n\nconst findTreeItem = <T extends TreeItem>(array: T[], targetItem: T): T | null => {\n for (const obj of array) {\n // Check if the current item reference is the same as the target object reference\n if (obj === targetItem) {\n return obj; // Found the item, return it\n }\n // If the current item has nested children, recursively search within them\n const key = 'children';\n if (Array.isArray(obj[key])) {\n const found = findTreeItem(obj[key] as T[], targetItem);\n if (found) return found; // If found in nested array, return it\n }\n }\n return null; // Object not found\n};\n\nconst modifyTreeStructure = (\n sourceItems: TreeItem[],\n event: CdkDragDrop<TreeItem[]>,\n targetItems: TreeItem[],\n targetIndex: number,\n removeFromSource = true\n): void => {\n const sourceTreeItem = findTreeItem(\n sourceItems,\n event.previousContainer.data[event.previousIndex]\n );\n\n if (!sourceTreeItem) {\n console.error('Source tree item not found');\n return;\n }\n\n const sourceTreeItemCopy = structuredClone(sourceTreeItem);\n\n const targetTreeItem = findTreeItem<TreeItem>(\n targetItems,\n event.container.data[targetIndex < 0 ? 0 : targetIndex]\n );\n\n if (!targetTreeItem) {\n console.error('Target tree item not found');\n return;\n }\n\n if (findTreeItem(sourceTreeItem.children!, targetTreeItem)) {\n console.error('Cannot move parent into its own child');\n return;\n }\n\n const targetItemParent = targetTreeItem?.parent;\n if (targetIndex < 0) {\n sourceTreeItemCopy.parent = targetItemParent;\n sourceTreeItemCopy.level = targetItemParent?.level ? targetItemParent.level + 1 : 0;\n targetItemParent?.children?.splice(0, 0, sourceTreeItemCopy);\n } else if (targetTreeItem?.state === 'expanded') {\n sourceTreeItemCopy.parent = targetTreeItem;\n sourceTreeItemCopy.level = targetTreeItem.level ? targetTreeItem.level + 1 : 0;\n if (targetTreeItem.children?.length) {\n targetTreeItem.children = [sourceTreeItemCopy, ...targetTreeItem.children];\n } else {\n targetTreeItem.children = [sourceTreeItemCopy];\n }\n } else {\n if (targetItemParent) {\n const targetItemIndex = targetItemParent.children?.indexOf(targetTreeItem) ?? -1;\n sourceTreeItemCopy.parent = targetItemParent;\n sourceTreeItemCopy.level = targetItemParent.level ? targetItemParent.level + 1 : 0;\n targetItemParent?.children?.splice(targetItemIndex + 1, 0, sourceTreeItemCopy);\n }\n }\n const sourceTreeItemParent = sourceTreeItem.parent;\n if (removeFromSource && sourceTreeItemParent) {\n const sourceItemIndex = sourceTreeItemParent.children?.indexOf(sourceTreeItem) ?? -1;\n sourceTreeItemParent?.children?.splice(sourceItemIndex, 1);\n }\n};\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-tree-view-item-template.directive';\nexport * from './si-tree-view-item/si-tree-view-item.component';\nexport * from './si-tree-view.component';\nexport * from './si-tree-view.module';\nexport * from './si-tree-view.model';\nexport * from './si-tree-view.utils';\nexport * from './si-tree-view-item/si-tree-view-item.directive';\nexport * from './drag-drop.util';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;AAGG;AAKH;;;;;;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