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

45 lines (44 loc) 1.85 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"; 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; }