@c8y/ngx-components 1022.6.1 → 1022.9.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.
Files changed (77) hide show
  1. package/context-dashboard/context-dashboard.component.d.ts +1 -3
  2. package/context-dashboard/context-dashboard.component.d.ts.map +1 -1
  3. package/core/core.module.d.ts.map +1 -1
  4. package/core/file-picker/file-picker.component.d.ts +5 -2
  5. package/core/file-picker/file-picker.component.d.ts.map +1 -1
  6. package/core/index.d.ts +1 -0
  7. package/core/index.d.ts.map +1 -1
  8. package/core/preview-feature/feature-cache.service.d.ts +3 -1
  9. package/core/preview-feature/feature-cache.service.d.ts.map +1 -1
  10. package/core/preview-feature/preview-feature-button.component.d.ts +3 -2
  11. package/core/preview-feature/preview-feature-button.component.d.ts.map +1 -1
  12. package/core/preview-feature/preview-feature-query-param.factory.d.ts +24 -0
  13. package/core/preview-feature/preview-feature-query-param.factory.d.ts.map +1 -0
  14. package/core/preview-feature/preview-feature-show-notification.service.d.ts +4 -1
  15. package/core/preview-feature/preview-feature-show-notification.service.d.ts.map +1 -1
  16. package/core/preview-feature/preview-feature.component.d.ts +2 -0
  17. package/core/preview-feature/preview-feature.component.d.ts.map +1 -1
  18. package/core/preview-feature/preview-feature.model.d.ts +1 -1
  19. package/core/preview-feature/preview-feature.model.d.ts.map +1 -1
  20. package/core/preview-feature/preview-feature.providers.d.ts.map +1 -1
  21. package/core/query-param-handler/index.d.ts +5 -0
  22. package/core/query-param-handler/index.d.ts.map +1 -0
  23. package/core/query-param-handler/query-param-bottom-drawer.service.d.ts +48 -0
  24. package/core/query-param-handler/query-param-bottom-drawer.service.d.ts.map +1 -0
  25. package/core/query-param-handler/query-param-handler.service.d.ts +31 -0
  26. package/core/query-param-handler/query-param-handler.service.d.ts.map +1 -0
  27. package/core/query-param-handler/query-param-modal-handler.service.d.ts +79 -0
  28. package/core/query-param-handler/query-param-modal-handler.service.d.ts.map +1 -0
  29. package/datapoint-explorer/view/datapoint-explorer.component.d.ts +3 -2
  30. package/datapoint-explorer/view/datapoint-explorer.component.d.ts.map +1 -1
  31. package/datapoint-explorer/view/datapoint-explorer.service.d.ts +2 -0
  32. package/datapoint-explorer/view/datapoint-explorer.service.d.ts.map +1 -1
  33. package/datapoint-explorer/view/send-as-widget-to-dashboard-modal/send-as-widget-to-dashboard-modal.component.d.ts +24 -0
  34. package/datapoint-explorer/view/send-as-widget-to-dashboard-modal/send-as-widget-to-dashboard-modal.component.d.ts.map +1 -0
  35. package/datapoint-explorer/view/send-as-widget-to-report-modal/send-as-widget-to-report-modal.component.d.ts +1 -1
  36. package/echart/charts.component.d.ts.map +1 -1
  37. package/echart/services/y-axis.service.d.ts.map +1 -1
  38. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +4 -20
  39. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  40. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +121 -39
  41. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  42. package/fesm2022/c8y-ngx-components-echart.mjs +7 -4
  43. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  44. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs +2 -2
  45. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-firmware.mjs.map +1 -1
  46. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs +2 -2
  47. package/fesm2022/c8y-ngx-components-operations-stepper-bulk-type-software.mjs.map +1 -1
  48. package/fesm2022/c8y-ngx-components-repository-configuration.mjs +1 -1
  49. package/fesm2022/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  50. package/fesm2022/c8y-ngx-components-repository-firmware.mjs +6 -6
  51. package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
  52. package/fesm2022/c8y-ngx-components-repository-software.mjs +4 -4
  53. package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
  54. package/fesm2022/c8y-ngx-components-sensor-phone.mjs +331 -8
  55. package/fesm2022/c8y-ngx-components-sensor-phone.mjs.map +1 -1
  56. package/fesm2022/c8y-ngx-components.mjs +429 -101
  57. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  58. package/locales/de.po +29 -3
  59. package/locales/es.po +29 -3
  60. package/locales/fr.po +28 -3
  61. package/locales/ja_JP.po +28 -3
  62. package/locales/ko.po +28 -3
  63. package/locales/locales.pot +29 -3
  64. package/locales/nl.po +29 -3
  65. package/locales/pl.po +29 -3
  66. package/locales/pt_BR.po +29 -3
  67. package/locales/zh_CN.po +28 -3
  68. package/locales/zh_TW.po +29 -3
  69. package/package.json +1 -1
  70. package/sensor-phone/sensor-phone.module.d.ts.map +1 -1
  71. package/fesm2022/c8y-ngx-components-query-param-modal-handler.mjs +0 -115
  72. package/fesm2022/c8y-ngx-components-query-param-modal-handler.mjs.map +0 -1
  73. package/query-param-modal-handler/c8y-ngx-components-query-param-modal-handler.d.ts.map +0 -1
  74. package/query-param-modal-handler/index.d.ts +0 -2
  75. package/query-param-modal-handler/index.d.ts.map +0 -1
  76. package/query-param-modal-handler/query-param-modal-handler.service.d.ts +0 -77
  77. package/query-param-modal-handler/query-param-modal-handler.service.d.ts.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Component, Injectable, signal, EventEmitter, Output, Input, DestroyRef, ViewChild } from '@angular/core';
3
- import * as i1 from '@c8y/ngx-components';
3
+ import * as i2 from '@c8y/ngx-components';
4
4
  import { gettext, CoreModule, ContextRouteService, ClipboardService, ViewContext, AlertService, Permissions, CommonModule, FormsModule as FormsModule$1 } from '@c8y/ngx-components';
5
5
  import * as i5$1 from '@c8y/ngx-components/alarm-event-selector';
6
6
  import { AlarmEventSelectorModule } from '@c8y/ngx-components/alarm-event-selector';
@@ -18,12 +18,12 @@ import { PopoverModule } from 'ngx-bootstrap/popover';
18
18
  import { BsModalService } from 'ngx-bootstrap/modal';
