UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

78 lines 4.35 kB
import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormArray, FormBuilder, ValidationErrors, Validator } from '@angular/forms'; import { ContextRouteService, EmptyStateComponent } from '@c8y/ngx-components'; import { WidgetConfigComponent } from '@c8y/ngx-components/context-dashboard'; import { AlarmEventSelectorModalOptions } from '../alarm-event-selector-modal/alarm-event-selector-modal.model'; import { AlarmEventSelectorModalService } from '../alarm-event-selector-modal/alarm-event-selector-modal.service'; import { AlarmOrEvent, OmitSelectorProperties, TimelineType, TimelineTypeTexts } from '../alarm-event-selector.model'; import { AlarmEventSelectorService } from '../alarm-event-selector.service'; import { ActivatedRoute } from '@angular/router'; import * as i0 from "@angular/core"; export declare class AlarmEventSelectionListComponent implements ControlValueAccessor, Validator, OnInit, OnDestroy { private alarmEventModalService; private alarmEventSelectService; private formBuilder; private activatedRoute; private contextRouteService; private widgetComponent; /** * The type of timeline to be displayed. * Can be either 'ALARM' or 'EVENT'. */ timelineType: TimelineType; /** * Whether the user can remove items from the list. */ canRemove: boolean; /** * Whether the user can edit items in the alarm/event list. */ canEdit: boolean; canDragAndDrop: boolean; title: string; /** * The label for the button to add items to the list. * If not provided, a default label will be used based on the timeline type. */ addButtonLabel: string; /** * Hide or show the source of the alarm or event. */ hideSource: boolean; /** * Display the list inline or as a dropdown. * If set to true, the list will be displayed inline. */ inline: boolean; /** * Display the alarm/events as switch. If disabled it is displayed as checkbox instead. */ activeToggleAsSwitch: boolean; omitProperties: OmitSelectorProperties; datapoints: any[]; emptyState: EmptyStateComponent; /** * The configuration for the alarms-events selector modal. */ config: Partial<AlarmEventSelectorModalOptions>; formArray: FormArray; timelineTypeTexts: TimelineTypeTexts; contextSourceId: number | string | null; private destroy$; constructor(alarmEventModalService: AlarmEventSelectorModalService, alarmEventSelectService: AlarmEventSelectorService, formBuilder: FormBuilder, activatedRoute: ActivatedRoute, contextRouteService: ContextRouteService, widgetComponent: WidgetConfigComponent); ngOnInit(): void; ngOnDestroy(): void; registerOnTouched(fn: any): void; validate(_control: AbstractControl): ValidationErrors; writeValue(val: AlarmOrEvent[]): void; registerOnChange(fn: any): void; add(): void; onItemRemoved(index: number): void; drop(event: CdkDragDrop<AlarmOrEvent[]>): void; private transformValue; private initializeContextSourceId; static ɵfac: i0.ɵɵFactoryDeclaration<AlarmEventSelectionListComponent, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration<AlarmEventSelectionListComponent, "c8y-alarm-event-selection-list", never, { "timelineType": { "alias": "timelineType"; "required": false; }; "canRemove": { "alias": "canRemove"; "required": false; }; "canEdit": { "alias": "canEdit"; "required": false; }; "canDragAndDrop": { "alias": "canDragAndDrop"; "required": false; }; "title": { "alias": "title"; "required": false; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; }; "hideSource": { "alias": "hideSource"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "activeToggleAsSwitch": { "alias": "activeToggleAsSwitch"; "required": false; }; "omitProperties": { "alias": "omitProperties"; "required": false; }; "datapoints": { "alias": "datapoints"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, ["emptyState"], ["c8y-ui-empty-state"], true, never>; } //# sourceMappingURL=alarm-event-selection-list.component.d.ts.map