@c8y/ngx-components 1023.50.2 → 1023.52.0

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 (39) hide show
  1. package/datapoint-explorer/view/index.d.ts +8 -0
  2. package/datapoint-explorer/view/index.d.ts.map +1 -1
  3. package/datapoint-selector/index.d.ts +14 -1
  4. package/datapoint-selector/index.d.ts.map +1 -1
  5. package/echart/index.d.ts +2 -0
  6. package/echart/index.d.ts.map +1 -1
  7. package/echart/models/index.d.ts +1 -0
  8. package/echart/models/index.d.ts.map +1 -1
  9. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs +33 -4
  10. package/fesm2022/c8y-ngx-components-datapoint-explorer-view.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs +24 -7
  12. package/fesm2022/c8y-ngx-components-datapoint-selector.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-echart-models.mjs.map +1 -1
  14. package/fesm2022/c8y-ngx-components-echart.mjs +32 -10
  15. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  16. package/fesm2022/c8y-ngx-components-global-context.mjs +7 -2
  17. package/fesm2022/c8y-ngx-components-global-context.mjs.map +1 -1
  18. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs +35 -5
  19. package/fesm2022/c8y-ngx-components-widgets-implementations-datapoints-graph.mjs.map +1 -1
  20. package/fesm2022/c8y-ngx-components.mjs +1338 -1211
  21. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  22. package/global-context/index.d.ts +1 -0
  23. package/global-context/index.d.ts.map +1 -1
  24. package/index.d.ts +1324 -1327
  25. package/index.d.ts.map +1 -1
  26. package/locales/de.po +9 -3
  27. package/locales/es.po +9 -3
  28. package/locales/fr.po +9 -3
  29. package/locales/ja_JP.po +9 -3
  30. package/locales/ko.po +9 -3
  31. package/locales/locales.pot +15 -3
  32. package/locales/nl.po +9 -3
  33. package/locales/pl.po +9 -3
  34. package/locales/pt_BR.po +9 -3
  35. package/locales/zh_CN.po +9 -3
  36. package/locales/zh_TW.po +9 -3
  37. package/package.json +1 -1
  38. package/widgets/implementations/datapoints-graph/index.d.ts +8 -0
  39. package/widgets/implementations/datapoints-graph/index.d.ts.map +1 -1