19
19
  import * as i5 from '@angular/cdk/a11y';
20
20
  import { A11yModule } from '@angular/cdk/a11y';
21
- import { merge, of } from 'rxjs';
21
+ import { merge, of, firstValueFrom } from 'rxjs';
22
22
  import { map } from 'rxjs/operators';
23
23
  import { ReportDashboardService, ReportDashboardModule } from '@c8y/ngx-components/report-dashboard';
24
24
  import * as i3$1 from '@angular/common';
25
- import * as i1$1 from '@c8y/ngx-components/context-dashboard';
26
- import { ContextDashboardService } from '@c8y/ngx-components/context-dashboard';
25
+ import * as i1 from '@c8y/ngx-components/context-dashboard';
26
+ import { ContextDashboardService, ContextDashboardType, ContextDashboardModule } from '@c8y/ngx-components/context-dashboard';
27
27
  import { DatapointsExportSelectorComponent } from '@c8y/ngx-components/datapoints-export-selector';
28
28
  import { InventoryService } from '@c8y/client';
29
29
  import { ActivatedRoute, Router } from '@angular/router';
@@ -60,11 +60,11 @@ class SendAsWidgetToReportModal {
60
60
  return new FormGroup(controls);
61
61
  }
62
62
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SendAsWidgetToReportModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SendAsWidgetToReportModal, isStandalone: true, selector: "c8y-apply-branding-to-app-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"'Send as widget to reports' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedReports$ | async as numberOfReports; else noSelectedReports\"\n translate\n [translateParams]=\"{ numberOfReports: numberOfReports }\"\n ngNonBindable\n >\n {{ numberOfReports }} reports selected for widget\n </p>\n <ng-template #noSelectedReports>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more reports to send the Data points graph widget with the current configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let report of reports\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + report.id\"\n [formControlName]=\"report.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ report.icon }}\"></i>\n </c8y-li-icon>\n <div class=\"text-truncate\" title=\"{{report.name}}\">{{ report.name }}</div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"reports.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.EmptyStateComponent, selector: "c8y-ui-empty-state", inputs: ["icon", "title", "subtitle", "horizontal"] }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "component", type: i1.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i1.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "ngmodule", type: ReportDashboardModule }] }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SendAsWidgetToReportModal, isStandalone: true, selector: "c8y-send-as-widget-to-report-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"'Send as widget to reports' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedReports$ | async as numberOfReports; else noSelectedReports\"\n translate\n [translateParams]=\"{ numberOfReports: numberOfReports }\"\n ngNonBindable\n >\n {{ numberOfReports }} reports selected for widget\n </p>\n <ng-template #noSelectedReports>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more reports to send the Data points graph widget with the current configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let report of reports\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + report.id\"\n [formControlName]=\"report.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ report.icon }}\"></i>\n </c8y-li-icon>\n <div class=\"text-truncate\" title=\"{{report.name}}\">{{ report.name }}</div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"reports.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CoreModule }, { 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: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { 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: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "ngmodule", type: ReportDashboardModule }] }); }
64
64
  }
65
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SendAsWidgetToReportModal, decorators: [{
66
66
  type: Component,
67
- args: [{ selector: 'c8y-apply-branding-to-app-modal', standalone: true, imports: [ReactiveFormsModule, CoreModule, ReportDashboardModule], template: "<c8y-modal\n [title]=\"'Send as widget to reports' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedReports$ | async as numberOfReports; else noSelectedReports\"\n translate\n [translateParams]=\"{ numberOfReports: numberOfReports }\"\n ngNonBindable\n >\n {{ numberOfReports }} reports selected for widget\n </p>\n <ng-template #noSelectedReports>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more reports to send the Data points graph widget with the current configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let report of reports\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + report.id\"\n [formControlName]=\"report.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ report.icon }}\"></i>\n </c8y-li-icon>\n <div class=\"text-truncate\" title=\"{{report.name}}\">{{ report.name }}</div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"reports.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n" }]
67
+ args: [{ selector: 'c8y-send-as-widget-to-report-modal', standalone: true, imports: [ReactiveFormsModule, CoreModule, ReportDashboardModule], template: "<c8y-modal\n [title]=\"'Send as widget to reports' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedReports$ | async as numberOfReports; else noSelectedReports\"\n translate\n [translateParams]=\"{ numberOfReports: numberOfReports }\"\n ngNonBindable\n >\n {{ numberOfReports }} reports selected for widget\n </p>\n <ng-template #noSelectedReports>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more reports to send the Data points graph widget with the current configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let report of reports\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + report.id\"\n [formControlName]=\"report.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ report.icon }}\"></i>\n </c8y-li-icon>\n <div class=\"text-truncate\" title=\"{{report.name}}\">{{ report.name }}</div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'c8y-reports'\"\n [title]=\"'There are no reports defined.' | translate\"\n [subtitle]=\"'Add a report first.' | translate\"\n *ngIf=\"reports.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n" }]
68
68
  }] });
69
69
 
70
70
  class CreateNewReportModalComponent {
@@ -114,17 +114,18 @@ class CreateNewReportModalComponent {
114
114
  cancel() {
115
115
  this._reject();
116
116
  }
117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CreateNewReportModalComponent, deps: [{ token: i1$1.ContextDashboardService }], target: i0.ɵɵFactoryTarget.Component }); }
118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CreateNewReportModalComponent, isStandalone: true, selector: "c8y-create-new-report-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"'Create new report with widget' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [disabled]=\"reportName === ''\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <p class=\"text-center bg-component text-balance sticky-top p-l-24 p-r-24 p-t-8 p-b-8 separator-bottom\">\n {{' Create a new report with the Data points graph widget using the current configuration.' | translate}}\n </p>\n <div class=\"p-24 p-t-8\">\n <c8y-form-group>\n <label\n for=\"reportName\"\n translate\n >\n Report name\n </label>\n <input\n class=\"form-control\"\n id=\"reportName\"\n placeholder=\"{{ 'e.g. My data point Report' }}\"\n name=\"name\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"reportName\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i1.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i1.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "ngmodule", type: ReportDashboardModule }] }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CreateNewReportModalComponent, deps: [{ token: i1.ContextDashboardService }], target: i0.ɵɵFactoryTarget.Component }); }
118
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CreateNewReportModalComponent, isStandalone: true, selector: "c8y-create-new-report-modal", ngImport: i0, template: "<c8y-modal\n [title]=\"'Create new report with widget' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [disabled]=\"reportName === ''\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <p class=\"text-center bg-component text-balance sticky-top p-l-24 p-r-24 p-t-8 p-b-8 separator-bottom\">\n {{' Create a new report with the Data points graph widget using the current configuration.' | translate}}\n </p>\n <div class=\"p-24 p-t-8\">\n <c8y-form-group>\n <label\n for=\"reportName\"\n translate\n >\n Report name\n </label>\n <input\n class=\"form-control\"\n id=\"reportName\"\n placeholder=\"{{ 'e.g. My data point Report' }}\"\n name=\"name\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"reportName\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.FormGroupComponent, selector: "c8y-form-group", inputs: ["hasError", "hasWarning", "hasSuccess", "novalidation", "status"] }, { kind: "component", type: i2.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "ngmodule", type: ReportDashboardModule }] }); }
119
119
  }
