@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
34 lines (33 loc) • 1.37 kB
TypeScript
import { NgZone, OnDestroy } from "@angular/core";
import { Subject } from "rxjs";
import { EventBus, EventDefinition } from "@nova-ui/bits";
import { RefresherSettingsService } from "./refresher-settings.service";
import { IWidgetEvent } from "../../services/widget-to-dashboard-event-proxy.service";
import { IConfigurable, IProperties } from "../../types";
export interface IRefresherProperties extends IProperties {
interval?: number;
enabled?: boolean;
overrideDefaultSettings?: boolean;
eventDef?: EventDefinition<any>;
}
/**
* This provider emits the REFRESH event every X milliseconds
*/
export declare class Refresher implements OnDestroy, IConfigurable {
protected eventBus: EventBus<IWidgetEvent>;
protected ngZone: NgZone;
protected refresherSettings: RefresherSettingsService;
private intervalRef?;
protected enabled: boolean;
protected overrideDefaultSettings: boolean;
protected interval: number;
protected eventDef: EventDefinition<unknown>;
readonly destroy$: Subject<void>;
constructor(eventBus: EventBus<IWidgetEvent>, ngZone: NgZone, refresherSettings: RefresherSettingsService);
updateConfiguration(properties: IRefresherProperties): void;
ngOnDestroy(): void;
private initializeInterval;
protected performAction(): void;
private getInterval;
private clearInterval;
}