@c8y/ngx-components 1021.2.0 → 1021.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ export class CustomAlarmEventFormComponent {
11
11
  constructor(formBuilder) {
12
12
  this.formBuilder = formBuilder;
13
13
  this.omitProperties = {};
14
+ this.selectedItems = [];
14
15
  this.added = new EventEmitter();
15
16
  this.cancel = new EventEmitter();
16
17
  this.destroy$ = new Subject();
@@ -45,17 +46,19 @@ export class CustomAlarmEventFormComponent {
45
46
  return obj;
46
47
  }
47
48
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CustomAlarmEventFormComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
48
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: { timelineType: "timelineType", target: "target", omitProperties: "omitProperties", defaultColor: "defaultColor" }, outputs: { added: "added", cancel: "cancel" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
49
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: { timelineType: "timelineType", target: "target", omitProperties: "omitProperties", selectedItems: "selectedItems", defaultColor: "defaultColor" }, outputs: { added: "added", cancel: "cancel" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n [selectedItems]=\"selectedItems\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4.AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties", "selectedItems"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
49
50
  }
50
51
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CustomAlarmEventFormComponent, decorators: [{
51
52
  type: Component,
52
- args: [{ selector: 'c8y-custom-alarm-event-form', template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n" }]
53
+ args: [{ selector: 'c8y-custom-alarm-event-form', template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n [selectedItems]=\"selectedItems\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n" }]
53
54
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { timelineType: [{
54
55
  type: Input
55
56
  }], target: [{
56
57
  type: Input
57
58
  }], omitProperties: [{
58
59
  type: Input
60
+ }], selectedItems: [{
61
+ type: Input
59
62
  }], defaultColor: [{
60
63
  type: Input
61
64
  }], added: [{
@@ -63,4 +66,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
63
66
  }], cancel: [{
64
67
  type: Output
65
68
  }] } });
66
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWFsYXJtLWV2ZW50LWZvcm0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vYWxhcm0tZXZlbnQtc2VsZWN0b3IvY3VzdG9tLWFsYXJtLWV2ZW50LWZvcm0vY3VzdG9tLWFsYXJtLWV2ZW50LWZvcm0uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vYWxhcm0tZXZlbnQtc2VsZWN0b3IvY3VzdG9tLWFsYXJtLWV2ZW50LWZvcm0vY3VzdG9tLWFsYXJtLWV2ZW50LWZvcm0uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFxQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUYsT0FBTyxFQUFFLFdBQVcsRUFBYSxNQUFNLGdCQUFnQixDQUFDO0FBRXhELE9BQU8sRUFBRSxHQUFHLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzNELE9BQU8sRUFBYyxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7Ozs7OztBQU8zQyxNQUFNLE9BQU8sNkJBQTZCO0lBWXhDLFlBQW9CLFdBQXdCO1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ZXNcIlxuICAgIFtzZWxlY3RlZEl0ZW1zXT1cInNlbGVjdGVkSXRlbXNcIlxuICA+PC9jOHktYWxhcm0tZXZlbnQtYXR0cmlidXRlcy1mb3JtPlxuXG4gIDxkaXYgY2xhc3M9XCJkLWZsZXggcC10LTE2XCI+XG4gICAgPGJ1dHRvbiBjbGFzcz1cImJ0biBidG4tZGVmYXVsdCBidG4tc21cIiAoY2xpY2spPVwiY2FuY2VsLmVtaXQoKVwiPlxuICAgICAge3sgJ0NhbmNlbCcgfCB0cmFuc2xhdGUgfX1cbiAgICA8L2J1dHRvbj5cbiAgICA8YnV0dG9uXG4gICAgICBjbGFzcz1cImJ0biBidG4tcHJpbWFyeSBidG4tc21cIlxuICAgICAgW2Rpc2FibGVkXT1cIih2YWxpZCQgfCBhc3luYykgPT09IGZhbHNlXCJcbiAgICAgIChjbGljayk9XCJhZGQoKVwiXG4gICAgPlxuICAgICAgPGkgYzh5SWNvbj1cInBsdXMtY2lyY2xlXCI+PC9pPlxuICAgICAge3sgJ1NlbGVjdCcgfCB0cmFuc2xhdGUgfX1cbiAgICA8L2J1dHRvbj5cbiAgPC9kaXY+XG48L2Zvcm0+XG4iXX0=
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Component, Input, Injectable, EventEmitter, Output, Pipe, Optional, ContentChild, NgModule } from '@angular/core';
2
+ import { Injectable, forwardRef, Component, Input, EventEmitter, Output, Pipe, Optional, ContentChild, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { Validators, FormControl, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
5
5
  import { take, takeUntil, map, startWith, tap, switchMap, shareReplay, distinctUntilChanged, debounceTime } from 'rxjs/operators';
@@ -23,14 +23,42 @@ import * as i1$3 from '@angular/router';
23
23
  import { RouterModule } from '@angular/router';
24
24
  import { TooltipModule } from 'ngx-bootstrap/tooltip';
25
25
 
26
+ class AlarmEventAttributesFormService {
27
+ duplicateTypeValidator(selectedItems) {
28
+ return (control) => {
29
+ if (!control.value || !selectedItems?.length) {
30
+ return null;
31
+ }
32
+ const isDuplicate = selectedItems.some(item => item.filters?.type?.toLowerCase() === control.value.toLowerCase());
33
+ return isDuplicate ? { duplicateType: true } : null;
34
+ };
35
+ }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
37
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormService, providedIn: 'root' }); }
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormService, decorators: [{
40
+ type: Injectable,
41
+ args: [{ providedIn: 'root' }]
42
+ }] });
43
+
26
44
  class AlarmEventAttributesFormComponent {
27
- constructor(formBuilder) {
45
+ constructor(formBuilder, alarmEventAttributesFormService) {
28
46
  this.formBuilder = formBuilder;
47
+ this.alarmEventAttributesFormService = alarmEventAttributesFormService;
29
48
  this.omitProperties = {};
49
+ this.selectedItems = [];
30
50
  }
31
51
  ngOnInit() {
32
52
  this.formGroup = this.formBuilder.group({
33
- filters: this.formBuilder.group({ type: ['', [Validators.required]] }),
53
+ filters: this.formBuilder.group({
54
+ type: [
55
+ '',
56
+ [
57
+ Validators.required,
58
+ this.alarmEventAttributesFormService.duplicateTypeValidator(this.selectedItems)
59
+ ]
60
+ ]
61
+ }),
34
62
  timelineType: ''
35
63
  });
36
64
  if (!this.omitProperties.label) {
@@ -52,8 +80,8 @@ class AlarmEventAttributesFormComponent {
52
80
  setDisabledState(isDisabled) {
53
81
  isDisabled ? this.formGroup.disable() : this.formGroup.enable();
54
82
  }
55
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
56
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: { timelineType: "timelineType", omitProperties: "omitProperties" }, providers: [
83
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormComponent, deps: [{ token: i1.FormBuilder }, { token: AlarmEventAttributesFormService }], target: i0.ɵɵFactoryTarget.Component }); }
84
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: { timelineType: "timelineType", omitProperties: "omitProperties", selectedItems: "selectedItems" }, providers: [
57
85
  {
58
86
  provide: NG_VALUE_ACCESSOR,
59
87
  useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
@@ -64,7 +92,7 @@ class AlarmEventAttributesFormComponent {
64
92
  useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
65
93
  multi: true
66
94
  }
67
- ], ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group *ngIf=\"formGroup.controls.label\">\n <label class=\"m-0\">{{ 'Label' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"label\"\n formControlName=\"label\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM'\n ? 'Alarm unavailable'\n : 'Location update'\n }\n \"\n />\n </c8y-form-group>\n\n <div formGroupName=\"filters\">\n <c8y-form-group>\n <label class=\"m-0\">{{ 'Type' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"type\"\n formControlName=\"type\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM'\n ? 'c8y_UnavailabilityAlarm'\n : 'c8y_LocationUpdate'\n }\n \"\n />\n </c8y-form-group>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
95
+ ], ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group *ngIf=\"formGroup.controls.label\">\n <label class=\"m-0\">{{ 'Label' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"label\"\n formControlName=\"label\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example: timelineType === 'ALARM' ? 'Alarm unavailable' : 'Location update'\n }\n \"\n />\n </c8y-form-group>\n\n <div formGroupName=\"filters\">\n <c8y-form-group>\n <label class=\"m-0\">{{ 'Type' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"type\"\n formControlName=\"type\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM' ? 'c8y_UnavailabilityAlarm' : 'c8y_LocationUpdate'\n }\n \"\n />\n <c8y-messages>\n <c8y-message\n name=\"duplicateType\"\n [text]=\"'Type already used.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "directive", type: i2.MessageDirective, selector: "c8y-message", inputs: ["name", "text"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
68
96
  }
69
97
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormComponent, decorators: [{
70
98
  type: Component,
@@ -79,11 +107,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
79
107
  useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
80
108
  multi: true
81
109
  }
82
- ], template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group *ngIf=\"formGroup.controls.label\">\n <label class=\"m-0\">{{ 'Label' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"label\"\n formControlName=\"label\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM'\n ? 'Alarm unavailable'\n : 'Location update'\n }\n \"\n />\n </c8y-form-group>\n\n <div formGroupName=\"filters\">\n <c8y-form-group>\n <label class=\"m-0\">{{ 'Type' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"type\"\n formControlName=\"type\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM'\n ? 'c8y_UnavailabilityAlarm'\n : 'c8y_LocationUpdate'\n }\n \"\n />\n </c8y-form-group>\n </div>\n</div>\n" }]
83
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { timelineType: [{
110
+ ], template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group *ngIf=\"formGroup.controls.label\">\n <label class=\"m-0\">{{ 'Label' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"label\"\n formControlName=\"label\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example: timelineType === 'ALARM' ? 'Alarm unavailable' : 'Location update'\n }\n \"\n />\n </c8y-form-group>\n\n <div formGroupName=\"filters\">\n <c8y-form-group>\n <label class=\"m-0\">{{ 'Type' | translate }}</label>\n <input\n class=\"form-control flex-grow\"\n name=\"type\"\n formControlName=\"type\"\n [placeholder]=\"\n 'e.g. {{ example }}'\n | translate\n : {\n example:\n timelineType === 'ALARM' ? 'c8y_UnavailabilityAlarm' : 'c8y_LocationUpdate'\n }\n \"\n />\n <c8y-messages>\n <c8y-message\n name=\"duplicateType\"\n [text]=\"'Type already used.' | translate\"\n ></c8y-message>\n </c8y-messages>\n </c8y-form-group>\n </div>\n</div>\n" }]
111
+ }], ctorParameters: () => [{ type: i1.FormBuilder }, { type: AlarmEventAttributesFormService }], propDecorators: { timelineType: [{
84
112
  type: Input
85
113
  }], omitProperties: [{
86
114
  type: Input
115
+ }], selectedItems: [{
116
+ type: Input
87
117
  }] } });