120
120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CreateNewReportModalComponent, decorators: [{
121
121
  type: Component,
122
122
  args: [{ selector: 'c8y-create-new-report-modal', standalone: true, imports: [ReactiveFormsModule, CoreModule, ReportDashboardModule], template: "<c8y-modal\n [title]=\"'Create new report with widget' | translate\"\n [headerClasses]=\"'dialog-header'\"\n [disabled]=\"reportName === ''\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"c8y-reports\"></span>\n </ng-container>\n\n <p class=\"text-center bg-component text-balance sticky-top p-l-24 p-r-24 p-t-8 p-b-8 separator-bottom\">\n {{' Create a new report with the Data points graph widget using the current configuration.' | translate}}\n </p>\n <div class=\"p-24 p-t-8\">\n <c8y-form-group>\n <label\n for=\"reportName\"\n translate\n >\n Report name\n </label>\n <input\n class=\"form-control\"\n id=\"reportName\"\n placeholder=\"{{ 'e.g. My data point Report' }}\"\n name=\"name\"\n type=\"text\"\n autocomplete=\"off\"\n required\n [(ngModel)]=\"reportName\"\n />\n <c8y-messages></c8y-messages>\n </c8y-form-group>\n </div>\n</c8y-modal>\n" }]
123
- }], ctorParameters: () => [{ type: i1$1.ContextDashboardService }] });
123
+ }], ctorParameters: () => [{ type: i1.ContextDashboardService }] });
124
124
 
125
125
  class DataExplorerService {
126
126
  constructor() {
127
127
  this.inventory = inject(InventoryService);
128
+ this.contextDashboardService = inject(ContextDashboardService);
128
129
  }
129
130
  async fetchReportDashboard(reportId) {
130
131
  return (await this.inventory.list({
@@ -132,6 +133,12 @@ class DataExplorerService {
132
133
  query: `has('c8y_Dashboard!name!report_${reportId}')`
133
134
  })).data[0];
134
135
  }
136
+ async fetchContextDashboard(dashboardId, contextAsset) {
137
+ const context = contextAsset.c8y_isDevice
138
+ ? ContextDashboardType.Device
139
+ : ContextDashboardType.Group;
140
+ return firstValueFrom(this.contextDashboardService.getDashboard$(dashboardId, [context]));
141
+ }
135
142
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DataExplorerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
136
143
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DataExplorerService, providedIn: 'root' }); }
137
144
  }
@@ -407,7 +414,7 @@ class WorkspaceConfigComponent {
407
414
  }
408
415
  }
