@nova-ui/charts 21.0.1 → 21.0.4

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,7 +2,7 @@ import * as i1$1 from '@angular/cdk/overlay';
2
2
  import { OverlayModule } from '@angular/cdk/overlay';
3
3
  import { ComponentPortal } from '@angular/cdk/portal';
4
4
  import * as i0 from '@angular/core';
5
- import { Input, ChangeDetectionStrategy, Component, Directive, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, forwardRef, Injectable, Inject, ViewEncapsulation, HostListener, HostBinding, Optional, Host, NgModule } from '@angular/core';
5
+ import { Input, ChangeDetectionStrategy, Component, Directive, InjectionToken, ViewChildren, EventEmitter, ViewChild, Output, forwardRef, HostBinding, Injectable, Inject, ViewEncapsulation, HostListener, Optional, Host, NgModule } from '@angular/core';
6
6
  import { Subject, BehaviorSubject, of } from 'rxjs';
7
7
  import { trigger, transition, style, animate } from '@angular/animations';
8
8
  import * as i1 from '@angular/common';
@@ -69,8 +69,8 @@ import findIndex from 'lodash/findIndex';
69
69
  // THE SOFTWARE.
70
70
  class ChartTooltipComponent {
71
71
  template;
72
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: ChartTooltipComponent, isStandalone: false, selector: "nui-chart-tooltip", inputs: { template: "template" }, ngImport: i0, 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", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ChartTooltipComponent, isStandalone: false, selector: "nui-chart-tooltip", inputs: { template: "template" }, ngImport: i0, template: "<div>\n <!-- TODO: NUI-6278 - Keyboard access to chart tooltip content (WCAG 2.1.1) -->\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", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
74
74
  trigger("tooltip", [
75
75
  transition(":enter", [
76
76
  style({ opacity: 0 }),
@@ -80,7 +80,7 @@ class ChartTooltipComponent {
80
80
  ]),
81
81
  ], changeDetection: i0.ChangeDetectionStrategy.OnPush });
82
82
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipComponent, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipComponent, decorators: [{
84
84
  type: Component,
85
85
  args: [{ selector: "nui-chart-tooltip", changeDetection: ChangeDetectionStrategy.OnPush, animations: [
86
86
  trigger("tooltip", [
@@ -90,7 +90,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
90
90
  ]),
91
91
  transition(":leave", [animate(300, style({ opacity: 0 }))]),
92
92
  ]),
93
- ], standalone: false, 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", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"] }]
93
+ ], standalone: false, template: "<div>\n <!-- TODO: NUI-6278 - Keyboard access to chart tooltip content (WCAG 2.1.1) -->\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", styles: [":host{display:block;pointer-events:none}.nui-chart-tooltip{background-color:var(--nui-color-bg-inverse,#111);color:var(--nui-color-text-inverse,#fff);line-height:normal}\n"] }]
94
94
  }], propDecorators: { template: [{
95
95
  type: Input
96
96
  }] } });
@@ -145,6 +145,11 @@ class ChartTooltipDirective {
145
145
  positionStrategy: this.positionStrategy,
146
146
  scrollStrategy: this.scrollStrategyOptions.close(),
147
147
  });
148
+ // a11y: the overlay element persists in the DOM between show/hide cycles.
149
+ // Setting aria-live here (not on the component) ensures the live region is
150
+ // registered once and reliably announces tooltip content to screen readers.
151
+ this.overlayRef.overlayElement.setAttribute("aria-live", "polite");
152
+ this.overlayRef.overlayElement.setAttribute("aria-atomic", "true");
148
153
  if (this.openRemoteControl) {
149
154
  this.openSubscription = this.openRemoteControl.subscribe(() => {
150
155
  this.show();
@@ -179,10 +184,10 @@ class ChartTooltipDirective {
179
184
  getOverlayElement() {
180
185
  return this.overlayRef.overlayElement;
181
186
  }
182
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i1$1.OverlayPositionBuilder }, { token: i1$1.ScrollStrategyOptions }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
183
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: ChartTooltipDirective, isStandalone: false, selector: "[nuiChartTooltip]", inputs: { template: "template", openRemoteControl: "openRemoteControl", closeRemoteControl: "closeRemoteControl", positions: "positions" }, ngImport: i0 });
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i1$1.OverlayPositionBuilder }, { token: i1$1.ScrollStrategyOptions }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
188
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: ChartTooltipDirective, isStandalone: false, selector: "[nuiChartTooltip]", inputs: { template: "template", openRemoteControl: "openRemoteControl", closeRemoteControl: "closeRemoteControl", positions: "positions" }, ngImport: i0 });
184
189
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipDirective, decorators: [{
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipDirective, decorators: [{
186
191
  type: Directive,
187
192
  args: [{
188
193
  selector: "[nuiChartTooltip]",
@@ -856,12 +861,12 @@ class ChartDonutContentComponent {
856
861
  this.contentPositionUpdateSubscription.unsubscribe();
857
862
  }
858
863
  }
859
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartDonutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
860
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartDonutContentComponent, isStandalone: false, selector: "nui-chart-donut-content", inputs: { plugin: "plugin" }, usesOnChanges: true, ngImport: i0, template: "@if (plugin && contentPosition) {\n<div\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}\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"] });
864
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartDonutContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
865
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ChartDonutContentComponent, isStandalone: false, selector: "nui-chart-donut-content", inputs: { plugin: "plugin" }, usesOnChanges: true, ngImport: i0, template: "@if (plugin && contentPosition) {\n<div\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 <ng-content></ng-content>\n</div>\n}\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"] });
861
866
  }
862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartDonutContentComponent, decorators: [{
867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartDonutContentComponent, decorators: [{
863
868
  type: Component,
864
- args: [{ selector: "nui-chart-donut-content", standalone: false, template: "@if (plugin && contentPosition) {\n<div\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}\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"] }]
869
+ args: [{ selector: "nui-chart-donut-content", standalone: false, template: "@if (plugin && contentPosition) {\n<div\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 <ng-content></ng-content>\n</div>\n}\n", styles: [".nui-chart-donut-content{position:absolute;pointer-events:auto;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis}\n"] }]
865
870
  }], propDecorators: { plugin: [{
866
871
  type: Input
867
872
  }] } });
