@trackunit/react-components 0.0.121 → 0.0.123
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/components/Chart/Chart.d.ts +5 -1
- package/index.js +4 -2
- package/package.json +3 -2
|
@@ -58,6 +58,10 @@ export interface ChartProps extends CommonProps {
|
|
|
58
58
|
* Type of rendered used. Either "svg" or "canvas".
|
|
59
59
|
*/
|
|
60
60
|
renderer?: "svg" | "canvas";
|
|
61
|
+
/**
|
|
62
|
+
* Value used to find element by `data-testid` attribute.
|
|
63
|
+
*/
|
|
64
|
+
dataTestId?: string;
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
63
67
|
* The Chart component is a wrapper component for ECharts.
|
|
@@ -69,4 +73,4 @@ export interface ChartProps extends CommonProps {
|
|
|
69
73
|
* @param {ChartProps} props - The props for the Chart component
|
|
70
74
|
* @returns {JSX.Element} Chart component
|
|
71
75
|
*/
|
|
72
|
-
export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, merge, loadingOption, timezoneLabel, renderer, }: ChartProps) => JSX.Element;
|
|
76
|
+
export declare const Chart: ({ options, showLoading, className, style, onChartReady, onClick, onDataZoom, onBrush, onBrushSelected, mouseLeaveChart, merge, loadingOption, timezoneLabel, renderer, dataTestId, }: ChartProps) => JSX.Element;
|
package/index.js
CHANGED
|
@@ -1324,7 +1324,8 @@ const Chart = ({
|
|
|
1324
1324
|
merge = true,
|
|
1325
1325
|
loadingOption,
|
|
1326
1326
|
timezoneLabel,
|
|
1327
|
-
renderer = "canvas"
|
|
1327
|
+
renderer = "canvas",
|
|
1328
|
+
dataTestId
|
|
1328
1329
|
}) => {
|
|
1329
1330
|
var _a, _b;
|
|
1330
1331
|
|
|
@@ -1369,7 +1370,8 @@ const Chart = ({
|
|
|
1369
1370
|
style: {
|
|
1370
1371
|
height: (_a = style === null || style === void 0 ? void 0 : style.height) !== null && _a !== void 0 ? _a : "300px",
|
|
1371
1372
|
width: (_b = style === null || style === void 0 ? void 0 : style.width) !== null && _b !== void 0 ? _b : "100%"
|
|
1372
|
-
}
|
|
1373
|
+
},
|
|
1374
|
+
"data-testid": dataTestId
|
|
1373
1375
|
}, {
|
|
1374
1376
|
children: showLoading ? jsxs(SpinnerContainer, {
|
|
1375
1377
|
children: [jsx(Spinner, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.123",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"@popperjs/core": "^2.11.4",
|
|
21
21
|
"history": "^5.3.0",
|
|
22
22
|
"react-router-dom": "^6.2.2",
|
|
23
|
-
"react-select": "^5.4.0"
|
|
23
|
+
"react-select": "^5.4.0",
|
|
24
|
+
"jest-canvas-mock": "^2.4.0"
|
|
24
25
|
},
|
|
25
26
|
"module": "./index.js",
|
|
26
27
|
"main": "./index.js",
|