409
416
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: WorkspaceConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
410
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: WorkspaceConfigComponent, isStandalone: true, selector: "c8y-workspace-config", inputs: { updatedConfig: "updatedConfig" }, outputs: { onConfigurationChange: "onConfigurationChange" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"dropdown\"\n #actionbar_dropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"actionbar_dropdown.isOpen\"\n dropdown\n [insideClick]=\"true\"\n>\n\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ currentConfiguration.label }}\"\n tooltip=\"{{ 'Selected configuration' | translate }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"current-configuration-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"list\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span class=\"text-12\">\n {{ 'Configuration' | translate }}\n </span>\n <span class=\"text-10 text-muted text-truncate\">\n {{ currentConfiguration.label }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-wide dropdown-menu-action-bar\"\n *dropdownMenu\n >\n <div class=\"sticky-top separator-bottom p-t-8 p-b-8 p-l-16 p-r-16\">\n <p>\n <strong>{{ 'Data explorer configurations' | translate }}</strong>\n </p>\n <p>\n <small>{{ 'Easily switch and manage configurations.' | translate }}</small>\n </p>\n </div>\n <c8y-list-group class=\"no-border-last\">\n <form [formGroup]=\"configurationsFormGroup\">\n <div formArrayName=\"configurations\">\n <c8y-li\n class=\"p-0\"\n *ngFor=\"\n let configuration of configurationsFormGroup.controls.configurations['controls'];\n let i = index\n \"\n [dense]=\"true\"\n >\n <c8y-li-radio\n [selected]=\"configuration.value.id === currentConfiguration.id\"\n (onSelect)=\"changeConfiguration($event, configuration.value)\"\n ></c8y-li-radio>\n <div class=\"d-flex a-i-center gap-8\">\n <div\n class=\"flex-grow min-width-0\"\n [formGroupName]=\"i\"\n >\n <label\n class=\"editable\"\n [ngClass]=\"{\n updated:\n configuration.controls.label.touched && configuration.controls.label.dirty\n }\"\n >\n <input\n class=\"form-control\"\n [style.width.ch]=\"configuration.value.label || 25\"\n [attr.aria-label]=\"'Configuration label' | translate\"\n placeholder=\"{{ 'Configuration 1' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n formControlName=\"label\"\n (blur)=\"updateConfigurationLabel(configuration.value)\"\n />\n </label>\n </div>\n <div class=\"flex-nogrow d-flex gap-8\">\n <button\n class=\"btn-dot btn\"\n [attr.aria-label]=\"'Duplicate configuration' | translate\"\n tooltip=\"{{ 'Duplicate configuration' | translate }}\"\n placement=\"left\"\n (click)=\"addConfig(configuration.value.config)\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"copy\"></i>\n </button>\n\n <button\n class=\"btn-dot btn btn-dot--danger\"\n [attr.aria-label]=\"'Remove configurations' | translate\"\n tooltip=\"{{\n (configuration.value.id === currentConfiguration.id\n ? activeConfigTooltip\n : removeConfigTooltip\n ) | translate\n }}\"\n placement=\"left\"\n [delay]=\"500\"\n (click)=\"$event.stopPropagation(); deleteConfiguration(configuration.value)\"\n [disabled]=\"configuration.value.id === currentConfiguration.id\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </div>\n </c8y-li>\n </div>\n </form>\n </c8y-list-group>\n <div class=\"sticky-bottom separator-top\">\n <div class=\"d-flex p-l-16 p-r-16 p-t-8 p-b-8\">\n <button\n class=\"btn btn-danger btn-sm flex-grow\"\n (click)=\"clearAll()\"\n [disabled]=\"configurations.length < 2\"\n >\n <i [c8yIcon]=\"'delete'\"></i>\n {{ 'Delete all configurations' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n type=\"button\"\n (click)=\"addConfig()\"\n >\n <i [c8yIcon]=\"'add-circle-outline'\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "component", type: i1.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i1.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i1.ListItemRadioComponent, selector: "c8y-list-item-radio, c8y-li-radio", inputs: ["selected", "name", "disabled", "value"], outputs: ["onSelect"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }] }); }
417
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: WorkspaceConfigComponent, isStandalone: true, selector: "c8y-workspace-config", inputs: { updatedConfig: "updatedConfig" }, outputs: { onConfigurationChange: "onConfigurationChange" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"dropdown\"\n #actionbar_dropdown=\"bs-dropdown\"\n [cdkTrapFocus]=\"actionbar_dropdown.isOpen\"\n dropdown\n [insideClick]=\"true\"\n>\n\n <button\n class=\"dropdown-toggle form-control l-h-tight d-flex a-i-center\"\n attr.aria-label=\"{{ currentConfiguration.label }}\"\n tooltip=\"{{ 'Selected configuration' | translate }}\"\n placement=\"top\"\n container=\"body\"\n data-cy=\"current-configuration-dropdown-button\"\n [adaptivePosition]=\"false\"\n [delay]=\"500\"\n dropdownToggle\n >\n <i\n class=\"m-r-4\"\n c8yIcon=\"list\"\n ></i>\n <div class=\"d-col text-left fit-w\">\n <span class=\"text-12\">\n {{ 'Configuration' | translate }}\n </span>\n <span class=\"text-10 text-muted text-truncate\">\n {{ currentConfiguration.label }}\n </span>\n </div>\n <span class=\"caret m-r-16 m-l-4\"></span>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-wide dropdown-menu-action-bar\"\n *dropdownMenu\n >\n <div class=\"sticky-top separator-bottom p-t-8 p-b-8 p-l-16 p-r-16\">\n <p>\n <strong>{{ 'Data explorer configurations' | translate }}</strong>\n </p>\n <p>\n <small>{{ 'Easily switch and manage configurations.' | translate }}</small>\n </p>\n </div>\n <c8y-list-group class=\"no-border-last\">\n <form [formGroup]=\"configurationsFormGroup\">\n <div formArrayName=\"configurations\">\n <c8y-li\n class=\"p-0\"\n *ngFor=\"\n let configuration of configurationsFormGroup.controls.configurations['controls'];\n let i = index\n \"\n [dense]=\"true\"\n >\n <c8y-li-radio\n [selected]=\"configuration.value.id === currentConfiguration.id\"\n (onSelect)=\"changeConfiguration($event, configuration.value)\"\n ></c8y-li-radio>\n <div class=\"d-flex a-i-center gap-8\">\n <div\n class=\"flex-grow min-width-0\"\n [formGroupName]=\"i\"\n >\n <label\n class=\"editable\"\n [ngClass]=\"{\n updated:\n configuration.controls.label.touched && configuration.controls.label.dirty\n }\"\n >\n <input\n class=\"form-control\"\n [style.width.ch]=\"configuration.value.label || 25\"\n [attr.aria-label]=\"'Configuration label' | translate\"\n placeholder=\"{{ 'Configuration 1' | translate }}\"\n type=\"text\"\n autocomplete=\"off\"\n required\n formControlName=\"label\"\n (blur)=\"updateConfigurationLabel(configuration.value)\"\n />\n </label>\n </div>\n <div class=\"flex-nogrow d-flex gap-8\">\n <button\n class=\"btn-dot btn\"\n [attr.aria-label]=\"'Duplicate configuration' | translate\"\n tooltip=\"{{ 'Duplicate configuration' | translate }}\"\n placement=\"left\"\n (click)=\"addConfig(configuration.value.config)\"\n [delay]=\"500\"\n >\n <i c8yIcon=\"copy\"></i>\n </button>\n\n <button\n class=\"btn-dot btn btn-dot--danger\"\n [attr.aria-label]=\"'Remove configurations' | translate\"\n tooltip=\"{{\n (configuration.value.id === currentConfiguration.id\n ? activeConfigTooltip\n : removeConfigTooltip\n ) | translate\n }}\"\n placement=\"left\"\n [delay]=\"500\"\n (click)=\"$event.stopPropagation(); deleteConfiguration(configuration.value)\"\n [disabled]=\"configuration.value.id === currentConfiguration.id\"\n >\n <i c8yIcon=\"minus-circle\"></i>\n </button>\n </div>\n </div>\n </c8y-li>\n </div>\n </form>\n </c8y-list-group>\n <div class=\"sticky-bottom separator-top\">\n <div class=\"d-flex p-l-16 p-r-16 p-t-8 p-b-8\">\n <button\n class=\"btn btn-danger btn-sm flex-grow\"\n (click)=\"clearAll()\"\n [disabled]=\"configurations.length < 2\"\n >\n <i [c8yIcon]=\"'delete'\"></i>\n {{ 'Delete all configurations' | translate }}\n </button>\n <button\n class=\"btn btn-default btn-sm flex-grow\"\n type=\"button\"\n (click)=\"addConfig()\"\n >\n <i [c8yIcon]=\"'add-circle-outline'\"></i>\n {{ 'Add configuration' | translate }}\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { 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: i2.ListItemRadioComponent, selector: "c8y-list-item-radio, c8y-li-radio", inputs: ["selected", "name", "disabled", "value"], outputs: ["onSelect"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "directive", type: i4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i5.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }] }); }
411
418
  }
412
419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: WorkspaceConfigComponent, decorators: [{
413
420
  type: Component,
@@ -418,6 +425,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
418
425
  type: Output
419
426
  }] } });
420
427
 