88
118
 
89
119
  const EVENT_TEXTS = {
@@ -286,7 +316,7 @@ class AlarmEventSelectorListItemComponent {
286
316
  useExisting: forwardRef(() => AlarmEventSelectorListItemComponent),
287
317
  multi: true
288
318
  }
289
- ], ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroup]=\"formGroup\"\n #li\n>\n <c8y-li-drag-handle><ng-content select=\"c8y-li-drag-handle\"></ng-content></c8y-li-drag-handle>\n <c8y-li-icon\n class=\"a-s-center p-r-4\"\n *ngIf=\"showAddRemoveButton\"\n >\n <button\n class=\"btn btn-clean text-primary\"\n [title]=\"'Remove' | translate\"\n *ngIf=\"isSelected\"\n (click)=\"addOrRemoveItem()\"\n >\n <i\n class=\"text-danger\"\n c8yIcon=\"minus-circle\"\n ></i>\n </button>\n <button\n class=\"btn btn-clean text-primary\"\n [title]=\"'Select' | translate\"\n *ngIf=\"!isSelected\"\n (click)=\"addOrRemoveItem()\"\n [disabled]=\"(valid$ | async) === false\"\n >\n <i\n class=\"text-primary\"\n c8yIcon=\"plus-circle\"\n ></i>\n </button>\n </c8y-li-icon>\n\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n *ngIf=\"showActiveToggle\"\n [displayAsSwitch]=\"displayAsSwitch\"\n formControlName=\"__active\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n\n <div class=\"d-flex a-i-center p-l-4\">\n <div\n class=\"c8y-list__item__colorpicker p-t-0 p-b-0 p-l-0\"\n [title]=\"colorPickerTitle | translate\"\n >\n <div\n class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--alarm': timelineType === 'ALARM',\n 'c8y-colorpicker--event': timelineType === 'EVENT'\n }\"\n >\n <input\n [ngStyle]=\"{ 'pointer-events': allowItemEdit && !omitProperties.color ? 'auto' : 'none' }\"\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': formGroup.value.color }\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"\n ></i>\n </span>\n </div>\n </div>\n <button\n class=\"btn-clean text-truncate\"\n [title]=\"formGroup.value.details?.label\"\n (click)=\"\n allowItemEdit\n ? (li.collapsed = !li.collapsed)\n : showActiveToggle\n ? toggleActive()\n : addOrRemoveItem()\n \"\n >\n <span class=\"text-truncate\">\n <c8y-highlight\n [text]=\"\n omitProperties.label\n ? formGroup.value.details?.filters?.type\n : formGroup.value.details?.label\n \"\n [pattern]=\"highlightText\"\n [shouldTrimPattern]=\"true\"\n ></c8y-highlight>\n </span>\n <small\n class=\"text-truncate text-muted icon-flex\"\n *ngIf=\"formGroup.value.__target && !hideSource\"\n >\n <i c8yIcon=\"exchange\"></i>\n <span class=\"text-truncate\">{{ formGroup.value.__target.name }}</span>\n </small>\n </button>\n\n <button\n class=\"btn-dot btn-dot--danger m-l-auto\"\n title=\"{{ 'Invalid entries' | translate }}\"\n [popover]=\"'Some entries are invalid. Check the required input fields.' | translate\"\n container=\"body\"\n *ngIf=\"(valid$ | async) === false && li.collapsed\"\n [outsideClick]=\"true\"\n >\n <i c8yIcon=\"exclamation-circle\"></i>\n </button>\n </div>\n\n <c8y-li-action\n [icon]=\"'minus-circle'\"\n *ngIf=\"optionToRemove\"\n [label]=\"'Remove from list' | translate\"\n (click)=\"remove()\"\n ></c8y-li-action>\n <c8y-li-collapse *ngIf=\"allowItemEdit\">\n <div class=\"data-point-details\">\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n </div>\n </c8y-li-collapse>\n</c8y-li>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: i2.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i2.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "component", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
319
+ ], ngImport: i0, template: "<c8y-li\n class=\"c8y-list__item__collapse--container-small\"\n [formGroup]=\"formGroup\"\n #li\n>\n <c8y-li-drag-handle><ng-content select=\"c8y-li-drag-handle\"></ng-content></c8y-li-drag-handle>\n <c8y-li-icon\n class=\"a-s-center p-r-4\"\n *ngIf=\"showAddRemoveButton\"\n >\n <button\n class=\"btn btn-clean text-primary\"\n [title]=\"'Remove' | translate\"\n *ngIf=\"isSelected\"\n (click)=\"addOrRemoveItem()\"\n >\n <i\n class=\"text-danger\"\n c8yIcon=\"minus-circle\"\n ></i>\n </button>\n <button\n class=\"btn btn-clean text-primary\"\n [title]=\"'Select' | translate\"\n *ngIf=\"!isSelected\"\n (click)=\"addOrRemoveItem()\"\n [disabled]=\"(valid$ | async) === false\"\n >\n <i\n class=\"text-primary\"\n c8yIcon=\"plus-circle\"\n ></i>\n </button>\n </c8y-li-icon>\n\n <c8y-li-checkbox\n class=\"a-s-center p-r-0\"\n *ngIf=\"showActiveToggle\"\n [displayAsSwitch]=\"displayAsSwitch\"\n formControlName=\"__active\"\n (click)=\"$event.stopPropagation()\"\n ></c8y-li-checkbox>\n\n <div class=\"d-flex a-i-center p-l-4\">\n <div\n class=\"c8y-list__item__colorpicker p-t-0 p-b-0 p-l-0\"\n [title]=\"colorPickerTitle | translate\"\n >\n <div\n class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--alarm': timelineType === 'ALARM',\n 'c8y-colorpicker--event': timelineType === 'EVENT'\n }\"\n >\n <input\n [ngStyle]=\"{ 'pointer-events': allowItemEdit && !omitProperties.color ? 'auto' : 'none' }\"\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span\n class=\"circle-icon-wrapper\"\n [ngStyle]=\"{ 'background-color': formGroup.value.color }\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"\n ></i>\n </span>\n </div>\n </div>\n <button\n class=\"btn-clean text-truncate\"\n [title]=\"formGroup.value.details?.label\"\n (click)=\"\n allowItemEdit\n ? (li.collapsed = !li.collapsed)\n : showActiveToggle\n ? toggleActive()\n : addOrRemoveItem()\n \"\n >\n <span class=\"text-truncate\">\n <c8y-highlight\n [text]=\"\n omitProperties.label\n ? formGroup.value.details?.filters?.type\n : formGroup.value.details?.label\n \"\n [pattern]=\"highlightText\"\n [shouldTrimPattern]=\"true\"\n ></c8y-highlight>\n </span>\n <small\n class=\"text-truncate text-muted icon-flex\"\n *ngIf=\"formGroup.value.__target && !hideSource\"\n >\n <i c8yIcon=\"exchange\"></i>\n <span class=\"text-truncate\">{{ formGroup.value.__target.name }}</span>\n </small>\n </button>\n\n <button\n class=\"btn-dot btn-dot--danger m-l-auto\"\n title=\"{{ 'Invalid entries' | translate }}\"\n [popover]=\"'Some entries are invalid. Check the required input fields.' | translate\"\n container=\"body\"\n *ngIf=\"(valid$ | async) === false && li.collapsed\"\n [outsideClick]=\"true\"\n >\n <i c8yIcon=\"exclamation-circle\"></i>\n </button>\n </div>\n\n <c8y-li-action\n [icon]=\"'minus-circle'\"\n *ngIf=\"optionToRemove\"\n [label]=\"'Remove from list' | translate\"\n (click)=\"remove()\"\n ></c8y-li-action>\n <c8y-li-collapse *ngIf=\"allowItemEdit\">\n <div class=\"data-point-details\">\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n </div>\n </c8y-li-collapse>\n</c8y-li>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.HighlightComponent, selector: "c8y-highlight", inputs: ["pattern", "text", "elementClass", "shouldTrimPattern"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemActionComponent, selector: "c8y-list-item-action, c8y-li-action", inputs: ["label", "icon", "disabled"], outputs: ["click"] }, { kind: "component", type: i2.ListItemCollapseComponent, selector: "c8y-list-item-collapse, c8y-li-collapse", inputs: ["collapseWay"] }, { kind: "component", type: i2.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "component", type: i2.ListItemDragHandleComponent, selector: "c8y-list-item-drag-handle, c8y-li-drag-handle" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "component", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties", "selectedItems"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
290
320
  }