@@ -978,7 +983,7 @@ class ChartTooltipsPlugin extends ChartPlugin {
978
983
  .getStream(SERIES_STATE_CHANGE_EVENT)
979
984
  .pipe(takeUntil(this.destroy$))
980
985
  .subscribe((event) => {
981
- event.data.forEach((series) => {
986
+ event.data.forEach(series => {
982
987
  this.seriesVisibilityMap[series.seriesId] =
983
988
  series.state !== RenderState.hidden;
984
989
  });
@@ -1017,7 +1022,7 @@ class ChartTooltipsPlugin extends ChartPlugin {
1017
1022
  x: bbox.left - offsetParentBbox.left,
1018
1023
  y: bbox.top - offsetParentBbox.top,
1019
1024
  };
1020
- each(Object.keys(this.dataPoints), (seriesId) => {
1025
+ each(Object.keys(this.dataPoints), seriesId => {
1021
1026
  const dataPoint = this.dataPoints[seriesId];
1022
1027
  const chartSeries = this.chart
1023
1028
  .getDataManager()
@@ -1122,7 +1127,7 @@ class ChartTooltipsComponent {
1122
1127
  handleOpen() {
1123
1128
  this.changeDetector.detectChanges();
1124
1129
  const currentTooltipDirectivesIndex = {};
1125
- this.tooltips.forEach((tooltip) => {
1130
+ this.tooltips.forEach(tooltip => {
1126
1131
  // this is how we identify which series does the tooltip belong to
1127
1132
  const seriesId = tooltip.elementRef.nativeElement.getAttribute("series-id") ??
1128
1133
  undefined;
@@ -1167,7 +1172,7 @@ class ChartTooltipsComponent {
1167
1172
  avoidTooltipCollisions() {
1168
1173
  // extracted tooltip positions from tooltip directives
1169
1174
  const tooltipPositions = {};
1170
- this.tooltips.forEach((tooltip) => {
1175
+ this.tooltips.forEach(tooltip => {
1171
1176
  const element = tooltip.getOverlayElement();
1172
1177
  // this is how we identify which series does the tooltip belong to
1173
1178
  const seriesId = tooltip.elementRef.nativeElement.getAttribute("series-id") ??
@@ -1196,7 +1201,7 @@ class ChartTooltipsComponent {
1196
1201
  * @param tooltipPositions
1197
1202
  */
1198
1203
  startSimulation(tooltipIndex, tooltipPositions) {
1199
- const nodes = Object.keys(tooltipPositions).map((seriesId) => {
1204
+ const nodes = Object.keys(tooltipPositions).map(seriesId => {
1200
1205
  const position = tooltipPositions[seriesId];
1201
1206
  if (isNil(position.height) || isNil(position.width)) {
1202
1207
  throw new Error("Position height or width are not defined");
@@ -1235,12 +1240,12 @@ class ChartTooltipsComponent {
1235
1240
  isVertical() {
1236
1241
  return this.plugin.orientation === "right";
1237
1242
  }
1238
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1239
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartTooltipsComponent, isStandalone: false, selector: "nui-chart-tooltips", inputs: { plugin: "plugin", template: "template" }, viewQueries: [{ propertyName: "tooltips", predicate: ChartTooltipDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (plugin && plugin.dataPoints) {\n<div>\n @for (item of plugin.dataPoints | keyvalue; track trackByFn($index, item)) {\n <div>\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"\n ></ng-container>\n </ng-template>\n @if (plugin.dataPointPositions[item.key]) {\n <div\n nuiChartTooltip\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 }\n </div>\n }\n</div>\n}\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[nuiChartTooltip]", inputs: ["template", "openRemoteControl", "closeRemoteControl", "positions"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }] });
1243
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1244
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ChartTooltipsComponent, isStandalone: false, selector: "nui-chart-tooltips", inputs: { plugin: "plugin", template: "template" }, viewQueries: [{ propertyName: "tooltips", predicate: ChartTooltipDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (plugin && plugin.dataPoints) {\n<div>\n @for (item of plugin.dataPoints | keyvalue; track trackByFn($index, item)) {\n <div>\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"></ng-container>\n </ng-template>\n @if (plugin.dataPointPositions[item.key]) {\n <div\n nuiChartTooltip\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\"></div>\n }\n </div>\n }\n</div>\n}\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ChartTooltipDirective, selector: "[nuiChartTooltip]", inputs: ["template", "openRemoteControl", "closeRemoteControl", "positions"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }] });
1240
1245
  }
1241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartTooltipsComponent, decorators: [{
1246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartTooltipsComponent, decorators: [{
1242
1247
  type: Component,
1243
- args: [{ selector: "nui-chart-tooltips", standalone: false, template: "@if (plugin && plugin.dataPoints) {\n<div>\n @for (item of plugin.dataPoints | keyvalue; track trackByFn($index, item)) {\n <div>\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"\n ></ng-container>\n </ng-template>\n @if (plugin.dataPointPositions[item.key]) {\n <div\n nuiChartTooltip\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 }\n </div>\n }\n</div>\n}\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"] }]
1248
+ args: [{ selector: "nui-chart-tooltips", standalone: false, template: "@if (plugin && plugin.dataPoints) {\n<div>\n @for (item of plugin.dataPoints | keyvalue; track trackByFn($index, item)) {\n <div>\n <ng-template #tooltipTemplate>\n <ng-container\n *ngTemplateOutlet=\"template; context: { dataPoint: item.value }\"></ng-container>\n </ng-template>\n @if (plugin.dataPointPositions[item.key]) {\n <div\n nuiChartTooltip\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\"></div>\n }\n </div>\n }\n</div>\n}\n", styles: [".chart-tooltips__popover{position:absolute;pointer-events:none}\n"] }]
1244
1249
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { plugin: [{
1245
1250
  type: Input
1246
1251
  }], template: [{
@@ -1339,7 +1344,7 @@ class ChartPopoverPlugin extends ChartPlugin {
1339
1344
  if (!chartElement) {
1340
1345
  throw new Error("Chart parent node is not defined");
1341
1346
  }
1342
- const dataPointsLeft = Math.min(...valuesArray.map((d) => d.position.x));
1347
+ const dataPointsLeft = Math.min(...valuesArray.map(d => d.position.x));
1343
1348
  const left = chartElement.offsetLeft +
1344
1349
  this.chart.getGrid().config().dimension.margin.left +
1345
1350
  dataPointsLeft;
@@ -1351,7 +1356,7 @@ class ChartPopoverPlugin extends ChartPlugin {
1351
1356
  top: top,
1352
1357
  left: left,
1353
1358
  height: chartElement.offsetHeight,
1354
- width: Math.max(...valuesArray.map((d) => d.position.x + (d.position.width || 0))) - dataPointsLeft,
1359
+ width: Math.max(...valuesArray.map(d => d.position.x + (d.position.width || 0))) - dataPointsLeft,
1355
1360
  };
1356
1361
  }
1357
1362
  processDataPoints(dataPoints) {
@@ -1444,12 +1449,12 @@ class ChartPopoverComponent {
1444
1449
  this.update.next(this.plugin?.dataPoints);
1445
1450
  });
1446
1451
  }
1447
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1448
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartPopoverComponent, isStandalone: false, selector: "nui-chart-popover", inputs: { plugin: "plugin", template: "template" }, outputs: { update: "update" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (plugin) {\n<div>\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 <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}\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$2.PopoverComponent, selector: "nui-popover", inputs: ["closePopover", "openPopover", "disabled", "trigger", "template", "placement", "popoverTitle", "icon", "modal", "container", "hasPadding", "preventClosing", "unlimited", "delay", "withGrowAfterOpen", "popoverOverlayPosition"], outputs: ["shown", "hidden"] }] });
1452
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartPopoverComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1453
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ChartPopoverComponent, isStandalone: false, selector: "nui-chart-popover", inputs: { plugin: "plugin", template: "template" }, outputs: { update: "update" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (plugin) {\n<div>\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 </nui-popover>\n <ng-template #popoverTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { dataPoints: plugin.dataPoints }\n \"></ng-container>\n </ng-template>\n</div>\n}\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$2.PopoverComponent, selector: "nui-popover", inputs: ["closePopover", "openPopover", "disabled", "trigger", "template", "placement", "popoverTitle", "icon", "modal", "container", "hasPadding", "preventClosing", "unlimited", "delay", "withGrowAfterOpen", "popoverOverlayPosition"], outputs: ["shown", "hidden"] }] });
1449
1454
  }
1450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartPopoverComponent, decorators: [{
1455
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartPopoverComponent, decorators: [{
1451
1456
  type: Component,
1452
- args: [{ selector: "nui-chart-popover", standalone: false, template: "@if (plugin) {\n<div>\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 <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}\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"] }]
1457
+ args: [{ selector: "nui-chart-popover", standalone: false, template: "@if (plugin) {\n<div>\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 </nui-popover>\n <ng-template #popoverTemplate>\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: { dataPoints: plugin.dataPoints }\n \"></ng-container>\n </ng-template>\n</div>\n}\n", styles: [":host{position:absolute}.chart-popover__popover{position:absolute;pointer-events:none}\n"] }]
1453
1458
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { plugin: [{
1454
1459
  type: Input
1455
1460
  }], template: [{
@@ -1538,12 +1543,12 @@ class ChartMarkerComponent {
1538
1543
  this.changeDetector.markForCheck();
1539
1544
  });
1540
1545
  }
1541
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartMarkerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1542
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: ChartMarkerComponent, isStandalone: false, selector: "nui-chart-marker", inputs: { marker: "marker", drawLine: "drawLine", color: "color", maxSize: "maxSize" }, viewQueries: [{ propertyName: "svgContent", first: true, predicate: ["svgContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<svg [attr.width]=\"width\" [attr.height]=\"height\" [attr.viewBox]=\"viewBox\">\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] });
1546
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartMarkerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1547
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ChartMarkerComponent, isStandalone: false, selector: "nui-chart-marker", inputs: { marker: "marker", drawLine: "drawLine", color: "color", maxSize: "maxSize" }, viewQueries: [{ propertyName: "svgContent", first: true, predicate: ["svgContent"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<svg\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n [attr.viewBox]=\"viewBox\"\n aria-hidden=\"true\"\n>\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] });
1543
1548
  }
1544
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartMarkerComponent, decorators: [{
1549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartMarkerComponent, decorators: [{
1545
1550
  type: Component,
1546
- args: [{ selector: "nui-chart-marker", standalone: false, template: "<svg [attr.width]=\"width\" [attr.height]=\"height\" [attr.viewBox]=\"viewBox\">\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] }]
1551
+ args: [{ selector: "nui-chart-marker", standalone: false, template: "<svg\n [attr.width]=\"width\"\n [attr.height]=\"height\"\n [attr.viewBox]=\"viewBox\"\n aria-hidden=\"true\"\n>\n <g #svgContent></g>\n</svg>\n", styles: [":host{font-size:0}\n"] }]
1547
1552
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { marker: [{
1548
1553
  type: Input
1549
1554
  }], drawLine: [{
@@ -1581,6 +1586,18 @@ class ChartComponent {
1581
1586
  ngZone;
1582
1587
  cd;
1583
1588
  chart;
1589
+ /** Accessible name for the chart. Should be a localized string describing the chart content (WCAG 1.1.1). */
1590
+ ariaLabel;
1591
+ // Only expose role="img" when an accessible name is present; an img role
1592
+ // without a name is a WCAG 1.1.1 violation (axe: role-img-alt). When no
1593
+ // ariaLabel is supplied the inner svg stays aria-hidden, so the chart is
1594
+ // treated as decorative.
1595
+ get role() {
1596
+ return this.ariaLabel ? "img" : null;
1597
+ }
1598
+ get a11yLabel() {
1599
+ return this.ariaLabel || null;
1600
+ }
1584
1601
  resizeObserver;
1585
1602
  resizeHandler;
1586
1603
  intersectionObserver;
@@ -1610,7 +1627,7 @@ class ChartComponent {
1610
1627
  eventBus.getStream(REFRESH_EVENT).subscribe(() => {
1611
1628
  this.chart.updateDimensions();
1612
1629
  });
1613
- [MOUSE_ACTIVE_EVENT, SERIES_STATE_CHANGE_EVENT].forEach((eventName) => {
1630
+ [MOUSE_ACTIVE_EVENT, SERIES_STATE_CHANGE_EVENT].forEach(eventName => {
1614
1631
  eventBus.getStream(eventName).subscribe(() => {
1615
1632
  this.ngZone.run(() => {
1616
1633
  this.cd.markForCheck();
@@ -1645,15 +1662,15 @@ class ChartComponent {
1645
1662
  .getStream(CHART_VIEW_STATUS_EVENT)
1646
1663
  .next({ data });
1647
1664
  };
1648
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1649
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: ChartComponent, isStandalone: false, selector: "nui-chart", inputs: { chart: "chart" }, providers: [
1665
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1666
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: ChartComponent, isStandalone: false, selector: "nui-chart", inputs: { chart: "chart", ariaLabel: "ariaLabel" }, host: { properties: { "attr.role": "this.role", "attr.aria-label": "this.a11yLabel" } }, providers: [
1650
1667
  {
1651
1668
  provide: CHART_COMPONENT,
1652
1669
  useExisting: forwardRef(() => ChartComponent),
1653
1670
  },
1654
1671
  ], usesOnChanges: true, ngImport: i0, template: "", isInline: true });
1655
1672
  }
1656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartComponent, decorators: [{
1673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartComponent, decorators: [{
1657
1674
  type: Component,
1658
1675
  args: [{
1659
1676
  selector: "nui-chart",
@@ -1668,6 +1685,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1668
1685
  }]
1669
1686
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { chart: [{
1670
1687
  type: Input
1688
+ }], ariaLabel: [{
1689
+ type: Input
1690
+ }], role: [{
1691
+ type: HostBinding,
1692
+ args: ["attr.role"]
1693
+ }], a11yLabel: [{
1694
+ type: HostBinding,
1695
+ args: ["attr.aria-label"]
1671
1696
  }] } });
1672
1697
 
1673
1698
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -1756,7 +1781,7 @@ class ChartCollection {
1756
1781
  if (!this.eventBus) {
1757
1782
  this.initializeEventBus();
1758
1783
  }
1759
- each(this.events, (event) => {
1784
+ each(this.events, event => {
1760
1785
  this.subscribe(index, chart.getEventBus().getStream(event), (value) => {
1761
1786
  // this is where we check for the __broadcast__ flag, which means it originated in the chart collection
1762
1787
  if (!value.broadcast) {
@@ -1834,7 +1859,7 @@ class ChartCollection {
1834
1859
  * @param {string} chartKey
1835
1860
  */
1836
1861
  unsubscribeChart(chartKey) {
1837
- each(this.subscriptions[chartKey], (sub) => {
1862
+ each(this.subscriptions[chartKey], sub => {
1838
1863
  sub.unsubscribe();
1839
1864
  });
1840
1865
  delete this.subscriptions[chartKey];
@@ -1876,10 +1901,10 @@ class ChartCollectionService {
1876
1901
  }
1877
1902
  return collection;
1878
1903
  }
1879
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCollectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1880
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCollectionService });
1904
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartCollectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1905
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartCollectionService });
1881
1906
  }
1882
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCollectionService, decorators: [{
1907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartCollectionService, decorators: [{
1883
1908
  type: Injectable
1884
1909
  }] });
1885
1910
 
@@ -1931,10 +1956,10 @@ class ChartCollectionIdDirective {
1931
1956
  }
1932
1957
  }
1933
1958
  }
1934
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCollectionIdDirective, deps: [{ token: CHART_COMPONENT }, { token: ChartCollectionService }], target: i0.ɵɵFactoryTarget.Directive });
1935
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: ChartCollectionIdDirective, isStandalone: false, selector: "[nuiChartCollectionId]", inputs: { collectionId: ["nuiChartCollectionId", "collectionId"] }, usesOnChanges: true, ngImport: i0 });
1959
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartCollectionIdDirective, deps: [{ token: CHART_COMPONENT }, { token: ChartCollectionService }], target: i0.ɵɵFactoryTarget.Directive });
1960
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: ChartCollectionIdDirective, isStandalone: false, selector: "[nuiChartCollectionId]", inputs: { collectionId: ["nuiChartCollectionId", "collectionId"] }, usesOnChanges: true, ngImport: i0 });
1936
1961
  }
1937
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCollectionIdDirective, decorators: [{
1962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ChartCollectionIdDirective, decorators: [{
1938
1963
  type: Directive,
1939
1964
  args: [{
1940
1965
  selector: "[nuiChartCollectionId]",
@@ -1993,6 +2018,10 @@ var LegendOrientation;
1993
2018
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1994
2019
  // THE SOFTWARE.
1995
2020
  class LegendComponent {
2021
+ /**
2022
+ * The accessible name of the legend. Defaults to "Legend".
2023
+ */
2024
+ ariaLabel = $localize `Legend`;
1996
2025
  /**
1997
2026
  * EventEmitter for notifying subscribers of a change in the active state
1998
2027
  */
@@ -2029,13 +2058,19 @@ class LegendComponent {
2029
2058
  ngOnDestroy() {
2030
2059
  this.activeChanged.complete();
2031
2060
  }
2032
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2033
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: LegendComponent, isStandalone: false, selector: "nui-legend", inputs: { active: "active", interactive: "interactive", orientation: "orientation", seriesColor: "seriesColor", seriesIcon: "seriesIcon", seriesUnitLabel: "seriesUnitLabel" }, host: { classAttribute: "d-inline-block" }, usesOnChanges: true, ngImport: i0, 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" });
2061
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2062
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: LegendComponent, isStandalone: false, selector: "nui-legend", inputs: { ariaLabel: "ariaLabel", active: "active", interactive: "interactive", orientation: "orientation", seriesColor: "seriesColor", seriesIcon: "seriesIcon", seriesUnitLabel: "seriesUnitLabel" }, host: { properties: { "attr.role": "interactive ? 'group' : 'list'", "attr.aria-label": "ariaLabel" }, classAttribute: "d-inline-block" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"nui-legend d-flex flex-wrap\"\n [class.flex-column]=\"orientation === 'vertical'\">\n <ng-content></ng-content>\n</div>\n" });
2034
2063
  }
2035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendComponent, decorators: [{
2064
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: LegendComponent, decorators: [{
2036
2065
  type: Component,
2037
- args: [{ selector: "nui-legend", host: { class: "d-inline-block" }, encapsulation: ViewEncapsulation.Emulated, standalone: false, 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" }]
2038
- }], propDecorators: { active: [{
2066
+ args: [{ selector: "nui-legend", host: {
2067
+ class: "d-inline-block",
2068
+ "[attr.role]": "interactive ? 'group' : 'list'",
2069
+ "[attr.aria-label]": "ariaLabel",
2070
+ }, encapsulation: ViewEncapsulation.Emulated, standalone: false, template: "<div\n class=\"nui-legend d-flex flex-wrap\"\n [class.flex-column]=\"orientation === 'vertical'\">\n <ng-content></ng-content>\n</div>\n" }]
2071
+ }], propDecorators: { ariaLabel: [{
2072
+ type: Input
2073
+ }], active: [{
2039
2074
  type: Input
2040
2075
  }], interactive: [{
2041
2076
  type: Input
@@ -2147,6 +2182,18 @@ class LegendSeriesComponent {
2147
2182
  get isActiveClassApplied() {
2148
2183
  return this._active && this.seriesRenderState !== RenderState.hidden;
2149
2184
  }
2185
+ get role() {
2186
+ if (this._interactive) {
2187
+ return "checkbox";
2188
+ }
2189
+ return this.legend?.interactive === false ? "listitem" : null;
2190
+ }
2191
+ get interactiveTabIndex() {
2192
+ return this._interactive ? 0 : null;
2193
+ }
2194
+ get interactiveAriaChecked() {
2195
+ return this._interactive ? this.isSelected : null;
2196
+ }
2150
2197
  _seriesRenderState;
2151
2198
  _active = false;
2152
2199
  _interactive;
@@ -2175,6 +2222,17 @@ class LegendSeriesComponent {
2175
2222
  this.isSelectedChange.next(!this.isSelected);
2176
2223
  }
2177
2224
  }
2225
+ onEnterKey() {
2226
+ if (this.interactive) {
2227
+ this.isSelectedChange.emit(!this.isSelected);
2228
+ }
2229
+ }
2230
+ onSpaceKey(event) {
2231
+ if (this.interactive) {
2232
+ event.preventDefault();
2233
+ this.isSelectedChange.emit(!this.isSelected);
2234
+ }
2235
+ }
2178
2236
  /**
2179
2237
  * @returns boolean indicating whether the series has a primary or secondary description
2180
2238
  */
@@ -2189,12 +2247,12 @@ class LegendSeriesComponent {
2189
2247
  return (!!this.projectedDescription &&
2190
2248
  this.projectedDescription.nativeElement.children.length !== 0);
2191
2249
  }
2192
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendSeriesComponent, deps: [{ token: LegendComponent, host: true, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2193
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LegendSeriesComponent, isStandalone: false, selector: "nui-legend-series", inputs: { active: "active", interactive: "interactive", isSelected: "isSelected", descriptionPrimary: "descriptionPrimary", descriptionSecondary: "descriptionSecondary", icon: "icon", color: "color", seriesRenderState: "seriesRenderState" }, outputs: { isSelectedChange: "isSelectedChange" }, host: { listeners: { "click": "onClick()" }, properties: { "class.nui-legend-series--interactive": "this.isInteractiveClassApplied", "class.nui-legend-series--horizontal": "this.isHorizontalClassApplied", "class.nui-legend-series--deselected": "this.isDeselectedClassApplied", "class.nui-legend-series--state-deemphasized": "this.isDeemphasizedClassApplied", "class.nui-legend-series--state-hidden": "this.isHiddenStateClassApplied", "class.inverse": "this.isActiveClassApplied" }, classAttribute: "nui-legend-series" }, viewQueries: [{ propertyName: "projectedDescription", first: true, predicate: ["projectedDescription"], descendants: true }], ngImport: i0, 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 @if (hasInputDescription()) {\n <div\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\"\n >\n @if (!!descriptionPrimary) {\n <div\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\"\n >\n {{ descriptionPrimary }}\n </div>\n } @if (!!descriptionSecondary) {\n <div\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\"\n >\n {{ descriptionSecondary }}\n </div>\n }\n </div>\n } @else {\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n }\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2250
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: LegendSeriesComponent, deps: [{ token: LegendComponent, host: true, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2251
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: LegendSeriesComponent, isStandalone: false, selector: "nui-legend-series", inputs: { active: "active", interactive: "interactive", isSelected: "isSelected", descriptionPrimary: "descriptionPrimary", descriptionSecondary: "descriptionSecondary", icon: "icon", color: "color", seriesRenderState: "seriesRenderState" }, outputs: { isSelectedChange: "isSelectedChange" }, host: { listeners: { "click": "onClick()", "keydown.enter": "onEnterKey()", "keydown.space": "onSpaceKey($event)" }, properties: { "class.nui-legend-series--interactive": "this.isInteractiveClassApplied", "class.nui-legend-series--horizontal": "this.isHorizontalClassApplied", "class.nui-legend-series--deselected": "this.isDeselectedClassApplied", "class.nui-legend-series--state-deemphasized": "this.isDeemphasizedClassApplied", "class.nui-legend-series--state-hidden": "this.isHiddenStateClassApplied", "class.inverse": "this.isActiveClassApplied", "attr.role": "this.role", "attr.tabindex": "this.interactiveTabIndex", "attr.aria-checked": "this.interactiveAriaChecked" }, classAttribute: "nui-legend-series" }, viewQueries: [{ propertyName: "projectedDescription", first: true, predicate: ["projectedDescription"], descendants: true }], ngImport: i0, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\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 aria-hidden=\"true\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\">\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n </div>\n @if (hasInputDescription()) {\n <div\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\">\n @if (!!descriptionPrimary) {\n <div\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\">\n {{ descriptionPrimary }}\n </div>\n } @if (!!descriptionSecondary) {\n <div\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\">\n {{ descriptionSecondary }}\n </div>\n }\n </div>\n } @else {\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n }\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2194
2252
  }
2195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendSeriesComponent, decorators: [{
2253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: LegendSeriesComponent, decorators: [{
2196
2254
  type: Component,
2197
- args: [{ host: { class: LEGEND_SERIES_CLASS_NAME }, selector: "nui-legend-series", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, 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 @if (hasInputDescription()) {\n <div\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\"\n >\n @if (!!descriptionPrimary) {\n <div\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\"\n >\n {{ descriptionPrimary }}\n </div>\n } @if (!!descriptionSecondary) {\n <div\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\"\n >\n {{ descriptionSecondary }}\n </div>\n }\n </div>\n } @else {\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n }\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n" }]
2255
+ args: [{ host: { class: LEGEND_SERIES_CLASS_NAME }, selector: "nui-legend-series", changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"d-flex\"\n [ngClass]=\"['nui-legend-series--state-' + seriesRenderState]\"\n [class.nui-legend-series--deselected]=\"!isSelected\">\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 aria-hidden=\"true\"\n [class.nui-legend-series__checkbox--checked]=\"isSelected\">\n <div class=\"nui-legend-series__checkbox-mark\">\n <i class=\"nui-legend-series__checkbox-glyph\"></i>\n </div>\n </div>\n </div>\n @if (hasInputDescription()) {\n <div\n class=\"description-container nui-text-small d-flex flex-column justify-content-center\">\n @if (!!descriptionPrimary) {\n <div\n class=\"description description-primary\"\n [title]=\"descriptionPrimary\">\n {{ descriptionPrimary }}\n </div>\n } @if (!!descriptionSecondary) {\n <div\n class=\"description description-secondary\"\n [title]=\"descriptionSecondary\">\n {{ descriptionSecondary }}\n </div>\n }\n </div>\n } @else {\n <div class=\"d-flex\" #projectedDescription>\n <ng-content select=\"[description]\"></ng-content>\n </div>\n }\n <div class=\"legend-menu\">\n <ng-content select=\"[legendMenu]\"></ng-content>\n </div>\n</div>\n" }]
2198
2256
  }], ctorParameters: () => [{ type: LegendComponent, decorators: [{
2199
2257
  type: Optional
2200
2258
  }, {
@@ -2238,9 +2296,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2238
2296
  }], isActiveClassApplied: [{
2239
2297
  type: HostBinding,
2240
2298
  args: [`class.inverse`]
2299
+ }], role: [{
2300
+ type: HostBinding,
2301
+ args: ["attr.role"]
2302
+ }], interactiveTabIndex: [{
2303
+ type: HostBinding,
2304
+ args: ["attr.tabindex"]
2305
+ }], interactiveAriaChecked: [{
2306
+ type: HostBinding,
2307
+ args: ["attr.aria-checked"]
2241
2308
  }], onClick: [{
2242
2309
  type: HostListener,
2243
2310
  args: ["click"]
2311
+ }], onEnterKey: [{
2312
+ type: HostListener,
2313
+ args: ["keydown.enter"]
2314
+ }], onSpaceKey: [{
2315
+ type: HostListener,
2316
+ args: ["keydown.space", ["$event"]]
2244
2317
  }] } });
2245
2318
 
2246
2319
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
@@ -2263,10 +2336,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2263
2336
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2264
2337
  // THE SOFTWARE.
2265
2338
  class BasicLegendTileComponent {
2266
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BasicLegendTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2267
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: BasicLegendTileComponent, isStandalone: false, selector: "nui-basic-legend-tile", ngImport: i0, template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n", styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"] });
2339
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: BasicLegendTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2340
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.23", type: BasicLegendTileComponent, isStandalone: false, selector: "nui-basic-legend-tile", ngImport: i0, template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n", styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"] });
2268
2341
  }
2269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BasicLegendTileComponent, decorators: [{
2342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: BasicLegendTileComponent, decorators: [{
2270
2343
  type: Component,
2271
2344
  args: [{ selector: "nui-basic-legend-tile", encapsulation: ViewEncapsulation.Emulated, standalone: false, template: "<div class=\"nui-basic-legend-tile\">\n <ng-content></ng-content>\n</div>\n", styles: [".nui-basic-legend-tile{height:100%;min-height:30px;min-width:30px;display:flex;align-items:center;justify-content:center}\n"] }]
2272
2345
  }] });
@@ -2337,12 +2410,12 @@ class RichLegendTileComponent {
2337
2410
  hasInputUnitLabel() {
2338
2411
  return !isNil(this.unitLabel);
2339
2412
  }
2340
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: RichLegendTileComponent, deps: [{ token: LegendSeriesComponent, host: true }, { token: LegendComponent, host: true, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2341
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: RichLegendTileComponent, isStandalone: false, selector: "nui-rich-legend-tile", inputs: { unitLabel: "unitLabel", value: "value", backgroundColor: "backgroundColor", color: "color" }, ngImport: i0, 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 @if (hasInputValue()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\"\n >\n {{ value }}\n </div>\n } @else {\n <ng-content select=\"[top]\"></ng-content>\n } @if (hasInputUnitLabel()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\"\n >\n {{ unitLabel }}\n </div>\n } @else {\n <ng-content select=\"[bottom]\"></ng-content>\n }\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", 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"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2413
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: RichLegendTileComponent, deps: [{ token: LegendSeriesComponent, host: true }, { token: LegendComponent, host: true, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2414
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: RichLegendTileComponent, isStandalone: false, selector: "nui-rich-legend-tile", inputs: { unitLabel: "unitLabel", value: "value", backgroundColor: "backgroundColor", color: "color" }, ngImport: i0, 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 <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 @if (hasInputValue()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\">\n {{ value }}\n </div>\n } @else {\n <ng-content select=\"[top]\"></ng-content>\n } @if (hasInputUnitLabel()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\">\n {{ unitLabel }}\n </div>\n } @else {\n <ng-content select=\"[bottom]\"></ng-content>\n }\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", 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"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
2342
2415
  }
2343
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: RichLegendTileComponent, decorators: [{
2416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: RichLegendTileComponent, decorators: [{
2344
2417
  type: Component,
2345
- args: [{ selector: "nui-rich-legend-tile", encapsulation: ViewEncapsulation.Emulated, standalone: false, 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 @if (hasInputValue()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\"\n >\n {{ value }}\n </div>\n } @else {\n <ng-content select=\"[top]\"></ng-content>\n } @if (hasInputUnitLabel()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\"\n >\n {{ unitLabel }}\n </div>\n } @else {\n <ng-content select=\"[bottom]\"></ng-content>\n }\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", 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"] }]
2418
+ args: [{ selector: "nui-rich-legend-tile", encapsulation: ViewEncapsulation.Emulated, standalone: false, 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 <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 @if (hasInputValue()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-value nui-rich-legend-tile__ellipsified\">\n {{ value }}\n </div>\n } @else {\n <ng-content select=\"[top]\"></ng-content>\n } @if (hasInputUnitLabel()) {\n <div\n class=\"nui-rich-legend-tile__tilebox-unit nui-rich-legend-tile__ellipsified\">\n {{ unitLabel }}\n </div>\n } @else {\n <ng-content select=\"[bottom]\"></ng-content>\n }\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", 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"] }]
2346
2419
  }], ctorParameters: () => [{ type: LegendSeriesComponent, decorators: [{
2347
2420
  type: Host
2348
2421
  }] }, { type: LegendComponent, decorators: [{
@@ -2830,10 +2903,10 @@ const emptyShapes = [
2830
2903
  /* eslint-enable max-len */
2831
2904
  /** Default chart marker set */
2832
2905
  const CHART_MARKERS = [
2833
- ...regularShapes.map((s) => `<path class="nui-chart--path__outline" d="${s}"></path>`),
2906
+ ...regularShapes.map(s => `<path class="nui-chart--path__outline" d="${s}"></path>`),
2834
2907
  ...emptyShapes.map((s, i) => `<path class="nui-chart--path__outline-fill" stroke="none" d="${regularShapes[i]}"></path>
2835
2908
  <path class="nui-chart--path__outline" d="${s}"></path>`),
2836
- ].map((s) => new SvgMarker(s));
2909
+ ].map(s => new SvgMarker(s));
2837
2910
 
2838
2911
  // © 2022 SolarWinds Worldwide, LLC. All rights reserved.
2839
2912
  //
@@ -3293,7 +3366,7 @@ class UtilityService {
3293
3366
  }
3294
3367
  const valueAccessor = UtilityService.getValueAccessor(accessor, haystack[0]);
3295
3368
  if (typeof needle === "string") {
3296
- return haystack.findIndex((straw) => valueAccessor(straw, 0) === needle);
3369
+ return haystack.findIndex(straw => valueAccessor(straw, 0) === needle);
3297
3370
  }
3298
3371
  let closestDataIndex = this.findNearestIndex(haystack, needle, accessor);
3299
3372
  // Compensate for bisect
@@ -3328,7 +3401,7 @@ class UtilityService {
3328
3401
  }
3329
3402
  static uuid() {
3330
3403
  let dt = new Date().getTime();
3331
- const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
3404
+ const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => {
3332
3405
  // eslint-disable-next-line
3333
3406
  const r = (dt + Math.random() * 16) % 16 | 0;
3334
3407
  dt = Math.floor(dt / 16);
@@ -3698,10 +3771,10 @@ class BarRenderer extends XYRenderer {
3698
3771
  }
3699
3772
  else {
3700
3773
  const values = data && data.length > 0 ? data.map(accessor("start")) : [];
3701
- const maxLength = Math.max(...values.map((d) => (isArray(d) ? d.length : -1)));
3774
+ const maxLength = Math.max(...values.map(d => (isArray(d) ? d.length : -1)));
3702
3775
  if (maxLength >= 0) {
3703
3776
  return Array.from(Array(maxLength)).map((e, i) => {
3704
- const scalesDomains = values.map((d) => i < d.length ? d[i] : []);
3777
+ const scalesDomains = values.map(d => i < d.length ? d[i] : []);
3705
3778
  return uniq(flatten(scalesDomains));
3706
3779
  });
3707
3780
  }
@@ -3936,7 +4009,7 @@ class LineAccessors extends XYAccessors {
3936
4009
  * @param px
3937
4010
  */
3938
4011
  function isInRange(scale, px) {
3939
- const r = scale.range().map((a) => a);
4012
+ const r = scale.range().map(a => a);
3940
4013
  const min = Math.min(r[0], r[1]);
3941
4014
  const max = Math.max(r[0], r[1]);
3942
4015
  return px >= min && px <= max;
@@ -4152,11 +4225,11 @@ class LineRenderer extends XYRenderer {
4152
4225
  .classed("main", true)
4153
4226
  // Assigning null value to match ValueMap<GElement, Datum> D3's signature
4154
4227
  .attrs({
4155
- stroke: strokeValue ?? null,
4228
+ "stroke": strokeValue ?? null,
4156
4229
  "stroke-width": this.config.strokeWidth ?? null,
4157
4230
  "stroke-dasharray": this.config.strokeStyle ?? null,
4158
4231
  "stroke-linecap": this.config.strokeLinecap ?? null,
4159
- fill: "none",
4232
+ "fill": "none",
4160
4233
  });
4161
4234
  }
4162
4235
  this.drawLine(renderSeries, path);
@@ -4458,7 +4531,7 @@ class ThresholdsService {
4458
4531
  */
4459
4532
  injectThresholdsData(dataSeries, zones) {
4460
4533
  const zoneIndexes = {};
4461
- zones.forEach((z) => (z.entered = false));
4534
+ zones.forEach(z => (z.entered = false));
4462
4535
  for (let i = 0; i < dataSeries.data.length; i++) {
4463
4536
  const d = dataSeries.data[i];
4464
4537
  const x = dataSeries.accessors.data.x(d, i, dataSeries.data, dataSeries);
@@ -4494,15 +4567,15 @@ class ThresholdsService {
4494
4567
  }
4495
4568
  let data;
4496
4569
  const accessors = statusAccessors(colorProvider);
4497
- accessors.data.thickness = (d) => thicknessMap[d.status];
4570
+ accessors.data.thickness = d => thicknessMap[d.status];
4498
4571
  if (isBandScale(scales.x)) {
4499
4572
  data = cloneDeep(sourceSeries.data);
4500
4573
  accessors.data.start = sourceSeries.accessors.data.x;
4501
4574
  accessors.data.end = sourceSeries.accessors.data.x;
4502
- accessors.data.color = (d) => d.__thresholds && d.__thresholds.status
4575
+ accessors.data.color = d => d.__thresholds && d.__thresholds.status
4503
4576
  ? colorProvider.get(d.__thresholds.status)
4504
4577
  : "transparent";
4505
- accessors.data.thickness = (d) => thicknessMap[d.__thresholds.status];
4578
+ accessors.data.thickness = d => thicknessMap[d.__thresholds.status];
4506
4579
  }
4507
4580
  else {
4508
4581
  data = this.getBackgroundsDataForContinuousScale(sourceSeries, zones);
@@ -4596,9 +4669,9 @@ class ThresholdsService {
4596
4669
  zoneStartY,
4597
4670
  zoneEndY,
4598
4671
  ]
4599
- .map((y) => this.getCrossPointWithY(xy1, xy2, y)) // calculate cross points for both limits
4600
- .filter((c) => c); // take only those that actually intersect
4601
- [xy1, xy2].forEach((xy) => {
4672
+ .map(y => this.getCrossPointWithY(xy1, xy2, y)) // calculate cross points for both limits
4673
+ .filter(c => c); // take only those that actually intersect
4674
+ [xy1, xy2].forEach(xy => {
4602
4675
  if (xy.y === zoneStartY || xy.y === zoneEndY) {
4603
4676
  xy.isZoneEdge = true;
4604
4677
  }
@@ -4620,8 +4693,8 @@ class ThresholdsService {
4620
4693
  */
4621
4694
  getThresholdZones(sourceSeries, simpleZones, colorProvider) {
4622
4695
  const areaAccessors = new AreaAccessors();
4623
- areaAccessors.data.start = (d) => d.start;
4624
- areaAccessors.data.end = (d) => d.end;
4696
+ areaAccessors.data.start = d => d.start;
4697
+ areaAccessors.data.end = d => d.end;
4625
4698
  areaAccessors.series.color = (seriesId, series) => colorProvider.get(series.value);
4626
4699
  return simpleZones.map((z, i) => ({
4627
4700
  id: sourceSeries.id + "__" + z.status + "-" + i,
@@ -4637,7 +4710,7 @@ class ThresholdsService {
4637
4710
  * @param zones Zones defined as data series with IAreaAccessors
4638
4711
  */
4639
4712
  getThresholdLines(zones) {
4640
- if (-1 === zones.findIndex((z) => z.entered)) {
4713
+ if (-1 === zones.findIndex(z => z.entered)) {
4641
4714
  return [];
4642
4715
  }
4643
4716
  // TODO: works only for static thresholds
@@ -4655,7 +4728,7 @@ class ThresholdsService {
4655
4728
  addLimitEntry(z.accessors.data.end, z, ZoneBoundary.End);
4656
4729
  }
4657
4730
  }
4658
- return values(limits).map((limit) => this.getThresholdLine(limit.series, limit.accessor, limit.zoneBoundary));
4731
+ return values(limits).map(limit => this.getThresholdLine(limit.series, limit.accessor, limit.zoneBoundary));
4659
4732
  }
4660
4733
  /**
4661
4734
  * Creates a IChartAssistSeries that represents a threshold zone limit defined by given valueAccessor
@@ -4768,7 +4841,7 @@ class ThresholdsService {
4768
4841
  getSideIndicators(zones, scales, rendererConfig) {
4769
4842
  const sideIndicators = [];
4770
4843
  const renderer = new SideIndicatorRenderer(rendererConfig || cloneDeep(THRESHOLDS_MAIN_CHART_RENDERER_CONFIG));
4771
- const indicatorsActive = -1 !== zones.findIndex((z) => z.entered);
4844
+ const indicatorsActive = -1 !== zones.findIndex(z => z.entered);
4772
4845
  for (const z of zones) {
4773
4846
  const sideIndicatorAccessors = new SideIndicatorAccessors();
4774
4847
  sideIndicatorAccessors.series = {
@@ -4788,10 +4861,10 @@ class ThresholdsService {
4788
4861
  }
4789
4862
  return sideIndicators;
4790
4863
  }
4791
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThresholdsService, deps: [{ token: i1$2.LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
4792
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThresholdsService });
4864
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ThresholdsService, deps: [{ token: i1$2.LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
4865
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ThresholdsService });
4793
4866
  }
4794
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ThresholdsService, decorators: [{
4867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ThresholdsService, decorators: [{
4795
4868
  type: Injectable
4796
4869
  }], ctorParameters: () => [{ type: i1$2.LoggerService }] });
4797
4870
 
@@ -4815,8 +4888,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
4815
4888
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4816
4889
  // THE SOFTWARE.
4817
4890
  class NuiChartsModule {
4818
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NuiChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4819
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: NuiChartsModule, declarations: [LegendComponent,
4891
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NuiChartsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4892
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.23", ngImport: i0, type: NuiChartsModule, declarations: [LegendComponent,
4820
4893
  LegendSeriesComponent,
4821
4894
  BasicLegendTileComponent,
4822
4895
  RichLegendTileComponent,
@@ -4839,9 +4912,9 @@ class NuiChartsModule {
4839
4912
  ChartTooltipsComponent,
4840
4913
  ChartTooltipComponent,
4841
4914
  ChartTooltipDirective] });
4842
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NuiChartsModule, providers: [ChartCollectionService, ThresholdsService], imports: [NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule] });
4915
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NuiChartsModule, providers: [ChartCollectionService, ThresholdsService], imports: [NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule] });
4843
4916
  }
4844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NuiChartsModule, decorators: [{
4917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: NuiChartsModule, decorators: [{
4845
4918
  type: NgModule,
4846
4919
  args: [{
4847
4920
  imports: [NuiCommonModule, NuiIconModule, NuiPopoverModule, OverlayModule],
@@ -5038,14 +5111,14 @@ class DataManager {
5038
5111
  this.chart = chart;
5039
5112
  }
5040
5113
  update(seriesSet) {
5041
- const duplicateIds = filter(seriesSet.map((series) => series.id), (val, i, iteratee) => includes(iteratee, val, i + 1));
5114
+ const duplicateIds = filter(seriesSet.map(series => series.id), (val, i, iteratee) => includes(iteratee, val, i + 1));
5042
5115
  if (duplicateIds.length > 0) {
5043
5116
  console.warn("Series set contains duplicate IDs:", duplicateIds);
5044
5117
  }
5045
5118
  this._chartSeriesSet = seriesSet || [];
5046
5119
  this.dataIndex = keyBy(this._chartSeriesSet, (s) => s.id);
5047
5120
  this._scalesIndexByKey = this.buildScalesIndex(this._chartSeriesSet);
5048
- this._scalesIndexById = keyBy(flatten(values(this._scalesIndexByKey).map((v) => v.list)), (s) => s.id);
5121
+ this._scalesIndexById = keyBy(flatten(values(this._scalesIndexByKey).map(v => v.list)), s => s.id);
5049
5122
  }
5050
5123
  getChartSeries(seriesId) {
5051
5124
  return this.dataIndex[seriesId];
@@ -5056,9 +5129,9 @@ class DataManager {
5056
5129
  }
5057
5130
  if (scale.domainCalculator) {
5058
5131
  const chartSeriesSet = this.chartSeriesSet
5059
- .filter((cs) => cs.scales[scaleKey] === scale &&
5132
+ .filter(cs => cs.scales[scaleKey] === scale &&
5060
5133
  !cs.renderer.config.ignoreForDomainCalculation)
5061
- .filter((c) => c.renderState !== RenderState.hidden);
5134
+ .filter(c => c.renderState !== RenderState.hidden);
5062
5135
  if (chartSeriesSet.length ||
5063
5136
  this.chart?.configuration?.updateDomainForEmptySeries) {
5064
5137
  const calculatedDomain = scale.domainCalculator(chartSeriesSet, scaleKey, scale);
@@ -5068,8 +5141,8 @@ class DataManager {
5068
5141
  }
5069
5142
  buildScalesIndex(chartSeries) {
5070
5143
  const scales = {};
5071
- each(chartSeries, (cs) => {
5072
- each(Object.keys(cs.scales), (scaleKey) => {
5144
+ each(chartSeries, cs => {
5145
+ each(Object.keys(cs.scales), scaleKey => {
5073
5146
  const scale = cs.scales[scaleKey];
5074
5147
  let indexEntry = scales[scaleKey];
5075
5148
  if (!indexEntry) {
@@ -5088,8 +5161,8 @@ class DataManager {
5088
5161
  return scales;
5089
5162
  }
5090
5163
  updateScaleDomains() {
5091
- each(Object.keys(this._scalesIndexByKey), (scaleKey) => {
5092
- each(this._scalesIndexByKey[scaleKey].list, (scale) => {
5164
+ each(Object.keys(this._scalesIndexByKey), scaleKey => {
5165
+ each(this._scalesIndexByKey[scaleKey].list, scale => {
5093
5166
  this.updateScaleDomain(scale, scaleKey);
5094
5167
  });
5095
5168
  });
@@ -5148,7 +5221,7 @@ class RenderEngine {
5148
5221
  each(this.dataManager.chartSeriesSet, (chartSeries) => {
5149
5222
  const childContainers = this.getSeriesChildContainers(chartSeries.id);
5150
5223
  const areDomainsValid = -1 ===
5151
- Object.values(chartSeries.scales).findIndex((scale) => {
5224
+ Object.values(chartSeries.scales).findIndex(scale => {
5152
5225
  if (typeof scaleValidity[scale.id] === "undefined") {
5153
5226
  const isValid = scale.isDomainValid();
5154
5227
  if (!isValid) {
@@ -5186,7 +5259,7 @@ class RenderEngine {
5186
5259
  let highlightChangeDetected = false;
5187
5260
  const interactionDataPoints = this.dataManager.chartSeriesSet.reduce((result, chartSeries) => {
5188
5261
  const chartValues = {};
5189
- each(Object.keys(payload.values), (scaleKey) => {
5262
+ each(Object.keys(payload.values), scaleKey => {
5190
5263
  const myScaleId = chartSeries.scales[scaleKey].id;
5191
5264
  chartValues[scaleKey] = UtilityService.getInteractionValues(payload.values[scaleKey], myScaleId);
5192
5265
  });
@@ -5261,7 +5334,7 @@ class RenderEngine {
5261
5334
  }
5262
5335
  const childContainers = this.getSeriesChildContainers(seriesId);
5263
5336
  const attrs = chartSeries.renderer.getContainerStateStyles(state);
5264
- each(values(childContainers), (cc) => {
5337
+ each(values(childContainers), cc => {
5265
5338
  cc.attrs(attrs);
5266
5339
  });
5267
5340
  chartSeries.renderer.setSeriesState(childContainers, state);
@@ -5277,8 +5350,8 @@ class RenderEngine {
5277
5350
  }
5278
5351
  buildLayerIndex(chartSeriesSet) {
5279
5352
  const layerIndex = {};
5280
- each(chartSeriesSet, (chartSeries) => {
5281
- each(chartSeries.renderer.getRequiredLayers(), (layerDef) => {
5353
+ each(chartSeriesSet, chartSeries => {
5354
+ each(chartSeries.renderer.getRequiredLayers(), layerDef => {
5282
5355
  if (STANDARD_RENDER_LAYERS[layerDef.name] &&
5283
5356
  !isEqual(STANDARD_RENDER_LAYERS[layerDef.name], layerDef)) {
5284
5357
  throw new Error(`Custom definition detected for render layer "${layerDef.name}". ` +
@@ -5298,7 +5371,7 @@ class RenderEngine {
5298
5371
  return layerIndex;
5299
5372
  }
5300
5373
  removeUnusedLayers() {
5301
- each(Object.keys(this.renderLayers), (layerName) => {
5374
+ each(Object.keys(this.renderLayers), layerName => {
5302
5375
  if (!this.layerIndex[layerName]) {
5303
5376
  this.lasagna.removeLayer(layerName);
5304
5377
  delete this.renderLayers[layerName];
@@ -5306,7 +5379,7 @@ class RenderEngine {
5306
5379
  });
5307
5380
  }
5308
5381
  addNeededLayers() {
5309
- each(this.layerIndex, (layerData) => {
5382
+ each(this.layerIndex, layerData => {
5310
5383
  if (!this.renderLayers[layerData.layerDefinition.name]) {
5311
5384
  this.renderLayers[layerData.layerDefinition.name] =
5312
5385
  this.lasagna.addLayer(layerData.layerDefinition);
@@ -5314,7 +5387,7 @@ class RenderEngine {
5314
5387
  });
5315
5388
  }
5316
5389
  updateLayerContents() {
5317
- each(Object.keys(this.renderLayers), (layerName) => {
5390
+ each(Object.keys(this.renderLayers), layerName => {
5318
5391
  const renderLayer = this.renderLayers[layerName];
5319
5392
  const containers = renderLayer
5320
5393
  .selectAll("g.data-series-container")
@@ -5332,7 +5405,7 @@ class RenderEngine {
5332
5405
  }
5333
5406
  getSeriesChildContainers(seriesId) {
5334
5407
  const childContainers = {};
5335
- each(Object.keys(this.renderLayers), (layerName) => {
5408
+ each(Object.keys(this.renderLayers), layerName => {
5336
5409
  const renderLayer = this.renderLayers[layerName];
5337
5410
  childContainers[layerName] = renderLayer.selectAll(`#${layerName}-${UtilityService.cssEscape(seriesId)}`);
5338
5411
  });
@@ -5484,7 +5557,7 @@ class Chart {
5484
5557
  this.plugins.push(plugin);
5485
5558
  }
5486
5559
  removePlugin(classRef) {
5487
- const pluginIndex = this.plugins.findIndex((plugin) => plugin instanceof classRef);
5560
+ const pluginIndex = this.plugins.findIndex(plugin => plugin instanceof classRef);
5488
5561
  if (-1 !== pluginIndex) {
5489
5562
  this.plugins[pluginIndex].destroy();
5490
5563
  this.plugins.splice(pluginIndex, 1);
@@ -5501,8 +5574,7 @@ class Chart {
5501
5574
  }
5502
5575
  }
5503
5576
  hasPlugin(classRef) {
5504
- return (-1 !==
5505
- this.plugins.findIndex((plugin) => plugin instanceof classRef));
5577
+ return (-1 !== this.plugins.findIndex(plugin => plugin instanceof classRef));
5506
5578
  }
5507
5579
  build(element) {
5508
5580
  this.element = element;
@@ -5510,9 +5582,11 @@ class Chart {
5510
5582
  this.target = select$1(this.element)
5511
5583
  .append("svg")
5512
5584
  .attrs({
5513
- class: "nui-chart",
5514
- height: "100%",
5515
- width: "100%",
5585
+ "class": "nui-chart",
5586
+ "height": "100%",
5587
+ "width": "100%",
5588
+ // aria-hidden: the accessible label is carried by the nui-chart host element (role="img")
5589
+ "aria-hidden": "true",
5516
5590
  });
5517
5591
  this.configureCssFilters();
5518
5592
  this.buildGrid();
@@ -5574,7 +5648,7 @@ class Chart {
5574
5648
  destroy() {
5575
5649
  this.eventBus.getStream(DESTROY_EVENT).next({ data: null });
5576
5650
  this.eventBus.destroy();
5577
- this.plugins.forEach((p) => p.destroy());
5651
+ this.plugins.forEach(p => p.destroy());
5578
5652
  this.target?.remove();
5579
5653
  this.target = undefined;
5580
5654
  }
@@ -5589,7 +5663,7 @@ class Chart {
5589
5663
  this.grid.scales = this.dataManager.scalesIndexByKey;
5590
5664
  this.dataManager.updateScaleDomains();
5591
5665
  this.grid.updateRanges();
5592
- this.plugins.forEach((p) => p.update());
5666
+ this.plugins.forEach(p => p.update());
5593
5667
  }
5594
5668
  onUpdateDimensions() {
5595
5669
  const dimensionConfig = this.grid.config().dimension;
@@ -5603,7 +5677,7 @@ class Chart {
5603
5677
  dimensions.width = this.element.clientWidth;
5604
5678
  }
5605
5679
  this.grid.updateDimensions(dimensions);
5606
- this.plugins.forEach((p) => p.updateDimensions());
5680
+ this.plugins.forEach(p => p.updateDimensions());
5607
5681
  }
5608
5682
  updateTargetDimensions(dimensionConfig) {
5609
5683
  if (!dimensionConfig.autoHeight) {
@@ -5767,12 +5841,12 @@ class ChartAssist {
5767
5841
  .getEventBus()
5768
5842
  .getStream(INTERACTION_DATA_POINTS_EVENT)
5769
5843
  .asObservable()
5770
- .pipe(filter$1((event) => event.data.interactionType === InteractionType.MouseMove), map((event) => event.data.dataPoints[chartSeries.id]));
5844
+ .pipe(filter$1(event => event.data.interactionType === InteractionType.MouseMove), map(event => event.data.dataPoints[chartSeries.id]));
5771
5845
  // if there is no highlightData, or index is "-1", we'll show the last value from series (if possible)
5772
5846
  const highlightDataPresentPredicate = (highlightData) => highlightData && highlightData.index >= 0;
5773
5847
  return seriesHighlight$.pipe(
5774
5848
  // eslint-disable-next-line import/no-deprecated
5775
- switchMap((highlightData) => highlightDataPresentPredicate(highlightData)
5849
+ switchMap(highlightData => highlightDataPresentPredicate(highlightData)
5776
5850
  ? of(highlightData.data)
5777
5851
  : of(chartSeries.data && chartSeries.data.length
5778
5852
  ? chartSeries.data[chartSeries.data.length - 1]
@@ -5783,16 +5857,16 @@ class ChartAssist {
5783
5857
  }
5784
5858
  update(inputSeriesSet, updateLegend = true) {
5785
5859
  this.inputSeriesSet = inputSeriesSet;
5786
- const processedSeriesSet = this.seriesProcessor(inputSeriesSet.map((series) => ({
5860
+ const processedSeriesSet = this.seriesProcessor(inputSeriesSet.map(series => ({
5787
5861
  ...series,
5788
5862
  data: series.data || [],
5789
5863
  })));
5790
- this.legendSeriesSet = processedSeriesSet.filter((s) => s.showInLegend || typeof s.showInLegend === "undefined");
5864
+ this.legendSeriesSet = processedSeriesSet.filter(s => s.showInLegend || typeof s.showInLegend === "undefined");
5791
5865
  if (updateLegend) {
5792
5866
  this.legendInteractionAssist.update(processedSeriesSet);
5793
5867
  }
5794
5868
  // add render states to the series for use in the chart
5795
- const seriesSet = processedSeriesSet.map((s) => Object.assign({ renderState: this.renderStatesIndex[s.id]?.state }, s));
5869
+ const seriesSet = processedSeriesSet.map(s => Object.assign({ renderState: this.renderStatesIndex[s.id]?.state }, s));
5796
5870
  this.chart.update(seriesSet);
5797
5871
  this.publishRenderStates();
5798
5872
  }
@@ -5851,7 +5925,7 @@ class ChartAssist {
5851
5925
  const dataPoint = this.highlightedDataPoints[chartSeries.id];
5852
5926
  return ChartAssist.getLabel(chartSeries, dataPoint, scaleKey, formatterName, dataAccessorKey);
5853
5927
  }
5854
- getVisibleSeriesWithLegend = () => this.legendSeriesSet.filter((s) => !this.isSeriesHidden(s.id));
5928
+ getVisibleSeriesWithLegend = () => this.legendSeriesSet.filter(s => !this.isSeriesHidden(s.id));
5855
5929
  /**
5856
5930
  * Synchronize this chart assist's actions with IChartAssistEvents emitted by the specified
5857
5931
  * chart assist, and override this chart assist's getVisibleSeriesWithLegend method with the
@@ -5869,7 +5943,7 @@ class ChartAssist {
5869
5943
  this.syncSubscription = chartAssist.chartAssistSubject
5870
5944
  .pipe(takeUntil(chartAssist.chart.getEventBus().getStream(DESTROY_EVENT)))
5871
5945
  .subscribe((event) => {
5872
- const args = Object.keys(event.payload).map((key) => event.payload[key]);
5946
+ const args = Object.keys(event.payload).map(key => event.payload[key]);
5873
5947
  this.syncHandlerMap[event.type](...args);
5874
5948
  });
5875
5949
  }
@@ -5904,8 +5978,8 @@ class ChartAssist {
5904
5978
  this.isLegendActive = data;
5905
5979
  },
5906
5980
  };
5907
- each(Object.keys(eventHandlers), (key) => {
5908
- eventBus.getStream(key).subscribe((event) => {
5981
+ each(Object.keys(eventHandlers), key => {
5982
+ eventBus.getStream(key).subscribe(event => {
5909
5983
  eventHandlers[key](event.data);
5910
5984
  if (this.onEvent) {
5911
5985
  this.onEvent(event);
@@ -5927,10 +6001,10 @@ class LegendInteractionAssist {
5927
6001
  }
5928
6002
  update(seriesSet) {
5929
6003
  this.seriesGroups = this.getSeriesGroups(seriesSet);
5930
- this.seriesIndex = keyBy(seriesSet, (s) => s.id);
6004
+ this.seriesIndex = keyBy(seriesSet, s => s.id);
5931
6005
  this.resetSeries();
5932
6006
  // override render states
5933
- for (const series of seriesSet.filter((s) => s.renderState)) {
6007
+ for (const series of seriesSet.filter(s => s.renderState)) {
5934
6008
  this.renderStatesIndex[series.id] = new ChartAssistRenderStateData(series.id, series, series.renderState === RenderState.hidden
5935
6009
  ? RenderState.default
5936
6010
  : series.renderState, series.renderState !== RenderState.hidden);
@@ -6550,21 +6624,21 @@ class MouseInteractiveArea {
6550
6624
  */
6551
6625
  function mergeDomains(domains, scale) {
6552
6626
  if (scale.isContinuous()) {
6553
- const nonEmptyDomains = domains.filter((d) => d !== EMPTY_CONTINUOUS_DOMAIN);
6627
+ const nonEmptyDomains = domains.filter(d => d !== EMPTY_CONTINUOUS_DOMAIN);
6554
6628
  if (nonEmptyDomains.length === 0) {
6555
6629
  return EMPTY_CONTINUOUS_DOMAIN;
6556
6630
  }
6557
6631
  const domainMin = min$1(nonEmptyDomains
6558
- .filter((e) => typeof e[0] !== "undefined")
6559
- .map((e) => e[0]));
6632
+ .filter(e => typeof e[0] !== "undefined")
6633
+ .map(e => e[0]));
6560
6634
  const domainMax = max$1(nonEmptyDomains
6561
- .filter((e) => typeof e[1] !== "undefined")
6562
- .map((e) => e[1]));
6635
+ .filter(e => typeof e[1] !== "undefined")
6636
+ .map(e => e[1]));
6563
6637
  return [domainMin, domainMax];
6564
6638
  }
6565
- const maxLength = Math.max(...domains.map((d) => d.length));
6639
+ const maxLength = Math.max(...domains.map(d => d.length));
6566
6640
  return Array.from(Array(maxLength)).map((e, i) => {
6567
- const scalesDomains = domains.map((d) => (i < d.length ? d[i] : []));
6641
+ const scalesDomains = domains.map(d => (i < d.length ? d[i] : []));
6568
6642
  return uniq(flatten(scalesDomains));
6569
6643
  });
6570
6644
  }
@@ -6620,7 +6694,7 @@ function getFixedDomains(chartSeriesSet, scaleId) {
6620
6694
  */
6621
6695
  const getAutomaticDomain = (chartSeriesSet, scaleKey, scale) => {
6622
6696
  const fixedDomains = getFixedDomains(chartSeriesSet, scaleKey);
6623
- const domains = chartSeriesSet.map((cs) => {
6697
+ const domains = chartSeriesSet.map(cs => {
6624
6698
  // find fixed, continuous scales that are referenced by this series
6625
6699
  const filterScales = Object.keys(fixedDomains).reduce((result, next) => {
6626
6700
  const seriesScale = cs.scales[next];
@@ -6725,7 +6799,7 @@ class Scale {
6725
6799
  }
6726
6800
  /** See {@link IScale#reverse} */
6727
6801
  isDomainValid() {
6728
- return -1 === this.domain().findIndex((value) => value === undefined);
6802
+ return -1 === this.domain().findIndex(value => value === undefined);
6729
6803
  }
6730
6804
  reverse() {
6731
6805
  return this.reversed(!this.isReversed);
@@ -6766,7 +6840,7 @@ class Scale {
6766
6840
  class LinearScale extends Scale {
6767
6841
  constructor(id) {
6768
6842
  super(id);
6769
- this.formatters.tick = (value) => value?.toLocaleString();
6843
+ this.formatters.tick = value => value?.toLocaleString();
6770
6844
  }
6771
6845
  createD3Scale() {
6772
6846
  return scaleLinear();
@@ -6781,7 +6855,7 @@ class LinearScale extends Scale {
6781
6855
  return true;
6782
6856
  }
6783
6857
  isDomainValid() {
6784
- return -1 === this.domain().findIndex((value) => isNaN(value));
6858
+ return -1 === this.domain().findIndex(value => isNaN(value));
6785
6859
  }
6786
6860
  }
6787
6861
 
@@ -7298,7 +7372,7 @@ class MouseInteractiveAreaPlugin extends ChartPlugin {
7298
7372
  .getEventBus()
7299
7373
  .getStream(MOUSE_ACTIVE_EVENT)
7300
7374
  .pipe(takeUntil(this.destroy$))
7301
- .subscribe((event) => {
7375
+ .subscribe(event => {
7302
7376
  const active = event.data;
7303
7377
  if (!active && this.chart.getDataManager().chartSeriesSet) {
7304
7378
  this.highlightReset();
@@ -7308,7 +7382,7 @@ class MouseInteractiveAreaPlugin extends ChartPlugin {
7308
7382
  .getEventBus()
7309
7383
  .getStream(INTERACTION_VALUES_ACTIVE_EVENT)
7310
7384
  .pipe(takeUntil(this.destroy$))
7311
- .subscribe((event) => (this.interactionValuesActive = event.data));
7385
+ .subscribe(event => (this.interactionValuesActive = event.data));
7312
7386
  this.mouseInteractiveArea.interaction
7313
7387
  .pipe(takeUntil(this.destroy$))
7314
7388
  .subscribe((event) => {
@@ -7401,7 +7475,7 @@ class Lasagna {
7401
7475
  return this.getLayerContainer(layer.name);
7402
7476
  }
7403
7477
  removeLayer(layerName) {
7404
- const index = this.layers.findIndex((layer) => layer.name === layerName);
7478
+ const index = this.layers.findIndex(layer => layer.name === layerName);
7405
7479
  if (index === -1) {
7406
7480
  return;
7407
7481
  }
@@ -7423,7 +7497,7 @@ class Lasagna {
7423
7497
  .enter()
7424
7498
  .append("g")
7425
7499
  .attrs({
7426
- class: (d) => `${Lasagna.LAYER_CLASS} ${Lasagna.LAYER_CLASS}-${d.name}`,
7500
+ "class": (d) => `${Lasagna.LAYER_CLASS} ${Lasagna.LAYER_CLASS}-${d.name}`,
7427
7501
  "clip-path": (d) => d.clipped ? `url(#${this.clipPath})` : "",
7428
7502
  "pointer-events": "none",
7429
7503
  });
@@ -7670,7 +7744,7 @@ class Grid {
7670
7744
  });
7671
7745
  return renderingAreaContainer.append("rect").attrs({
7672
7746
  "pointer-events": "all",
7673
- fill: "transparent",
7747
+ "fill": "transparent",
7674
7748
  });
7675
7749
  }
7676
7750
  /**
@@ -7838,7 +7912,7 @@ class XYGrid extends Grid {
7838
7912
  set scales(scales) {
7839
7913
  this._scales = scales;
7840
7914
  if (this._scales) {
7841
- Object.keys(this._scales).forEach((scaleKey) => {
7915
+ Object.keys(this._scales).forEach(scaleKey => {
7842
7916
  // Defaulting to left
7843
7917
  let config = this.config().axis.left;
7844
7918
  let axisGenerator;
@@ -7846,8 +7920,8 @@ class XYGrid extends Grid {
7846
7920
  return;
7847
7921
  }
7848
7922
  this._scales[scaleKey]?.list
7849
- ?.filter((scale) => scale instanceof LinearScale)
7850
- .forEach((scale) => {
7923
+ ?.filter(scale => scale instanceof LinearScale)
7924
+ .forEach(scale => {
7851
7925
  if (scale?.id === this.leftScaleId) {
7852
7926
  config = this.config().axis.left;
7853
7927
  axisGenerator = axisLeft;
@@ -7942,12 +8016,12 @@ class XYGrid extends Grid {
7942
8016
  calculateAxesStyles(e, axes) {
7943
8017
  const renderStates = e.data;
7944
8018
  const emphasizedSeries = renderStates
7945
- .filter((rs) => rs.state === RenderState.emphasized && rs.series)
7946
- .map((rs) => rs.series);
8019
+ .filter(rs => rs.state === RenderState.emphasized && rs.series)
8020
+ .map(rs => rs.series);
7947
8021
  if (emphasizedSeries.length > 0) {
7948
8022
  const emphasizedYScales = uniq(emphasizedSeries
7949
- .map((s) => s?.scales["y"])
7950
- .filter((s) => !!s));
8023
+ .map(s => s?.scales["y"])
8024
+ .filter(s => !!s));
7951
8025
  if (emphasizedYScales.length <= 0) {
7952
8026
  return {};
7953
8027
  }
@@ -8051,12 +8125,12 @@ class XYGrid extends Grid {
8051
8125
  const dimension = this.config().dimension;
8052
8126
  const padding = dimension.padding;
8053
8127
  if (this.scales.x) {
8054
- each(this.scales.x.list, (xScale) => {
8128
+ each(this.scales.x.list, xScale => {
8055
8129
  xScale.range([padding.left, dimension.width() - padding.right]);
8056
8130
  });
8057
8131
  }
8058
8132
  if (this.scales.y) {
8059
- each(this.scales.y.list, (yScale) => {
8133
+ each(this.scales.y.list, yScale => {
8060
8134
  yScale.range([
8061
8135
  dimension.height() - padding.bottom,
8062
8136
  padding.top,
@@ -8354,7 +8428,7 @@ class XYGrid extends Grid {
8354
8428
  }
8355
8429
  return textInsideNext;
8356
8430
  }, elementsToFilter[0] && select$1(elementsToFilter[0]).text());
8357
- return elementsToFilter.filter((element) => arr.indexOf(element) === -1);
8431
+ return elementsToFilter.filter(element => arr.indexOf(element) === -1);
8358
8432
  }
8359
8433
  getElementsToHide(elementsToFilter, measurement, isBottomAxis) {
8360
8434
  const measureType = isBottomAxis ? "width" : "height";
@@ -8371,7 +8445,7 @@ class XYGrid extends Grid {
8371
8445
  return [];
8372
8446
  }
8373
8447
  const elementsToDisplay = this.elementsFiltering(elementsToFilter, measurement, measureType);
8374
- return elementsToFilter.filter((element) => elementsToDisplay.indexOf(element) === -1);
8448
+ return elementsToFilter.filter(element => elementsToDisplay.indexOf(element) === -1);
8375
8449
  }
8376
8450
  elementsFiltering(elementsToFilter, parameter, measureType) {
8377
8451
  let elementsToDisplay;
@@ -8652,8 +8726,8 @@ class DonutGaugeThresholdsRenderer extends RadialRenderer {
8652
8726
  .append("circle")
8653
8727
  .attr("class", GAUGE_THRESHOLD_MARKER_CLASS)
8654
8728
  .merge(markerSelection)
8655
- .attr("cx", (d) => markerGenerator.centroid(d)[0])
8656
- .attr("cy", (d) => markerGenerator.centroid(d)[1])
8729
+ .attr("cx", d => markerGenerator.centroid(d)[0])
8730
+ .attr("cy", d => markerGenerator.centroid(d)[1])
8657
8731
  .attr("r", this.config.markerRadius)
8658
8732
  .style("fill", (d, i) => `var(--nui-color-${data[i].hit ? "text-light" : "icon-default"})`)
8659
8733
  .style("stroke-width", 0);
@@ -8761,7 +8835,7 @@ class DonutGaugeLabelsPlugin extends ChartPlugin {
8761
8835
  const labelGenerator = arc()
8762
8836
  .outerRadius(labelRadius)
8763
8837
  .innerRadius(labelRadius);
8764
- const formatter = thresholdsSeries?.scales.r.formatters[this.config.formatterName] ?? ((d) => d);
8838
+ const formatter = thresholdsSeries?.scales.r.formatters[this.config.formatterName] ?? (d => d);
8765
8839
  const data = cloneDeep(this.config.disableThresholdLabels ? [] : thresholdsSeries?.data);
8766
8840
  if (isUndefined(data)) {
8767
8841
  throw new Error("Gauge threshold series data is undefined");
@@ -8777,10 +8851,10 @@ class DonutGaugeLabelsPlugin extends ChartPlugin {
8777
8851
  .append("text")
8778
8852
  .attr("class", GAUGE_THRESHOLD_LABEL_CLASS)
8779
8853
  .merge(labelSelection)
8780
- .attr("transform", (d) => `translate(${labelGenerator.centroid(d)})`)
8854
+ .attr("transform", d => `translate(${labelGenerator.centroid(d)})`)
8781
8855
  .attr("title", (d, i) => formatter(data[i].value))
8782
- .style("text-anchor", (d) => this.getTextAnchor(d.startAngle))
8783
- .style("dominant-baseline", (d) => this.getAlignmentBaseline(d.startAngle))
8856
+ .style("text-anchor", d => this.getTextAnchor(d.startAngle))
8857
+ .style("dominant-baseline", d => this.getAlignmentBaseline(d.startAngle))
8784
8858
  .text((d, i) => formatter(data[i].value));
8785
8859
  }
8786
8860
  getTextAnchor(angle) {
@@ -8913,7 +8987,7 @@ class LinearGaugeLabelsPlugin extends ChartPlugin {
8913
8987
  // removing this value to avoid rendering a label for it
8914
8988
  data.pop();
8915
8989
  const formatter = this.thresholdsSeries?.scales[this.isHorizontal ? "x" : "y"]
8916
- .formatters[this.config.formatterName] ?? ((d) => d);
8990
+ .formatters[this.config.formatterName] ?? (d => d);
8917
8991
  const labelSelection = gaugeThresholdsLabelsGroup
8918
8992
  .selectAll(`text.${GAUGE_THRESHOLD_LABEL_CLASS}`)
8919
8993
  .data(data);
@@ -8925,8 +8999,8 @@ class LinearGaugeLabelsPlugin extends ChartPlugin {
8925
8999
  .merge(labelSelection)
8926
9000
  .attr("transform", (d, i) => `translate(${this.xTranslate(d, i)}, ${this.yTranslate(d, i)})`)
8927
9001
  .attr("title", (d, i) => formatter(data[i].value))
8928
- .style("text-anchor", (d) => this.getTextAnchor())
8929
- .style("dominant-baseline", (d) => this.getAlignmentBaseline())
9002
+ .style("text-anchor", d => this.getTextAnchor())
9003
+ .style("dominant-baseline", d => this.getAlignmentBaseline())
8930
9004
  .text((d, i) => formatter(data[i].value));
8931
9005
  }
8932
9006
  xTranslate = (d, i) => {
@@ -9186,7 +9260,7 @@ function gatherCategories(chartSeriesSet, type = "category") {
9186
9260
  accInner.push(categoryAccessor?.(datum, index, chartSeries.data, chartSeries));
9187
9261
  return accInner;
9188
9262
  }, []);
9189
- return unionBy(acc, categories, (d) => d.valueOf());
9263
+ return unionBy(acc, categories, d => d.valueOf());
9190
9264
  }, []);
9191
9265
  }
9192
9266
 
@@ -9214,7 +9288,7 @@ function stackedPreprocessor(chartSeriesSet, isVisible) {
9214
9288
  if (chartSeriesSet.length === 0) {
9215
9289
  return chartSeriesSet;
9216
9290
  }
9217
- const categories = gatherCategories(chartSeriesSet.filter((chartSeries) => isUndefined(chartSeries.preprocess) || chartSeries.preprocess));
9291
+ const categories = gatherCategories(chartSeriesSet.filter(chartSeries => isUndefined(chartSeries.preprocess) || chartSeries.preprocess));
9218
9292
  // This is adding metadata to the dataset and filling missing
9219
9293
  chartSeriesSet.reduce((acc, chartSeries) => {
9220
9294
  if (!isUndefined(chartSeries.preprocess) && !chartSeries.preprocess) {
@@ -9908,11 +9982,11 @@ class GaugeUtil {
9908
9982
  .sort((a, b) => a.value - b.value);
9909
9983
  const activeThreshold = gaugeConfig
9910
9984
  .thresholds?.reversed
9911
- ? thresholds?.find((threshold) => !isUndefined(threshold.hit) && !threshold.hit)
9985
+ ? thresholds?.find(threshold => !isUndefined(threshold.hit) && !threshold.hit)
9912
9986
  : thresholds
9913
9987
  ?.slice()
9914
9988
  .reverse()
9915
- .find((threshold) => threshold.hit);
9989
+ .find(threshold => threshold.hit);
9916
9990
  return {
9917
9991
  thresholds,
9918
9992
  activeThreshold,
@@ -9930,7 +10004,7 @@ class GaugeUtil {
9930
10004
  value = 0;
9931
10005
  }
9932
10006
  const thresholdDefs = gaugeConfig.thresholds?.definitions || {};
9933
- Object.keys(thresholdDefs || {}).forEach((thresholdId) => {
10007
+ Object.keys(thresholdDefs || {}).forEach(thresholdId => {
9934
10008
  const threshold = thresholdDefs[thresholdId];
9935
10009
  if (threshold) {
9936
10010
  if (threshold.value > gaugeConfig.max) {
@@ -10084,9 +10158,9 @@ class PathMarker {
10084
10158
  constructor(d) {
10085
10159
  this.element = document.createElement("path");
10086
10160
  this.setAttributes({
10087
- class: "nui-chart-element-marker nui-chart--path__outline",
10161
+ "class": "nui-chart-element-marker nui-chart--path__outline",
10088
10162
  "vector-effect": "non-scaling-stroke",
10089
- d: d,
10163
+ "d": d,
10090
10164
  });
10091
10165
  }
10092
10166
  setColor(color) {
@@ -10176,7 +10250,7 @@ const domainWithAuxiliarySeries = (additionalSeriesFn, domainCalculator) => (cha
10176
10250
  class PointScale extends Scale {
10177
10251
  constructor(id) {
10178
10252
  super(id);
10179
- this.formatters.tick = (value) => value;
10253
+ this.formatters.tick = value => value;
10180
10254
  }
10181
10255
  createD3Scale() {
10182
10256
  return scalePoint();
@@ -10325,7 +10399,7 @@ class TimeScale extends Scale {
10325
10399
  return true;
10326
10400
  }
10327
10401
  isDomainValid() {
10328
- return (-1 === this.domain().findIndex((value) => isNaN(value.getTime())));
10402
+ return -1 === this.domain().findIndex(value => isNaN(value.getTime()));
10329
10403
  }
10330
10404
  }
10331
10405
 
@@ -11012,8 +11086,8 @@ class RadialPopoverPlugin extends ChartPopoverPlugin {
11012
11086
  if (!chartElement) {
11013
11087
  throw new Error("Chart parent node is not defined");
11014
11088
  }
11015
- const dataPointsLeft = Math.min(...valArr.map((d) => d.position.x));
11016
- const dataPointsTop = Math.min(...valArr.map((d) => d.position.y));
11089
+ const dataPointsLeft = Math.min(...valArr.map(d => d.position.x));
11090
+ const dataPointsTop = Math.min(...valArr.map(d => d.position.y));
11017
11091
  const left = chartElement.offsetLeft +
11018
11092
  this.chart.getGrid().config().dimension.margin.left +
11019
11093
  dataPointsLeft +
@@ -11345,7 +11419,7 @@ class ZoomPlugin extends ChartPlugin {
11345
11419
  result[next.id] = [
11346
11420
  selection[0],
11347
11421
  selection[1] + widthCorrection,
11348
- ].map((x) => next.invert(x));
11422
+ ].map(x => next.invert(x));
11349
11423
  return result;
11350
11424
  }, {});
11351
11425
  // zoom the chart
@@ -11740,7 +11814,7 @@ class TimeseriesZoomPluginsSyncService {
11740
11814
  return;
11741
11815
  }
11742
11816
  const collection = [...this.collections[collectionId]];
11743
- const idx = collection.findIndex((p) => p === plugin);
11817
+ const idx = collection.findIndex(p => p === plugin);
11744
11818
  if (idx === -1) {
11745
11819
  return;
11746
11820
  }
@@ -11750,21 +11824,21 @@ class TimeseriesZoomPluginsSyncService {
11750
11824
  syncPositionInsideCollection(collectionId, startDate, endDate) {
11751
11825
  const collection = this.getPlugins(collectionId);
11752
11826
  setTimeout(() => {
11753
- collection.forEach((plugin) => {
11827
+ collection.forEach(plugin => {
11754
11828
  plugin.moveBrushByDate(startDate, endDate);
11755
11829
  });
11756
11830
  });
11757
11831
  }
11758
11832
  clearZoomInsideCollection(collectionId) {
11759
11833
  const collection = this.getPlugins(collectionId);
11760
- collection.forEach((plugin) => {
11834
+ collection.forEach(plugin => {
11761
11835
  plugin.clearBrush();
11762
11836
  });
11763
11837
  }
11764
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimeseriesZoomPluginsSyncService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11765
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimeseriesZoomPluginsSyncService, providedIn: "root" });
11838
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TimeseriesZoomPluginsSyncService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11839
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TimeseriesZoomPluginsSyncService, providedIn: "root" });
11766
11840
  }
11767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimeseriesZoomPluginsSyncService, decorators: [{
11841
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TimeseriesZoomPluginsSyncService, decorators: [{
11768
11842
  type: Injectable,
11769
11843
  args: [{ providedIn: "root" }]
11770
11844
  }] });
@@ -11842,7 +11916,7 @@ class SparkChartAssist {
11842
11916
  * See {@link IChartAssist#update}
11843
11917
  */
11844
11918
  update(inputSeriesSet) {
11845
- const sparks = inputSeriesSet.map((chartSeries) => ({
11919
+ const sparks = inputSeriesSet.map(chartSeries => ({
11846
11920
  id: chartSeries.id,
11847
11921
  chartSeriesSet: [chartSeries],
11848
11922
  }));
@@ -11858,7 +11932,7 @@ class SparkChartAssist {
11858
11932
  this.sparks = inputSparks.map((spark, index) => {
11859
11933
  const lastSpark = index === inputSparks.length - 1;
11860
11934
  const existingSparkIndex = spark.id
11861
- ? this.sparks.findIndex((existingSpark) => existingSpark.id === spark.id)
11935
+ ? this.sparks.findIndex(existingSpark => existingSpark.id === spark.id)
11862
11936
  : -1;
11863
11937
  if (existingSparkIndex !== -1) {
11864
11938
  spark.chart = this.reconfigureChart(this.sparks[existingSparkIndex].chart, lastSpark);
@@ -11901,15 +11975,15 @@ class SparkChartAssist {
11901
11975
  return chart;
11902
11976
  }
11903
11977
  configureEventSubscriptions(eventBus) {
11904
- eventBus.getStream(INTERACTION_DATA_POINTS_EVENT).subscribe((event) => {
11978
+ eventBus.getStream(INTERACTION_DATA_POINTS_EVENT).subscribe(event => {
11905
11979
  if (event.data.interactionType === InteractionType.MouseMove) {
11906
11980
  const dataPoints = event.data.dataPoints;
11907
- Object.keys(dataPoints).forEach((seriesId) => {
11981
+ Object.keys(dataPoints).forEach(seriesId => {
11908
11982
  this.highlightedDataPoints[seriesId] = Object.assign({}, dataPoints[seriesId]);
11909
11983
  });
11910
11984
  }
11911
11985
  });
11912
- eventBus.getStream(MOUSE_ACTIVE_EVENT).subscribe((event) => {
11986
+ eventBus.getStream(MOUSE_ACTIVE_EVENT).subscribe(event => {
11913
11987
  this.isLegendActive = event.data;
11914
11988
  });
11915
11989
  }
@@ -12704,8 +12778,8 @@ class LineSelectSeriesInteractionStrategy {
12704
12778
  .attrs({
12705
12779
  "stroke-width": renderer.config.strokeWidth +
12706
12780
  2 * this.INTERACTION_MARGIN,
12707
- stroke: "transparent",
12708
- fill: "none",
12781
+ "stroke": "transparent",
12782
+ "fill": "none",
12709
12783
  })
12710
12784
  .on("mouseenter", () => {
12711
12785
  const dataPoint = {
@@ -13177,10 +13251,10 @@ function applyStackMetadata(baseAccessorKey, valueAccessorKey, chartSeries, isVi
13177
13251
  // THE SOFTWARE.
13178
13252
  function stackedAreaAccessors(colorProvider, markerProvider) {
13179
13253
  const areaAccessors = new AreaAccessors(colorProvider, markerProvider);
13180
- areaAccessors.data.x = (d) => d.x;
13254
+ areaAccessors.data.x = d => d.x;
13181
13255
  areaAccessors.data.y = areaAccessors.data.absoluteY1;
13182
13256
  areaAccessors.data.y0 = () => 0;
13183
- areaAccessors.data.y1 = (d) => d.y;
13257
+ areaAccessors.data.y1 = d => d.y;
13184
13258
  return areaAccessors;
13185
13259
  }
13186
13260