import * as i0 from '@angular/core'; import { OnInit, SimpleChanges } from '@angular/core'; import * as _angular_forms from '@angular/forms'; import { FormBuilder } from '@angular/forms'; import { DateTimeContext, DateAndTimeOptions, WidgetTimeContextDateRangeService } from '@c8y/ngx-components'; import { Interval } from '@c8y/ngx-components/interval-picker'; import { BsDropdownDirective } from 'ngx-bootstrap/dropdown'; import { aggregationType } from '@c8y/client'; interface TimeContext { date: DateTimeContext; interval: Interval['id']; realtime: boolean; aggregation: aggregationType; } declare class DatapointExplorerService { readonly DEFAULT_INTERVAL: Interval['id']; getDefaultContext(overrides?: Partial): TimeContext; calculateAggregation([dateFrom, dateTo]: DateTimeContext, requestedAggregation: aggregationType | null): { selectedAggregation: aggregationType | null; disabledAggregations: Partial>; }; getDateTimeContextByInterval(intervalId: Interval['id']): DateTimeContext; private getTimeRangeInMs; private validateTimeRanges; private getDisabledAggregations; private determineAggregation; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class TimeContextComponent implements OnInit { #private; private widgetTimeContextDateRangeService; changedDateContext: { dateFrom?: Date; dateTo?: Date; interval?: Interval['id']; realtime?: boolean; aggregation?: string; }; controlsAvailable: any; timeContext: Partial; timePickerConfig: DateAndTimeOptions; dropdown: BsDropdownDirective; datapointExplorerService: DatapointExplorerService; formBuilder: FormBuilder; readonly DATE_FORMAT = "short"; readonly INTERVAL_TITLES: Record<"minutes" | "hours" | "days" | "weeks" | "months" | "custom", string>; readonly REALTIME_INTERVAL = 1000; form: _angular_forms.FormGroup<{ temporaryUserSelectedFromDate: _angular_forms.FormControl; temporaryUserSelectedToDate: _angular_forms.FormControl; currentDateContextFromDate: _angular_forms.FormControl; currentDateContextToDate: _angular_forms.FormControl; currentDateContextInterval: _angular_forms.FormControl; realtime: _angular_forms.FormControl; aggregation: _angular_forms.FormControl; }>; disabledAggregations: any; readonly valuesSignal: i0.Signal; context: i0.ModelSignal>; private realtimeSubscription; constructor(widgetTimeContextDateRangeService: WidgetTimeContextDateRangeService); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; applyDatetimeContext(): void; stopRealtime(): void; private subscribeToIntervalChange; private subscribeToRealtimeChange; private subscribeToAggregationChange; private onRealtimeValueChange; private startRealtime; private update; private createForm; private updateFormValues; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export { DatapointExplorerService, TimeContextComponent }; export type { TimeContext }; //# sourceMappingURL=index.d.ts.map