@nova-ui/charts 12.0.20-4218 → 12.0.21

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.
@@ -2,10 +2,29 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/core'), require('@angular/animations'), require('d3-force'), require('d3-selection'), require('lodash/each'), require('lodash/isEqual'), require('lodash/isNil'), require('rxjs'), require('rxjs/operators'), require('@nova-ui/bits'), require('lodash/isFunction'), require('d3-selection-multi'), require('lodash/isUndefined'), require('lodash/findKey'), require('lodash/debounce'), require('lodash/isEmpty'), require('lodash/cloneDeep'), require('lodash/sortBy'), require('lodash/unionWith'), require('lodash/values'), require('d3-color'), require('lodash/isArray'), require('lodash/startsWith'), require('lodash/trim'), require('lodash/trimEnd'), require('lodash/trimStart'), require('d3-array'), require('lodash/defaultsDeep'), require('lodash/flatten'), require('lodash/uniq'), require('lodash/get'), require('lodash/identity'), require('d3-shape'), require('lodash/filter'), require('lodash/includes'), require('lodash/keyBy'), require('d3-axis'), require('lodash/clone'), require('d3-scale'), require('lodash/toString'), require('lodash/indexOf'), require('lodash/find'), require('lodash/orderBy'), require('lodash/unionBy'), require('d3-time'), require('moment/moment'), require('lodash/pickBy'), require('d3-brush'), require('lodash/findIndex')) :
3
3
  typeof define === 'function' && define.amd ? define('@nova-ui/charts', ['exports', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/core', '@angular/animations', 'd3-force', 'd3-selection', 'lodash/each', 'lodash/isEqual', 'lodash/isNil', 'rxjs', 'rxjs/operators', '@nova-ui/bits', 'lodash/isFunction', 'd3-selection-multi', 'lodash/isUndefined', 'lodash/findKey', 'lodash/debounce', 'lodash/isEmpty', 'lodash/cloneDeep', 'lodash/sortBy', 'lodash/unionWith', 'lodash/values', 'd3-color', 'lodash/isArray', 'lodash/startsWith', 'lodash/trim', 'lodash/trimEnd', 'lodash/trimStart', 'd3-array', 'lodash/defaultsDeep', 'lodash/flatten', 'lodash/uniq', 'lodash/get', 'lodash/identity', 'd3-shape', 'lodash/filter', 'lodash/includes', 'lodash/keyBy', 'd3-axis', 'lodash/clone', 'd3-scale', 'lodash/toString', 'lodash/indexOf', 'lodash/find', 'lodash/orderBy', 'lodash/unionBy', 'd3-time', 'moment/moment', 'lodash/pickBy', 'd3-brush', 'lodash/findIndex'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.nui = global.nui || {}, global.nui.charts = {}), global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.core, global.ng.animations, global.d3, global.d3, global._.each, global._.isEqual, global._.isNil, global.rxjs, global.rxjs.operators, global.nui.bits, global._.isFunction, global.d3, global._.isUndefined, global._.findKey, global._.debounce, global._.isEmpty, global._.cloneDeep, global._.sortBy, global._.unionWith, global._.values, global.d3, global._.isArray, global._.startsWith, global._.trim, global._.trimEnd, global._.trimStart, global.d3, global._.defaultsDeep, global._.flatten, global._.uniq, global._.get, global._.identity, global.d3, global._.filter, global._.includes, global._.keyBy, global.d3, global._.clone, global.d3, global._.toString, global._.indexOf, global._.find, global._.orderBy, global._.unionBy, global.d3, global.moment, global._.pickBy, global.d3, global._.findIndex));
5
- })(this, (function (exports, overlay, portal, core, animations, d3Force, d3Selection, each, isEqual, isNil, rxjs, operators, bits, isFunction, d3SelectionMulti, isUndefined, findKey, debounce, isEmpty, cloneDeep, sortBy, unionWith, values, d3Color, isArray, startsWith, trim, trimEnd, trimStart, d3Array, defaultsDeep, flatten, uniq, get, identity, d3Shape, filter, includes, keyBy, d3Axis, clone, d3Scale, toString, indexOf, find, orderBy, unionBy, d3Time, moment, pickBy, d3Brush, findIndex) { 'use strict';
5
+ })(this, (function (exports, overlay, portal, i0, animations, d3Force, d3Selection, each, isEqual, isNil, rxjs, operators, bits, isFunction, d3SelectionMulti, isUndefined, findKey, debounce, isEmpty, cloneDeep, sortBy, unionWith, values, d3Color, isArray, startsWith, trim, trimEnd, trimStart, d3Array, defaultsDeep, flatten, uniq, get, identity, d3Shape, filter, includes, keyBy, d3Axis, clone, d3Scale, toString, indexOf, find, orderBy, unionBy, d3Time, moment, pickBy, d3Brush, findIndex) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
9
28
  var each__default = /*#__PURE__*/_interopDefaultLegacy(each);
10
29
  var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
11
30
  var isNil__default = /*#__PURE__*/_interopDefaultLegacy(isNil);
@@ -48,10 +67,10 @@
48
67
  return ChartTooltipComponent;
49
68
  }());
50
69
  ChartTooltipComponent.decorators = [
51
- { type: core.Component, args: [{
70
+ { type: i0.Component, args: [{
52
71
  selector: "nui-chart-tooltip",
53
72
  template: "<div>\n <div @tooltip class=\"nui-chart-tooltip px-2 py-1 nui-text-small\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n",
54
- changeDetection: core.ChangeDetectionStrategy.OnPush,
73
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
55
74
  animations: [
56
75
  animations.trigger("tooltip", [
57
76
  animations.transition(":enter", [
@@ -65,7 +84,7 @@
65
84
  },] }
66
85
  ];
67
86
  ChartTooltipComponent.propDecorators = {
68
- template: [{ type: core.Input }]
87
+ template: [{ type: i0.Input }]
69
88
  };
70
89
 
71
90
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -127,19 +146,19 @@
127
146
  return ChartTooltipDirective;
128
147
  }());
129
148
  ChartTooltipDirective.decorators = [
130
- { type: core.Directive, args: [{ selector: "[nuiChartTooltip]" },] }
149
+ { type: i0.Directive, args: [{ selector: "[nuiChartTooltip]" },] }
131
150
  ];
132
151
  ChartTooltipDirective.ctorParameters = function () { return [
133
152
  { type: overlay.Overlay },
134
153
  { type: overlay.OverlayPositionBuilder },
135
154
  { type: overlay.ScrollStrategyOptions },
136
- { type: core.ElementRef }
155
+ { type: i0.ElementRef }
137
156
  ]; };
138
157
  ChartTooltipDirective.propDecorators = {
139
- template: [{ type: core.Input }],
140
- openRemoteControl: [{ type: core.Input }],
141
- closeRemoteControl: [{ type: core.Input }],
142
- positions: [{ type: core.Input }]
158
+ template: [{ type: i0.Input }],
159
+ openRemoteControl: [{ type: i0.Input }],
160
+ closeRemoteControl: [{ type: i0.Input }],
161
+ positions: [{ type: i0.Input }]
143
162
  };
144
163
 
145
164
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -166,14 +185,14 @@
166
185
  return ChartDonutContentComponent;
167
186
  }());
168
187
  ChartDonutContentComponent.decorators = [
169
- { type: core.Component, args: [{
188
+ { type: i0.Component, args: [{
170
189
  selector: "nui-chart-donut-content",
171
190
  template: "<div\n *ngIf=\"plugin && contentPosition\"\n class=\"nui-chart-donut-content d-flex justify-content-center align-items-center text-center\"\n [style.top.px]=\"contentPosition.top\"\n [style.left.px]=\"contentPosition.left\"\n [style.height.px]=\"contentPosition.height\"\n [style.width.px]=\"contentPosition.width\"\n>\n <ng-content></ng-content>\n</div>\n",
172
191
  styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"]
173
192
  },] }
174
193
  ];
175
194
  ChartDonutContentComponent.propDecorators = {
176
- plugin: [{ type: core.Input }]
195
+ plugin: [{ type: i0.Input }]
177
196
  };
178
197
 
179
198
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -331,19 +350,19 @@
331
350
  return ChartTooltipsComponent;
332
351
  }());
333
352
  ChartTooltipsComponent.decorators = [
334
- { type: core.Component, args: [{
353
+ { type: i0.Component, args: [{
335
354
  selector: "nui-chart-tooltips",
336
355
  template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <div *ngFor=\"let item of plugin.dataPoints | keyvalue; trackBy: trackByFn\">\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"\n ></ng-container>\n </ng-template>\n\n <div\n nuiChartTooltip\n *ngIf=\"plugin.dataPointPositions[item.key]\"\n [attr.series-id]=\"item.key\"\n [template]=\"tooltipTemplate\"\n [openRemoteControl]=\"openTooltips\"\n [closeRemoteControl]=\"closeTooltips\"\n [positions]=\"plugin.dataPointPositions[item.key].overlayPositions\"\n class=\"chart-tooltips__popover\"\n [style.left.px]=\"plugin.dataPointPositions[item.key].x\"\n [style.top.px]=\"plugin.dataPointPositions[item.key].y\"\n [style.height.px]=\"plugin.dataPointPositions[item.key].height\"\n [style.width.px]=\"plugin.dataPointPositions[item.key].width\"\n ></div>\n </div>\n</div>\n",
337
356
  styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"]
338
357
  },] }
339
358
  ];
340
359
  ChartTooltipsComponent.ctorParameters = function () { return [
341
- { type: core.ChangeDetectorRef }
360
+ { type: i0.ChangeDetectorRef }
342
361
  ]; };
343
362
  ChartTooltipsComponent.propDecorators = {
344
- plugin: [{ type: core.Input }],
345
- template: [{ type: core.Input }],
346
- tooltips: [{ type: core.ViewChildren, args: [ChartTooltipDirective,] }]
363
+ plugin: [{ type: i0.Input }],
364
+ template: [{ type: i0.Input }],
365
+ tooltips: [{ type: i0.ViewChildren, args: [ChartTooltipDirective,] }]
347
366
  };
348
367
 
349
368
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -351,7 +370,7 @@
351
370
  function ChartPopoverComponent(changeDetector, element) {
352
371
  this.changeDetector = changeDetector;
353
372
  this.element = element;
354
- this.update = new core.EventEmitter();
373
+ this.update = new i0.EventEmitter();
355
374
  this.destroy$ = new rxjs.Subject();
356
375
  this.initPlugin$ = new rxjs.Subject();
357
376
  }
@@ -390,21 +409,21 @@
390
409
  return ChartPopoverComponent;
391
410
  }());
392
411
  ChartPopoverComponent.decorators = [
393
- { type: core.Component, args: [{
412
+ { type: i0.Component, args: [{
394
413
  selector: "nui-chart-popover",
395
414
  template: "<div *ngIf=\"plugin && plugin.dataPoints\">\n <nui-popover\n class=\"chart-popover__popover\"\n trigger=\"openPopoverSubject\"\n placement=\"top\"\n [unlimited]=\"true\"\n [template]=\"popoverTemplate\"\n [openPopover]=\"plugin.openPopoverSubject\"\n [closePopover]=\"plugin.closePopoverSubject\"\n [hasPadding]=\"false\"\n [container]=\"element.nativeElement\"\n [style.height.px]=\"plugin.popoverTargetPosition.height\"\n [withGrowAfterOpen]=\"true\"\n >\n </nui-popover>\n\n <ng-template #popoverTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { dataPoints: plugin.dataPoints }\n \"\n ></ng-container>\n </ng-template>\n</div>\n",
396
415
  styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"]
397
416
  },] }
398
417
  ];
399
418
  ChartPopoverComponent.ctorParameters = function () { return [
400
- { type: core.ChangeDetectorRef },
401
- { type: core.ElementRef }
419
+ { type: i0.ChangeDetectorRef },
420
+ { type: i0.ElementRef }
402
421
  ]; };
403
422
  ChartPopoverComponent.propDecorators = {
404
- plugin: [{ type: core.Input }],
405
- template: [{ type: core.Input }],
406
- update: [{ type: core.Output }],
407
- popover: [{ type: core.ViewChild, args: [bits.PopoverComponent,] }]
423
+ plugin: [{ type: i0.Input }],
424
+ template: [{ type: i0.Input }],
425
+ update: [{ type: i0.Output }],
426
+ popover: [{ type: i0.ViewChild, args: [bits.PopoverComponent,] }]
408
427
  };
409
428
 
410
429
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -465,21 +484,21 @@
465
484
  return ChartMarkerComponent;
466
485
  }());
467
486
  ChartMarkerComponent.decorators = [
468
- { type: core.Component, args: [{
487
+ { type: i0.Component, args: [{
469
488
  selector: "nui-chart-marker",
470
489
  template: "<svg [attr.width]=\"width\" [attr.height]=\"height\" [attr.viewBox]=\"viewBox\">\n <g #svgContent></g>\n</svg>\n",
471
490
  styles: [":host{font-size:0}\n"]
472
491
  },] }
473
492
  ];
474
493
  ChartMarkerComponent.ctorParameters = function () { return [
475
- { type: core.ChangeDetectorRef }
494
+ { type: i0.ChangeDetectorRef }
476
495
  ]; };
477
496
  ChartMarkerComponent.propDecorators = {
478
- marker: [{ type: core.Input }],
479
- drawLine: [{ type: core.Input }],
480
- color: [{ type: core.Input }],
481
- maxSize: [{ type: core.Input }],
482
- svgContent: [{ type: core.ViewChild, args: ["svgContent",] }]
497
+ marker: [{ type: i0.Input }],
498
+ drawLine: [{ type: i0.Input }],
499
+ color: [{ type: i0.Input }],
500
+ maxSize: [{ type: i0.Input }],
501
+ svgContent: [{ type: i0.ViewChild, args: ["svgContent",] }]
483
502
  };
484
503
 
485
504
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -534,7 +553,7 @@
534
553
  var SERIES_STATE_CHANGE_EVENT = "series_state_change";
535
554
  var AXES_STYLE_CHANGE_EVENT = "axes_style_change";
536
555
  /** @ignore */
537
- var CHART_COMPONENT = new core.InjectionToken("chart_component");
556
+ var CHART_COMPONENT = new i0.InjectionToken("chart_component");
538
557
  /** @ignore */
539
558
  var STANDARD_RENDER_LAYERS = (_a$1 = {},
540
559
  _a$1[exports.RenderLayerName.background] = {
@@ -1073,7 +1092,7 @@
1073
1092
  return ChartCollectionService;
1074
1093
  }());
1075
1094
  ChartCollectionService.decorators = [
1076
- { type: core.Injectable }
1095
+ { type: i0.Injectable }
1077
1096
  ];
1078
1097
 
1079
1098
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1106,16 +1125,16 @@
1106
1125
  return ChartCollectionIdDirective;
1107
1126
  }());
1108
1127
  ChartCollectionIdDirective.decorators = [
1109
- { type: core.Directive, args: [{
1128
+ { type: i0.Directive, args: [{
1110
1129
  selector: "[nuiChartCollectionId]",
1111
1130
  },] }
1112
1131
  ];
1113
1132
  ChartCollectionIdDirective.ctorParameters = function () { return [
1114
- { type: undefined, decorators: [{ type: core.Inject, args: [CHART_COMPONENT,] }] },
1133
+ { type: undefined, decorators: [{ type: i0.Inject, args: [CHART_COMPONENT,] }] },
1115
1134
  { type: ChartCollectionService }
1116
1135
  ]; };
1117
1136
  ChartCollectionIdDirective.propDecorators = {
1118
- collectionId: [{ type: core.Input, args: ["nuiChartCollectionId",] }]
1137
+ collectionId: [{ type: i0.Input, args: ["nuiChartCollectionId",] }]
1119
1138
  };
1120
1139
 
1121
1140
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1183,24 +1202,24 @@
1183
1202
  return ChartComponent;
1184
1203
  }());
1185
1204
  ChartComponent.decorators = [
1186
- { type: core.Component, args: [{
1205
+ { type: i0.Component, args: [{
1187
1206
  selector: "nui-chart",
1188
1207
  template: "",
1189
1208
  providers: [
1190
1209
  {
1191
1210
  provide: CHART_COMPONENT,
1192
- useExisting: core.forwardRef(function () { return ChartComponent; }),
1211
+ useExisting: i0.forwardRef(function () { return ChartComponent; }),
1193
1212
  },
1194
1213
  ]
1195
1214
  },] }
1196
1215
  ];
1197
1216
  ChartComponent.ctorParameters = function () { return [
1198
- { type: core.ElementRef },
1199
- { type: core.NgZone },
1200
- { type: core.ChangeDetectorRef }
1217
+ { type: i0.ElementRef },
1218
+ { type: i0.NgZone },
1219
+ { type: i0.ChangeDetectorRef }
1201
1220
  ]; };
1202
1221
  ChartComponent.propDecorators = {
1203
- chart: [{ type: core.Input }]
1222
+ chart: [{ type: i0.Input }]
1204
1223
  };
1205
1224
 
1206
1225
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1234,7 +1253,7 @@
1234
1253
  /**
1235
1254
  * EventEmitter for notifying subscribers of a change in the active state
1236
1255
  */
1237
- this.activeChanged = new core.EventEmitter();
1256
+ this.activeChanged = new i0.EventEmitter();
1238
1257
  /**
1239
1258
  * The active state
1240
1259
  */
@@ -1259,21 +1278,21 @@
1259
1278
  return LegendComponent;
1260
1279
  }());
1261
1280
  LegendComponent.decorators = [
1262
- { type: core.Component, args: [{
1281
+ { type: i0.Component, args: [{
1263
1282
  selector: "nui-legend",
1264
1283
  // eslint-disable-next-line
1265
1284
  host: { class: "d-inline-block" },
1266
1285
  template: "<div\n class=\"nui-legend d-flex flex-wrap\"\n [class.flex-column]=\"orientation === 'vertical'\"\n>\n <ng-content></ng-content>\n</div>\n",
1267
- encapsulation: core.ViewEncapsulation.Emulated
1286
+ encapsulation: i0.ViewEncapsulation.Emulated
1268
1287
  },] }
1269
1288
  ];
1270
1289
  LegendComponent.propDecorators = {
1271
- active: [{ type: core.Input }],
1272
- interactive: [{ type: core.Input }],
1273
- orientation: [{ type: core.Input }],
1274
- seriesColor: [{ type: core.Input }],
1275
- seriesIcon: [{ type: core.Input }],
1276
- seriesUnitLabel: [{ type: core.Input }]
1290
+ active: [{ type: i0.Input }],
1291
+ interactive: [{ type: i0.Input }],
1292
+ orientation: [{ type: i0.Input }],
1293
+ seriesColor: [{ type: i0.Input }],
1294
+ seriesIcon: [{ type: i0.Input }],
1295
+ seriesUnitLabel: [{ type: i0.Input }]
1277
1296
  };
1278
1297
 
1279
1298
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1289,7 +1308,7 @@
1289
1308
  /**
1290
1309
  * Emits an event with a boolean value indicating a new selected status
1291
1310
  */
1292
- this.isSelectedChange = new core.EventEmitter();
1311
+ this.isSelectedChange = new i0.EventEmitter();
1293
1312
  this.isHorizontalClassApplied = false;
1294
1313
  this._active = false;
1295
1314
  }
@@ -1389,32 +1408,32 @@
1389
1408
  return LegendSeriesComponent;
1390
1409
  }());
1391
1410
  LegendSeriesComponent.decorators = [
1392
- { type: core.Component, args: [{
1411
+ { type: i0.Component, args: [{
1393
1412
  // eslint-disable-next-line
1394
1413
  host: { class: LEGEND_SERIES_CLASS_NAME },
1395
1414
  selector: "nui-legend-series",
1396
1415
  template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\"\n>\n <div class=\"nui-legend-series__tile-wrapper\">\n <div class=\"nui-legend-series__tile\">\n <ng-content></ng-content>\n </div>\n <div\n class=\"nui-legend-series__checkbox-wrapper\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\"\n >\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"hasInputDescription(); else descriptionTemplate\"\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\"\n >\n <div\n *ngIf=\"!!descriptionPrimary\"\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\"\n >\n {{ descriptionPrimary }}\n </div>\n <div\n *ngIf=\"!!descriptionSecondary\"\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\"\n >\n {{ descriptionSecondary }}\n </div>\n </div>\n</div>\n<ng-template #descriptionTemplate>\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n</ng-template>\n",
1397
- changeDetection: core.ChangeDetectionStrategy.OnPush
1416
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1398
1417
  },] }
1399
1418
  ];
1400
1419
  LegendSeriesComponent.ctorParameters = function () { return [
1401
- { type: LegendComponent, decorators: [{ type: core.Optional }, { type: core.Host }] }
1420
+ { type: LegendComponent, decorators: [{ type: i0.Optional }, { type: i0.Host }] }
1402
1421
  ]; };
1403
1422
  LegendSeriesComponent.propDecorators = {
1404
- active: [{ type: core.Input }],
1405
- interactive: [{ type: core.Input }],
1406
- isSelected: [{ type: core.Input }],
1407
- isSelectedChange: [{ type: core.Output }],
1408
- descriptionPrimary: [{ type: core.Input }],
1409
- descriptionSecondary: [{ type: core.Input }],
1410
- icon: [{ type: core.Input }],
1411
- color: [{ type: core.Input }],
1412
- seriesRenderState: [{ type: core.Input }],
1413
- projectedDescription: [{ type: core.ViewChild, args: ["projectedDescription",] }],
1414
- isInteractiveClassApplied: [{ type: core.HostBinding, args: ["class." + LEGEND_SERIES_CLASS_NAME + "--interactive",] }],
1415
- isHorizontalClassApplied: [{ type: core.HostBinding, args: ["class." + LEGEND_SERIES_CLASS_NAME + "--horizontal",] }],
1416
- isActiveClassApplied: [{ type: core.HostBinding, args: ["class.inverse",] }],
1417
- onClick: [{ type: core.HostListener, args: ["click",] }]
1423
+ active: [{ type: i0.Input }],
1424
+ interactive: [{ type: i0.Input }],
1425
+ isSelected: [{ type: i0.Input }],
1426
+ isSelectedChange: [{ type: i0.Output }],
1427
+ descriptionPrimary: [{ type: i0.Input }],
1428
+ descriptionSecondary: [{ type: i0.Input }],
1429
+ icon: [{ type: i0.Input }],
1430
+ color: [{ type: i0.Input }],
1431
+ seriesRenderState: [{ type: i0.Input }],
1432
+ projectedDescription: [{ type: i0.ViewChild, args: ["projectedDescription",] }],
1433
+ isInteractiveClassApplied: [{ type: i0.HostBinding, args: ["class." + LEGEND_SERIES_CLASS_NAME + "--interactive",] }],
1434
+ isHorizontalClassApplied: [{ type: i0.HostBinding, args: ["class." + LEGEND_SERIES_CLASS_NAME + "--horizontal",] }],
1435
+ isActiveClassApplied: [{ type: i0.HostBinding, args: ["class.inverse",] }],
1436
+ onClick: [{ type: i0.HostListener, args: ["click",] }]
1418
1437
  };
1419
1438
 
1420
1439
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1424,10 +1443,10 @@
1424
1443
  return BasicLegendTileComponent;
1425
1444
  }());
1426
1445
  BasicLegendTileComponent.decorators = [
1427
- { type: core.Component, args: [{
1446
+ { type: i0.Component, args: [{
1428
1447
  selector: "nui-basic-legend-tile",
1429
1448
  template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n",
1430
- encapsulation: core.ViewEncapsulation.Emulated,
1449
+ encapsulation: i0.ViewEncapsulation.Emulated,
1431
1450
  styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"]
1432
1451
  },] }
1433
1452
  ];
@@ -1463,23 +1482,23 @@
1463
1482
  return RichLegendTileComponent;
1464
1483
  }());
1465
1484
  RichLegendTileComponent.decorators = [
1466
- { type: core.Component, args: [{
1485
+ { type: i0.Component, args: [{
1467
1486
  selector: "nui-rich-legend-tile",
1468
1487
  template: "<div\n class=\"nui-rich-legend-tile\"\n [class.nui-rich-legend-tile--has-point-marker]=\"\n rightEdge.children.length > 0\n \"\n [class.nui-rich-legend-tile--series-has-additional-content]=\"\n seriesHasAdditionalContent\n \"\n>\n <div\n class=\"nui-rich-legend-tile__tilebox d-flex justify-content-center align-items-end flex-column\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n [style.color]=\"color\"\n >\n <div\n *ngIf=\"hasInputValue(); else projectedTopContent\"\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\"\n >\n {{ value }}\n </div>\n <div\n *ngIf=\"hasInputUnitLabel(); else projectedBottomContent\"\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\"\n >\n {{ unitLabel }}\n </div>\n <ng-content></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__icon\" #icon>\n <ng-content select=\"[leftEdge]\"></ng-content>\n </div>\n <div class=\"nui-rich-legend-tile__point-marker\" #rightEdge>\n <ng-content select=\"[rightEdge]\"></ng-content>\n </div>\n</div>\n<ng-template #projectedTopContent>\n <ng-content select=\"[top]\"></ng-content>\n</ng-template>\n<ng-template #projectedBottomContent>\n <ng-content select=\"[bottom]\"></ng-content>\n</ng-template>\n",
1469
- encapsulation: core.ViewEncapsulation.Emulated,
1488
+ encapsulation: i0.ViewEncapsulation.Emulated,
1470
1489
  styles: [".nui-rich-legend-tile{position:relative;width:60px;height:100%;line-height:18px}.nui-rich-legend-tile :empty{display:none}.nui-rich-legend-tile__tilebox{width:100%;height:100%;padding:0 5px;background-color:var(--nui-color-bg-light,#fff)}.nui-rich-legend-tile__ellipsified{max-width:100%;overflow:hidden;text-overflow:ellipsis}.nui-rich-legend-tile__tilebox-value{text-align:right;font-weight:600}.nui-rich-legend-tile__tilebox-value:not(:last-child){margin-bottom:-3px}.nui-rich-legend-tile__tilebox-unit{text-align:right;font-size:11px}.nui-rich-legend-tile__tilebox-unit:not(:first-child){margin-top:-3px}.nui-rich-legend-tile__point-marker,.nui-rich-legend-tile__icon{position:absolute;line-height:0;top:50%;pointer-events:none}.nui-rich-legend-tile__point-marker{right:0;transform:translate(50%,-50%)}.nui-rich-legend-tile__icon{left:0;transform:translate(-50%,-50%)}.nui-rich-legend-tile--has-point-marker.nui-rich-legend-tile--series-has-additional-content{margin-right:5px}.nui-rich-legend-tile--has-point-marker .nui-rich-legend-tile__tilebox{padding-right:7px}\n"]
1471
1490
  },] }
1472
1491
  ];
1473
1492
  RichLegendTileComponent.ctorParameters = function () { return [
1474
- { type: LegendSeriesComponent, decorators: [{ type: core.Host }] },
1475
- { type: LegendComponent, decorators: [{ type: core.Optional }, { type: core.Host }] },
1476
- { type: core.ChangeDetectorRef }
1493
+ { type: LegendSeriesComponent, decorators: [{ type: i0.Host }] },
1494
+ { type: LegendComponent, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
1495
+ { type: i0.ChangeDetectorRef }
1477
1496
  ]; };
1478
1497
  RichLegendTileComponent.propDecorators = {
1479
- unitLabel: [{ type: core.Input }],
1480
- value: [{ type: core.Input }],
1481
- backgroundColor: [{ type: core.Input }],
1482
- color: [{ type: core.Input }]
1498
+ unitLabel: [{ type: i0.Input }],
1499
+ value: [{ type: i0.Input }],
1500
+ backgroundColor: [{ type: i0.Input }],
1501
+ color: [{ type: i0.Input }]
1483
1502
  };
1484
1503
 
1485
1504
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -3871,7 +3890,7 @@
3871
3890
  }());
3872
3891
  ThresholdsService.SERIES_ID_SUFFIX = "__thresholds-background";
3873
3892
  ThresholdsService.decorators = [
3874
- { type: core.Injectable }
3893
+ { type: i0.Injectable }
3875
3894
  ];
3876
3895
  ThresholdsService.ctorParameters = function () { return [
3877
3896
  { type: bits.LoggerService }
@@ -3884,7 +3903,7 @@
3884
3903
  return NuiChartsModule;
3885
3904
  }());
3886
3905
  NuiChartsModule.decorators = [
3887
- { type: core.NgModule, args: [{
3906
+ { type: i0.NgModule, args: [{
3888
3907
  imports: [bits.NuiCommonModule, bits.NuiIconModule, bits.NuiPopoverModule, overlay.OverlayModule],
3889
3908
  declarations: [
3890
3909
  LegendComponent,
@@ -9939,6 +9958,384 @@
9939
9958
  enableExternalEvents: false,
9940
9959
  };
9941
9960
 
9961
+ var TimeseriesZoomPlugin = /** @class */ (function (_super) {
9962
+ __extends(TimeseriesZoomPlugin, _super);
9963
+ function TimeseriesZoomPlugin(config, syncService) {
9964
+ var _c;
9965
+ if (config === void 0) { config = {}; }
9966
+ var _this = this;
9967
+ var _a;
9968
+ _this = _super.call(this) || this;
9969
+ _this.config = config;
9970
+ _this.syncService = syncService;
9971
+ _this.destroy$ = new rxjs.Subject();
9972
+ _this.isChartHoverd = false;
9973
+ _this.isPopoverDisplayed = false;
9974
+ _this.openPopoverSubject = new rxjs.Subject();
9975
+ _this.openPopover$ = _this.openPopoverSubject
9976
+ .asObservable()
9977
+ .pipe(operators.takeUntil(_this.destroy$));
9978
+ _this.closePopoverSubject = new rxjs.Subject();
9979
+ _this.closePopover$ = _this.closePopoverSubject
9980
+ .asObservable()
9981
+ .pipe(operators.takeUntil(_this.destroy$));
9982
+ _this.zoomCreatedSubject = new rxjs.Subject();
9983
+ _this.zoomCreated$ = _this.zoomCreatedSubject
9984
+ .asObservable()
9985
+ .pipe(operators.takeUntil(_this.destroy$));
9986
+ _this.resizeHandler = debounce__default["default"](function () {
9987
+ if (isUndefined__default["default"](_this.brushStartXDate) ||
9988
+ isUndefined__default["default"](_this.brushEndXDate)) {
9989
+ return;
9990
+ }
9991
+ // makes sure that popover is closed while resizing
9992
+ _this.moveBrushByDate(_this.brushStartXDate, _this.brushEndXDate);
9993
+ _this.closePopover();
9994
+ }, 10);
9995
+ _this.onBrushStart = function (xCoord) {
9996
+ if (!isUndefined__default["default"](_this.brushStartXCoord)) {
9997
+ // brush already exist, clear first
9998
+ _this.clearBrush();
9999
+ }
10000
+ _this.brushStartXCoord = xCoord;
10001
+ _this.brushStartXDate = _this.getDateFromCoord(xCoord);
10002
+ _this.addZoomBoundaryLine(_this.brushStartXDate, _this.brushStartXCoord);
10003
+ };
10004
+ // event that is triggered when hovering over chart
10005
+ _this.onBrushMove = function (xCoord) {
10006
+ if (isUndefined__default["default"](_this.brushStartXCoord)) {
10007
+ return;
10008
+ }
10009
+ if (isUndefined__default["default"](_this.brushEndXCoord)) {
10010
+ var selection = [_this.brushStartXCoord, xCoord].sort(function (a, b) { return a - b; });
10011
+ _this.brush.move(_this.brushElement, selection);
10012
+ }
10013
+ // if the zoom brush is displayed, shows and hides the popover when hovering over zoom area
10014
+ if (!isUndefined__default["default"](_this.brushStartXCoord) &&
10015
+ !isUndefined__default["default"](_this.brushEndXCoord)) {
10016
+ if (xCoord >= _this.brushStartXCoord &&
10017
+ xCoord <= _this.brushEndXCoord) {
10018
+ _this.showPopover();
10019
+ }
10020
+ else {
10021
+ _this.closePopover();
10022
+ }
10023
+ }
10024
+ };
10025
+ _this.onBrushEnd = function (xCoord) {
10026
+ if (isUndefined__default["default"](_this.brushStartXCoord)) {
10027
+ return;
10028
+ }
10029
+ var date = _this.getDateFromCoord(xCoord);
10030
+ _this.addZoomBoundaryLine(date, xCoord);
10031
+ if (_this.brushStartXCoord > xCoord) {
10032
+ // updates position incase dragging from right to left
10033
+ _this.brushEndXCoord = _this.brushStartXCoord;
10034
+ _this.brushStartXCoord = xCoord;
10035
+ _this.brushEndXDate = _this.brushStartXDate;
10036
+ _this.brushStartXDate = date;
10037
+ }
10038
+ else {
10039
+ _this.brushEndXCoord = xCoord;
10040
+ _this.brushEndXDate = date;
10041
+ }
10042
+ if (_this.isChartHoverd) {
10043
+ _this.zoomCreatedSubject.next();
10044
+ }
10045
+ };
10046
+ _this.config = defaultsDeep__default["default"](_this.config, TimeseriesZoomPlugin.DEFAULT_CONFIG);
10047
+ // registers handlers
10048
+ _this.interactionHandlerMap = (_c = {},
10049
+ _c[exports.InteractionType.MouseDown] = _this.onBrushStart,
10050
+ _c[exports.InteractionType.MouseMove] = _this.onBrushMove,
10051
+ _c[exports.InteractionType.MouseUp] = _this.onBrushEnd,
10052
+ _c);
10053
+ if (_this.config.collectionId) {
10054
+ (_a = _this.syncService) === null || _a === void 0 ? void 0 : _a.registerPlugin(_this.config.collectionId, _this);
10055
+ }
10056
+ return _this;
10057
+ }
10058
+ TimeseriesZoomPlugin.prototype.initialize = function () {
10059
+ var _this = this;
10060
+ this.grid = this.chart.getGrid();
10061
+ this.zoomBrushLayer = this.grid.getLasagna().addLayer({
10062
+ name: TimeseriesZoomPlugin.LAYER_NAME,
10063
+ // add 1 to the foreground layer's order to ensure the brush is rendered in front of it
10064
+ order: STANDARD_RENDER_LAYERS[exports.RenderLayerName.foreground].order + 1,
10065
+ clipped: true,
10066
+ });
10067
+ this.zoomLineLayer = this.chart.getGrid().getLasagna().addLayer({
10068
+ name: "zoom-interaction-line",
10069
+ order: 900,
10070
+ clipped: true,
10071
+ });
10072
+ this.chart
10073
+ .getEventBus()
10074
+ .getStream(INTERACTION_COORDINATES_EVENT)
10075
+ .pipe(operators.takeUntil(this.destroy$))
10076
+ .subscribe(function (chartEvent) {
10077
+ if (chartEvent.broadcast && !_this.config.enableExternalEvents) {
10078
+ return;
10079
+ }
10080
+ var data = chartEvent.data;
10081
+ if (isEmpty__default["default"](_this.grid.scales) || isEmpty__default["default"](data.coordinates)) {
10082
+ return;
10083
+ }
10084
+ if (_this.interactionHandlerMap[data.interactionType]) {
10085
+ var xCoord = data.coordinates && data.coordinates.x;
10086
+ var yCoord = data.coordinates && data.coordinates.y;
10087
+ _this.interactionHandlerMap[data.interactionType](xCoord, yCoord);
10088
+ }
10089
+ });
10090
+ this.chart
10091
+ .getEventBus()
10092
+ .getStream(INTERACTION_VALUES_EVENT)
10093
+ .pipe(operators.takeUntil(this.destroy$))
10094
+ .subscribe(function (event) {
10095
+ var _a;
10096
+ // detects hovering on different charts and closes popover
10097
+ if ((_a = event.data.values) === null || _a === void 0 ? void 0 : _a.x) {
10098
+ var chartGrid = _this.grid;
10099
+ var eventXAxisIds = Object.keys(event.data.values.x);
10100
+ var chartLeftXAxis = chartGrid.scales.x.list[0];
10101
+ // shows popover only for a chart that is currently being hovered
10102
+ if (chartLeftXAxis.isTimeseriesScale &&
10103
+ !eventXAxisIds.includes(chartLeftXAxis.id)) {
10104
+ _this.isChartHoverd = false;
10105
+ _this.closePopover();
10106
+ }
10107
+ else {
10108
+ _this.isChartHoverd = true;
10109
+ }
10110
+ }
10111
+ });
10112
+ this.brush = d3Brush.brushX();
10113
+ this.brushElement = this.zoomBrushLayer
10114
+ .append("g")
10115
+ .attr("class", "brush");
10116
+ // engage pointer capture to confine mouse events to the interactive area
10117
+ // (in other words, if the 'mouseup' is physically triggered outside the interactive area,
10118
+ // the pointer capture allows us to still zoom based on that event)
10119
+ this.chart
10120
+ .getGrid()
10121
+ .getInteractiveArea()
10122
+ .on("pointerdown", function () { return d3Selection.event.target.setPointerCapture(d3Selection.event.pointerId); })
10123
+ .on("pointerup", function () { return d3Selection.event.target.releasePointerCapture(d3Selection.event.pointerId); });
10124
+ };
10125
+ TimeseriesZoomPlugin.prototype.updateDimensions = function () {
10126
+ var _a, _b;
10127
+ var dimension = (_b = (_a = this.grid) === null || _a === void 0 ? void 0 : _a.config()) === null || _b === void 0 ? void 0 : _b.dimension;
10128
+ if (this.grid) {
10129
+ this.xScale = find__default["default"](this.grid.scales["x"].index, {
10130
+ id: this.grid.bottomScaleId,
10131
+ });
10132
+ }
10133
+ if (!dimension) {
10134
+ return;
10135
+ }
10136
+ // set the brush area's dimensions
10137
+ this.brush.extent([
10138
+ [0, 0],
10139
+ [dimension.width(), dimension.height()],
10140
+ ]);
10141
+ // render the brush area after we have dimensions
10142
+ this.brush(this.zoomBrushLayer.select(".brush"));
10143
+ // prevent the brush from handling its own pointer events
10144
+ this.brushElement.select(".overlay").style("pointer-events", "none");
10145
+ // remove stroke per mockups
10146
+ this.brushElement.select(".selection").attr("stroke", null);
10147
+ // makes sure that zoom brush gets correctly resized when chart's dimension changes
10148
+ this.resizeHandler();
10149
+ };
10150
+ TimeseriesZoomPlugin.prototype.destroy = function () {
10151
+ var _a;
10152
+ if (this.config.collectionId) {
10153
+ (_a = this.syncService) === null || _a === void 0 ? void 0 : _a.removePlugin(this.config.collectionId, this);
10154
+ }
10155
+ this.clearBrush();
10156
+ this.grid.getLasagna().removeLayer(TimeseriesZoomPlugin.LAYER_NAME);
10157
+ this.destroy$.next();
10158
+ this.destroy$.complete();
10159
+ };
10160
+ TimeseriesZoomPlugin.prototype.showPopover = function () {
10161
+ if (!this.isChartHoverd ||
10162
+ this.isPopoverDisplayed ||
10163
+ (isUndefined__default["default"](this.brushStartXCoord) &&
10164
+ isUndefined__default["default"](this.brushEndXCoord))) {
10165
+ return;
10166
+ }
10167
+ this.isPopoverDisplayed = true;
10168
+ this.openPopoverSubject.next(this.brushEndXCoord);
10169
+ };
10170
+ TimeseriesZoomPlugin.prototype.closePopover = function () {
10171
+ if (!this.isPopoverDisplayed) {
10172
+ return;
10173
+ }
10174
+ this.isPopoverDisplayed = false;
10175
+ this.closePopoverSubject.next();
10176
+ };
10177
+ TimeseriesZoomPlugin.prototype.moveBrushByDate = function (startDate, endDate) {
10178
+ var startXCoord = this.xScale.convert(startDate);
10179
+ var endXCoord = this.xScale.convert(endDate);
10180
+ // brush is already in the correct position
10181
+ if (this.brushStartXCoord === startXCoord &&
10182
+ this.brushEndXCoord === endXCoord) {
10183
+ return;
10184
+ }
10185
+ // in case brush doesn't exist yet
10186
+ if (isUndefined__default["default"](this.brushStartXCoord) &&
10187
+ isUndefined__default["default"](this.brushStartXCoord)) {
10188
+ this.createBrushWithoutDrag(startXCoord, endXCoord);
10189
+ return;
10190
+ }
10191
+ this.moveBrush(startDate, endDate, startXCoord, endXCoord);
10192
+ };
10193
+ TimeseriesZoomPlugin.prototype.moveBrushByCoord = function (startX, endX) {
10194
+ if (isUndefined__default["default"](startX) || isUndefined__default["default"](endX)) {
10195
+ return;
10196
+ }
10197
+ // brush is already in the correct position
10198
+ if (startX === this.brushStartXCoord && endX === this.brushEndXCoord) {
10199
+ return;
10200
+ }
10201
+ // in case brush doesn't exist yet
10202
+ if (isUndefined__default["default"](this.brushStartXCoord) &&
10203
+ isUndefined__default["default"](this.brushEndXCoord)) {
10204
+ this.createBrushWithoutDrag(startX, endX);
10205
+ return;
10206
+ }
10207
+ var startDate = this.getDateFromCoord(startX);
10208
+ var endDate = this.getDateFromCoord(endX);
10209
+ this.moveBrush(startDate, endDate, startX, endX);
10210
+ };
10211
+ TimeseriesZoomPlugin.prototype.clearBrush = function () {
10212
+ this.brush.move(this.brushElement, null);
10213
+ this.zoomLineLayer
10214
+ .selectAll("." + TimeseriesZoomPlugin.LAYER_NAME)
10215
+ .remove();
10216
+ this.brushEndXCoord = undefined;
10217
+ this.brushStartXCoord = undefined;
10218
+ this.brushStartXDate = undefined;
10219
+ this.brushEndXDate = undefined;
10220
+ this.closePopover();
10221
+ };
10222
+ TimeseriesZoomPlugin.prototype.getInspectionFrame = function () {
10223
+ return {
10224
+ startDate: this.brushStartXDate,
10225
+ endDate: this.brushEndXDate,
10226
+ };
10227
+ };
10228
+ TimeseriesZoomPlugin.prototype.getDateFromCoord = function (xCoord) {
10229
+ var xScaleValue = UtilityService.getScaleValues([this.xScale], xCoord);
10230
+ return moment__default["default"](UtilityService.getInteractionValues(xScaleValue, this.xScale.id));
10231
+ };
10232
+ TimeseriesZoomPlugin.prototype.addZoomBoundaryLine = function (xDate, xCoord) {
10233
+ var line = this.zoomLineLayer
10234
+ .selectAll(TimeseriesZoomPlugin.LAYER_NAME)
10235
+ .data([xDate]);
10236
+ var attrs = {
10237
+ class: TimeseriesZoomPlugin.LAYER_NAME,
10238
+ x1: xCoord,
10239
+ y1: 0,
10240
+ x2: xCoord,
10241
+ y2: this.chart.getGrid().config().dimension.height(),
10242
+ };
10243
+ line.enter()
10244
+ .append("line")
10245
+ .merge(line)
10246
+ .attrs(attrs);
10247
+ line.exit().remove();
10248
+ };
10249
+ // simulates creating brash with mouse dragging
10250
+ TimeseriesZoomPlugin.prototype.createBrushWithoutDrag = function (startX, endX) {
10251
+ this.brushStartXCoord = startX;
10252
+ this.brushEndXCoord = endX;
10253
+ this.brushStartXDate = this.getDateFromCoord(startX);
10254
+ this.brushEndXDate = this.getDateFromCoord(endX);
10255
+ this.brush.move(this.brushElement, [startX, endX]);
10256
+ this.addZoomBoundaryLine(this.brushStartXDate, this.brushStartXCoord);
10257
+ this.addZoomBoundaryLine(this.brushEndXDate, this.brushEndXCoord);
10258
+ };
10259
+ TimeseriesZoomPlugin.prototype.moveBrush = function (startDate, endDate, startXCoord, endXCoord) {
10260
+ var nodes = this.zoomLineLayer
10261
+ .selectAll("." + TimeseriesZoomPlugin.LAYER_NAME)
10262
+ .nodes();
10263
+ if (nodes.length !== 2) {
10264
+ return;
10265
+ }
10266
+ // moves boundary lines
10267
+ nodes[0].setAttribute("x1", startXCoord.toString());
10268
+ nodes[0].setAttribute("x2", startXCoord.toString());
10269
+ nodes[1].setAttribute("x1", endXCoord.toString());
10270
+ nodes[1].setAttribute("x2", endXCoord.toString());
10271
+ // moves brush
10272
+ this.brush.move(this.brushElement, [
10273
+ startXCoord,
10274
+ endXCoord,
10275
+ ]);
10276
+ this.brushStartXCoord = startXCoord;
10277
+ this.brushStartXDate = startDate;
10278
+ this.brushEndXCoord = endXCoord;
10279
+ this.brushEndXDate = endDate;
10280
+ };
10281
+ return TimeseriesZoomPlugin;
10282
+ }(ChartPlugin));
10283
+ TimeseriesZoomPlugin.LAYER_NAME = "timeseries-zoom-brush";
10284
+ TimeseriesZoomPlugin.DEFAULT_CONFIG = {
10285
+ enableExternalEvents: true,
10286
+ collectionId: "",
10287
+ };
10288
+
10289
+ var TimeseriesZoomPluginsSyncService = /** @class */ (function () {
10290
+ function TimeseriesZoomPluginsSyncService() {
10291
+ this.collections = {};
10292
+ }
10293
+ TimeseriesZoomPluginsSyncService.prototype.registerPlugin = function (collectionId, plugin) {
10294
+ var collection = this.collections[collectionId];
10295
+ if (!collection) {
10296
+ this.collections[collectionId] = [plugin];
10297
+ }
10298
+ else {
10299
+ this.collections[collectionId].push(plugin);
10300
+ }
10301
+ };
10302
+ TimeseriesZoomPluginsSyncService.prototype.getPlugins = function (collectionId) {
10303
+ var _a;
10304
+ return (_a = this.collections[collectionId]) !== null && _a !== void 0 ? _a : [];
10305
+ };
10306
+ TimeseriesZoomPluginsSyncService.prototype.removePlugin = function (collectionId, plugin) {
10307
+ if (!this.collections[collectionId]) {
10308
+ return;
10309
+ }
10310
+ var collection = __spreadArray([], __read(this.collections[collectionId]));
10311
+ var idx = collection.findIndex(function (p) { return p === plugin; });
10312
+ if (idx === -1) {
10313
+ return;
10314
+ }
10315
+ collection.splice(idx, 1);
10316
+ this.collections[collectionId] = collection;
10317
+ };
10318
+ TimeseriesZoomPluginsSyncService.prototype.syncPositionInsideCollection = function (collectionId, startDate, endDate) {
10319
+ var collection = this.getPlugins(collectionId);
10320
+ setTimeout(function () {
10321
+ collection.forEach(function (plugin) {
10322
+ plugin.moveBrushByDate(startDate, endDate);
10323
+ });
10324
+ });
10325
+ };
10326
+ TimeseriesZoomPluginsSyncService.prototype.clearZoomInsideCollection = function (collectionId) {
10327
+ var collection = this.getPlugins(collectionId);
10328
+ collection.forEach(function (plugin) {
10329
+ plugin.clearBrush();
10330
+ });
10331
+ };
10332
+ return TimeseriesZoomPluginsSyncService;
10333
+ }());
10334
+ TimeseriesZoomPluginsSyncService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TimeseriesZoomPluginsSyncService_Factory() { return new TimeseriesZoomPluginsSyncService(); }, token: TimeseriesZoomPluginsSyncService, providedIn: "root" });
10335
+ TimeseriesZoomPluginsSyncService.decorators = [
10336
+ { type: i0.Injectable, args: [{ providedIn: "root" },] }
10337
+ ];
10338
+
9942
10339
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
9943
10340
 
9944
10341
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -11037,6 +11434,8 @@
11037
11434
  exports.ThresholdsService = ThresholdsService;
11038
11435
  exports.TimeIntervalScale = TimeIntervalScale;
11039
11436
  exports.TimeScale = TimeScale;
11437
+ exports.TimeseriesZoomPlugin = TimeseriesZoomPlugin;
11438
+ exports.TimeseriesZoomPluginsSyncService = TimeseriesZoomPluginsSyncService;
11040
11439
  exports.UtilityService = UtilityService;
11041
11440
  exports.VerticalBarAccessors = VerticalBarAccessors;
11042
11441
  exports.XYAccessors = XYAccessors;