@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
37 lines • 1.7 kB
TypeScript
import { NavigatorNode } from './navigator-node';
import { NavigatorNodeData } from './navigator-node-data';
/**
* Root navigator node. Top node in the hierarchy.
* The root node is used as an anchor point for the rest of the nodes.
*/
export declare class NavigatorNodeRoot extends NavigatorNode {
/**
* Adds top nodes to the navigator tree structure. These nodes are the direct children of the root node.
* In the case of the cockpit application, such a node is, for example, the "Home" menu entry.
*
* ```ts
* const nodeData: NavigatorNodeData = { label: 'Home' } ;
* const root: NavigatorNodeRoot = new NavigatorNodeRoot();
*
* // Based on the node data, a new node will be created and assigned to root.
* root.addRoot(nodeData);
*
* const parentNode: NavigatorNode = new NavigatorNode({ label: 'Configuration'...});
* const nodeData: NavigatorNodeData = { label: 'Exports', parent: parentNode } ;
* const root: NavigatorNodeRoot = new NavigatorNodeRoot();
*
* // Based on the node data, parent node will be directly assigned to the root node, and newly created child node
* // will be added to the parent node.
* root.add(nodeData);
* ```
*
* @param {Partial<NavigatorNodeData>} nodeData Data on the basis of which a new node is created.
*/
addRoot(nodeData: Partial<NavigatorNodeData>): any;
/**
* Creates a new navigator node.
* @param nodeData The data that serves as the basis for creating a new node.
*/
createNode(nodeData: string | object | NavigatorNodeData | NavigatorNode): NavigatorNode;
}
//# sourceMappingURL=navigator-node-root.d.ts.map