@c8y/ngx-components 1021.51.1 → 1021.54.2
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.
- package/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.component.d.ts +10 -2
- package/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.component.d.ts.map +1 -1
- package/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.model.d.ts +11 -0
- package/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.model.d.ts.map +1 -0
- package/alarm-event-selector/alarm-event-selection-list/alarm-event-selection-list.component.d.ts +10 -4
- package/alarm-event-selector/alarm-event-selection-list/alarm-event-selection-list.component.d.ts.map +1 -1
- package/alarm-event-selector/alarm-event-selector-list-item/alarm-event-selector-list-item.component.d.ts +3 -1
- package/alarm-event-selector/alarm-event-selector-list-item/alarm-event-selector-list-item.component.d.ts.map +1 -1
- package/alarm-event-selector/alarm-event-selector.model.d.ts +7 -0
- package/alarm-event-selector/alarm-event-selector.model.d.ts.map +1 -1
- package/core/dashboard/dashboard-child-action.component.d.ts +1 -1
- package/core/dashboard/dashboard-child-action.component.d.ts.map +1 -1
- package/core/dashboard/dashboard.module.d.ts +29 -29
- package/core/dashboard/index.d.ts +3 -0
- package/core/dashboard/index.d.ts.map +1 -1
- package/core/dashboard/widgets-dashboard.component.d.ts +1 -1
- package/core/dashboard/widgets-dashboard.component.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/aggregation-picker/aggregation-picker.component.d.ts +1 -1
- package/core/dashboard/wiget-time-context/aggregation-picker/aggregation-picker.component.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/realtime-control/realtime-control.component.d.ts +1 -1
- package/core/dashboard/wiget-time-context/realtime-control/realtime-control.component.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/widget-time-context-date-range.service.d.ts +10 -0
- package/core/dashboard/wiget-time-context/widget-time-context-date-range.service.d.ts.map +1 -0
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts +7 -4
- package/core/dashboard/wiget-time-context/widget-time-context.component.d.ts.map +1 -1
- package/core/dashboard/wiget-time-context/widget-time-context.model.d.ts +0 -1
- package/core/dashboard/wiget-time-context/widget-time-context.model.d.ts.map +1 -1
- package/core/date-picker/date-picker.component.d.ts +1 -1
- package/core/date-picker/date-picker.component.d.ts.map +1 -1
- package/core/date-picker/date-picker.module.d.ts +9 -9
- package/core/date-time-picker/close-date-picker.directive.d.ts +1 -1
- package/core/date-time-picker/close-date-picker.directive.d.ts.map +1 -1
- package/core/date-time-picker/date-time-picker.component.d.ts +6 -3
- package/core/date-time-picker/date-time-picker.component.d.ts.map +1 -1
- package/core/date-time-picker/date-time-picker.module.d.ts +11 -11
- package/core/date-time-picker/date-time-picker.module.d.ts.map +1 -1
- package/core/forms/forms.module.d.ts +18 -18
- package/core/forms/required-input-placeholder.directive.d.ts +1 -1
- package/core/forms/required-input-placeholder.directive.d.ts.map +1 -1
- package/core/router/router.service.d.ts.map +1 -1
- package/core/user/user-menu.service.d.ts +36 -11
- package/core/user/user-menu.service.d.ts.map +1 -1
- package/datapoint-explorer/c8y-ngx-components-datapoint-explorer.d.ts.map +1 -0
- package/datapoint-explorer/datapoint-explorer.module.d.ts +7 -0
- package/datapoint-explorer/datapoint-explorer.module.d.ts.map +1 -0
- package/datapoint-explorer/index.d.ts +2 -0
- package/datapoint-explorer/index.d.ts.map +1 -0
- package/datapoint-explorer/view/c8y-ngx-components-datapoint-explorer-view.d.ts.map +1 -0
- package/datapoint-explorer/view/configuration/naming-dictionary.d.ts +3 -0
- package/datapoint-explorer/view/configuration/naming-dictionary.d.ts.map +1 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.component.d.ts +38 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.component.d.ts.map +1 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.model.d.ts +7 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.model.d.ts.map +1 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.service.d.ts +15 -0
- package/datapoint-explorer/view/configuration/workspace-configuration.service.d.ts.map +1 -0
- package/datapoint-explorer/view/create-new-report-modal/create-new-report-modal.component.d.ts +25 -0
- package/datapoint-explorer/view/create-new-report-modal/create-new-report-modal.component.d.ts.map +1 -0
- package/datapoint-explorer/view/datapoint-explorer.component.d.ts +67 -0
- package/datapoint-explorer/view/datapoint-explorer.component.d.ts.map +1 -0
- package/datapoint-explorer/view/datapoint-explorer.service.d.ts +9 -0
- package/datapoint-explorer/view/datapoint-explorer.service.d.ts.map +1 -0
- package/datapoint-explorer/view/index.d.ts +2 -0
- package/datapoint-explorer/view/index.d.ts.map +1 -0
- package/datapoint-explorer/view/send-as-widget-to-report-modal/send-as-widget-to-report-modal.component.d.ts +23 -0
- package/datapoint-explorer/view/send-as-widget-to-report-modal/send-as-widget-to-report-modal.component.d.ts.map +1 -0
- package/echart/c8y-ngx-components-echart.d.ts.map +1 -0
- package/echart/chart-alerts/chart-alerts.component.d.ts +8 -0
- package/echart/chart-alerts/chart-alerts.component.d.ts.map +1 -0
- package/echart/charts.component.d.ts +63 -0
- package/echart/charts.component.d.ts.map +1 -0
- package/echart/index.d.ts +5 -0
- package/echart/index.d.ts.map +1 -0
- package/echart/models/c8y-ngx-components-echart-models.d.ts.map +1 -0
- package/echart/models/chart.model.d.ts +37 -0
- package/echart/models/chart.model.d.ts.map +1 -0
- package/echart/models/datapoints-graph-widget.model.d.ts +126 -0
- package/echart/models/datapoints-graph-widget.model.d.ts.map +1 -0
- package/echart/models/index.d.ts +4 -0
- package/echart/models/index.d.ts.map +1 -0
- package/echart/models/svg-icons.model.d.ts +22 -0
- package/echart/models/svg-icons.model.d.ts.map +1 -0
- package/echart/services/chart-alarms.service.d.ts +17 -0
- package/echart/services/chart-alarms.service.d.ts.map +1 -0
- package/echart/services/chart-events.service.d.ts +17 -0
- package/echart/services/chart-events.service.d.ts.map +1 -0
- package/echart/services/chart-realtime.service.d.ts +35 -0
- package/echart/services/chart-realtime.service.d.ts.map +1 -0
- package/echart/services/chart-types.service.d.ts +15 -0
- package/echart/services/chart-types.service.d.ts.map +1 -0
- package/echart/services/custom-measurements.service.d.ts +12 -0
- package/echart/services/custom-measurements.service.d.ts.map +1 -0
- package/echart/services/echarts-options.service.d.ts +143 -0
- package/echart/services/echarts-options.service.d.ts.map +1 -0
- package/echart/services/y-axis.service.d.ts +17 -0
- package/echart/services/y-axis.service.d.ts.map +1 -0
- package/esm2022/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.component.mjs +37 -12
- package/esm2022/alarm-event-selector/alarm-event-attributes-form/alarm-event-attributes-form.model.mjs +2 -0
- package/esm2022/alarm-event-selector/alarm-event-selection-list/alarm-event-selection-list.component.mjs +39 -12
- package/esm2022/alarm-event-selector/alarm-event-selector-list-item/alarm-event-selector-list-item.component.mjs +6 -4
- package/esm2022/alarm-event-selector/alarm-event-selector.component.mjs +1 -1
- package/esm2022/alarm-event-selector/alarm-event-selector.model.mjs +1 -1
- package/esm2022/alarm-event-selector/custom-alarm-event-form/custom-alarm-event-form.component.mjs +1 -1
- package/esm2022/alarms/alarms-filter.component.mjs +3 -3
- package/esm2022/core/dashboard/dashboard-child-action.component.mjs +3 -3
- package/esm2022/core/dashboard/dashboard.module.mjs +17 -14
- package/esm2022/core/dashboard/index.mjs +4 -1
- package/esm2022/core/dashboard/widgets-dashboard.component.mjs +9 -9
- package/esm2022/core/dashboard/wiget-time-context/aggregation-picker/aggregation-picker.component.mjs +11 -9
- package/esm2022/core/dashboard/wiget-time-context/realtime-control/realtime-control.component.mjs +8 -7
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context-date-range.service.mjs +23 -0
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context.component.mjs +70 -26
- package/esm2022/core/dashboard/wiget-time-context/widget-time-context.model.mjs +1 -1
- package/esm2022/core/date-picker/date-picker.component.mjs +29 -14
- package/esm2022/core/date-picker/date-picker.module.mjs +9 -7
- package/esm2022/core/date-time-picker/close-date-picker.directive.mjs +4 -3
- package/esm2022/core/date-time-picker/date-time-picker.component.mjs +57 -29
- package/esm2022/core/date-time-picker/date-time-picker.module.mjs +11 -7
- package/esm2022/core/forms/forms.module.mjs +3 -3
- package/esm2022/core/forms/ip-range-input-list.component.mjs +5 -5
- package/esm2022/core/forms/required-input-placeholder.directive.mjs +4 -3
- package/esm2022/core/router/router.service.mjs +1 -1
- package/esm2022/core/user/user-menu.service.mjs +57 -17
- package/esm2022/datapoint-explorer/c8y-ngx-components-datapoint-explorer.mjs +5 -0
- package/esm2022/datapoint-explorer/datapoint-explorer.module.mjs +65 -0
- package/esm2022/datapoint-explorer/index.mjs +2 -0
- package/esm2022/datapoint-explorer/view/c8y-ngx-components-datapoint-explorer-view.mjs +5 -0
- package/esm2022/datapoint-explorer/view/configuration/naming-dictionary.mjs +65 -0
- package/esm2022/datapoint-explorer/view/configuration/workspace-configuration.component.mjs +169 -0
- package/esm2022/datapoint-explorer/view/configuration/workspace-configuration.model.mjs +2 -0
- package/esm2022/datapoint-explorer/view/configuration/workspace-configuration.service.mjs +40 -0
- package/esm2022/datapoint-explorer/view/create-new-report-modal/create-new-report-modal.component.mjs +64 -0
- package/esm2022/datapoint-explorer/view/datapoint-explorer.component.mjs +279 -0
- package/esm2022/datapoint-explorer/view/datapoint-explorer.service.mjs +23 -0
- package/esm2022/datapoint-explorer/view/index.mjs +2 -0
- package/esm2022/datapoint-explorer/view/send-as-widget-to-report-modal/send-as-widget-to-report-modal.component.mjs +48 -0
- package/esm2022/datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.mjs +3 -3
- package/esm2022/datapoint-selector/datapoint-selector-list-item/datapoint-selector-list-item.component.mjs +3 -3
- package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-exports-selector-file-types/datapoints-exports-selector-file-types.component.mjs +3 -3
- package/esm2022/datapoints-export-selector/datapoints-export-selector.component.mjs +3 -3
- package/esm2022/device-list/add-smart-group.component.mjs +3 -3
- package/esm2022/echart/c8y-ngx-components-echart.mjs +5 -0
- package/esm2022/echart/chart-alerts/chart-alerts.component.mjs +16 -0
- package/esm2022/echart/charts.component.mjs +560 -0
- package/esm2022/echart/index.mjs +5 -0
- package/esm2022/echart/models/c8y-ngx-components-echart-models.mjs +5 -0
- package/esm2022/echart/models/chart.model.mjs +2 -0
- package/esm2022/echart/models/datapoints-graph-widget.model.mjs +17 -0
- package/esm2022/echart/models/index.mjs +4 -0
- package/esm2022/echart/models/svg-icons.model.mjs +22 -0
- package/esm2022/echart/services/chart-alarms.service.mjs +58 -0
- package/esm2022/echart/services/chart-events.service.mjs +44 -0
- package/esm2022/echart/services/chart-realtime.service.mjs +193 -0
- package/esm2022/echart/services/chart-types.service.mjs +102 -0
- package/esm2022/echart/services/custom-measurements.service.mjs +52 -0
- package/esm2022/echart/services/echarts-options.service.mjs +857 -0
- package/esm2022/echart/services/y-axis.service.mjs +150 -0
- package/esm2022/icon-selector/icons/platform/index.mjs +10 -8
- package/esm2022/interval-picker/interval-picker.component.mjs +3 -3
- package/esm2022/interval-picker/interval-picker.model.mjs +1 -1
- package/esm2022/report-dashboard/index.mjs +2 -1
- package/esm2022/time-context/c8y-ngx-components-time-context.mjs +5 -0
- package/esm2022/time-context/index.mjs +2 -0
- package/esm2022/time-context/time-context.component.mjs +217 -0
- package/esm2022/time-context/time-context.service.mjs +83 -0
- package/esm2022/translation-editor/lazy/translation-editor/translation-editor.component.mjs +6 -5
- package/esm2022/widgets/cockpit-exports/index.mjs +8 -1
- package/esm2022/widgets/definitions/datapoints-graph/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +5 -0
- package/esm2022/widgets/definitions/datapoints-graph/index.mjs +31 -0
- package/esm2022/widgets/definitions/index.mjs +3 -2
- package/esm2022/widgets/implementations/datapoints-graph/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +5 -0
- package/esm2022/widgets/implementations/datapoints-graph/datapoints-graph-config/datapoints-graph-widget-config.component.mjs +239 -0
- package/esm2022/widgets/implementations/datapoints-graph/datapoints-graph-view/datapoints-graph-widget-view.component.mjs +241 -0
- package/esm2022/widgets/implementations/datapoints-graph/index.mjs +3 -0
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs +80 -28
- package/fesm2022/c8y-ngx-components-alarm-event-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +2 -2
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +658 -0
- package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +72 -0
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +4 -4
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-list.mjs +2 -2
- package/fesm2022/c8y-ngx-components-device-list.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart-models.mjs +46 -0
- package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-echart.mjs +2023 -0
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs +9 -7
- package/fesm2022/c8y-ngx-components-icon-selector-icons-platform.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-interval-picker.mjs +2 -2
- package/fesm2022/c8y-ngx-components-interval-picker.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-time-context.mjs +300 -0
- package/fesm2022/c8y-ngx-components-time-context.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs +5 -4
- package/fesm2022/c8y-ngx-components-translation-editor-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-cockpit-exports.mjs +7 -0
- package/fesm2022/c8y-ngx-components-widgets-cockpit-exports.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs +38 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions-datapoints-graph.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs +2 -1
- package/fesm2022/c8y-ngx-components-widgets-definitions.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +467 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components.mjs +429 -277
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/icon-selector/icons/index.d.ts +1 -1
- package/icon-selector/icons/platform/index.d.ts +2 -2
- package/icon-selector/icons/platform/index.d.ts.map +1 -1
- package/interval-picker/interval-picker.component.d.ts.map +1 -1
- package/interval-picker/interval-picker.model.d.ts.map +1 -1
- package/locales/de.po +206 -279
- package/locales/es.po +206 -279
- package/locales/fr.po +206 -279
- package/locales/ja_JP.po +196 -279
- package/locales/ko.po +455 -444
- package/locales/locales.pot +190 -272
- package/locales/nl.po +206 -279
- package/locales/pl.po +206 -279
- package/locales/pt_BR.po +206 -279
- package/locales/zh_CN.po +450 -443
- package/locales/zh_TW.po +452 -445
- package/package.json +1 -1
- package/report-dashboard/index.d.ts +1 -0
- package/report-dashboard/index.d.ts.map +1 -1
- package/time-context/c8y-ngx-components-time-context.d.ts.map +1 -0
- package/time-context/index.d.ts +2 -0
- package/time-context/index.d.ts.map +1 -0
- package/time-context/time-context.component.d.ts +61 -0
- package/time-context/time-context.component.d.ts.map +1 -0
- package/time-context/time-context.service.d.ts +25 -0
- package/time-context/time-context.service.d.ts.map +1 -0
- package/translation-editor/lazy/translation-editor/translation-editor.component.d.ts.map +1 -1
- package/widgets/cockpit-exports/index.d.ts +6 -0
- package/widgets/cockpit-exports/index.d.ts.map +1 -1
- package/widgets/definitions/datapoints-graph/c8y-ngx-components-widgets-definitions-datapoints-graph.d.ts.map +1 -0
- package/widgets/definitions/datapoints-graph/index.d.ts +16 -0
- package/widgets/definitions/datapoints-graph/index.d.ts.map +1 -0
- package/widgets/definitions/index.d.ts +1 -0
- package/widgets/definitions/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-graph/c8y-ngx-components-widgets-implementations-datapoints-graph.d.ts.map +1 -0
- package/widgets/implementations/datapoints-graph/datapoints-graph-config/datapoints-graph-widget-config.component.d.ts +43 -0
- package/widgets/implementations/datapoints-graph/datapoints-graph-config/datapoints-graph-widget-config.component.d.ts.map +1 -0
- package/widgets/implementations/datapoints-graph/datapoints-graph-view/datapoints-graph-widget-view.component.d.ts +54 -0
- package/widgets/implementations/datapoints-graph/datapoints-graph-view/datapoints-graph-widget-view.component.d.ts.map +1 -0
- package/widgets/implementations/datapoints-graph/index.d.ts +3 -0
- package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, forwardRef, Component, Input, EventEmitter, Output, Pipe, Optional, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
|
-
import {
|
|
4
|
+
import { FormControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
5
|
import { take, takeUntil, map, startWith, tap, switchMap, shareReplay, distinctUntilChanged, debounceTime } from 'rxjs/operators';
|
|
6
6
|
import * as i3 from '@angular/common';
|
|
7
7
|
import * as i2 from '@c8y/ngx-components';
|
|
8
|
-
import { gettext, EmptyStateComponent, CommonModule, CoreModule } from '@c8y/ngx-components';
|
|
9
|
-
import * as
|
|
8
|
+
import { gettext, ViewContext, EmptyStateComponent, CommonModule, CoreModule } from '@c8y/ngx-components';
|
|
9
|
+
import * as i8 from '@angular/cdk/drag-drop';
|
|
10
10
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i6$1 from '@c8y/ngx-components/context-dashboard';
|
|
12
12
|
import * as i1$2 from 'ngx-bootstrap/modal';
|
|
13
13
|
import { Subject, BehaviorSubject, combineLatest } from 'rxjs';
|
|
14
14
|
import * as i1$1 from '@c8y/client';
|
|
@@ -19,7 +19,7 @@ import * as i6 from 'ngx-bootstrap/collapse';
|
|
|
19
19
|
import { CollapseModule } from 'ngx-bootstrap/collapse';
|
|
20
20
|
import * as i4 from 'ngx-bootstrap/popover';
|
|
21
21
|
import { PopoverModule } from 'ngx-bootstrap/popover';
|
|
22
|
-
import * as
|
|
22
|
+
import * as i4$1 from '@angular/router';
|
|
23
23
|
import { RouterModule } from '@angular/router';
|
|
24
24
|
import { TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
25
25
|
|
|
@@ -47,23 +47,25 @@ class AlarmEventAttributesFormComponent {
|
|
|
47
47
|
this.alarmEventAttributesFormService = alarmEventAttributesFormService;
|
|
48
48
|
this.omitProperties = {};
|
|
49
49
|
this.selectedItems = [];
|
|
50
|
+
this.datapoints = [];
|
|
50
51
|
}
|
|
51
52
|
ngOnInit() {
|
|
52
53
|
this.formGroup = this.formBuilder.group({
|
|
53
54
|
filters: this.formBuilder.group({
|
|
54
|
-
type: [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.alarmEventAttributesFormService.duplicateTypeValidator(this.selectedItems)
|
|
59
|
-
]
|
|
60
|
-
]
|
|
55
|
+
type: new FormControl('', [
|
|
56
|
+
Validators.required,
|
|
57
|
+
this.alarmEventAttributesFormService.duplicateTypeValidator(this.selectedItems)
|
|
58
|
+
])
|
|
61
59
|
}),
|
|
62
|
-
timelineType: ''
|
|
60
|
+
timelineType: new FormControl(''),
|
|
61
|
+
selectedDatapoint: new FormControl(null)
|
|
63
62
|
});
|
|
64
63
|
if (!this.omitProperties.label) {
|
|
65
64
|
this.formGroup.addControl('label', new FormControl('', Validators.required));
|
|
66
65
|
}
|
|
66
|
+
if (this.datapoints?.length > 0) {
|
|
67
|
+
this.filterKpis();
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
70
|
validate(_control) {
|
|
69
71
|
return this.formGroup?.valid ? null : { formInvalid: {} };
|
|
@@ -80,8 +82,27 @@ class AlarmEventAttributesFormComponent {
|
|
|
80
82
|
setDisabledState(isDisabled) {
|
|
81
83
|
isDisabled ? this.formGroup.disable() : this.formGroup.enable();
|
|
82
84
|
}
|
|
85
|
+
changeDatapointSelection(event) {
|
|
86
|
+
const selectElement = event.target;
|
|
87
|
+
const selectedIndex = selectElement.selectedIndex;
|
|
88
|
+
const selectedDatapoint = this.datapoints[selectedIndex];
|
|
89
|
+
const trimmedDatapoint = {
|
|
90
|
+
target: selectedDatapoint.__target.id,
|
|
91
|
+
fragment: selectedDatapoint.fragment,
|
|
92
|
+
series: selectedDatapoint.series
|
|
93
|
+
};
|
|
94
|
+
this.formGroup.patchValue({ selectedDatapoint: trimmedDatapoint });
|
|
95
|
+
}
|
|
96
|
+
trackByFn(_index, item) {
|
|
97
|
+
return `${item.fragment}-${item.series}-${item.__target?.id}`;
|
|
98
|
+
}
|
|
99
|
+
filterKpis() {
|
|
100
|
+
if (this.target && this.target.id) {
|
|
101
|
+
this.datapoints = this.datapoints.filter(dp => dp.__target?.id === this.target.id);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
83
104
|
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: [
|
|
105
|
+
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", target: "target", datapoints: "datapoints" }, providers: [
|
|
85
106
|
{
|
|
86
107
|
provide: NG_VALUE_ACCESSOR,
|
|
87
108
|
useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
|
|
@@ -92,7 +113,7 @@ class AlarmEventAttributesFormComponent {
|
|
|
92
113
|
useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
|
|
93
114
|
multi: true
|
|
94
115
|
}
|
|
95
|
-
], ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group
|
|
116
|
+
], ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group\n class=\"form-group-sm\"\n *ngIf=\"formGroup.controls.label\"\n >\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 class=\"form-group-sm\">\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\n <c8y-form-group\n class=\"form-group-sm\"\n *ngIf=\"datapoints?.length > 0\"\n >\n <label>{{ 'Select data point' | translate }}</label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control input-sm\"\n (change)=\"changeDatapointSelection($event)\"\n >\n <option\n title=\"{{ 'Widget configuration' | translate }}\"\n *ngFor=\"let datapoint of datapoints; trackBy: trackByFn\"\n [ngValue]=\"{\n target: datapoint.__target.id,\n fragment: datapoint.fragment,\n series: datapoint.series\n }\"\n [selected]=\"\n datapoint.__target.id === formGroup.value.selectedDatapoint?.target &&\n datapoint.fragment === formGroup.value.selectedDatapoint?.fragment &&\n datapoint.series === formGroup.value.selectedDatapoint?.series\n \"\n >\n {{ datapoint?.label }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n</div>\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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" }] }); }
|
|
96
117
|
}
|
|
97
118
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventAttributesFormComponent, decorators: [{
|
|
98
119
|
type: Component,
|
|
@@ -107,13 +128,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
107
128
|
useExisting: forwardRef(() => AlarmEventAttributesFormComponent),
|
|
108
129
|
multi: true
|
|
109
130
|
}
|
|
110
|
-
], template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group
|
|
131
|
+
], template: "<div [formGroup]=\"formGroup\">\n <c8y-form-group\n class=\"form-group-sm\"\n *ngIf=\"formGroup.controls.label\"\n >\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 class=\"form-group-sm\">\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\n <c8y-form-group\n class=\"form-group-sm\"\n *ngIf=\"datapoints?.length > 0\"\n >\n <label>{{ 'Select data point' | translate }}</label>\n <div class=\"c8y-select-wrapper\">\n <select\n class=\"form-control input-sm\"\n (change)=\"changeDatapointSelection($event)\"\n >\n <option\n title=\"{{ 'Widget configuration' | translate }}\"\n *ngFor=\"let datapoint of datapoints; trackBy: trackByFn\"\n [ngValue]=\"{\n target: datapoint.__target.id,\n fragment: datapoint.fragment,\n series: datapoint.series\n }\"\n [selected]=\"\n datapoint.__target.id === formGroup.value.selectedDatapoint?.target &&\n datapoint.fragment === formGroup.value.selectedDatapoint?.fragment &&\n datapoint.series === formGroup.value.selectedDatapoint?.series\n \"\n >\n {{ datapoint?.label }}\n </option>\n </select>\n </div>\n </c8y-form-group>\n</div>\n" }]
|
|
111
132
|
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: AlarmEventAttributesFormService }], propDecorators: { timelineType: [{
|
|
112
133
|
type: Input
|
|
113
134
|
}], omitProperties: [{
|
|
114
135
|
type: Input
|
|
115
136
|
}], selectedItems: [{
|
|
116
137
|
type: Input
|
|
138
|
+
}], target: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], datapoints: [{
|
|
141
|
+
type: Input
|
|
117
142
|
}] } });
|
|
118
143
|
|
|
119
144
|
const EVENT_TEXTS = {
|
|
@@ -305,7 +330,7 @@ class AlarmEventSelectorListItemComponent {
|
|
|
305
330
|
return obj;
|
|
306
331
|
}
|
|
307
332
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorListItemComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
308
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmEventSelectorListItemComponent, selector: "c8y-alarm-event-selector-list-item", inputs: { timelineType: "timelineType", highlightText: "highlightText", showAddRemoveButton: "showAddRemoveButton", isSelected: "isSelected", optionToRemove: "optionToRemove", showActiveToggle: "showActiveToggle", allowItemEdit: "allowItemEdit", hideSource: "hideSource", displayAsSwitch: "displayAsSwitch", omitProperties: "omitProperties" }, outputs: { added: "added", removed: "removed" }, providers: [
|
|
333
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmEventSelectorListItemComponent, selector: "c8y-alarm-event-selector-list-item", inputs: { timelineType: "timelineType", datapoints: "datapoints", highlightText: "highlightText", showAddRemoveButton: "showAddRemoveButton", isSelected: "isSelected", optionToRemove: "optionToRemove", showActiveToggle: "showActiveToggle", allowItemEdit: "allowItemEdit", hideSource: "hideSource", displayAsSwitch: "displayAsSwitch", omitProperties: "omitProperties" }, outputs: { added: "added", removed: "removed" }, providers: [
|
|
309
334
|
{
|
|
310
335
|
provide: NG_VALUE_ACCESSOR,
|
|
311
336
|
useExisting: forwardRef(() => AlarmEventSelectorListItemComponent),
|
|
@@ -316,7 +341,7 @@ class AlarmEventSelectorListItemComponent {
|
|
|
316
341
|
useExisting: forwardRef(() => AlarmEventSelectorListItemComponent),
|
|
317
342
|
multi: true
|
|
318
343
|
}
|
|
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 m-t-4 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-
|
|
344
|
+
], 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 m-t-4 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-0\">\n <div\n class=\"c8y-list__item__colorpicker p-t-0 p-b-0 p-l-4\"\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 circle-icon-wrapper--medium\"\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 [datapoints]=\"datapoints\"\n [target]=\"formGroup.value.__target\"\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", "target", "datapoints"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
|
|
320
345
|
}
|
|
321
346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorListItemComponent, decorators: [{
|
|
322
347
|
type: Component,
|
|
@@ -331,9 +356,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
331
356
|
useExisting: forwardRef(() => AlarmEventSelectorListItemComponent),
|
|
332
357
|
multi: true
|
|
333
358
|
}
|
|
334
|
-
], 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 m-t-4 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-
|
|
359
|
+
], 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 m-t-4 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-0\">\n <div\n class=\"c8y-list__item__colorpicker p-t-0 p-b-0 p-l-4\"\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 circle-icon-wrapper--medium\"\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 [datapoints]=\"datapoints\"\n [target]=\"formGroup.value.__target\"\n ></c8y-alarm-event-attributes-form>\n </div>\n </c8y-li-collapse>\n</c8y-li>\n" }]
|
|
335
360
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { timelineType: [{
|
|
336
361
|
type: Input
|
|
362
|
+
}], datapoints: [{
|
|
363
|
+
type: Input
|
|
337
364
|
}], highlightText: [{
|
|
338
365
|
type: Input
|
|
339
366
|
}], showAddRemoveButton: [{
|
|
@@ -397,7 +424,7 @@ class CustomAlarmEventFormComponent {
|
|
|
397
424
|
return obj;
|
|
398
425
|
}
|
|
399
426
|
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 }); }
|
|
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" }] }); }
|
|
427
|
+
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", "target", "datapoints"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] }); }
|
|
401
428
|
}
|
|
402
429
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: CustomAlarmEventFormComponent, decorators: [{
|
|
403
430
|
type: Component,
|
|
@@ -536,7 +563,7 @@ class AlarmEventSelectorComponent {
|
|
|
536
563
|
multi: true,
|
|
537
564
|
useExisting: forwardRef(() => AlarmEventSelectorComponent)
|
|
538
565
|
}
|
|
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" }] }); }
|
|
566
|
+
], 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", "datapoints", "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" }] }); }
|
|
540
567
|
}
|
|
541
568
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorComponent, decorators: [{
|
|
542
569
|
type: Component,
|
|
@@ -632,10 +659,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
632
659
|
}], ctorParameters: () => [{ type: i1$2.BsModalService }] });
|
|
633
660
|
|
|
634
661
|
class AlarmEventSelectionListComponent {
|
|
635
|
-
constructor(alarmEventModalService, alarmEventSelectService, formBuilder, widgetComponent) {
|
|
662
|
+
constructor(alarmEventModalService, alarmEventSelectService, formBuilder, activatedRoute, contextRouteService, widgetComponent) {
|
|
636
663
|
this.alarmEventModalService = alarmEventModalService;
|
|
637
664
|
this.alarmEventSelectService = alarmEventSelectService;
|
|
638
665
|
this.formBuilder = formBuilder;
|
|
666
|
+
this.activatedRoute = activatedRoute;
|
|
667
|
+
this.contextRouteService = contextRouteService;
|
|
639
668
|
this.widgetComponent = widgetComponent;
|
|
640
669
|
this.timelineType = 'ALARM';
|
|
641
670
|
this.canRemove = true;
|
|
@@ -645,6 +674,7 @@ class AlarmEventSelectionListComponent {
|
|
|
645
674
|
this.inline = false; // TODO: @janhommes we should rename this to `isDropdownContained` or similar to make it more clear
|
|
646
675
|
this.activeToggleAsSwitch = true;
|
|
647
676
|
this.omitProperties = { color: false, label: false };
|
|
677
|
+
this.datapoints = [];
|
|
648
678
|
/**
|
|
649
679
|
* The configuration for the alarms-events selector modal.
|
|
650
680
|
*/
|
|
@@ -656,6 +686,7 @@ class AlarmEventSelectionListComponent {
|
|
|
656
686
|
this.timelineTypeTexts = this.alarmEventSelectService.timelineTypeTexts(this.timelineType);
|
|
657
687
|
this.title ??= this.timelineTypeTexts.listTitle;
|
|
658
688
|
this.addButtonLabel ??= this.timelineTypeTexts.addButtonLabel;
|
|
689
|
+
this.contextSourceId = this.initializeContextSourceId();
|
|
659
690
|
const context = this.widgetComponent?.context;
|
|
660
691
|
if (context?.id) {
|
|
661
692
|
const { name, id, c8y_IsDevice } = context;
|
|
@@ -699,6 +730,11 @@ class AlarmEventSelectionListComponent {
|
|
|
699
730
|
title: this.timelineTypeTexts.selectorTitle,
|
|
700
731
|
saveButtonLabel: this.timelineTypeTexts.addButtonLabel,
|
|
701
732
|
omitProperties: this.omitProperties,
|
|
733
|
+
contextAsset: this.config?.contextAsset
|
|
734
|
+
? this.config.contextAsset
|
|
735
|
+
: this.contextSourceId
|
|
736
|
+
? { id: this.contextSourceId }
|
|
737
|
+
: null,
|
|
702
738
|
...(this.config || {})
|
|
703
739
|
})
|
|
704
740
|
.then(result => {
|
|
@@ -721,8 +757,18 @@ class AlarmEventSelectionListComponent {
|
|
|
721
757
|
}
|
|
722
758
|
return formArrayValue.map(tmp => Object.assign({}, ...Object.values(tmp)));
|
|
723
759
|
}
|
|
724
|
-
|
|
725
|
-
|
|
760
|
+
initializeContextSourceId() {
|
|
761
|
+
const routeContext = this.contextRouteService.getContextData(this.activatedRoute);
|
|
762
|
+
if (!routeContext) {
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
const { context, contextData } = routeContext;
|
|
766
|
+
if ([ViewContext.Device, ViewContext.Group].includes(context)) {
|
|
767
|
+
return contextData?.id;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectionListComponent, deps: [{ token: AlarmEventSelectorModalService }, { token: AlarmEventSelectorService }, { token: i1.FormBuilder }, { token: i4$1.ActivatedRoute, optional: true }, { token: i2.ContextRouteService, optional: true }, { token: i6$1.WidgetConfigComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
771
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmEventSelectionListComponent, selector: "c8y-alarm-event-selection-list", inputs: { timelineType: "timelineType", canRemove: "canRemove", canEdit: "canEdit", canDragAndDrop: "canDragAndDrop", title: "title", addButtonLabel: "addButtonLabel", hideSource: "hideSource", inline: "inline", activeToggleAsSwitch: "activeToggleAsSwitch", omitProperties: "omitProperties", datapoints: "datapoints", config: "config" }, providers: [
|
|
726
772
|
{
|
|
727
773
|
provide: NG_VALUE_ACCESSOR,
|
|
728
774
|
multi: true,
|
|
@@ -733,7 +779,7 @@ class AlarmEventSelectionListComponent {
|
|
|
733
779
|
useExisting: forwardRef(() => AlarmEventSelectionListComponent),
|
|
734
780
|
multi: true
|
|
735
781
|
}
|
|
736
|
-
], queries: [{ propertyName: "emptyState", first: true, predicate: EmptyStateComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"card-header separator sticky-top bg-
|
|
782
|
+
], queries: [{ propertyName: "emptyState", first: true, predicate: EmptyStateComponent, descendants: true }], ngImport: i0, template: "<div\n class=\"card-header separator-top-bottom sticky-top bg-inherit\"\n *ngIf=\"!inline\"\n>\n <span class=\"card-title h4\">{{ title | translate }}</span>\n</div>\n\n<c8y-list-group\n class=\"flex-grow ff-scroll-fix cdk-droplist\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListDisabled]=\"formArray.controls?.length < 2\"\n>\n <div\n class=\"p-t-8\"\n *ngIf=\"!formArray.controls?.length\"\n >\n <ng-content select=\"c8y-ui-empty-state\"></ng-content>\n <c8y-ui-empty-state\n class=\"p-t-8\"\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.emptyStateSubtitle | translate\"\n *ngIf=\"!emptyState\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div\n *ngFor=\"let itemForm of formArray.controls; let index = index\"\n [formGroup]=\"itemForm\"\n >\n <c8y-alarm-event-selector-list-item\n class=\"d-block\"\n cdkDrag\n [cdkDragDisabled]=\"!canDragAndDrop\"\n formControlName=\"details\"\n [showAddRemoveButton]=\"false\"\n [datapoints]=\"datapoints\"\n [optionToRemove]=\"canRemove\"\n [showActiveToggle]=\"true\"\n [timelineType]=\"timelineType\"\n [allowItemEdit]=\"canEdit\"\n [hideSource]=\"hideSource\"\n [displayAsSwitch]=\"activeToggleAsSwitch\"\n [omitProperties]=\"omitProperties\"\n (removed)=\"onItemRemoved(index)\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Click and drag to reorder' | translate }}\"\n cdkDragHandle\n *ngIf=\"canDragAndDrop\"\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n </c8y-alarm-event-selector-list-item>\n </div>\n</c8y-list-group>\n\n<div class=\"card-footer bg-inherit\">\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"addButtonLabel | translate\"\n type=\"button\"\n [ngClass]=\"{ 'btn-block': inline }\"\n (click)=\"add()\"\n >\n <i\n c8yIcon=\"plus-circle\"\n *ngIf=\"canDragAndDrop\"\n ></i>\n {{ addButtonLabel | translate }}\n </button>\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: "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.ListGroupComponent, selector: "c8y-list-group" }, { 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: i8.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i8.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i8.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: AlarmEventSelectorListItemComponent, selector: "c8y-alarm-event-selector-list-item", inputs: ["timelineType", "datapoints", "highlightText", "showAddRemoveButton", "isSelected", "optionToRemove", "showActiveToggle", "allowItemEdit", "hideSource", "displayAsSwitch", "omitProperties"], outputs: ["added", "removed"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
|
|
737
783
|
}
|
|
738
784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectionListComponent, decorators: [{
|
|
739
785
|
type: Component,
|
|
@@ -748,8 +794,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
748
794
|
useExisting: forwardRef(() => AlarmEventSelectionListComponent),
|
|
749
795
|
multi: true
|
|
750
796
|
}
|
|
751
|
-
], template: "<div\n class=\"card-header separator sticky-top bg-
|
|
752
|
-
}], ctorParameters: () => [{ type: AlarmEventSelectorModalService }, { type: AlarmEventSelectorService }, { type: i1.FormBuilder }, { type: i4$1.
|
|
797
|
+
], template: "<div\n class=\"card-header separator-top-bottom sticky-top bg-inherit\"\n *ngIf=\"!inline\"\n>\n <span class=\"card-title h4\">{{ title | translate }}</span>\n</div>\n\n<c8y-list-group\n class=\"flex-grow ff-scroll-fix cdk-droplist\"\n cdkDropList\n (cdkDropListDropped)=\"drop($event)\"\n [cdkDropListDisabled]=\"formArray.controls?.length < 2\"\n>\n <div\n class=\"p-t-8\"\n *ngIf=\"!formArray.controls?.length\"\n >\n <ng-content select=\"c8y-ui-empty-state\"></ng-content>\n <c8y-ui-empty-state\n class=\"p-t-8\"\n [icon]=\"timelineTypeTexts.emptyStateIcon\"\n [title]=\"timelineTypeTexts.emptyStateTitle | translate\"\n [subtitle]=\"timelineTypeTexts.emptyStateSubtitle | translate\"\n *ngIf=\"!emptyState\"\n [horizontal]=\"true\"\n ></c8y-ui-empty-state>\n </div>\n <div\n *ngFor=\"let itemForm of formArray.controls; let index = index\"\n [formGroup]=\"itemForm\"\n >\n <c8y-alarm-event-selector-list-item\n class=\"d-block\"\n cdkDrag\n [cdkDragDisabled]=\"!canDragAndDrop\"\n formControlName=\"details\"\n [showAddRemoveButton]=\"false\"\n [datapoints]=\"datapoints\"\n [optionToRemove]=\"canRemove\"\n [showActiveToggle]=\"true\"\n [timelineType]=\"timelineType\"\n [allowItemEdit]=\"canEdit\"\n [hideSource]=\"hideSource\"\n [displayAsSwitch]=\"activeToggleAsSwitch\"\n [omitProperties]=\"omitProperties\"\n (removed)=\"onItemRemoved(index)\"\n >\n <c8y-li-drag-handle\n title=\"{{ 'Click and drag to reorder' | translate }}\"\n cdkDragHandle\n *ngIf=\"canDragAndDrop\"\n >\n <i c8yIcon=\"drag-reorder\"></i>\n </c8y-li-drag-handle>\n </c8y-alarm-event-selector-list-item>\n </div>\n</c8y-list-group>\n\n<div class=\"card-footer bg-inherit\">\n <button\n class=\"btn btn-default btn-sm\"\n [title]=\"addButtonLabel | translate\"\n type=\"button\"\n [ngClass]=\"{ 'btn-block': inline }\"\n (click)=\"add()\"\n >\n <i\n c8yIcon=\"plus-circle\"\n *ngIf=\"canDragAndDrop\"\n ></i>\n {{ addButtonLabel | translate }}\n </button>\n</div>\n" }]
|
|
798
|
+
}], ctorParameters: () => [{ type: AlarmEventSelectorModalService }, { type: AlarmEventSelectorService }, { type: i1.FormBuilder }, { type: i4$1.ActivatedRoute, decorators: [{
|
|
799
|
+
type: Optional
|
|
800
|
+
}] }, { type: i2.ContextRouteService, decorators: [{
|
|
801
|
+
type: Optional
|
|
802
|
+
}] }, { type: i6$1.WidgetConfigComponent, decorators: [{
|
|
753
803
|
type: Optional
|
|
754
804
|
}] }], propDecorators: { timelineType: [{
|
|
755
805
|
type: Input
|
|
@@ -771,6 +821,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImpor
|
|
|
771
821
|
type: Input
|
|
772
822
|
}], omitProperties: [{
|
|
773
823
|
type: Input
|
|
824
|
+
}], datapoints: [{
|
|
825
|
+
type: Input
|
|
774
826
|
}], emptyState: [{
|
|
775
827
|
type: ContentChild,
|
|
776
828
|
args: [EmptyStateComponent]
|
|
@@ -792,7 +844,7 @@ class AlarmEventSelectorModule {
|
|
|
792
844
|
PopoverModule,
|
|
793
845
|
TooltipModule,
|
|
794
846
|
AssetSelectorModule,
|
|
795
|
-
CollapseModule,
|
|
847
|
+
CollapseModule, i4$1.RouterModule], exports: [AlarmEventSelectionListComponent, AlarmEventSelectorComponent] }); }
|
|
796
848
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmEventSelectorModule, imports: [CommonModule,
|
|
797
849
|
CoreModule,
|
|
798
850
|
DragDropModule,
|