291
321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorListItemComponent, decorators: [{
292
322
  type: Component,
@@ -332,6 +362,7 @@ class CustomAlarmEventFormComponent {
332
362
  constructor(formBuilder) {
333
363
  this.formBuilder = formBuilder;
334
364
  this.omitProperties = {};
365
+ this.selectedItems = [];
335
366
  this.added = new EventEmitter();
336
367
  this.cancel = new EventEmitter();
337
368
  this.destroy$ = new Subject();
@@ -366,17 +397,19 @@ class CustomAlarmEventFormComponent {
366
397
  return obj;
367
398
  }
368
399
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CustomAlarmEventFormComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
369
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: { timelineType: "timelineType", target: "target", omitProperties: "omitProperties", defaultColor: "defaultColor" }, outputs: { added: "added", cancel: "cancel" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
400
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: { timelineType: "timelineType", target: "target", omitProperties: "omitProperties", selectedItems: "selectedItems", defaultColor: "defaultColor" }, outputs: { added: "added", cancel: "cancel" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n [selectedItems]=\"selectedItems\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AlarmEventAttributesFormComponent, selector: "c8y-alarm-event-attributes-form", inputs: ["timelineType", "omitProperties", "selectedItems"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
370
401
  }
371
402
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CustomAlarmEventFormComponent, decorators: [{
372
403
  type: Component,
373
- args: [{ selector: 'c8y-custom-alarm-event-form', template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n" }]
404
+ args: [{ selector: 'c8y-custom-alarm-event-form', template: "<form [formGroup]=\"formGroup\" class=\"p-16\">\n <div\n *ngIf=\"!omitProperties.color\"\n class=\"form-group d-flex a-i-center gap-8\"\n [title]=\"'Change color' | translate\"\n >\n <label class=\"m-0\">{{ 'Color' | translate }}</label>\n <div class=\"c8y-colorpicker\"\n [ngClass]=\"{\n 'c8y-colorpicker--event': timelineType === 'EVENT',\n 'c8y-colorpicker--alarm': timelineType !== 'EVENT'\n }\"\n >\n <input\n type=\"color\"\n formControlName=\"color\"\n (click)=\"$event.stopPropagation()\"\n />\n <span [style.background-color]=\"formGroup.value.color\">\n <i [c8yIcon]=\"timelineType === 'EVENT' ? 'c8y-events' : 'bell'\"></i>\n </span>\n </div>\n </div>\n\n <c8y-alarm-event-attributes-form\n formControlName=\"details\"\n [timelineType]=\"timelineType\"\n [omitProperties]=\"omitProperties\"\n [selectedItems]=\"selectedItems\"\n ></c8y-alarm-event-attributes-form>\n\n <div class=\"d-flex p-t-16\">\n <button class=\"btn btn-default btn-sm\" (click)=\"cancel.emit()\">\n {{ 'Cancel' | translate }}\n </button>\n <button\n class=\"btn btn-primary btn-sm\"\n [disabled]=\"(valid$ | async) === false\"\n (click)=\"add()\"\n >\n <i c8yIcon=\"plus-circle\"></i>\n {{ 'Select' | translate }}\n </button>\n </div>\n</form>\n" }]
374
405
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { timelineType: [{
375
406
  type: Input
376
407
  }], target: [{
377
408
  type: Input
378
409
  }], omitProperties: [{
379
410
  type: Input
411
+ }], selectedItems: [{
412
+ type: Input
380
413
  }], defaultColor: [{
381
414
  type: Input
382
415
  }], added: [{
@@ -503,7 +536,7 @@ class AlarmEventSelectorComponent {
503
536
  multi: true,
504
537
  useExisting: forwardRef(() => AlarmEventSelectorComponent)
505
538
  }
506
- ], ngImport: i0, template: "<div\n class=\"d-grid grid__row--1 fit-h\"\n [ngClass]=\"{\n 'grid__col--3-6-3--md': allowChangingContext,\n 'grid__col--8-4--md': !allowChangingContext\n }\"\n>\n <div\n class=\"d-flex d-col p-relative bg-level-1\"\n *ngIf=\"allowChangingContext\"\n >\n <c8y-asset-selector-miller\n class=\"d-contents\"\n [(ngModel)]=\"contextAsset\"\n [asset]=\"contextAsset\"\n (onSelected)=\"assetSelectionChanged($event)\"\n [container]=\"''\"\n [config]=\"{\n view: 'miller',\n groupsSelectable: groupsSelectable,\n columnHeaders: true,\n showChildDevices: true,\n showUnassignedDevices: true,\n singleColumn: true,\n search: allowSearch,\n showFilter: true\n }\"\n ></c8y-asset-selector-miller>\n </div>\n <!-- center column -->\n <div class=\"inner-scroll bg-component\" data-cy=\"c8y-alarm-event-selector--inner-column\">\n <ng-template #noDeviceEmptyState>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <ng-template #loadingData>\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-template>\n\n <div\n class=\"bg-inherit\"\n *ngIf=\"assetSelection | async as asset; else noDeviceEmptyState\"\n >\n <div class=\"p-l-16 p-r-16 p-t-8 p-b-8 sticky-top bg-inherit separator-bottom\">\n <p\n class=\"text-medium text-truncate\"\n [title]=\"timelineTypeTexts.availableItemsTitle | translate\"\n >\n {{ timelineTypeTexts.availableItemsTitle | translate }}\n </p>\n <div class=\"d-flex\">\n <div\n class=\"input-group input-group-search m-t-4\"\n id=\"search\"\n *ngIf=\"!(loadingItems$ | async)\"\n >\n <input\n class=\"form-control\"\n placeholder=\"Filter\u2026\"\n type=\"search\"\n [ngModel]=\"filterString\"\n (ngModelChange)=\"filterStringChanged($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"!filterString; else clearFilterString\"\n ></i>\n <ng-template #clearFilterString>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"filterString\"\n (click)=\"filterStringChanged()\"\n ></i>\n </ng-template>\n </span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"filteredItems$ | async as filteredItems; else loadingData\">\n <ng-container *ngIf=\"!(loadingItems$ | async); else loadingData\">\n <ng-container *ngIf=\"items$ | async as items\">\n <div class=\"p-16 bg-level-2 separator-bottom\">\n <div>\n <p>\n <i\n class=\"text-info m-r-4\"\n c8yIcon=\"info-circle\"\n ></i>\n <strong>{{ timelineTypeTexts.recentItemsWarningTitle | translate }}</strong>\n </p>\n <p>\n {{ timelineTypeTexts.recentItemsWarningText | translate }}\n {{ timelineTypeTexts.addCustomText | translate }}\n </p>\n </div>\n <div class=\"p-t-16\">\n <button\n class=\"btn btn-default btn-sm\"\n aria-controls=\"collapseCustomItemForm\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ timelineTypeTexts.addCustomItemButtonLabel | translate }}\n </button>\n <div\n class=\"collapse\"\n id=\"collapseCustomItemForm\"\n [collapse]=\"!isExpanded\"\n [isAnimated]=\"true\"\n >\n <div [style.min-height]=\"'230px'\">\n <c8y-custom-alarm-event-form\n class=\"d-block\"\n *ngIf=\"isExpanded\"\n [timelineType]=\"timelineType\"\n [target]=\"assetSelection | async\"\n [omitProperties]=\"omitProperties\"\n [defaultColor]=\"defaultColor\"\n (added)=\"itemAdded($event); isExpanded = false\"\n (cancel)=\"isExpanded = false\"\n ></c8y-custom-alarm-event-form>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"p-16\"\n *ngIf=\"!filteredItems.length\"\n >\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"\n items.length\n ? ('Try another filter term.' | translate)\n : (timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate)\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n\n <c8y-list-group>\n <c8y-list-item\n class=\"sticky-top\"\n style=\"top: 72px\"\n *ngIf=\"items.length > maxNumberOfItems && filteredItems.length >= maxNumberOfItems\"\n >\n <div class=\"alert alert-warning m-b-0\">\n {{ timelineTypeTexts.largeNumberOfItemsInfo | translate }}\n </div>\n </c8y-list-item>\n <c8y-alarm-event-selector-list-item\n class=\"d-contents\"\n [ngModel]=\"item\"\n [isSelected]=\"selectedItems | includesAlarmOrEvent: item\"\n (added)=\"itemAdded($event)\"\n (removed)=\"itemRemoved($event)\"\n [highlightText]=\"filterStringChanges$ | async\"\n [timelineType]=\"timelineType\"\n [hideSource]=\"hideSource\"\n *ngFor=\"let item of filteredItems; trackBy: trackByFn\"\n ></c8y-alarm-event-selector-list-item>\n </c8y-list-group>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <!-- last column -->\n <div class=\"inner-scroll bg-level-1\">\n <p\n class=\"text-medium m-b-4 p-l-16 p-r-16 p-t-8 p-b-8 separator-bottom sticky-top text-truncate\"\n [title]=\"timelineTypeTexts.selectedItemsTitle | translate\"\n >\n {{ timelineTypeTexts.selectedItemsTitle | translate }}\n </p>\n <div class=\"d-flex flex-wrap gap-8 p-l-16 p-r-16 p-b-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.noSelectedItemsTitle | translate\"\n *ngIf=\"!selectedItems || !selectedItems.length\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div\n [ngClass]=\"{\n 'c8y-alarm-pill': timelineType === 'ALARM',\n 'c8y-event-pill': timelineType === 'EVENT'\n }\"\n *ngFor=\"let selectedItem of selectedItems\"\n >\n <button\n [title]=\"'Remove' | translate\"\n type=\"button\"\n [ngClass]=\"{\n 'c8y-alarm-pill__btn': timelineType === 'ALARM',\n 'c8y-event-pill__btn': timelineType === 'EVENT'\n }\"\n (click)=\"itemRemoved(selectedItem)\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"remove\"\n ></i>\n </button>\n <div\n class=\"c8y-datapoint-pill__label\"\n [title]=\"selectedItem.label || selectedItem.filters.type\"\n >\n <span\n class=\"circle-icon-wrapper circle-icon-wrapper--small m-r-4\"\n [style.background-color]=\"selectedItem.color || defaultColor\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'ALARM' ? 'bell' : 'c8y-events'\"\n ></i>\n </span>\n <span class=\"text-truncate\">\n <span class=\"text-truncate\">{{ selectedItem.label || selectedItem.filters.type }}</span>\n <small\n class=\"text-muted text-10\"\n *ngIf=\"!hideSource && selectedItem?.__target?.name\"\n >\n {{ selectedItem?.__target?.name }}\n </small>\n </span>\n </div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i5.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "directive", type: i6.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "component", type: AlarmEventSelectorListItemComponent, selector: "c8y-alarm-event-selector-list-item", inputs: ["timelineType", "highlightText", "showAddRemoveButton", "isSelected", "optionToRemove", "showActiveToggle", "allowItemEdit", "hideSource", "displayAsSwitch", "omitProperties"], outputs: ["added", "removed"] }, { kind: "component", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: ["timelineType", "target", "omitProperties", "defaultColor"], outputs: ["added", "cancel"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: IncludesAlarmOrEventPipe, name: "includesAlarmOrEvent" }] }); }
539
+ ], ngImport: i0, template: "<div\n class=\"d-grid grid__row--1 fit-h\"\n [ngClass]=\"{\n 'grid__col--3-6-3--md': allowChangingContext,\n 'grid__col--8-4--md': !allowChangingContext\n }\"\n>\n <div\n class=\"d-flex d-col p-relative bg-level-1\"\n *ngIf=\"allowChangingContext\"\n >\n <c8y-asset-selector-miller\n class=\"d-contents\"\n [(ngModel)]=\"contextAsset\"\n [asset]=\"contextAsset\"\n (onSelected)=\"assetSelectionChanged($event)\"\n [container]=\"''\"\n [config]=\"{\n view: 'miller',\n groupsSelectable: groupsSelectable,\n columnHeaders: true,\n showChildDevices: true,\n showUnassignedDevices: true,\n singleColumn: true,\n search: allowSearch,\n showFilter: true\n }\"\n ></c8y-asset-selector-miller>\n </div>\n <!-- center column -->\n <div class=\"inner-scroll bg-component\" data-cy=\"c8y-alarm-event-selector--inner-column\">\n <ng-template #noDeviceEmptyState>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <ng-template #loadingData>\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-template>\n\n <div\n class=\"bg-inherit\"\n *ngIf=\"assetSelection | async as asset; else noDeviceEmptyState\"\n >\n <div class=\"p-l-16 p-r-16 p-t-8 p-b-8 sticky-top bg-inherit separator-bottom\">\n <p\n class=\"text-medium text-truncate\"\n [title]=\"timelineTypeTexts.availableItemsTitle | translate\"\n >\n {{ timelineTypeTexts.availableItemsTitle | translate }}\n </p>\n <div class=\"d-flex\">\n <div\n class=\"input-group input-group-search m-t-4\"\n id=\"search\"\n *ngIf=\"!(loadingItems$ | async)\"\n >\n <input\n class=\"form-control\"\n placeholder=\"Filter\u2026\"\n type=\"search\"\n [ngModel]=\"filterString\"\n (ngModelChange)=\"filterStringChanged($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"!filterString; else clearFilterString\"\n ></i>\n <ng-template #clearFilterString>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"filterString\"\n (click)=\"filterStringChanged()\"\n ></i>\n </ng-template>\n </span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"filteredItems$ | async as filteredItems; else loadingData\">\n <ng-container *ngIf=\"!(loadingItems$ | async); else loadingData\">\n <ng-container *ngIf=\"items$ | async as items\">\n <div class=\"p-16 bg-level-2 separator-bottom\">\n <div>\n <p>\n <i\n class=\"text-info m-r-4\"\n c8yIcon=\"info-circle\"\n ></i>\n <strong>{{ timelineTypeTexts.recentItemsWarningTitle | translate }}</strong>\n </p>\n <p>\n {{ timelineTypeTexts.recentItemsWarningText | translate }}\n {{ timelineTypeTexts.addCustomText | translate }}\n </p>\n </div>\n <div class=\"p-t-16\">\n <button\n class=\"btn btn-default btn-sm\"\n aria-controls=\"collapseCustomItemForm\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ timelineTypeTexts.addCustomItemButtonLabel | translate }}\n </button>\n <div\n class=\"collapse\"\n id=\"collapseCustomItemForm\"\n [collapse]=\"!isExpanded\"\n [isAnimated]=\"true\"\n >\n <div [style.min-height]=\"'230px'\">\n <c8y-custom-alarm-event-form\n class=\"d-block\"\n *ngIf=\"isExpanded\"\n [timelineType]=\"timelineType\"\n [target]=\"assetSelection | async\"\n [omitProperties]=\"omitProperties\"\n [defaultColor]=\"defaultColor\"\n (added)=\"itemAdded($event); isExpanded = false\"\n (cancel)=\"isExpanded = false\"\n [selectedItems]=\"selectedItems\"\n ></c8y-custom-alarm-event-form>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"p-16\"\n *ngIf=\"!filteredItems.length\"\n >\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"\n items.length\n ? ('Try another filter term.' | translate)\n : (timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate)\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n\n <c8y-list-group>\n <c8y-list-item\n class=\"sticky-top\"\n style=\"top: 72px\"\n *ngIf=\"items.length > maxNumberOfItems && filteredItems.length >= maxNumberOfItems\"\n >\n <div class=\"alert alert-warning m-b-0\">\n {{ timelineTypeTexts.largeNumberOfItemsInfo | translate }}\n </div>\n </c8y-list-item>\n <c8y-alarm-event-selector-list-item\n class=\"d-contents\"\n [ngModel]=\"item\"\n [isSelected]=\"selectedItems | includesAlarmOrEvent: item\"\n (added)=\"itemAdded($event)\"\n (removed)=\"itemRemoved($event)\"\n [highlightText]=\"filterStringChanges$ | async\"\n [timelineType]=\"timelineType\"\n [hideSource]=\"hideSource\"\n *ngFor=\"let item of filteredItems; trackBy: trackByFn\"\n ></c8y-alarm-event-selector-list-item>\n </c8y-list-group>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <!-- last column -->\n <div class=\"inner-scroll bg-level-1\">\n <p\n class=\"text-medium m-b-4 p-l-16 p-r-16 p-t-8 p-b-8 separator-bottom sticky-top text-truncate\"\n [title]=\"timelineTypeTexts.selectedItemsTitle | translate\"\n >\n {{ timelineTypeTexts.selectedItemsTitle | translate }}\n </p>\n <div class=\"d-flex flex-wrap gap-8 p-l-16 p-r-16 p-b-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.noSelectedItemsTitle | translate\"\n *ngIf=\"!selectedItems || !selectedItems.length\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div\n [ngClass]=\"{\n 'c8y-alarm-pill': timelineType === 'ALARM',\n 'c8y-event-pill': timelineType === 'EVENT'\n }\"\n *ngFor=\"let selectedItem of selectedItems\"\n >\n <button\n [title]=\"'Remove' | translate\"\n type=\"button\"\n [ngClass]=\"{\n 'c8y-alarm-pill__btn': timelineType === 'ALARM',\n 'c8y-event-pill__btn': timelineType === 'EVENT'\n }\"\n (click)=\"itemRemoved(selectedItem)\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"remove\"\n ></i>\n </button>\n <div\n class=\"c8y-datapoint-pill__label\"\n [title]=\"selectedItem.label || selectedItem.filters.type\"\n >\n <span\n class=\"circle-icon-wrapper circle-icon-wrapper--small m-r-4\"\n [style.background-color]=\"selectedItem.color || defaultColor\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'ALARM' ? 'bell' : 'c8y-events'\"\n ></i>\n </span>\n <span class=\"text-truncate\">\n <span class=\"text-truncate\">{{ selectedItem.label || selectedItem.filters.type }}</span>\n <small\n class=\"text-muted text-10\"\n *ngIf=\"!hideSource && selectedItem?.__target?.name\"\n >\n {{ selectedItem?.__target?.name }}\n </small>\n </span>\n </div>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i2.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.LoadingComponent, selector: "c8y-loading", inputs: ["layout", "progress", "message"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i5.MillerViewComponent, selector: "c8y-asset-selector-miller", inputs: ["config", "asset", "selectedDevice", "rootNode", "container"], outputs: ["onSelected", "onClearSelected"] }, { kind: "directive", type: i6.CollapseDirective, selector: "[collapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { kind: "component", type: AlarmEventSelectorListItemComponent, selector: "c8y-alarm-event-selector-list-item", inputs: ["timelineType", "highlightText", "showAddRemoveButton", "isSelected", "optionToRemove", "showActiveToggle", "allowItemEdit", "hideSource", "displayAsSwitch", "omitProperties"], outputs: ["added", "removed"] }, { kind: "component", type: CustomAlarmEventFormComponent, selector: "c8y-custom-alarm-event-form", inputs: ["timelineType", "target", "omitProperties", "selectedItems", "defaultColor"], outputs: ["added", "cancel"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: IncludesAlarmOrEventPipe, name: "includesAlarmOrEvent" }] }); }
507
540
  }
508
541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorComponent, decorators: [{
509
542
  type: Component,
@@ -513,7 +546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
513
546
  multi: true,
514
547
  useExisting: forwardRef(() => AlarmEventSelectorComponent)
515
548
  }
516
- ], template: "<div\n class=\"d-grid grid__row--1 fit-h\"\n [ngClass]=\"{\n 'grid__col--3-6-3--md': allowChangingContext,\n 'grid__col--8-4--md': !allowChangingContext\n }\"\n>\n <div\n class=\"d-flex d-col p-relative bg-level-1\"\n *ngIf=\"allowChangingContext\"\n >\n <c8y-asset-selector-miller\n class=\"d-contents\"\n [(ngModel)]=\"contextAsset\"\n [asset]=\"contextAsset\"\n (onSelected)=\"assetSelectionChanged($event)\"\n [container]=\"''\"\n [config]=\"{\n view: 'miller',\n groupsSelectable: groupsSelectable,\n columnHeaders: true,\n showChildDevices: true,\n showUnassignedDevices: true,\n singleColumn: true,\n search: allowSearch,\n showFilter: true\n }\"\n ></c8y-asset-selector-miller>\n </div>\n <!-- center column -->\n <div class=\"inner-scroll bg-component\" data-cy=\"c8y-alarm-event-selector--inner-column\">\n <ng-template #noDeviceEmptyState>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <ng-template #loadingData>\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-template>\n\n <div\n class=\"bg-inherit\"\n *ngIf=\"assetSelection | async as asset; else noDeviceEmptyState\"\n >\n <div class=\"p-l-16 p-r-16 p-t-8 p-b-8 sticky-top bg-inherit separator-bottom\">\n <p\n class=\"text-medium text-truncate\"\n [title]=\"timelineTypeTexts.availableItemsTitle | translate\"\n >\n {{ timelineTypeTexts.availableItemsTitle | translate }}\n </p>\n <div class=\"d-flex\">\n <div\n class=\"input-group input-group-search m-t-4\"\n id=\"search\"\n *ngIf=\"!(loadingItems$ | async)\"\n >\n <input\n class=\"form-control\"\n placeholder=\"Filter\u2026\"\n type=\"search\"\n [ngModel]=\"filterString\"\n (ngModelChange)=\"filterStringChanged($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"!filterString; else clearFilterString\"\n ></i>\n <ng-template #clearFilterString>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"filterString\"\n (click)=\"filterStringChanged()\"\n ></i>\n </ng-template>\n </span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"filteredItems$ | async as filteredItems; else loadingData\">\n <ng-container *ngIf=\"!(loadingItems$ | async); else loadingData\">\n <ng-container *ngIf=\"items$ | async as items\">\n <div class=\"p-16 bg-level-2 separator-bottom\">\n <div>\n <p>\n <i\n class=\"text-info m-r-4\"\n c8yIcon=\"info-circle\"\n ></i>\n <strong>{{ timelineTypeTexts.recentItemsWarningTitle | translate }}</strong>\n </p>\n <p>\n {{ timelineTypeTexts.recentItemsWarningText | translate }}\n {{ timelineTypeTexts.addCustomText | translate }}\n </p>\n </div>\n <div class=\"p-t-16\">\n <button\n class=\"btn btn-default btn-sm\"\n aria-controls=\"collapseCustomItemForm\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ timelineTypeTexts.addCustomItemButtonLabel | translate }}\n </button>\n <div\n class=\"collapse\"\n id=\"collapseCustomItemForm\"\n [collapse]=\"!isExpanded\"\n [isAnimated]=\"true\"\n >\n <div [style.min-height]=\"'230px'\">\n <c8y-custom-alarm-event-form\n class=\"d-block\"\n *ngIf=\"isExpanded\"\n [timelineType]=\"timelineType\"\n [target]=\"assetSelection | async\"\n [omitProperties]=\"omitProperties\"\n [defaultColor]=\"defaultColor\"\n (added)=\"itemAdded($event); isExpanded = false\"\n (cancel)=\"isExpanded = false\"\n ></c8y-custom-alarm-event-form>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"p-16\"\n *ngIf=\"!filteredItems.length\"\n >\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"\n items.length\n ? ('Try another filter term.' | translate)\n : (timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate)\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n\n <c8y-list-group>\n <c8y-list-item\n class=\"sticky-top\"\n style=\"top: 72px\"\n *ngIf=\"items.length > maxNumberOfItems && filteredItems.length >= maxNumberOfItems\"\n >\n <div class=\"alert alert-warning m-b-0\">\n {{ timelineTypeTexts.largeNumberOfItemsInfo | translate }}\n </div>\n </c8y-list-item>\n <c8y-alarm-event-selector-list-item\n class=\"d-contents\"\n [ngModel]=\"item\"\n [isSelected]=\"selectedItems | includesAlarmOrEvent: item\"\n (added)=\"itemAdded($event)\"\n (removed)=\"itemRemoved($event)\"\n [highlightText]=\"filterStringChanges$ | async\"\n [timelineType]=\"timelineType\"\n [hideSource]=\"hideSource\"\n *ngFor=\"let item of filteredItems; trackBy: trackByFn\"\n ></c8y-alarm-event-selector-list-item>\n </c8y-list-group>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <!-- last column -->\n <div class=\"inner-scroll bg-level-1\">\n <p\n class=\"text-medium m-b-4 p-l-16 p-r-16 p-t-8 p-b-8 separator-bottom sticky-top text-truncate\"\n [title]=\"timelineTypeTexts.selectedItemsTitle | translate\"\n >\n {{ timelineTypeTexts.selectedItemsTitle | translate }}\n </p>\n <div class=\"d-flex flex-wrap gap-8 p-l-16 p-r-16 p-b-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.noSelectedItemsTitle | translate\"\n *ngIf=\"!selectedItems || !selectedItems.length\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div\n [ngClass]=\"{\n 'c8y-alarm-pill': timelineType === 'ALARM',\n 'c8y-event-pill': timelineType === 'EVENT'\n }\"\n *ngFor=\"let selectedItem of selectedItems\"\n >\n <button\n [title]=\"'Remove' | translate\"\n type=\"button\"\n [ngClass]=\"{\n 'c8y-alarm-pill__btn': timelineType === 'ALARM',\n 'c8y-event-pill__btn': timelineType === 'EVENT'\n }\"\n (click)=\"itemRemoved(selectedItem)\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"remove\"\n ></i>\n </button>\n <div\n class=\"c8y-datapoint-pill__label\"\n [title]=\"selectedItem.label || selectedItem.filters.type\"\n >\n <span\n class=\"circle-icon-wrapper circle-icon-wrapper--small m-r-4\"\n [style.background-color]=\"selectedItem.color || defaultColor\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'ALARM' ? 'bell' : 'c8y-events'\"\n ></i>\n </span>\n <span class=\"text-truncate\">\n <span class=\"text-truncate\">{{ selectedItem.label || selectedItem.filters.type }}</span>\n <small\n class=\"text-muted text-10\"\n *ngIf=\"!hideSource && selectedItem?.__target?.name\"\n >\n {{ selectedItem?.__target?.name }}\n </small>\n </span>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
549
+ ], template: "<div\n class=\"d-grid grid__row--1 fit-h\"\n [ngClass]=\"{\n 'grid__col--3-6-3--md': allowChangingContext,\n 'grid__col--8-4--md': !allowChangingContext\n }\"\n>\n <div\n class=\"d-flex d-col p-relative bg-level-1\"\n *ngIf=\"allowChangingContext\"\n >\n <c8y-asset-selector-miller\n class=\"d-contents\"\n [(ngModel)]=\"contextAsset\"\n [asset]=\"contextAsset\"\n (onSelected)=\"assetSelectionChanged($event)\"\n [container]=\"''\"\n [config]=\"{\n view: 'miller',\n groupsSelectable: groupsSelectable,\n columnHeaders: true,\n showChildDevices: true,\n showUnassignedDevices: true,\n singleColumn: true,\n search: allowSearch,\n showFilter: true\n }\"\n ></c8y-asset-selector-miller>\n </div>\n <!-- center column -->\n <div class=\"inner-scroll bg-component\" data-cy=\"c8y-alarm-event-selector--inner-column\">\n <ng-template #noDeviceEmptyState>\n <div class=\"p-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n </ng-template>\n\n <ng-template #loadingData>\n <div class=\"p-16 text-center\">\n <c8y-loading></c8y-loading>\n </div>\n </ng-template>\n\n <div\n class=\"bg-inherit\"\n *ngIf=\"assetSelection | async as asset; else noDeviceEmptyState\"\n >\n <div class=\"p-l-16 p-r-16 p-t-8 p-b-8 sticky-top bg-inherit separator-bottom\">\n <p\n class=\"text-medium text-truncate\"\n [title]=\"timelineTypeTexts.availableItemsTitle | translate\"\n >\n {{ timelineTypeTexts.availableItemsTitle | translate }}\n </p>\n <div class=\"d-flex\">\n <div\n class=\"input-group input-group-search m-t-4\"\n id=\"search\"\n *ngIf=\"!(loadingItems$ | async)\"\n >\n <input\n class=\"form-control\"\n placeholder=\"Filter\u2026\"\n type=\"search\"\n [ngModel]=\"filterString\"\n (ngModelChange)=\"filterStringChanged($event)\"\n />\n <span class=\"input-group-addon\">\n <i\n c8yIcon=\"search\"\n *ngIf=\"!filterString; else clearFilterString\"\n ></i>\n <ng-template #clearFilterString>\n <i\n class=\"text-muted\"\n c8yIcon=\"times\"\n *ngIf=\"filterString\"\n (click)=\"filterStringChanged()\"\n ></i>\n </ng-template>\n </span>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"filteredItems$ | async as filteredItems; else loadingData\">\n <ng-container *ngIf=\"!(loadingItems$ | async); else loadingData\">\n <ng-container *ngIf=\"items$ | async as items\">\n <div class=\"p-16 bg-level-2 separator-bottom\">\n <div>\n <p>\n <i\n class=\"text-info m-r-4\"\n c8yIcon=\"info-circle\"\n ></i>\n <strong>{{ timelineTypeTexts.recentItemsWarningTitle | translate }}</strong>\n </p>\n <p>\n {{ timelineTypeTexts.recentItemsWarningText | translate }}\n {{ timelineTypeTexts.addCustomText | translate }}\n </p>\n </div>\n <div class=\"p-t-16\">\n <button\n class=\"btn btn-default btn-sm\"\n aria-controls=\"collapseCustomItemForm\"\n [attr.aria-expanded]=\"isExpanded\"\n (click)=\"isExpanded = !isExpanded\"\n >\n {{ timelineTypeTexts.addCustomItemButtonLabel | translate }}\n </button>\n <div\n class=\"collapse\"\n id=\"collapseCustomItemForm\"\n [collapse]=\"!isExpanded\"\n [isAnimated]=\"true\"\n >\n <div [style.min-height]=\"'230px'\">\n <c8y-custom-alarm-event-form\n class=\"d-block\"\n *ngIf=\"isExpanded\"\n [timelineType]=\"timelineType\"\n [target]=\"assetSelection | async\"\n [omitProperties]=\"omitProperties\"\n [defaultColor]=\"defaultColor\"\n (added)=\"itemAdded($event); isExpanded = false\"\n (cancel)=\"isExpanded = false\"\n [selectedItems]=\"selectedItems\"\n ></c8y-custom-alarm-event-form>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"p-16\"\n *ngIf=\"!filteredItems.length\"\n >\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"\n items.length\n ? ('Try another filter term.' | translate)\n : (timelineTypeTexts.assetWithNoItemsEmptyStateSubtitle | translate)\n \"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n\n <c8y-list-group>\n <c8y-list-item\n class=\"sticky-top\"\n style=\"top: 72px\"\n *ngIf=\"items.length > maxNumberOfItems && filteredItems.length >= maxNumberOfItems\"\n >\n <div class=\"alert alert-warning m-b-0\">\n {{ timelineTypeTexts.largeNumberOfItemsInfo | translate }}\n </div>\n </c8y-list-item>\n <c8y-alarm-event-selector-list-item\n class=\"d-contents\"\n [ngModel]=\"item\"\n [isSelected]=\"selectedItems | includesAlarmOrEvent: item\"\n (added)=\"itemAdded($event)\"\n (removed)=\"itemRemoved($event)\"\n [highlightText]=\"filterStringChanges$ | async\"\n [timelineType]=\"timelineType\"\n [hideSource]=\"hideSource\"\n *ngFor=\"let item of filteredItems; trackBy: trackByFn\"\n ></c8y-alarm-event-selector-list-item>\n </c8y-list-group>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <!-- last column -->\n <div class=\"inner-scroll bg-level-1\">\n <p\n class=\"text-medium m-b-4 p-l-16 p-r-16 p-t-8 p-b-8 separator-bottom sticky-top text-truncate\"\n [title]=\"timelineTypeTexts.selectedItemsTitle | translate\"\n >\n {{ timelineTypeTexts.selectedItemsTitle | translate }}\n </p>\n <div class=\"d-flex flex-wrap gap-8 p-l-16 p-r-16 p-b-16\">\n <c8y-ui-empty-state\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.noSelectedItemsTitle | translate\"\n *ngIf=\"!selectedItems || !selectedItems.length\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n\n <div\n [ngClass]=\"{\n 'c8y-alarm-pill': timelineType === 'ALARM',\n 'c8y-event-pill': timelineType === 'EVENT'\n }\"\n *ngFor=\"let selectedItem of selectedItems\"\n >\n <button\n [title]=\"'Remove' | translate\"\n type=\"button\"\n [ngClass]=\"{\n 'c8y-alarm-pill__btn': timelineType === 'ALARM',\n 'c8y-event-pill__btn': timelineType === 'EVENT'\n }\"\n (click)=\"itemRemoved(selectedItem)\"\n >\n <i\n class=\"icon-14\"\n c8yIcon=\"remove\"\n ></i>\n </button>\n <div\n class=\"c8y-datapoint-pill__label\"\n [title]=\"selectedItem.label || selectedItem.filters.type\"\n >\n <span\n class=\"circle-icon-wrapper circle-icon-wrapper--small m-r-4\"\n [style.background-color]=\"selectedItem.color || defaultColor\"\n >\n <i\n class=\"stroked-icon\"\n [c8yIcon]=\"timelineType === 'ALARM' ? 'bell' : 'c8y-events'\"\n ></i>\n </span>\n <span class=\"text-truncate\">\n <span class=\"text-truncate\">{{ selectedItem.label || selectedItem.filters.type }}</span>\n <small\n class=\"text-muted text-10\"\n *ngIf=\"!hideSource && selectedItem?.__target?.name\"\n >\n {{ selectedItem?.__target?.name }}\n </small>\n </span>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
517
550
  }], ctorParameters: () => [{ type: AlarmEventSelectorService }], propDecorators: { timelineType: [{
518
551
  type: Input
519
552
  }], contextAsset: [{