@nova-ui/charts 20.0.13 → 20.0.14
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.
- package/bundles/css/styles.css +1 -1
- package/fesm2022/nova-ui-charts.mjs +269 -14
- package/fesm2022/nova-ui-charts.mjs.map +1 -1
- package/index.d.ts +38 -3
- package/package.json +2 -2
- package/sdk/less/nui-charts.less +22 -0
package/index.d.ts
CHANGED
|
@@ -1019,8 +1019,10 @@ interface ILasagnaLayer {
|
|
|
1019
1019
|
order: number;
|
|
1020
1020
|
clipped: boolean;
|
|
1021
1021
|
}
|
|
1022
|
-
/**
|
|
1022
|
+
/** Chart interaction types */
|
|
1023
1023
|
declare enum InteractionType {
|
|
1024
|
+
/** Indicates keyboard inspection of a data point */
|
|
1025
|
+
Keyboard = "keyboard",
|
|
1024
1026
|
/** Indicates that an element has been clicked */
|
|
1025
1027
|
Click = "click",
|
|
1026
1028
|
/** Indicates that an element is hovered */
|
|
@@ -1405,6 +1407,7 @@ declare class ChartTooltipsPlugin extends ChartPlugin {
|
|
|
1405
1407
|
private isChartInView;
|
|
1406
1408
|
private readonly destroy$;
|
|
1407
1409
|
private seriesVisibilityMap;
|
|
1410
|
+
private keyboardHighlightedSeries;
|
|
1408
1411
|
/**
|
|
1409
1412
|
* @param tooltipPositionOffset Offset of a tooltip from edge of a highlighted element
|
|
1410
1413
|
* @param orientation
|
|
@@ -1412,6 +1415,17 @@ declare class ChartTooltipsPlugin extends ChartPlugin {
|
|
|
1412
1415
|
constructor(tooltipPositionOffset?: number, orientation?: "right" | "top");
|
|
1413
1416
|
initialize(): void;
|
|
1414
1417
|
destroy(): void;
|
|
1418
|
+
/**
|
|
1419
|
+
* Number of positional data indices available for keyboard tooltip inspection.
|
|
1420
|
+
* Series with unequal domains are not aligned by this basic navigation mode.
|
|
1421
|
+
*/
|
|
1422
|
+
getKeyboardDataPointCount(): number;
|
|
1423
|
+
/** Inspect the same positional index in each visible series. */
|
|
1424
|
+
showForIndex(index: number): void;
|
|
1425
|
+
hideKeyboardTooltips(): void;
|
|
1426
|
+
private getKeyboardSeries;
|
|
1427
|
+
private resetKeyboardHighlights;
|
|
1428
|
+
private publishKeyboardDataPoints;
|
|
1415
1429
|
processHighlightedDataPoints(dataPoints: IDataPointsPayload): void;
|
|
1416
1430
|
/**
|
|
1417
1431
|
* Calculate tooltip position. Default implementation shows the tooltip on left / right with
|
|
@@ -1637,6 +1651,18 @@ declare class LegendSeriesComponent implements AfterContentInit {
|
|
|
1637
1651
|
* Set whether the series is selected
|
|
1638
1652
|
*/
|
|
1639
1653
|
isSelected: boolean;
|
|
1654
|
+
/**
|
|
1655
|
+
* Makes a non-interactive legend item keyboard-focusable without changing
|
|
1656
|
+
* its listitem role or enabling the series visibility checkbox.
|
|
1657
|
+
* Project independent action controls with the legendAction attribute.
|
|
1658
|
+
*/
|
|
1659
|
+
focusable: boolean;
|
|
1660
|
+
/**
|
|
1661
|
+
* Moves the checkbox from the host to the tile so projected actions remain independent.
|
|
1662
|
+
*/
|
|
1663
|
+
separateControls: boolean;
|
|
1664
|
+
/** Accessible name of the tile checkbox when separateControls is enabled. */
|
|
1665
|
+
toggleAriaLabel: string;
|
|
1640
1666
|
/**
|
|
1641
1667
|
* Emits an event with a boolean value indicating a new selected status
|
|
1642
1668
|
*/
|
|
@@ -1664,6 +1690,7 @@ declare class LegendSeriesComponent implements AfterContentInit {
|
|
|
1664
1690
|
get seriesRenderState(): RenderState;
|
|
1665
1691
|
private projectedDescription;
|
|
1666
1692
|
get isInteractiveClassApplied(): boolean;
|
|
1693
|
+
get hasSeparateControls(): boolean;
|
|
1667
1694
|
isHorizontalClassApplied: boolean;
|
|
1668
1695
|
get isActiveClassApplied(): boolean;
|
|
1669
1696
|
get role(): string | null;
|
|
@@ -1689,7 +1716,7 @@ declare class LegendSeriesComponent implements AfterContentInit {
|
|
|
1689
1716
|
*/
|
|
1690
1717
|
hasProjectedDescription(): boolean;
|
|
1691
1718
|
static ɵfac: i0.ɵɵFactoryDeclaration<LegendSeriesComponent, [{ optional: true; host: true; }]>;
|
|
1692
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LegendSeriesComponent, "nui-legend-series", never, { "active": { "alias": "active"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "descriptionPrimary": { "alias": "descriptionPrimary"; "required": false; }; "descriptionSecondary": { "alias": "descriptionSecondary"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "seriesRenderState": { "alias": "seriesRenderState"; "required": false; }; }, { "isSelectedChange": "isSelectedChange"; }, never, ["
|
|
1719
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LegendSeriesComponent, "nui-legend-series", never, { "active": { "alias": "active"; "required": false; }; "interactive": { "alias": "interactive"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "focusable": { "alias": "focusable"; "required": false; }; "separateControls": { "alias": "separateControls"; "required": false; }; "toggleAriaLabel": { "alias": "toggleAriaLabel"; "required": false; }; "descriptionPrimary": { "alias": "descriptionPrimary"; "required": false; }; "descriptionSecondary": { "alias": "descriptionSecondary"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "color": { "alias": "color"; "required": false; }; "seriesRenderState": { "alias": "seriesRenderState"; "required": false; }; }, { "isSelectedChange": "isSelectedChange"; }, never, ["[legendMenu]", "[legendAction]", "*", "[description]"], false, never>;
|
|
1693
1720
|
}
|
|
1694
1721
|
|
|
1695
1722
|
declare class BasicLegendTileComponent {
|
|
@@ -1734,21 +1761,29 @@ declare class ChartComponent implements OnInit, AfterContentInit, AfterViewInit,
|
|
|
1734
1761
|
chart: IChart;
|
|
1735
1762
|
/** Accessible name for the chart. Should be a localized string describing the chart content (WCAG 1.1.1). */
|
|
1736
1763
|
ariaLabel: string;
|
|
1764
|
+
/** Opt-in positional tooltip navigation; intended for series with aligned data indices. */
|
|
1765
|
+
keyboardTooltips?: ChartTooltipsPlugin;
|
|
1766
|
+
get keyboardTabIndex(): number | null;
|
|
1767
|
+
get hasKeyboardTooltips(): boolean;
|
|
1737
1768
|
get role(): string | null;
|
|
1738
1769
|
get a11yLabel(): string | null;
|
|
1739
1770
|
resizeObserver?: ResizeObserver;
|
|
1740
1771
|
private resizeHandler;
|
|
1741
1772
|
private intersectionObserver;
|
|
1773
|
+
private readonly keyboardTooltipController;
|
|
1742
1774
|
constructor(elRef: ElementRef, ngZone: NgZone, cd: ChangeDetectorRef);
|
|
1743
1775
|
ngOnInit(): void;
|
|
1744
1776
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1777
|
+
onKeyboardFocus(): void;
|
|
1778
|
+
onKeyboardNavigation(event: KeyboardEvent): void;
|
|
1779
|
+
onKeyboardBlur(): void;
|
|
1745
1780
|
ngAfterContentInit(): void;
|
|
1746
1781
|
ngAfterViewInit(): void;
|
|
1747
1782
|
ngOnDestroy(): void;
|
|
1748
1783
|
redraw: () => void;
|
|
1749
1784
|
private intersectionObserverCallback;
|
|
1750
1785
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
1751
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "nui-chart", never, { "chart": { "alias": "chart"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, never, false, never>;
|
|
1786
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "nui-chart", never, { "chart": { "alias": "chart"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "keyboardTooltips": { "alias": "keyboardTooltips"; "required": false; }; }, {}, never, never, false, never>;
|
|
1752
1787
|
}
|
|
1753
1788
|
|
|
1754
1789
|
/**
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
],
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nova-ui/bits": "~20.0.
|
|
9
|
+
"@nova-ui/bits": "~20.0.14",
|
|
10
10
|
"tslib": "^2.3.0"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"type": "git",
|
|
59
59
|
"url": "https://github.com/solarwinds/nova.git"
|
|
60
60
|
},
|
|
61
|
-
"version": "20.0.
|
|
61
|
+
"version": "20.0.14",
|
|
62
62
|
"module": "fesm2022/nova-ui-charts.mjs",
|
|
63
63
|
"typings": "index.d.ts",
|
|
64
64
|
"sideEffects": false
|
package/sdk/less/nui-charts.less
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
@nui-legend-series-max-width: 250px;
|
|
6
6
|
@nui-legend-series-description-min-width: 130px; // 180px from mockups - 50px for tile
|
|
7
7
|
|
|
8
|
+
nui-chart.nui-chart--keyboard-tooltips:focus-visible {
|
|
9
|
+
.focus-outline-inset();
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
.nui-chart-layout {
|
|
9
13
|
display: grid;
|
|
10
14
|
grid-template:
|
|
@@ -97,6 +101,20 @@
|
|
|
97
101
|
display: flex;
|
|
98
102
|
}
|
|
99
103
|
|
|
104
|
+
& &__toggle {
|
|
105
|
+
display: flex;
|
|
106
|
+
padding: 0;
|
|
107
|
+
border: 0;
|
|
108
|
+
background: none;
|
|
109
|
+
color: inherit;
|
|
110
|
+
font: inherit;
|
|
111
|
+
cursor: inherit;
|
|
112
|
+
|
|
113
|
+
&:focus-visible {
|
|
114
|
+
.focus-outline();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
100
118
|
&--horizontal:not(:last-child) {
|
|
101
119
|
margin-right: @nui-space-sm;
|
|
102
120
|
}
|
|
@@ -151,6 +169,10 @@
|
|
|
151
169
|
display: flex;
|
|
152
170
|
}
|
|
153
171
|
|
|
172
|
+
&--separate-controls:focus-within .legend-menu {
|
|
173
|
+
display: flex;
|
|
174
|
+
}
|
|
175
|
+
|
|
154
176
|
&--interactive {
|
|
155
177
|
cursor: pointer;
|
|
156
178
|
|