428
+ class SendAsWidgetToDashboardModal {
429
+ constructor() {
430
+ this.dashboards = [];
431
+ this.result = new Promise((resolve, reject) => {
432
+ this._resolve = resolve;
433
+ this._reject = reject;
434
+ });
435
+ this.labels = { cancel: gettext('Cancel'), ok: gettext('Send') };
436
+ this.contextDashboardService = inject(ContextDashboardService);
437
+ }
438
+ async ngOnInit() {
439
+ const context = this.contextAsset.c8y_IsDevice
440
+ ? ContextDashboardType.Device
441
+ : ContextDashboardType.Group;
442
+ this.dashboards = (await this.contextDashboardService.getContextDashboards(this.contextAsset, [
443
+ context
444
+ ])).data;
445
+ if (this.dashboards.length > 0) {
446
+ this.form = this.initForm();
447
+ }
448
+ this.numberOfSelectedDashboards$ = merge(this.form.valueChanges, of(this.form.value)).pipe(map(value => Object.values(value).filter(Boolean).length));
449
+ }
450
+ save() {
451
+ this._resolve(this.form.value);
452
+ }
453
+ cancel() {
454
+ this._reject();
455
+ }
456
+ initForm() {
457
+ const controls = this.dashboards.reduce((acc, dashboard) => ({
458
+ ...acc,
459
+ [dashboard.id]: new FormControl(false)
460
+ }), {});
461
+ return new FormGroup(controls);
462
+ }
463
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SendAsWidgetToDashboardModal, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
464
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SendAsWidgetToDashboardModal, isStandalone: true, selector: "c8y-send-as-widget-to-dashboard-modal", inputs: { contextAsset: "contextAsset" }, ngImport: i0, template: "<c8y-modal\n [title]=\"'Send as widget to dashboards' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"th\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedDashboards$ | async as numberOfDashboards; else noSelectedDashboards\"\n translate\n [translateParams]=\"{ numberOfDashboards: numberOfDashboards }\"\n ngNonBindable\n >\n {{ numberOfDashboards }} dashboards selected for widget\n </p>\n <ng-template #noSelectedDashboards>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more dashboards to send the Data points graph widget with the current\n configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let dashboard of dashboards\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + dashboard.id\"\n [formControlName]=\"dashboard.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ dashboard.icon }}\"></i>\n </c8y-li-icon>\n <div\n class=\"text-truncate\"\n title=\"{{ dashboard.name }}\"\n >\n {{ dashboard.name }}\n </div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'th'\"\n [title]=\"'There are no dashboards defined.' | translate\"\n [subtitle]=\"'Add a dashboard first.' | translate\"\n *ngIf=\"dashboards.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CoreModule }, { 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: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "component", type: i2.ModalComponent, selector: "c8y-modal", inputs: ["disabled", "close", "dismiss", "title", "body", "customFooter", "headerClasses", "labels"], outputs: ["onDismiss", "onClose"] }, { 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: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemCheckboxComponent, selector: "c8y-list-item-checkbox, c8y-li-checkbox", inputs: ["selected", "indeterminate", "disabled", "displayAsSwitch"], outputs: ["onSelect"] }, { kind: "ngmodule", type: ContextDashboardModule }] }); }
465
+ }
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SendAsWidgetToDashboardModal, decorators: [{
467
+ type: Component,
468
+ args: [{ selector: 'c8y-send-as-widget-to-dashboard-modal', standalone: true, imports: [ReactiveFormsModule, CoreModule, ContextDashboardModule], template: "<c8y-modal\n [title]=\"'Send as widget to dashboards' | translate\"\n [disabled]=\"!form || form.invalid\"\n [headerClasses]=\"'dialog-header'\"\n (onDismiss)=\"cancel()\"\n (onClose)=\"save()\"\n [labels]=\"labels\"\n>\n <ng-container c8y-modal-title>\n <span c8yIcon=\"th\"></span>\n </ng-container>\n\n <c8y-list-group\n class=\"m-b-0 no-border-last\"\n *ngIf=\"form\"\n [formGroup]=\"form\"\n >\n <c8y-li>\n <p\n class=\"text-center text-medium\"\n *ngIf=\"numberOfSelectedDashboards$ | async as numberOfDashboards; else noSelectedDashboards\"\n translate\n [translateParams]=\"{ numberOfDashboards: numberOfDashboards }\"\n ngNonBindable\n >\n {{ numberOfDashboards }} dashboards selected for widget\n </p>\n <ng-template #noSelectedDashboards>\n <p\n class=\"text-center text-medium\"\n translate\n >\n Select one or more dashboards to send the Data points graph widget with the current\n configuration\n </p>\n </ng-template>\n </c8y-li>\n <c8y-li *ngFor=\"let dashboard of dashboards\">\n <c8y-li-checkbox\n [attr.data-cy]=\"'branding-apply-branding-to-app-checkbox-' + dashboard.id\"\n [formControlName]=\"dashboard.id\"\n ></c8y-li-checkbox>\n <c8y-li-icon class=\"p-l-0\">\n <i c8yIcon=\"{{ dashboard.icon }}\"></i>\n </c8y-li-icon>\n <div\n class=\"text-truncate\"\n title=\"{{ dashboard.name }}\"\n >\n {{ dashboard.name }}\n </div>\n </c8y-li>\n </c8y-list-group>\n\n <c8y-ui-empty-state\n [icon]=\"'th'\"\n [title]=\"'There are no dashboards defined.' | translate\"\n [subtitle]=\"'Add a dashboard first.' | translate\"\n *ngIf=\"dashboards.length === 0\"\n ></c8y-ui-empty-state>\n</c8y-modal>\n" }]
469
+ }], propDecorators: { contextAsset: [{
470
+ type: Input
471
+ }] } });
472
+
421
473
  class DatapointExplorerComponent {
422
474
  #destroyRef;
423
475
  constructor() {
@@ -505,38 +557,51 @@ class DatapointExplorerComponent {
505
557
  updateTimeRangeOnRealtime(timeRange) {
506
558
  this.formGroup.patchValue(timeRange, { emitEvent: false });
507
559
  }
508
- createNewReportWithWidget() {
560
+ updateAlarmsAndEvents(alarmsEventsConfigs) {
561
+ this.alarms = alarmsEventsConfigs.filter(this.isAlarm);
562
+ this.events = alarmsEventsConfigs.filter(this.isEvent);
563
+ this.hasAtLeastOneAlarmActive = this.hasActiveAlarms(this.alarms);
564
+ }
565
+ handleDatapointOutOfSync(dpOutOfSync) {
566
+ const key = (dp) => dp.__target?.id + dp.fragment + dp.series;
567
+ const dpMatch = this.config.datapoints?.find(dp => key(dp) === key(dpOutOfSync));
568
+ if (!dpMatch) {
569
+ return;
570
+ }
571
+ this.datapointsOutOfSync.set(dpMatch, true);
572
+ }
573
+ async createNewReportWithWidget() {
509
574
  const modal = this.bsModalService.show(CreateNewReportModalComponent, {
510
575
  ignoreBackdropClick: true,
511
576
  keyboard: false,
512
577
  class: 'modal-sm'
513
578
  });
514
579
  const content = modal.content;
515
- content.result
516
- .then(async (report) => {
580
+ try {
581
+ const report = await content.result;
517
582
  const reportDashboard = await this.dataExplorerService.fetchReportDashboard(report.id);
518
583
  const widget = this.createWidgetConfig();
519
584
  reportDashboard.c8y_Dashboard.children = { [widget.id]: widget };
520
585
  await this.contextDashboardService.update(reportDashboard);
521
586
  this.alertService.success(gettext('Report and widget created.'));
522
- })
523
- .catch(e => {
587
+ }
588
+ catch (e) {
524
589
  if (e) {
525
590
  this.alertService.danger(gettext('Failed to create report and widget.'));
526
591
  this.alertService.addServerFailure(e);
527
592
  }
528
593
  // else: modal was closed
529
- });
594
+ }
530
595
  }
531
- sendAsWidgetToReport() {
596
+ async sendAsWidgetToReport() {
532
597
  const modal = this.bsModalService.show(SendAsWidgetToReportModal, {
533
598
  ignoreBackdropClick: true,
534
599
  keyboard: false,
535
600
  class: 'modal-sm'
536
601
  });
537
602
  const content = modal.content;
538
- content.result
539
- .then(async (reports) => {
603
+ try {
604
+ const reports = await content.result;
540
605
  const selectedReports = Object.entries(reports).filter(([, value]) => value);
541
606
  const reportPromises = selectedReports.map(async ([reportId]) => {
542
607
  const reportDashboard = await this.dataExplorerService.fetchReportDashboard(reportId);
@@ -547,27 +612,45 @@ class DatapointExplorerComponent {
547
612
  });
548
613
  await Promise.all(reportPromises);
549
614
  this.alertService.success(gettext('Widget created.'));
550
- })
551
- .catch(e => {
615
+ }
616
+ catch (e) {
552
617
  if (e) {
553
618
  this.alertService.danger(gettext('Failed to create widget.'));
554
619
  this.alertService.addServerFailure(e);
555
620
  }
556
621
  // else: modal was closed
557
- });
558
- }
559
- updateAlarmsAndEvents(alarmsEventsConfigs) {
560
- this.alarms = alarmsEventsConfigs.filter(this.isAlarm);
561
- this.events = alarmsEventsConfigs.filter(this.isEvent);
562
- this.hasAtLeastOneAlarmActive = this.hasActiveAlarms(this.alarms);
622
+ }
563
623
  }
564
- handleDatapointOutOfSync(dpOutOfSync) {
565
- const key = (dp) => dp.__target?.id + dp.fragment + dp.series;
566
- const dpMatch = this.config.datapoints?.find(dp => key(dp) === key(dpOutOfSync));
567
- if (!dpMatch) {
568
- return;
624
+ async sendAsWidgetToDashboard() {
625
+ const modal = this.bsModalService.show(SendAsWidgetToDashboardModal, {
626
+ ignoreBackdropClick: true,
627
+ keyboard: false,
628
+ class: 'modal-sm',
629
+ initialState: {
630
+ contextAsset: this.contextAsset
631
+ }
632
+ });
633
+ const content = modal.content;
634
+ try {
635
+ const dashboards = await content.result;
636
+ const selectedDashboards = Object.entries(dashboards).filter(([, value]) => value);
637
+ const dashboardPromises = selectedDashboards.map(async ([dashboardId]) => {
638
+ const dashboard = await this.dataExplorerService.fetchContextDashboard(dashboardId, this.contextAsset);
639
+ const widget = this.createWidgetConfig();
640
+ const children = dashboard.c8y_Dashboard.children || {};
641
+ dashboard.c8y_Dashboard.children = { ...children, [widget.id]: widget };
642
+ await this.contextDashboardService.update(dashboard);
643
+ });
644
+ await Promise.all(dashboardPromises);
645
+ this.alertService.success(gettext('Widget created.'));
646
+ }
647
+ catch (e) {
648
+ if (e) {
649
+ this.alertService.danger(gettext('Failed to create widget.'));
650
+ this.alertService.addServerFailure(e);
651
+ }
652
+ // else: modal was closed
569
653
  }
570
- this.datapointsOutOfSync.set(dpMatch, true);
571
654
  }
572
655
  isAlarm(item) {
573
656
  return item.timelineType === 'ALARM';
@@ -617,11 +700,10 @@ class DatapointExplorerComponent {
617
700
  }
618
701
  createWidgetConfig() {
619
702
  return {
620
- name: 'Data points graph 2',
621
- title: gettext('Data points graph 2'),
622
- id: String(Math.random()).substr(2),
703
+ name: gettext('Data points graph'),
704
+ title: gettext('Data points'),
623
705
  _width: 24,
624
- _height: 5,
706
+ _height: 12,
625
707
  config: this.config
626
708
  };
627
709
  }
@@ -648,7 +730,7 @@ class DatapointExplorerComponent {
648
730
  });
649
731
  }
650
732
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatapointExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
651
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DatapointExplorerComponent, isStandalone: true, selector: "c8y-datapoint-explorer", providers: [ChartEventsService, ChartAlarmsService], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n></c8y-time-context>\n\n<c8y-action-bar-item [placement]=\"'left'\">\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item placement=\"right\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n>\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n>\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-grid grid__col--auto-360 gap-24\">\n <div class=\"d-col gap-16\">\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n ></c8y-charts>\n <form\n class=\"m-l-48 m-r-48\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"d-grid-md grid__col--4-4-4 gap-16\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [tooltip]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [tooltip]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [tooltip]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarmsOrEventsHaveNoMatchingDps\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n </fieldset>\n </div>\n </form>\n </div>\n <div class=\"card inner-scroll bg-level-1\">\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i1.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i1.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i1.MessagesComponent, selector: "c8y-messages", inputs: ["show", "defaults", "helpMessage"] }, { kind: "directive", type: i1.RequiredInputPlaceholderDirective, selector: "input[required], input[formControlName]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i4$1.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: AlarmEventSelectorModule }, { kind: "component", type: i5$1.AlarmEventSelectionListComponent, selector: "c8y-alarm-event-selection-list", inputs: ["timelineType", "canRemove", "canEdit", "canDragAndDrop", "title", "addButtonLabel", "hideSource", "inline", "activeToggleAsSwitch", "omitProperties", "datapoints", "config"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: TimeContextComponent, selector: "c8y-time-context", inputs: ["changedDateContext", "controlsAvailable", "context"], outputs: ["contextChange"] }, { kind: "component", type: ChartsComponent, selector: "c8y-charts", inputs: ["config", "alerts"], outputs: ["configChangeOnZoomOut", "timeRangeChangeOnRealtime", "datapointOutOfSync", "updateAlarmsAndEvents", "isMarkedAreaEnabled"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: WorkspaceConfigComponent, selector: "c8y-workspace-config", inputs: ["updatedConfig"], outputs: ["onConfigurationChange"] }] }); }
733
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DatapointExplorerComponent, isStandalone: true, selector: "c8y-datapoint-explorer", providers: [ChartEventsService, ChartAlarmsService], viewQueries: [{ propertyName: "chart", first: true, predicate: ["chart"], descendants: true }], ngImport: i0, template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n></c8y-time-context>\n\n<c8y-action-bar-item [placement]=\"'left'\">\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item placement=\"right\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"contextAsset\">\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"th\"></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"!contextAsset\">\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-grid grid__col--auto-360 gap-24\">\n <div class=\"d-col gap-16\">\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n ></c8y-charts>\n <form\n class=\"m-l-48 m-r-48\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"d-grid-md grid__col--4-4-4 gap-16\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [tooltip]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [tooltip]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [tooltip]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarmsOrEventsHaveNoMatchingDps\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n </fieldset>\n </div>\n </form>\n </div>\n <div class=\"card inner-scroll bg-level-1\">\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "component", type: i2.ActionBarItemComponent, selector: "c8y-action-bar-item", inputs: ["placement", "priority", "itemClass", "injector", "groupId", "inGroupPriority"] }, { kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DatapointSelectorModule }, { kind: "component", type: i4$1.DatapointSelectionListComponent, selector: "c8y-datapoint-selection-list", inputs: ["actions", "allowDragAndDrop", "config", "defaultFormOptions", "maxActiveCount", "minActiveCount", "resolveContext", "listTitle"], outputs: ["isValid", "change"] }, { kind: "ngmodule", type: AlarmEventSelectorModule }, { kind: "component", type: i5$1.AlarmEventSelectionListComponent, selector: "c8y-alarm-event-selection-list", inputs: ["timelineType", "canRemove", "canEdit", "canDragAndDrop", "title", "addButtonLabel", "hideSource", "inline", "activeToggleAsSwitch", "omitProperties", "datapoints", "config"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: TimeContextComponent, selector: "c8y-time-context", inputs: ["changedDateContext", "controlsAvailable", "context"], outputs: ["contextChange"] }, { kind: "component", type: ChartsComponent, selector: "c8y-charts", inputs: ["config", "alerts"], outputs: ["configChangeOnZoomOut", "timeRangeChangeOnRealtime", "datapointOutOfSync", "updateAlarmsAndEvents", "isMarkedAreaEnabled"] }, { kind: "ngmodule", type: BsDropdownModule }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: DatapointsExportSelectorComponent, selector: "c8y-datapoints-export-selector", inputs: ["containerClass", "exportConfig"], outputs: ["isOpen"] }, { kind: "component", type: WorkspaceConfigComponent, selector: "c8y-workspace-config", inputs: ["updatedConfig"], outputs: ["onConfigurationChange"] }] }); }
652
734
  }
653
735
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatapointExplorerComponent, decorators: [{
654
736
  type: Component,
@@ -666,7 +748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
666
748
  A11yModule,
667
749
  DatapointsExportSelectorComponent,
668
750
  WorkspaceConfigComponent
669
- ], providers: [ChartEventsService, ChartAlarmsService], template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n></c8y-time-context>\n\n<c8y-action-bar-item [placement]=\"'left'\">\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item placement=\"right\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n>\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n>\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n</c8y-action-bar-item>\n\n<div class=\"content-fullpage d-grid grid__col--auto-360 gap-24\">\n <div class=\"d-col gap-16\">\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n ></c8y-charts>\n <form\n class=\"m-l-48 m-r-48\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"d-grid-md grid__col--4-4-4 gap-16\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [tooltip]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [tooltip]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [tooltip]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarmsOrEventsHaveNoMatchingDps\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n </fieldset>\n </div>\n </form>\n </div>\n <div class=\"card inner-scroll bg-level-1\">\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</div>\n" }]
751
+ ], providers: [ChartEventsService, ChartAlarmsService], template: "<c8y-title>{{ 'Data explorer' | translate }}</c8y-title>\n\n<c8y-time-context\n (contextChange)=\"onTimeContextChange($event)\"\n [changedDateContext]=\"timeProps\"\n></c8y-time-context>\n\n<c8y-action-bar-item [placement]=\"'left'\">\n <c8y-workspace-config\n [updatedConfig]=\"config\"\n (onConfigurationChange)=\"onConfigurationChange($event)\"\n ></c8y-workspace-config>\n</c8y-action-bar-item>\n\n<c8y-action-bar-item placement=\"right\">\n <c8y-datapoints-export-selector\n [exportConfig]=\"exportConfig\"\n [containerClass]=\"'d-contents'\"\n ></c8y-datapoints-export-selector>\n</c8y-action-bar-item>\n\n<ng-container *ngIf=\"contextAsset\">\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n class=\"btn btn-link\"\n title=\"{{ 'Send as widget to dashboard' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToDashboard()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"th\"></i>\n <span>{{ 'Send as widget to dashboard' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<ng-container *ngIf=\"!contextAsset\">\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Send as widget to report' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"sendAsWidgetToReport()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Send as widget to report' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n\n <c8y-action-bar-item\n [placement]=\"'more'\"\n [priority]=\"-2000\"\n >\n <button\n title=\"{{ 'Create a new report with widget' | translate }}\"\n type=\"button\"\n data-cy=\"widgets-dashboard--copy-dashboard\"\n (click)=\"createNewReportWithWidget()\"\n [disabled]=\"config?.datapoints?.length === 0 || !canAddReport\"\n >\n <i c8yIcon=\"c8y-reports\"></i>\n <span>{{ 'Create a new report with widget' | translate }}</span>\n </button>\n </c8y-action-bar-item>\n</ng-container>\n\n<div class=\"content-fullpage d-grid grid__col--auto-360 gap-24\">\n <div class=\"d-col gap-16\">\n <c8y-charts\n class=\"flex-grow data-point-explorer\"\n #chart\n [config]=\"config\"\n [alerts]=\"alerts\"\n (updateAlarmsAndEvents)=\"updateAlarmsAndEvents($event)\"\n (configChangeOnZoomOut)=\"onSliderZoom($event)\"\n (datapointOutOfSync)=\"handleDatapointOutOfSync($event)\"\n (timeRangeChangeOnRealtime)=\"updateTimeRangeOnRealtime($event)\"\n (isMarkedAreaEnabled)=\"isMarkedAreaEnabled = $event\"\n ></c8y-charts>\n <form\n class=\"m-l-48 m-r-48\"\n [formGroup]=\"formGroup\"\n >\n <div class=\"d-grid-md grid__col--4-4-4 gap-16\">\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Axis' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Y-axis helper lines' | translate\"\n >\n <input\n name=\"yAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"yAxisSplitLines\"\n />\n <span></span>\n <span translate>Y-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'X-axis helper lines' | translate\"\n >\n <input\n name=\"xAxisSplitLines\"\n type=\"checkbox\"\n formControlName=\"xAxisSplitLines\"\n />\n <span></span>\n <span translate>X-axis helper lines</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Merge matching data points into single axis' | translate\"\n >\n <input\n name=\"mergeMatchingDatapoints\"\n type=\"checkbox\"\n formControlName=\"mergeMatchingDatapoints\"\n />\n <span></span>\n <span translate>Merge matching data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n [tooltip]=\"\n 'Data points with the same min and max values will be merged into a single axis. The values must be defined in the data point configuration.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Force merge all data points into single axis' | translate\"\n >\n <input\n name=\"forceMergeDatapoints\"\n type=\"checkbox\"\n formControlName=\"forceMergeDatapoints\"\n />\n <span></span>\n <span translate>Force merge all data points into single axis</span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n [tooltip]=\"\n 'All axes will be force merged to a single axis with the scale being set to the max and min value of all axes. It\\'s recommended to use this option for data points with similar values.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Alarms & events' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show vertical line when alarm occurs' | translate\"\n >\n <input\n name=\"displayMarkedLine\"\n type=\"checkbox\"\n formControlName=\"displayMarkedLine\"\n />\n <span></span>\n <span translate>Show vertical line on every occurrence</span>\n </label>\n\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show icon when alarm or event occurs' | translate\"\n >\n <input\n name=\"displayMarkedPoint\"\n type=\"checkbox\"\n formControlName=\"displayMarkedPoint\"\n />\n <span></span>\n <span>\n {{\n 'Show icon when triggered`When alarms and events occur the icon will be shown`'\n | translate\n }}\n </span>\n <button\n class=\"btn-dot m-l-8\"\n [attr.aria-label]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n [tooltip]=\"\n 'Some alarms or events have no matching data points. No icons will be shown for them.'\n | translate\n \"\n container=\"body\"\n type=\"button\"\n *ngIf=\"alarmsOrEventsHaveNoMatchingDps\"\n (click)=\"$event.stopPropagation()\"\n [adaptivePosition]=\"false\"\n >\n <i\n class=\"text-info\"\n c8yIcon=\"info\"\n ></i>\n </button>\n </label>\n </fieldset>\n <fieldset class=\"c8y-fieldset form-group-sm m-t-md-0 p-b-8\">\n <legend>{{ 'Chart' | translate }}</legend>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show labels and units' | translate\"\n >\n <input\n name=\"showLabelAndUnit\"\n type=\"checkbox\"\n formControlName=\"showLabelAndUnit\"\n />\n <span></span>\n <span translate>Display labels and units on Y-axis</span>\n </label>\n <label\n class=\"c8y-checkbox\"\n [title]=\"'Show slider' | translate\"\n >\n <input\n name=\"showSlider\"\n type=\"checkbox\"\n formControlName=\"showSlider\"\n />\n <span></span>\n <span translate>Show slider</span>\n </label>\n </fieldset>\n </div>\n </form>\n </div>\n <div class=\"card inner-scroll bg-level-1\">\n <form\n class=\"bg-inherit\"\n [formGroup]=\"formGroup\"\n >\n <c8y-datapoint-selection-list\n class=\"bg-inherit separator-top d-block\"\n name=\"datapoints\"\n [minActiveCount]=\"0\"\n [defaultFormOptions]=\"datapointSelectDefaultFormOptions\"\n [config]=\"{ contextAsset: contextAsset }\"\n formControlName=\"datapoints\"\n [allowDragAndDrop]=\"true\"\n ></c8y-datapoint-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"alarms\"\n formControlName=\"alarms\"\n [timelineType]=\"'ALARM'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <c8y-alarm-event-selection-list\n class=\"bg-inherit\"\n name=\"events\"\n formControlName=\"events\"\n [timelineType]=\"'EVENT'\"\n [datapoints]=\"config.datapoints\"\n ></c8y-alarm-event-selection-list>\n\n <div class=\"p-l-16 p-r-16 form-group p-b-16\">\n <label\n [title]=\"'Number of decimal places' | translate\"\n translate\n >\n Number of decimal places\n </label>\n <input\n class=\"form-control\"\n name=\"numberOfDecimalPlaces\"\n type=\"number\"\n formControlName=\"numberOfDecimalPlaces\"\n [placeholder]=\"'e.g. {{ example }}' | translate: { example: 1 }\"\n />\n <c8y-messages\n [show]=\"\n formGroup.controls?.numberOfDecimalPlaces?.touched &&\n formGroup?.controls?.numberOfDecimalPlaces?.errors\n \"\n ></c8y-messages>\n </div>\n </form>\n </div>\n</div>\n" }]
670
752
  }], ctorParameters: () => [], propDecorators: { chart: [{
671
753
  type: ViewChild,
672
754
  args: ['chart']