@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
92 lines • 3.28 kB
TypeScript
import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, SimpleChanges, ViewContainerRef } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { PopoverConfirmComponent } from '../modal/popover-confirm.component';
import { ClickOptions, NavigatorNode } from './navigator-node';
import * as i0 from "@angular/core";
export declare const enum ClickEventSource {
ICON = "icon",
EXPANDER = "expander",
LINK = "link"
}
/**
* Navigator node renderer.
*/
export declare class NavigatorNodeComponent implements AfterViewInit, OnChanges, OnDestroy {
private router;
/**
* @ignore
*/
iconSlot: ViewContainerRef;
/**
* Navigator node.
*/
node: NavigatorNode;
/**
* Determines whether the navigator node is a root node (top node in the hierarchy).
*/
isRoot: boolean;
/**
* Event emitter responsible for broadcasting one of the following events: "icon", "expander" or "link" as string value.
*
* The type of event depends on where you click on the navigator node:
* * clicking the icon will broadcast the event "icon",
* * clicking the expander will broadcast the event "expander",
* * clicking the label will broadcast the event "link".
*/
nodeClick: EventEmitter<string>;
/**
* @ignore
*/
confirm: PopoverConfirmComponent;
private viewInitTimeout;
/**
* A subject that is triggered as soon as the navigator node is initialized.
*/
nodeInit$: Subject<void>;
/**
* A observable which emits, as soon as the active state of the node changes.
*/
isActive$: import("rxjs").Observable<boolean>;
constructor(router: Router);
ngOnChanges(changes: SimpleChanges): void;
/**
* @ignore
*/
ngAfterViewInit(): void;
/**
* Returns the expander title.
*/
get expandTitle(): "Expand" | "Collapse";
/**
* Click event handler.
*
* @param {string} from Source of the click event.
* @param event DOM event.
*/
click(from?: 'icon' | 'expander' | 'link', $event?: MouseEvent): void;
/**
* Expands or collapses the navigator node and its children recursively.
*
* @param {boolean} open Open or close the node.
* @param {ClickOptions} forNode Click options.
*/
expandCollapse(open: any, forNode?: ClickOptions): void;
/**
* @ignore
*/
ngOnDestroy(): void;
/**
* Expands the parent nodes recursively.
* @param nodes The nodes that should be tried to get opened.
* @param clickOption The click options to perform on the parent nodes.
*/
expandRecursiveParent(nodes: NavigatorNode[], clickOption?: ClickOptions): void;
private handleExpandCollapse;
private updateIcon;
private updateIconComponent;
private updateIconTemplate;
static ɵfac: i0.ɵɵFactoryDeclaration<NavigatorNodeComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NavigatorNodeComponent, "c8y-navigator-node", never, { "node": { "alias": "node"; "required": false; }; "isRoot": { "alias": "isRoot"; "required": false; }; }, { "nodeClick": "nodeClick"; }, never, never, true, never>;
}
//# sourceMappingURL=navigator-node.component.d.ts.map