@itwin/presentation-components
Version:
React components based on iTwin.js Presentation library
35 lines • 2.47 kB
TypeScript
/** @packageDocumentation
* @module Tree
*/
import { Observable as RxjsObservable } from "rxjs/internal/Observable";
import { DelayLoadedTreeNodeItem, Observable, TreeNodeItem, PageOptions as UiPageOptions } from "@itwin/components-react";
import { Node, NodeKey, PartialNode, PageOptions as PresentationPageOptions } from "@itwin/presentation-common";
import { InfoTreeNodeItemType, PresentationInfoTreeNodeItem, PresentationTreeNodeItem } from "./PresentationTreeNodeItem.js";
/** @internal */
export interface CreateTreeNodeItemProps {
appendChildrenCountForGroupingNodes?: boolean;
customizeTreeNodeItem?: (item: Partial<DelayLoadedTreeNodeItem>, node: Partial<Node>) => void;
}
/** @internal */
export declare function createTreeNodeItems(nodes: ReadonlyArray<Readonly<Node>>, parentId?: string, props?: CreateTreeNodeItemProps): PresentationTreeNodeItem[];
/** @internal */
export declare function createTreeNodeItem(node: Readonly<Node>, parentId?: string, props?: CreateTreeNodeItemProps): PresentationTreeNodeItem;
/** @internal */
export declare function createPartialTreeNodeItem(node: PartialNode, parentId: string | undefined, props: CreateTreeNodeItemProps): Partial<PresentationTreeNodeItem>;
/** @internal */
export declare function createTreeNodeId(key: NodeKey): string;
/**
* Applies customization from [Node]($presentation-common) to [TreeNodeItem]($components-react).
* @public
* @deprecated in 3.x. This is a temporary function to apply deprecated [Node]($presentation-common) customization attributes on a [TreeNodeItem]($components-react).
* The recommendation is to switch to using a custom customization function that looks at node's [Node.extendedData]($presentation-common) and applies
* [TreeNodeItem]($components-react) customization based on values in extended data.
* See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
*/
export declare function customizeTreeNodeItem(item: Partial<DelayLoadedTreeNodeItem>, node: Partial<Node>): void;
/** @internal */
export declare function pageOptionsUiToPresentation(pageOptions?: UiPageOptions): PresentationPageOptions | undefined;
/** @internal */
export declare function toRxjsObservable<T>(source: Observable<T>): RxjsObservable<T>;
export declare function createInfoNode(parentNode: TreeNodeItem | undefined, message: string, type?: InfoTreeNodeItemType): PresentationInfoTreeNodeItem;
//# sourceMappingURL=Utils.d.ts.map