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

37 lines (36 loc) 1.53 kB
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"; import * as i0 from "@angular/core"; 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; static ɵfac: i0.ɵɵFactoryDeclaration<Refresher, never>; static ɵprov: i0.ɵɵInjectableDeclaration<Refresher>; }