UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

28 lines 898 B
import { aggregationType } from '@c8y/client'; import { Interval } from '@c8y/ngx-components/interval-picker'; /** * Type for describing widget change events. It's possible * to extend this by adding additional events to discriminated union type. */ export type WidgetChangeEvent = TimeContextEvent; export interface TimeContextEvent { type: 'TIME_CONTEXT'; data: WidgetTimeContext; } export type WidgetChangeEventType = WidgetChangeEvent['type']; export type RevertChangeType = 'undo' | 'redo'; export type DateTimeContext = [Date, Date]; export type WidgetTimeContext = ({ dateTimeContext: DateTimeContext; realtime: boolean; aggregation: aggregationType; } & { interval?: never; }) | ({ dateTimeContext?: never; } & { interval: Interval['id']; realtime: boolean; aggregation: aggregationType; }); //# sourceMappingURL=widget-change-event.model.d.ts.map