@porscheinformatik/clr-addons
Version: 
Addon components for Clarity Angular
60 lines (59 loc) • 2.72 kB
TypeScript
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
import '@cds/core/icon/register.js';
import { LocationBarNode, NodeId } from '../location-bar.model';
import { LocationBarContentProvider } from '../location-bar.provider';
import { SearchRequestModel, SearchResultModel } from '../location-bar.search.model';
import { LocationBarSearchComponent } from '../location-bar-search/location-bar-search.component';
import * as i0 from "@angular/core";
/**
 * Component which renders a node of the location bar.
 */
export declare class LocationBarNodeComponent<T extends NodeId> implements OnChanges {
    contentProvider: LocationBarContentProvider<T>;
    /**
     * The parent node of this component
     */
    private _parentNode;
    /**
     * The selectable nodes
     */
    selectableChilds: LocationBarNode<T>[];
    searchText: string;
    focus: boolean;
    readonly SEARCH_ITEM_STORAGE_KEY: string;
    set parentNode(parentNode: LocationBarNode<T>);
    searchResultItems: SearchResultModel[];
    searchRequest: SearchRequestModel;
    /**
     * Emits selection changes
     */
    selectionChanged: EventEmitter<T[]>;
    searchItemChanged: EventEmitter<SearchResultModel>;
    set locationBarSearch(search: LocationBarSearchComponent);
    constructor(contentProvider: LocationBarContentProvider<T>);
    ngOnChanges(changes: SimpleChanges): void;
    get parentNode(): LocationBarNode<T>;
    private getLazyChildren;
    private prepareChildren;
    /**
     * Listens for selection changes of child components and re-emits the selection event.
     * @param selection The changed selection of child components
     */
    onSelectionChanged(selection: T[]): void;
    /**
     * Selects the given node
     * @param selectedNode The selected child node.
     */
    selectNode(selectedNode: LocationBarNode<T>): void;
    /**
     * Method called internally to emit the selection event
     * @param selectedNode The node which has been selected
     */
    private notifySelectionChanged;
    onSearch(text: string): void;
    displaySearchResult(): boolean;
    resetSearch(): void;
    onSearchItemChanged(item: SearchResultModel): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<LocationBarNodeComponent<any>, [{ optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<LocationBarNodeComponent<any>, "clr-location-bar-node", never, { "parentNode": { "alias": "parentNode"; "required": false; }; "searchResultItems": { "alias": "clrSearchResultItems"; "required": false; }; "searchRequest": { "alias": "clrSearchRequest"; "required": false; }; }, { "selectionChanged": "selectionChanged"; "searchItemChanged": "searchItemChanged"; }, never, ["*"], false, never>;
}