UNPKG

@nova-ui/dashboards

Version:

Nova Dashboards is a framework designed to provide feature developers with a common solution for presenting data coming from various sources within a single view, as well as a set of predefined widget visualizations that are 100% configuration-driven and

48 lines (47 loc) 2.45 kB
import { Portal } from "@angular/cdk/portal"; import { AfterViewInit, ComponentRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from "@angular/core"; import { IEvent, LoggerService } from "@nova-ui/bits"; import { ProviderRegistryService } from "../../../services/provider-registry.service"; import { IProviderConfiguration } from "../../../types"; import { ComponentPortalService } from "../../services/component-portal.service"; import * as i0 from "@angular/core"; export declare class ComponentPortalDirective implements OnInit, AfterViewInit, OnDestroy, OnChanges { private injector; private logger; private portalService; private renderer; private providerRegistry; componentId: string; componentType: string | Function; properties: Record<string, any>; providers: Record<string, IProviderConfiguration>; outputs: string[]; output: EventEmitter<IEvent<any>>; portal: Portal<any>; private component; private propertiesChanges; private providerInstances; private readonly destroy$; private changesSubscription?; private listenerUnsubscriber?; constructor(injector: Injector, logger: LoggerService, portalService: ComponentPortalService, renderer: Renderer2, providerRegistry: ProviderRegistryService); ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; attached(componentRef: ComponentRef<any>): void; private recreatePortal; private updateProviders; private updateProviderConfigurations; private subscribeToOutputs; private checkForProviderChanges; private destroyProviders; /** * There was a change in component properties, so we need to handle that here * * @param change a change of the `properties` input */ private applyPropertiesChange; static ɵfac: i0.ɵɵFactoryDeclaration<ComponentPortalDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentPortalDirective, "[nuiComponentPortal]", ["nuiComponentPortal"], { "componentId": { "alias": "componentId"; "required": false; }; "componentType": { "alias": "componentType"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "providers": { "alias": "providers"; "required": false; }; "outputs": { "alias": "outputs"; "required": false; }; }, { "output": "output"; }, never, never, false, never>; }