import * as i0 from '@angular/core'; import { OnInit, OnDestroy, TemplateRef } from '@angular/core'; import { FormBuilder, NgForm, ValidatorFn } from '@angular/forms'; import { OnBeforeSave, MeasurementRealtimeService } from '@c8y/ngx-components'; import { WidgetConfigComponent, WidgetConfigService, ContextDashboardComponent } from '@c8y/ngx-components/context-dashboard'; import { KPIDetails, DatapointSelectorModalOptions, DatapointAttributesFormConfig } from '@c8y/ngx-components/datapoint-selector'; import { Observable } from 'rxjs'; import { SupportedIconsSuggestions } from '@c8y/ngx-components/icon-selector/icons'; interface KpiWidgetConfig { datapoints: KPIDetails[]; icon?: SupportedIconsSuggestions | null; showTimestamp?: boolean | null; showTrend?: boolean | null; showIcon?: boolean | null; numberOfDecimalPlaces?: number | null; fontSize?: number | null; } declare function exactlyASingleDatapointActive(): ValidatorFn; declare class KpiWidgetConfigComponent implements OnInit, OnDestroy, OnBeforeSave { private formBuilder; private form; private widgetConfig; private widgetConfigService; set previewMapSet(template: TemplateRef); config: KpiWidgetConfig; previewActiveDatapoint: KPIDetails; datapointSelectionConfig: Partial; defaultFormOptions: Partial; formGroup: ReturnType; availableIcons: string[]; previewConfig: KpiWidgetConfig; private destroy$; private limits; constructor(formBuilder: FormBuilder, form: NgForm, widgetConfig: WidgetConfigComponent, widgetConfigService: WidgetConfigService); onBeforeSave(config?: KpiWidgetConfig): boolean | Promise | Observable; ngOnInit(): Promise; ngOnDestroy(): void; private applyLimits; private initForm; private createPreviewLimitedValue; private createForm; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface MeasurementValue { unit?: string; value: number; date: string; } declare enum ColorClass { danger = "text-danger", warning = "text-warning", unknown = "" } declare class KpiWidgetViewComponent implements OnInit { private measurementRealtime; private dashboard; config: KpiWidgetConfig; state$: Observable<{ latestMeasurement: MeasurementValue; previousValue: MeasurementValue | undefined; trend: string; unit: string; colorClass: ColorClass; }>; noDataInitiallyInDB: boolean; constructor(measurementRealtime: MeasurementRealtimeService, dashboard: ContextDashboardComponent); ngOnInit(): Promise; setupObservable(datapoint: KPIDetails): Observable<{ latestMeasurement: MeasurementValue; previousValue: MeasurementValue | undefined; trend: string; unit: string; colorClass: ColorClass; }>; private getLatestMeasurement$; private getColorClass$; private getLastTwoValuesOfObservable$; private getTrendOfLatestMeasurements$; private inRangeOf; private assignContextFromContextDashboard; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { KpiWidgetConfigComponent, KpiWidgetViewComponent, exactlyASingleDatapointActive }; export type { KpiWidgetConfig }; //# sourceMappingURL=index.d.ts.map