@@ -177,6 +177,7 @@ declare class DatapointExplorerComponent {
177
177
  private readonly chartHelpersService;
178
178
  private readonly gainsightService;
179
179
  private readonly datapointSyncService;
180
+ private readonly measurementService;
180
181
  constructor();
181
182
  ngOnInit(): void;
182
183
  onTimeContextChange(timeProps: TimeContextProps): void;
@@ -194,6 +195,13 @@ declare class DatapointExplorerComponent {
194
195
  createNewReportWithWidget(): Promise<void>;
195
196
  sendAsWidgetToReport(): Promise<void>;
196
197
  sendAsWidgetToDashboard(): Promise<void>;
198
+ /**
199
+ * DEPRECATED: to be removed when there is another way to identify time series migration.
200
+ * This method checks if the tenant is migrated to time series by making a call to measurement detail endpoint.
201
+ * If the endpoint returns 405, it means the tenant is migrated. This is a workaround for now until we have a
202
+ * better way to identify time series migration.
203
+ */
204
+ private detectTimeSeriesMigration;
197
205
  private isActualDate;
198
206
  private isAlarm;
199
207
  private isEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../../datapoint-explorer/view/configuration/name-generator.service.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.model.ts","../../../datapoint-explorer/view/datapoint-explorer.model.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.service.ts","../../../datapoint-explorer/view/datapoint-explorer.component.ts","../../../datapoint-explorer/view/datapoint-explorer.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;AAIE;;;AAOD;;;;;;ACRA;;;;;;;;ACGA;;AAGC;AACA;AACA;AACA;AAGA;AACD;;;;AAKC;;AAEE;;;AAIF;AACD;;;;AAMC;;AAEE;;AAGF;;AAEE;;AAEF;AACD;AAED;AAsBA;;;;;;;;;;;;;;;;;AAkBA;;;;AC1EA;AAIE;AACA;;AAGA;;;AAYA;;AAEG;AACH;;;;;;AAyCA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACpJD;;AA4BE;;;;;AAKA;;;AAGA;;;;AAIA;AACA;AACA;AACA;AACA;;;AAGE;;AAEA;;AAEF;;;AAMA;AAEA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AA8CA;;;;;AAgHwD;AAA2B;AAuCnF;AAMA;AAMA;AASA;AAIA;AAQM;AAuBA;AA8BA;AAmCN;AAOA;AAIA;AAIA;AAIA;AAUA;AAsBA;AAWA;AAUA;;;AA2BD;;AC1iBD;AAIE;AACA;AACA;AACA;AACA;AACA;AACA;;AAWM;AAUA;;;;AAUN;;;;;;AAMG;AACH;AAKA;;;;;;;AAOG;AACH;AAQA;AAWA;AAiBA;;;AAGG;AACH;AAMM;;;;AAuBP;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../datapoint-explorer/view/configuration/name-generator.service.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.model.ts","../../../datapoint-explorer/view/datapoint-explorer.model.ts","../../../datapoint-explorer/view/configuration/workspace-configuration.service.ts","../../../datapoint-explorer/view/datapoint-explorer.component.ts","../../../datapoint-explorer/view/datapoint-explorer.service.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;AAGA;AAIE;;;AAOD;;;;;;ACRA;;;;;;;;ACGA;;AAGC;AACA;AACA;AACA;AAGA;AACD;;;;AAKC;;AAEE;;;AAIF;AACD;;;;AAMC;;AAEE;;AAGF;;AAEE;;AAEF;AACD;AAED;AAsBA;;;;;;;;;;;;;;;;;AAkBA;;;;AC1EA;AAIE;AACA;;AAGA;;;AAYA;;AAEG;AACH;;;;;;AAyCA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACpJD;;AA4BE;;;;;AAKA;;;AAGA;;;;AAIA;AACA;AACA;AACA;AACA;;;AAGE;;AAEA;;AAEF;;;AAOA;AAEA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AA0DA;;;;;AAgHwD;AAA2B;AAuCnF;AAMA;AAMA;AASA;AAIA;AAQM;AAuBA;AA8BA;AAmCN;;;;;AAKG;;AAgBH;AAOA;AAIA;AAIA;AAIA;AAUA;AAsBA;AAWA;AAUA;;;AA4BD;;AC9kBD;AAIE;AACA;AACA;AACA;AACA;AACA;AACA;;AAWM;AAUA;;;;AAUN;;;;;;AAMG;AACH;AAKA;;;;;;;AAOG;AACH;AAQA;AAWA;AAiBA;;;AAGG;AACH;AAMM;;;;AAuBP;;;"}
@@ -58,6 +58,15 @@ declare const CHART_RENDER_TYPES: readonly [{
58
58
  }, {
59
59
  readonly val: "area";
60
60
  readonly text: "Minimum and maximum";
61
+ }, {
62
+ readonly val: "avg";
63
+ readonly text: "Average";
64
+ }, {
65
+ readonly val: "count";
66
+ readonly text: "Count";
67
+ }, {
68
+ readonly val: "sum";
69
+ readonly text: "Sum";
61
70
  }];
62
71
  type ChartRenderTypes = (typeof CHART_RENDER_TYPES)[number]['val'];
63
72
 
@@ -94,6 +103,7 @@ interface DatapointAction {
94
103
  icon: SupportedIconsSuggestions;
95
104
  }
96
105
  interface DatapointAttributesFormConfig {
106
+ showAdvancedChartOptions: boolean;
97
107
  showTarget: boolean;
98
108
  showRange: boolean;
99
109
  showYellowRange: boolean;
@@ -410,6 +420,7 @@ declare class DatapointAttributesFormComponent implements ControlValueAccessor,
410
420
  showRedRange: boolean;
411
421
  showChart: boolean;
412
422
  showFormIfTemplateWasSelected: boolean;
423
+ showAdvancedChartOptions: boolean;
413
424
  /** Displays all errors even if the form was not touched yet. */
414
425
  showErrorsImmediately: boolean;
415
426
  formGroup: FormGroup;
@@ -422,6 +433,7 @@ declare class DatapointAttributesFormComponent implements ControlValueAccessor,
422
433
  CHART_RENDER_TYPES: Array<(typeof CHART_RENDER_TYPES)[number]>;
423
434
  CHART_LINE_TYPES: Array<(typeof CHART_LINE_TYPES)[number]>;
424
435
  AXIS_TYPES: Array<(typeof AXIS_TYPES)[number]>;
436
+ DEFAULT_RENDER_TYPES: ChartRenderTypes[];
425
437
  customValidationErrorMessages: {
426
438
  [formField: string]: {
427
439
  [validationError: string]: string;
@@ -432,6 +444,7 @@ declare class DatapointAttributesFormComponent implements ControlValueAccessor,
432
444
  showChartForm: boolean;
433
445
  constructor(formValidations: DatapointAttributesFormValidationService);
434
446
  ngOnInit(): void;
447
+ ngOnChanges(changes: SimpleChanges): void;
435
448
  ngAfterViewInit(): void;
436
449
  validate(_control: AbstractControl): ValidationErrors;
437
450
  writeValue(obj: any): void;
@@ -445,7 +458,7 @@ declare class DatapointAttributesFormComponent implements ControlValueAccessor,
445
458
  private filterLineTypes;
446
459
  private filterAxisTypes;
447
460
  static ɵfac: i0.ɵɵFactoryDeclaration<DatapointAttributesFormComponent, never>;
448
- static ɵcmp: i0.ɵɵComponentDeclaration<DatapointAttributesFormComponent, "c8y-datapoint-attributes-form", never, { "selectableChartRenderTypes": { "alias": "selectableChartRenderTypes"; "required": false; }; "selectableChartLineTypes": { "alias": "selectableChartLineTypes"; "required": false; }; "selectableAxisTypes": { "alias": "selectableAxisTypes"; "required": false; }; "showTarget": { "alias": "showTarget"; "required": false; }; "showRange": { "alias": "showRange"; "required": false; }; "showYellowRange": { "alias": "showYellowRange"; "required": false; }; "showRedRange": { "alias": "showRedRange"; "required": false; }; "showChart": { "alias": "showChart"; "required": false; }; "showFormIfTemplateWasSelected": { "alias": "showFormIfTemplateWasSelected"; "required": false; }; "showErrorsImmediately": { "alias": "showErrorsImmediately"; "required": false; }; }, {}, never, never, true, never>;
461
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatapointAttributesFormComponent, "c8y-datapoint-attributes-form", never, { "selectableChartRenderTypes": { "alias": "selectableChartRenderTypes"; "required": false; }; "selectableChartLineTypes": { "alias": "selectableChartLineTypes"; "required": false; }; "selectableAxisTypes": { "alias": "selectableAxisTypes"; "required": false; }; "showTarget": { "alias": "showTarget"; "required": false; }; "showRange": { "alias": "showRange"; "required": false; }; "showYellowRange": { "alias": "showYellowRange"; "required": false; }; "showRedRange": { "alias": "showRedRange"; "required": false; }; "showChart": { "alias": "showChart"; "required": false; }; "showFormIfTemplateWasSelected": { "alias": "showFormIfTemplateWasSelected"; "required": false; }; "showAdvancedChartOptions": { "alias": "showAdvancedChartOptions"; "required": false; }; "showErrorsImmediately": { "alias": "showErrorsImmediately"; "required": false; }; }, {}, never, never, true, never>;
449
462
  }
450
463
 
451
464
  declare class DatapointSelectorModule {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../datapoint-selector/datapoint-attributes-form/datapoint-attributes.model.ts","../../datapoint-selector/datapoint-selection.model.ts","../../datapoint-selector/datapoint-library.service.ts","../../datapoint-selector/datapoint-selector.component.ts","../../datapoint-selector/datapoint-selector-modal/datapoint-selector-modal.component.ts","../../datapoint-selector/datapoint-selector-list-item/datapoint-selector-list-item.component.ts","../../datapoint-selector/datapoint-selector-modal/datapoint-selector-modal.model.ts","../../datapoint-selector/datapoint-selector.service.ts","../../datapoint-selector/datapoint-selection-list/datapoint-selection-list.component.ts","../../datapoint-selector/datapoint-template-popover/datapoint-template-popover.component.ts","../../datapoint-selector/pipes/includes-datapoint.pipe.ts","../../datapoint-selector/pipes/datapoint-label.pipe.ts","../../datapoint-selector/pipes/filter-datapoints.pipe.ts","../../datapoint-selector/datapoint-attributes-form/datapoint-attributes-form-validation.service.ts","../../datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.ts","../../datapoint-selector/datapoint-selector.module.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],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AAOA;;;AAOD;;ACpOD;;;;;;AAWG;;;AAwBF;;ACrCD;;;;AAaC;;ACbD;AAEE;;;AAE0D;;;AAmB3D;;ACvBD;;AAYE;;;AAqBD;;ACvBD;AAEc;AAAQ;AAEpB;AA4BA;;;;;;;;;;;AAyJA;AAOA;AAQA;AAMA;AAOA;;;AAWD;;AC5MD;AAgEc;;;;AA5BH;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AAYT;;AAEI;;;AAGJ;;;AAIoB;AAKpB;AAKA;AAMA;AAOA;AAeA;AASA;AAIA;AAOA;AAYA;AAYA;AAMA;AAQA;AAQA;;;AAOD;;AC7LD;;;;AA+BuC;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../datapoint-selector/datapoint-attributes-form/datapoint-attributes.model.ts","../../datapoint-selector/datapoint-selection.model.ts","../../datapoint-selector/datapoint-library.service.ts","../../datapoint-selector/datapoint-selector.component.ts","../../datapoint-selector/datapoint-selector-modal/datapoint-selector-modal.component.ts","../../datapoint-selector/datapoint-selector-list-item/datapoint-selector-list-item.component.ts","../../datapoint-selector/datapoint-selector-modal/datapoint-selector-modal.model.ts","../../datapoint-selector/datapoint-selector.service.ts","../../datapoint-selector/datapoint-selection-list/datapoint-selection-list.component.ts","../../datapoint-selector/datapoint-template-popover/datapoint-template-popover.component.ts","../../datapoint-selector/pipes/includes-datapoint.pipe.ts","../../datapoint-selector/pipes/datapoint-label.pipe.ts","../../datapoint-selector/pipes/filter-datapoints.pipe.ts","../../datapoint-selector/datapoint-attributes-form/datapoint-attributes-form-validation.service.ts","../../datapoint-selector/datapoint-attributes-form/datapoint-attributes-form.component.ts","../../datapoint-selector/datapoint-selector.module.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;AAMM;AAEN;;;;;;;;;;;;;;;;;;;AASM;AAEN;;;;;;;;;;;;;;;;;;;AASM;;ACrBN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;AAqBD;;ACvBD;AAEc;AAAQ;AAEpB;AA4BA;;;;;;;;;;;AAyJA;AAOA;AAQA;AAMA;AAOA;;;AAWD;;AC5MD;AAkEc;;;;AA9BH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AAaT;;AAEI;;;AAGJ;;;AAIoB;AAKpB;AAKA;AAMA;AAMA;AAOA;AAeA;AASA;AAIA;AAOA;AAYA;AAYA;AAMA;AAcA;AAQA;;;AAOD;;AC3MD;;;;AA+BuC;;;"}
package/echart/index.d.ts CHANGED
@@ -49,6 +49,7 @@ type DatapointsGraphWidgetConfig = {
49
49
  displayMode?: GlobalContextDisplayMode;
50
50
  refreshInterval?: number;
51
51
  numberOfDecimalPlaces?: number;
52
+ showAdvancedChartOptions?: boolean;
52
53
  retrievalError?: object;
53
54
  };
54
55
  type GraphDisplayOptions = {
@@ -265,6 +266,7 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
265
266
  updateAggregatedSliderDatapoint: EventEmitter<SelectedDatapoint>;
266
267
  chart: ElementRef;
267
268
  CHART_VIEW_CONTEXT: typeof CHART_VIEW_CONTEXT;
269
+ readonly AGGREGATION_INTERVAL_MAP: Record<aggregationType, string>;
268
270
  private configChangedSubject;
269
271
  private readonly measurementService;
270
272
  private readonly echartsOptionsService;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../echart/models/datapoints-graph-widget.model.ts","../../echart/models/chart.model.ts","../../echart/models/svg-icons.model.ts","../../echart/charts.component.ts","../../echart/services/chart-alarms.service.ts","../../echart/services/chart-events.service.ts","../../echart/services/chart-helpers.service.ts","../../echart/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AAOA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;;AAUI;;;;;;;;;;AAUJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;;AAYL;AAED;;;;;;;;AAUE;AACA;AACD;;AC/MD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;ACwDA;AA4BE;;AAEA;;;;;;;;AAQA;;;;;;AAMK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAgDA;;;;;AA2IuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAwBA;AA6BA;AAWA;;;;AAIG;AACH;AAcA;;;;;AAKG;AACH;AAgCA;AAeA;AA0BA;;AA8DA;;;AAiNA;AA0DA;AA0CA;AAkBA;AAWA;AAYA;;;AA6BD;;ACj9BD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;AC9BD;;AAQmC;AAEjC;;;;AAQD;;ACVD;;AAqBW;AACC;AAEV;;AAGA;;;AAiBA;;;AAgBD;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../echart/models/datapoints-graph-widget.model.ts","../../echart/models/chart.model.ts","../../echart/models/svg-icons.model.ts","../../echart/charts.component.ts","../../echart/services/chart-alarms.service.ts","../../echart/services/chart-events.service.ts","../../echart/services/chart-helpers.service.ts","../../echart/chart-alerts/chart-alerts.component.ts","../../echart/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AAOA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;AAWI;;;;;;;;;;AAUJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;;AAYL;AAED;;;;;;;;AAUE;AACA;AACD;;AChND;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;ACwDA;AA4BE;;AAEA;;;;;;;;AAQA;;;;;;AAMK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAgDA;;;;;AA2IuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAwBA;AA6BA;AAWA;;;;AAIG;AACH;AAcA;;;;;AAKG;AACH;AAgCA;AAeA;AA0BA;;AA8DA;;;AAiNA;AAiEA;AAsDA;AAkBA;AAWA;AAYA;;;AA6BD;;ACz+BD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;AC9BD;;AAQmC;AAEjC;;;;AAQD;;ACVD;;AAqBW;AACC;AAEV;;AAGA;;;AAiBA;;;AAgBD;;;"}
@@ -42,6 +42,7 @@ type DatapointsGraphWidgetConfig = {
42
42
  displayMode?: GlobalContextDisplayMode;
43
43
  refreshInterval?: number;
44
44
  numberOfDecimalPlaces?: number;
45
+ showAdvancedChartOptions?: boolean;
45
46
  retrievalError?: object;
46
47
  };
47
48
  type GraphDisplayOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sources":["../../../echart/models/datapoints-graph-widget.model.ts","../../../echart/models/chart.model.ts","../../../echart/models/svg-icons.model.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AAOA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;;AAUI;;;;;;;;;;AAUJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;;AAYL;AAED;;;;;;;;AAUE;AACA;AACD;;AC/MD;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../echart/models/datapoints-graph-widget.model.ts","../../../echart/models/chart.model.ts","../../../echart/models/svg-icons.model.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;;;;;;AAmBM;;;;AAKA;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;AAOA;;AAEA;AACA;AACA;AACA;;;AAGA;;;;;;;;;;AAWI;;;;;;;;;;AAUJ;;;AAII;;AAEJ;AACA;;AAGI;;;AAIN;;AAEG;;AAGG;AAIN;AACE;AACA;AACD;AAED;AACM;;AAEL;AAED;;;;AAIM;;;;;;;AAQL;AAED;;;;;AAUE;;;;;AAGD;;AAGC;;AAEA;;AAEE;;AAEF;;;AACD;;;;;;;AAQC;AACA;AACD;AAEK;AACA;AAEA;AAEA;AAEN;;;;AAKA;;;;;;;;;;;;;AAcM;AACA;AAEA;;;;AAKA;;;;;;;;;;;AAYL;AAED;;;;;;;;AAUE;AACA;AACD;;AChND;;;;;;AAMG;AACH;AACE;;;;AAIA;;;AACD;;;AAIA;;;AAIA;AAEK;AACA;AACJ;AACE;AACD;AACF;;AAGC;AACA;AACD;AAED;AACE;AACA;AACA;AACD;;AC3CD;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED;;;;;;;;;;;;"}
@@ -10,6 +10,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import * as i2$1 from '@angular/forms';
11
11
  import { FormBuilder, FormsModule, ReactiveFormsModule, FormControl, FormGroup, Validators } from '@angular/forms';
12
12
  import { Router, ActivatedRoute, NavigationStart } from '@angular/router';
13
+ import { InventoryService, MeasurementService } from '@c8y/client';
13
14
  import * as i4$1 from '@c8y/ngx-components/alarm-event-selector';
14
15
  import { AlarmEventSelectorModule } from '@c8y/ngx-components/alarm-event-selector';
15
16
  import * as i1 from '@c8y/ngx-components/context-dashboard';
@@ -28,8 +29,7 @@ import { PopoverModule } from 'ngx-bootstrap/popover';
28
29
  import { INTERVALS } from '@c8y/ngx-components/interval-picker';
29
30
  import { TimeContextComponent } from '@c8y/ngx-components/time-context';
30
31
  import { BsModalService } from 'ngx-bootstrap/modal';
31
- import { firstValueFrom, merge, of, map as map$1 } from 'rxjs';
32
- import { InventoryService } from '@c8y/client';
32
+ import { firstValueFrom, merge, of, map as map$1, filter, take } from 'rxjs';
33
33
  import * as i3 from '@angular/common';
34
34
  import { ReportDashboardModule, ReportDashboardService } from '@c8y/ngx-components/report-dashboard';
35
35
  import { map } from 'rxjs/operators';
@@ -813,7 +813,8 @@ class DatapointExplorerComponent {
813
813
  this.canAddReport = false;
814
814
  this.datapointSelectDefaultFormOptions = {
815
815
  showRange: true,
816
- showChart: true
816
+ showChart: true,
817
+ showAdvancedChartOptions: false
817
818
  };
818
819
  /** Flag to skip onTimeContextChange during zoom handling */
819
820
  this.isHandlingZoom = false;
@@ -835,6 +836,7 @@ class DatapointExplorerComponent {
835
836
  this.chartHelpersService = inject(ChartHelpersService);
836
837
  this.gainsightService = inject(GainsightService);
837
838
  this.datapointSyncService = inject(DatapointSyncService);
839
+ this.measurementService = inject(MeasurementService);
838
840
  this.formGroup = this.initForm();
839
841
  this.settings$ = this.activatedRoute.data.pipe(map$1(data => data.settings));
840
842
  }
@@ -857,6 +859,13 @@ class DatapointExplorerComponent {
857
859
  aggregation: this.config.aggregation
858
860
  };
859
861
  }
862
+ this.formGroup.controls.datapoints.valueChanges
863
+ .pipe(takeUntilDestroyed(this.#destroyRef), filter(value => value.length > 0), take(1))
864
+ .subscribe(async (value) => {
865
+ const isMigrated = await this.detectTimeSeriesMigration(value[0]);
866
+ this.datapointSelectDefaultFormOptions.showAdvancedChartOptions = isMigrated;
867
+ this.formGroup.patchValue({ showAdvancedChartOptions: isMigrated }, { emitEvent: false });
868
+ });
860
869
  this.formGroup.valueChanges
861
870
  .pipe(takeUntilDestroyed(this.#destroyRef))
862
871
  .subscribe(configChange => {
@@ -1103,6 +1112,25 @@ class DatapointExplorerComponent {
1103
1112
  // else: modal was closed
1104
1113
  }
1105
1114
  }
1115
+ /**
1116
+ * DEPRECATED: to be removed when there is another way to identify time series migration.
1117
+ * This method checks if the tenant is migrated to time series by making a call to measurement detail endpoint.
1118
+ * If the endpoint returns 405, it means the tenant is migrated. This is a workaround for now until we have a
1119
+ * better way to identify time series migration.
1120
+ */
1121
+ async detectTimeSeriesMigration(firstDp) {
1122
+ const targetId = firstDp?.__target?.id;
1123
+ if (!targetId) {
1124
+ return false;
1125
+ }
1126
+ try {
1127
+ await this.measurementService.detail(targetId);
1128
+ return false;
1129
+ }
1130
+ catch (err) {
1131
+ return err?.res?.status === 405;
1132
+ }
1133
+ }
1106
1134
  isActualDate(val) {
1107
1135
  if (!val)
1108
1136
  return false;
@@ -1188,7 +1216,8 @@ class DatapointExplorerComponent {
1188
1216
  displayDateSelection: [false, []],
1189
1217
  yAxisSplitLines: [false],
1190
1218
  xAxisSplitLines: [false],
1191
- numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]]
1219
+ numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]],
1220
+ showAdvancedChartOptions: [false]
1192
1221
  });
1193
1222
  }
1194
1223
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DatapointExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }