@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
139 lines (138 loc) • 4.15 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { ElementRef } from '@angular/core';
import { NavigationItem } from './navigation/navigation-item.interface';
import { TreeItem } from './treeitem.interface';
import { TreeItemLookup } from './treeitem-lookup.interface';
import { TreeItemFilterState } from './drag-and-drop/models/tree-item-filter-state';
import { TreeViewFilterSettings } from './treeview-filter-settings';
import { TreeViewSize } from './size';
/**
* @hidden
*/
export declare const match: (element: any, selector: string) => boolean;
/**
* @hidden
*/
export declare const closestWithMatch: (element: any, selector: string) => HTMLElement;
/**
* @hidden
*/
export declare const noop: () => void;
/**
* @hidden
*/
export declare const isPresent: Function;
/**
* @hidden
*/
export declare const isBlank: (value: any) => boolean;
/**
* @hidden
*/
export declare const isArray: (value: any) => value is any[];
/**
* @hidden
*/
export declare const isNullOrEmptyString: (value: string) => boolean;
/**
* @hidden
*/
export declare const isBoolean: (value: any) => value is boolean;
/**
* @hidden
*/
export declare const closestNode: (element: any) => HTMLElement;
/**
* @hidden
*/
export declare const isFocusable: (element: any) => boolean;
/**
* @hidden
*/
export declare const isContent: (element: any) => boolean;
/**
* @hidden
*
* Returns the nested .k-treeview-leaf:not(.k-treeview-load-more-button) element.
* If the passed parent item is itself a content node, it is returned.
*/
export declare const getContentElement: (parent: HTMLElement) => HTMLElement;
/**
* @hidden
*/
export declare const isLoadMoreButton: (element: any) => boolean;
/**
* @hidden
*/
export declare const closest: (node: any, predicate: any) => any;
/**
* @hidden
*/
export declare const hasParent: (element: any, container: any) => boolean;
/**
* @hidden
*/
export declare const focusableNode: (element: ElementRef) => HTMLElement;
/**
* @hidden
*/
export declare const hasActiveNode: (target: any, node?: any) => boolean;
/**
* @hidden
*/
export declare const nodeId: (node: HTMLElement) => string;
/**
* @hidden
*/
export declare const nodeIndex: (item: NavigationItem | TreeItem) => string;
/**
* @hidden
*/
export declare const dataItemsEqual: (first: TreeItemLookup, second: TreeItemLookup) => boolean;
/**
* @hidden
*/
export declare const getDataItem: (lookup: {
item: TreeItem;
}) => any;
/**
* @hidden
*/
export declare const isArrayWithAtLeastOneItem: (v: any) => boolean;
/**
* @hidden
* A recursive tree-filtering algorithm that returns:
* - all child nodes of matching nodes
* - a chain parent nodes from the match to the root node
*/
export declare const filterTree: (items: TreeItemFilterState[], term: string, { operator, ignoreCase, mode }: TreeViewFilterSettings, textField: string | string[], depth?: number) => void;
/**
* @hidden
*/
export declare const buildTreeIndex: (parentIndex: string, itemIndex: string | number) => string;
/**
* @hidden
*/
export declare const buildTreeItem: (dataItem: any, currentLevelIndex: number, parentIndex?: string) => TreeItem;
/**
* @hidden
*
* Retrieves all descendant nodes' lookups which are currently registered in the provided lookup item as a flat array.
*/
export declare const fetchLoadedDescendants: (lookup: TreeItemLookup, filterExpression?: (lookup: TreeItemLookup) => boolean) => TreeItemLookup[];
/**
* @hidden
*
* Compares two Seets to determine whether all unique elements in one, are present in the other.
* Important:
* - it disregards the element order
*/
export declare const sameValues: (as: Set<any>, bs: Set<any>) => boolean;
/**
* @hidden
* Returns the size class based on the component and size input.
*/
export declare const getSizeClass: (component: string, size: TreeViewSize) => string;