@c8y/ngx-components 1023.14.135 → 1023.14.136

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.
@@ -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;;;;;;AA8CA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACzJD;;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;;;;;;AA8CA;;;;AAIG;AACH;AAYA;;;;;;AAMG;AACH;AAOA;;;;;AAKG;;;AAiBH;;AAeA;AAcA;;AAEG;AACH;AAcA;;AAEG;AACH;;;AAiCD;;ACzJD;;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":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;AAMM;AAEN;;;;;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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;;;;AAKE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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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
@@ -48,6 +48,7 @@ type DatapointsGraphWidgetConfig = {
48
48
  displayMode?: GlobalContextDisplayMode;
49
49
  refreshInterval?: number;
50
50
  numberOfDecimalPlaces?: number;
51
+ showAdvancedChartOptions?: boolean;
51
52
  retrievalError?: object;
52
53
  };
53
54
  type GraphDisplayOptions = {
@@ -263,6 +264,7 @@ declare class ChartsComponent implements OnChanges, OnInit, OnDestroy {
263
264
  updateAggregatedSliderDatapoint: EventEmitter<SelectedDatapoint>;
264
265
  chart: ElementRef;
265
266
  CHART_VIEW_CONTEXT: typeof CHART_VIEW_CONTEXT;
267
+ readonly AGGREGATION_INTERVAL_MAP: Record<aggregationType, string>;
266
268
  private configChangedSubject;
267
269
  private destroyRef;
268
270
  private readonly measurementService;
@@ -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/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[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;;AAGI;;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;;AC9MD;;;;;;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;;;;;;;;;;;AC0DA;AA4BE;;AAEA;;;;;;;;AAQA;;;;;;AAMK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAsDA;;;;;AAoKuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAwBA;AA6BA;AAWA;;;;AAIG;AACH;AAcA;;;;;AAKG;AACH;AAgCA;AAeA;AA0BA;;AA8DA;;;AA8MA;AA0DA;AA0CA;AAkBA;AAWA;AAYA;;;AA6BD;;ACh/BD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;ACtBD;;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/select-aggregated-datapoint/select-aggregated-datapoint.component.ts"],"sourcesContent":[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;;AAGI;;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;;;;;;;;;;;AC0DA;AA4BE;;AAEA;;;;;;;;AAQA;;;;;;AAMK;AACK;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEV;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAsDA;;;;;AAoKuB;;;AAA4B;AAiDnD;AAOA;AAIA;AAwBA;AA6BA;AAWA;;;;AAIG;AACH;AAcA;;;;;AAKG;AACH;AAgCA;AAeA;AA0BA;;AA8DA;;;AA8MA;AAiEA;AAsDA;AAkBA;AAWA;AAYA;;;AA6BD;;ACxgCD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAqCP;;AC/CD;AAEc;AAAQ;AAEpB;;;;;AAKG;AACG;;;AAuBP;;AChCD;AAEE;;;;AAIG;;;;;;;;;;;AAcH;AAcA;;;AAGD;;ACtBD;;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;;AAGI;;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;;AC9MD;;;;;;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;;AAGI;;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;;;;;;;;;;;;"}
@@ -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';
@@ -818,7 +818,8 @@ class DatapointExplorerComponent {
818
818
  this.canAddReport = false;
819
819
  this.datapointSelectDefaultFormOptions = {
820
820
  showRange: true,
821
- showChart: true
821
+ showChart: true,
822
+ showAdvancedChartOptions: false
822
823
  };
823
824
  /** Flag to skip onTimeContextChange during zoom handling */
824
825
  this.isHandlingZoom = false;
@@ -840,6 +841,7 @@ class DatapointExplorerComponent {
840
841
  this.chartHelpersService = inject(ChartHelpersService);
841
842
  this.gainsightService = inject(GainsightService);
842
843
  this.datapointSyncService = inject(DatapointSyncService);
844
+ this.measurementService = inject(MeasurementService);
843
845
  this.formGroup = this.initForm();
844
846
  this.settings$ = this.activatedRoute.data.pipe(map$1(data => data.settings));
845
847
  }
@@ -862,6 +864,13 @@ class DatapointExplorerComponent {
862
864
  aggregation: this.config.aggregation
863
865
  };
864
866
  }
867
+ this.formGroup.controls.datapoints.valueChanges
868
+ .pipe(takeUntilDestroyed(this.#destroyRef), filter(value => value.length > 0), take(1))
869
+ .subscribe(async (value) => {
870
+ const isMigrated = await this.detectTimeSeriesMigration(value[0]);
871
+ this.datapointSelectDefaultFormOptions.showAdvancedChartOptions = isMigrated;
872
+ this.formGroup.patchValue({ showAdvancedChartOptions: isMigrated }, { emitEvent: false });
873
+ });
865
874
  this.formGroup.valueChanges
866
875
  .pipe(takeUntilDestroyed(this.#destroyRef))
867
876
  .subscribe(configChange => {
@@ -1108,6 +1117,25 @@ class DatapointExplorerComponent {
1108
1117
  // else: modal was closed
1109
1118
  }
1110
1119
  }
1120
+ /**
1121
+ * DEPRECATED: to be removed when there is another way to identify time series migration.
1122
+ * This method checks if the tenant is migrated to time series by making a call to measurement detail endpoint.
1123
+ * If the endpoint returns 405, it means the tenant is migrated. This is a workaround for now until we have a
1124
+ * better way to identify time series migration.
1125
+ */
1126
+ async detectTimeSeriesMigration(firstDp) {
1127
+ const targetId = firstDp?.__target?.id;
1128
+ if (!targetId) {
1129
+ return false;
1130
+ }
1131
+ try {
1132
+ await this.measurementService.detail(targetId);
1133
+ return false;
1134
+ }
1135
+ catch (err) {
1136
+ return err?.res?.status === 405;
1137
+ }
1138
+ }
1111
1139
  isActualDate(val) {
1112
1140
  if (!val)
1113
1141
  return false;
@@ -1193,7 +1221,8 @@ class DatapointExplorerComponent {
1193
1221
  displayDateSelection: [false, []],
1194
1222
  yAxisSplitLines: [false],
1195
1223
  xAxisSplitLines: [false],
1196
- numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]]
1224
+ numberOfDecimalPlaces: [2, [Validators.required, Validators.min(0), Validators.max(10)]],
1225
+ showAdvancedChartOptions: [false]
1197
1226
  });
1198
1227
  }
1199
1228
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatapointExplorerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }