@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
51 lines (50 loc) • 2.04 kB
TypeScript
import { OnDestroy } from "@angular/core";
import { EventBus, IEvent, IEventDefinition } from "@nova-ui/bits";
import { PizzagnaService } from "../pizzagna/services/pizzagna.service";
import { IConfigurable, IProperties } from "../types";
import { EventRegistryService } from "./event-registry.service";
import { WidgetConfigurationService } from "./widget-configuration.service";
export interface IWidgetEvent extends IEvent {
widgetId?: string;
}
/**
* Configuration of WidgetToDashboardEventProxy
*/
export interface IWidgetToDashboardEventProxyConfiguration extends IProperties {
/**
* List of events that are transmitted from widget to dashboard
*/
upstreams?: string[];
/**
* List of events that are transmitted from dashboard to widget
*/
downstreams?: string[];
}
/**
* This provider transmits events between the dashboard event bus and the widget event bus.
* It needs to be configured with the events that need transmission each way.
*/
export declare class WidgetToDashboardEventProxyService implements IConfigurable, OnDestroy {
private pizzagnaBus;
private dashboardBus;
private widgetConfigurationService;
private eventRegistry;
private pizzagnaService;
private upstreamSubscriptions;
private downstreamSubscriptions;
private readonly destroy$;
private component;
private upstreams?;
private downstreams?;
providerKey: string;
constructor(pizzagnaBus: EventBus<IEvent>, dashboardBus: EventBus<IEvent>, widgetConfigurationService: WidgetConfigurationService, eventRegistry: EventRegistryService, pizzagnaService: PizzagnaService);
ngOnDestroy(): void;
setComponent(component: any): void;
updateConfiguration(properties: IWidgetToDashboardEventProxyConfiguration): void;
addUpstream(stream: IEventDefinition): void;
addDownstream(stream: IEventDefinition): void;
private addStream;
private registerUpstreamSubscriptions;
private registerDownstreamSubscriptions;
private registerSubscriptions;
}