@wallarm-org/design-system 3.4.1-rc-fix-data-display-category.2 → 4.0.0
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/dist/components/Chat/Chat.js +20 -18
- package/dist/components/Chat/ChatTrigger.js +37 -33
- package/dist/components/DateInput/internal/DateInputInternal.js +8 -4
- package/dist/components/DateRangeInput/DateRangeInputInternal.js +8 -4
- package/dist/components/DateRangeInput/DateRangeSeparator.js +15 -6
- package/dist/components/FileUpload/FileUploadItemReplaceTrigger.js +14 -11
- package/dist/components/FilterCascade/FilterCascadeLevel.js +18 -10
- package/dist/components/FilterInput/FilterInput.d.ts +2 -1
- package/dist/components/FilterInput/FilterInput.js +160 -142
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.js +157 -138
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputRemoveButton.js +8 -4
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/PairSeparator.js +20 -11
- package/dist/components/FilterInput/FilterInputField/FilterInputChip/Segment.js +4 -0
- package/dist/components/FilterInput/FilterInputField/FilterInputConnectorChip/FilterInputConnectorChip.js +98 -86
- package/dist/components/FilterInput/FilterInputField/FilterInputField.js +82 -70
- package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.js +5 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.d.ts +2 -1
- package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.js +20 -14
- package/dist/components/NavRail/NavRailItem.js +57 -55
- package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +20 -13
- package/dist/components/Selection/SelectionItem.js +8 -4
- package/dist/components/SimpleCharts/AreaChart/AreaChartArea.js +8 -4
- package/dist/components/SimpleCharts/BarList/BarListPercent.js +16 -13
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.js +8 -4
- package/dist/components/SimpleCharts/LineChart/LineChartLine.js +8 -4
- package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.js +3 -0
- package/dist/components/SimpleCharts/PieChart/PieChartDonut.js +33 -30
- package/dist/components/Tree/TreeItemContent.js +18 -12
- package/dist/components/Tree/TreeItemHeader.js +49 -38
- package/dist/components/TreeView/TreeViewItem.js +46 -40
- package/dist/metadata/components.json +68 -512
- package/package.json +1 -1
- package/dist/components/TreeBase/TreeBase.d.ts +0 -31
- package/dist/components/TreeBase/TreeBase.js +0 -245
- package/dist/components/TreeBase/classes.d.ts +0 -7
- package/dist/components/TreeBase/classes.js +0 -10
- package/dist/components/TreeBase/index.d.ts +0 -1
- package/dist/components/TreeBase/index.js +0 -1
|
@@ -14,7 +14,7 @@ import { navRailItemCompactLabelClassName, navRailItemVariants } from "./classes
|
|
|
14
14
|
import { useNavRailContext } from "./NavRailContext.js";
|
|
15
15
|
import { useShortcut } from "./useShortcut.js";
|
|
16
16
|
const NavRailItem = (t0)=>{
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(58);
|
|
18
18
|
let Icon;
|
|
19
19
|
let avatarSrc;
|
|
20
20
|
let children;
|
|
@@ -89,12 +89,13 @@ const NavRailItem = (t0)=>{
|
|
|
89
89
|
$[19] = t7;
|
|
90
90
|
} else t7 = $[19];
|
|
91
91
|
let t8;
|
|
92
|
-
if ($[20] !== Icon || $[21] !== avatarSrc || $[22] !== hasPlate) {
|
|
92
|
+
if ($[20] !== Icon || $[21] !== avatarSrc || $[22] !== hasPlate || $[23] !== testId) {
|
|
93
93
|
t8 = /*#__PURE__*/ jsx("span", {
|
|
94
94
|
className: "flex shrink-0 items-center justify-center",
|
|
95
95
|
children: hasPlate ? /*#__PURE__*/ jsxs(Avatar, {
|
|
96
96
|
size: "md",
|
|
97
97
|
"data-slot": "nav-rail-item-avatar",
|
|
98
|
+
"data-testid": testId && `${testId}--avatar`,
|
|
98
99
|
className: "-m-4",
|
|
99
100
|
children: [
|
|
100
101
|
/*#__PURE__*/ jsx(AvatarImage, {
|
|
@@ -111,39 +112,40 @@ const NavRailItem = (t0)=>{
|
|
|
111
112
|
$[20] = Icon;
|
|
112
113
|
$[21] = avatarSrc;
|
|
113
114
|
$[22] = hasPlate;
|
|
114
|
-
$[23] =
|
|
115
|
-
|
|
115
|
+
$[23] = testId;
|
|
116
|
+
$[24] = t8;
|
|
117
|
+
} else t8 = $[24];
|
|
116
118
|
let t9;
|
|
117
|
-
if ($[
|
|
119
|
+
if ($[25] !== label || $[26] !== mode) {
|
|
118
120
|
t9 = "expanded" === mode && /*#__PURE__*/ jsx("span", {
|
|
119
121
|
className: cn("truncate whitespace-nowrap transition-[opacity,width] duration-200 pl-8"),
|
|
120
122
|
children: label
|
|
121
123
|
});
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
} else t9 = $[
|
|
124
|
+
$[25] = label;
|
|
125
|
+
$[26] = mode;
|
|
126
|
+
$[27] = t9;
|
|
127
|
+
} else t9 = $[27];
|
|
126
128
|
let t10;
|
|
127
|
-
if ($[
|
|
129
|
+
if ($[28] !== label || $[29] !== mode || $[30] !== showsLabel) {
|
|
128
130
|
t10 = showsLabel && "compact" === mode && /*#__PURE__*/ jsx("span", {
|
|
129
131
|
className: navRailItemCompactLabelClassName,
|
|
130
132
|
children: label
|
|
131
133
|
});
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
} else t10 = $[
|
|
134
|
+
$[28] = label;
|
|
135
|
+
$[29] = mode;
|
|
136
|
+
$[30] = showsLabel;
|
|
137
|
+
$[31] = t10;
|
|
138
|
+
} else t10 = $[31];
|
|
137
139
|
let t11;
|
|
138
|
-
if ($[
|
|
140
|
+
if ($[32] !== children) {
|
|
139
141
|
t11 = /*#__PURE__*/ jsx(Slottable, {
|
|
140
142
|
children: children
|
|
141
143
|
});
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
} else t11 = $[
|
|
144
|
+
$[32] = children;
|
|
145
|
+
$[33] = t11;
|
|
146
|
+
} else t11 = $[33];
|
|
145
147
|
let t12;
|
|
146
|
-
if ($[
|
|
148
|
+
if ($[34] !== Comp || $[35] !== props || $[36] !== t10 || $[37] !== t11 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9 || $[44] !== testId) {
|
|
147
149
|
t12 = /*#__PURE__*/ jsxs(Comp, {
|
|
148
150
|
...props,
|
|
149
151
|
ref: t4,
|
|
@@ -159,29 +161,29 @@ const NavRailItem = (t0)=>{
|
|
|
159
161
|
t11
|
|
160
162
|
]
|
|
161
163
|
});
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
} else t12 = $[
|
|
164
|
+
$[34] = Comp;
|
|
165
|
+
$[35] = props;
|
|
166
|
+
$[36] = t10;
|
|
167
|
+
$[37] = t11;
|
|
168
|
+
$[38] = t4;
|
|
169
|
+
$[39] = t5;
|
|
170
|
+
$[40] = t6;
|
|
171
|
+
$[41] = t7;
|
|
172
|
+
$[42] = t8;
|
|
173
|
+
$[43] = t9;
|
|
174
|
+
$[44] = testId;
|
|
175
|
+
$[45] = t12;
|
|
176
|
+
} else t12 = $[45];
|
|
175
177
|
const element = t12;
|
|
176
178
|
let t13;
|
|
177
|
-
if ($[
|
|
179
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
178
180
|
t13 = {
|
|
179
181
|
placement: "right"
|
|
180
182
|
};
|
|
181
|
-
$[
|
|
182
|
-
} else t13 = $[
|
|
183
|
+
$[46] = t13;
|
|
184
|
+
} else t13 = $[46];
|
|
183
185
|
let t14;
|
|
184
|
-
if ($[
|
|
186
|
+
if ($[47] !== element || $[48] !== props) {
|
|
185
187
|
t14 = /*#__PURE__*/ jsx(TooltipTrigger, {
|
|
186
188
|
asChild: true,
|
|
187
189
|
children: props["aria-haspopup"] ? /*#__PURE__*/ jsx("span", {
|
|
@@ -189,18 +191,18 @@ const NavRailItem = (t0)=>{
|
|
|
189
191
|
children: element
|
|
190
192
|
}) : element
|
|
191
193
|
});
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
} else t14 = $[
|
|
194
|
+
$[47] = element;
|
|
195
|
+
$[48] = props;
|
|
196
|
+
$[49] = t14;
|
|
197
|
+
} else t14 = $[49];
|
|
196
198
|
let t15;
|
|
197
|
-
if ($[
|
|
199
|
+
if ($[50] !== shortcut) {
|
|
198
200
|
t15 = shortcut && shortcut.length > 0 && shortcut.map(_temp);
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
} else t15 = $[
|
|
201
|
+
$[50] = shortcut;
|
|
202
|
+
$[51] = t15;
|
|
203
|
+
} else t15 = $[51];
|
|
202
204
|
let t16;
|
|
203
|
-
if ($[
|
|
205
|
+
if ($[52] !== label || $[53] !== t15) {
|
|
204
206
|
t16 = /*#__PURE__*/ jsxs(TooltipContent, {
|
|
205
207
|
children: [
|
|
206
208
|
label,
|
|
@@ -208,12 +210,12 @@ const NavRailItem = (t0)=>{
|
|
|
208
210
|
t15
|
|
209
211
|
]
|
|
210
212
|
});
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
} else t16 = $[
|
|
213
|
+
$[52] = label;
|
|
214
|
+
$[53] = t15;
|
|
215
|
+
$[54] = t16;
|
|
216
|
+
} else t16 = $[54];
|
|
215
217
|
let t17;
|
|
216
|
-
if ($[
|
|
218
|
+
if ($[55] !== t14 || $[56] !== t16) {
|
|
217
219
|
t17 = /*#__PURE__*/ jsxs(Tooltip, {
|
|
218
220
|
positioning: t13,
|
|
219
221
|
children: [
|
|
@@ -221,10 +223,10 @@ const NavRailItem = (t0)=>{
|
|
|
221
223
|
t16
|
|
222
224
|
]
|
|
223
225
|
});
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
} else t17 = $[
|
|
226
|
+
$[55] = t14;
|
|
227
|
+
$[56] = t16;
|
|
228
|
+
$[57] = t17;
|
|
229
|
+
} else t17 = $[57];
|
|
228
230
|
return t17;
|
|
229
231
|
};
|
|
230
232
|
NavRailItem.displayName = "NavRailItem";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useSelectContext } from "@ark-ui/react/select";
|
|
4
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
4
5
|
import { Tag, TagClose } from "../../Tag/index.js";
|
|
5
6
|
const TAG_SIZE_BY_SELECT_SIZE = {
|
|
6
7
|
small: "medium",
|
|
@@ -9,10 +10,12 @@ const TAG_SIZE_BY_SELECT_SIZE = {
|
|
|
9
10
|
"inline-edit": "large"
|
|
10
11
|
};
|
|
11
12
|
const SelectInputItemRenderer = (t0)=>{
|
|
12
|
-
const $ = c(
|
|
13
|
+
const $ = c(15);
|
|
13
14
|
const { item, size: t1 } = t0;
|
|
14
15
|
const size = void 0 === t1 ? "default" : t1;
|
|
15
16
|
const { value, setValue } = useSelectContext();
|
|
17
|
+
const testId = useTestId("tag");
|
|
18
|
+
const closeTestId = useTestId("close");
|
|
16
19
|
let t2;
|
|
17
20
|
if ($[0] !== item.value || $[1] !== setValue || $[2] !== value) {
|
|
18
21
|
t2 = ()=>{
|
|
@@ -34,29 +37,33 @@ const SelectInputItemRenderer = (t0)=>{
|
|
|
34
37
|
$[5] = t4;
|
|
35
38
|
} else t4 = $[5];
|
|
36
39
|
let t5;
|
|
37
|
-
if ($[6] !== handleRemove) {
|
|
40
|
+
if ($[6] !== closeTestId || $[7] !== handleRemove) {
|
|
38
41
|
t5 = /*#__PURE__*/ jsx(TagClose, {
|
|
39
|
-
onClick: handleRemove
|
|
42
|
+
onClick: handleRemove,
|
|
43
|
+
"data-testid": closeTestId
|
|
40
44
|
});
|
|
41
|
-
$[6] =
|
|
42
|
-
$[7] =
|
|
43
|
-
|
|
45
|
+
$[6] = closeTestId;
|
|
46
|
+
$[7] = handleRemove;
|
|
47
|
+
$[8] = t5;
|
|
48
|
+
} else t5 = $[8];
|
|
44
49
|
let t6;
|
|
45
|
-
if ($[
|
|
50
|
+
if ($[9] !== item.label || $[10] !== t3 || $[11] !== t4 || $[12] !== t5 || $[13] !== testId) {
|
|
46
51
|
t6 = /*#__PURE__*/ jsxs(Tag, {
|
|
47
52
|
size: t3,
|
|
53
|
+
"data-testid": testId,
|
|
48
54
|
children: [
|
|
49
55
|
t4,
|
|
50
56
|
item.label,
|
|
51
57
|
t5
|
|
52
58
|
]
|
|
53
59
|
});
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
|
|
60
|
+
$[9] = item.label;
|
|
61
|
+
$[10] = t3;
|
|
62
|
+
$[11] = t4;
|
|
63
|
+
$[12] = t5;
|
|
64
|
+
$[13] = testId;
|
|
65
|
+
$[14] = t6;
|
|
66
|
+
} else t6 = $[14];
|
|
60
67
|
return t6;
|
|
61
68
|
};
|
|
62
69
|
export { SelectInputItemRenderer, TAG_SIZE_BY_SELECT_SIZE };
|
|
@@ -2,11 +2,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
|
+
import { useTestId } from "../../utils/testId.js";
|
|
5
6
|
import { Checkbox, CheckboxIndicator } from "../Checkbox/index.js";
|
|
6
7
|
import { selectionItemVariants } from "./classes.js";
|
|
7
8
|
import { useSelectionContext } from "./useSelectionContext.js";
|
|
8
9
|
const SelectionItem = (t0)=>{
|
|
9
|
-
const $ = c(
|
|
10
|
+
const $ = c(29);
|
|
10
11
|
const { itemId, disabled: t1, className, children } = t0;
|
|
11
12
|
const disabled = void 0 === t1 ? false : t1;
|
|
12
13
|
const { isSelected, toggleItem, registerDisabled } = useSelectionContext();
|
|
@@ -18,6 +19,7 @@ const SelectionItem = (t0)=>{
|
|
|
18
19
|
$[2] = t2;
|
|
19
20
|
} else t2 = $[2];
|
|
20
21
|
const selected = t2;
|
|
22
|
+
const testId = useTestId("item");
|
|
21
23
|
let t3;
|
|
22
24
|
let t4;
|
|
23
25
|
if ($[3] !== disabled || $[4] !== itemId || $[5] !== registerDisabled) {
|
|
@@ -87,9 +89,10 @@ const SelectionItem = (t0)=>{
|
|
|
87
89
|
$[21] = t10;
|
|
88
90
|
} else t10 = $[21];
|
|
89
91
|
let t11;
|
|
90
|
-
if ($[22] !== children || $[23] !== handleClickCapture || $[24] !== t10 || $[25] !== t6 || $[26] !== t7) {
|
|
92
|
+
if ($[22] !== children || $[23] !== handleClickCapture || $[24] !== t10 || $[25] !== t6 || $[26] !== t7 || $[27] !== testId) {
|
|
91
93
|
t11 = /*#__PURE__*/ jsxs("div", {
|
|
92
94
|
"data-slot": "selection-item",
|
|
95
|
+
"data-testid": testId,
|
|
93
96
|
"data-selected": t6,
|
|
94
97
|
className: t7,
|
|
95
98
|
onClickCapture: handleClickCapture,
|
|
@@ -103,8 +106,9 @@ const SelectionItem = (t0)=>{
|
|
|
103
106
|
$[24] = t10;
|
|
104
107
|
$[25] = t6;
|
|
105
108
|
$[26] = t7;
|
|
106
|
-
$[27] =
|
|
107
|
-
|
|
109
|
+
$[27] = testId;
|
|
110
|
+
$[28] = t11;
|
|
111
|
+
} else t11 = $[28];
|
|
108
112
|
return t11;
|
|
109
113
|
};
|
|
110
114
|
SelectionItem.displayName = "SelectionItem";
|
|
@@ -2,12 +2,13 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useContext, useEffect } from "react";
|
|
4
4
|
import { Area } from "recharts";
|
|
5
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
5
6
|
import { LineChartActiveContext, LineChartDataContext } from "../LineChart/LineChartContext.js";
|
|
6
7
|
import { warnLineChartLine } from "../LineChart/lib/warn.js";
|
|
7
8
|
import { AreaChartVariantContext } from "./AreaChartContext.js";
|
|
8
9
|
import { AREA_FILL_OPACITY, AREA_INACTIVE_OPACITY, AREA_STROKE_FILL, AREA_STROKE_WIDTH, resolveSeriesColor } from "./constants.js";
|
|
9
10
|
const AreaChartArea = (t0)=>{
|
|
10
|
-
const $ = c(
|
|
11
|
+
const $ = c(12);
|
|
11
12
|
const { seriesKey, curve: t1, disableAnimation: t2, connectNulls: t3, strokeWidth: t4 } = t0;
|
|
12
13
|
const curve = void 0 === t1 ? "monotone" : t1;
|
|
13
14
|
const connectNulls = void 0 === t3 ? false : t3;
|
|
@@ -15,6 +16,7 @@ const AreaChartArea = (t0)=>{
|
|
|
15
16
|
const dataCtx = useContext(LineChartDataContext);
|
|
16
17
|
const { activeKey } = useContext(LineChartActiveContext);
|
|
17
18
|
const variant = useContext(AreaChartVariantContext);
|
|
19
|
+
const testId = useTestId("area");
|
|
18
20
|
const series = dataCtx?.seriesByKey.get(seriesKey);
|
|
19
21
|
const isHidden = dataCtx?.hiddenSet.has(seriesKey) ?? false;
|
|
20
22
|
useEffect(()=>{
|
|
@@ -34,7 +36,7 @@ const AreaChartArea = (t0)=>{
|
|
|
34
36
|
const t5 = "stacked" === variant ? "area-stack" : void 0;
|
|
35
37
|
const t6 = isActive ? "true" : void 0;
|
|
36
38
|
let t7;
|
|
37
|
-
if ($[0] !== connectNulls || $[1] !== curve || $[2] !== fill || $[3] !== opacity || $[4] !== series.label || $[5] !== seriesKey || $[6] !== stroke || $[7] !== strokeWidth || $[8] !== t5 || $[9] !== t6) {
|
|
39
|
+
if ($[0] !== connectNulls || $[1] !== curve || $[2] !== fill || $[3] !== opacity || $[4] !== series.label || $[5] !== seriesKey || $[6] !== stroke || $[7] !== strokeWidth || $[8] !== t5 || $[9] !== t6 || $[10] !== testId) {
|
|
38
40
|
t7 = /*#__PURE__*/ jsx(Area, {
|
|
39
41
|
dataKey: seriesKey,
|
|
40
42
|
name: series.label,
|
|
@@ -52,6 +54,7 @@ const AreaChartArea = (t0)=>{
|
|
|
52
54
|
stackId: t5,
|
|
53
55
|
isAnimationActive: false,
|
|
54
56
|
"data-slot": "area-chart-area",
|
|
57
|
+
"data-testid": testId,
|
|
55
58
|
"data-key": seriesKey,
|
|
56
59
|
"data-active": t6
|
|
57
60
|
});
|
|
@@ -65,8 +68,9 @@ const AreaChartArea = (t0)=>{
|
|
|
65
68
|
$[7] = strokeWidth;
|
|
66
69
|
$[8] = t5;
|
|
67
70
|
$[9] = t6;
|
|
68
|
-
$[10] =
|
|
69
|
-
|
|
71
|
+
$[10] = testId;
|
|
72
|
+
$[11] = t7;
|
|
73
|
+
} else t7 = $[11];
|
|
70
74
|
return t7;
|
|
71
75
|
};
|
|
72
76
|
AreaChartArea.displayName = "AreaChartArea";
|
|
@@ -6,7 +6,7 @@ import { useTestId } from "../../../utils/testId.js";
|
|
|
6
6
|
import { BarListItemContext } from "./BarListContext.js";
|
|
7
7
|
import { barListPercentSymbolVariants, barListPercentVariants } from "./classes.js";
|
|
8
8
|
const BarListPercent = (t0)=>{
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(22);
|
|
10
10
|
let children;
|
|
11
11
|
let className;
|
|
12
12
|
let props;
|
|
@@ -33,6 +33,7 @@ const BarListPercent = (t0)=>{
|
|
|
33
33
|
const digits = void 0 === t1 ? 0 : t1;
|
|
34
34
|
const variant = void 0 === t2 ? "split" : t2;
|
|
35
35
|
const testId = useTestId("percent");
|
|
36
|
+
const symbolTestId = useTestId("percent-symbol");
|
|
36
37
|
const itemCtx = useContext(BarListItemContext);
|
|
37
38
|
const percent = (itemCtx?.ratio ?? 0) * 100;
|
|
38
39
|
let t3;
|
|
@@ -45,12 +46,13 @@ const BarListPercent = (t0)=>{
|
|
|
45
46
|
$[9] = t3;
|
|
46
47
|
} else t3 = $[9];
|
|
47
48
|
let t4;
|
|
48
|
-
if ($[10] !== children || $[11] !== digits || $[12] !== percent || $[13] !== variant) {
|
|
49
|
+
if ($[10] !== children || $[11] !== digits || $[12] !== percent || $[13] !== symbolTestId || $[14] !== variant) {
|
|
49
50
|
t4 = children ?? /*#__PURE__*/ jsxs(Fragment, {
|
|
50
51
|
children: [
|
|
51
52
|
percent.toFixed(digits),
|
|
52
53
|
/*#__PURE__*/ jsx("span", {
|
|
53
54
|
"data-slot": "bar-list-percent-symbol",
|
|
55
|
+
"data-testid": symbolTestId,
|
|
54
56
|
className: barListPercentSymbolVariants({
|
|
55
57
|
variant
|
|
56
58
|
}),
|
|
@@ -61,11 +63,12 @@ const BarListPercent = (t0)=>{
|
|
|
61
63
|
$[10] = children;
|
|
62
64
|
$[11] = digits;
|
|
63
65
|
$[12] = percent;
|
|
64
|
-
$[13] =
|
|
65
|
-
$[14] =
|
|
66
|
-
|
|
66
|
+
$[13] = symbolTestId;
|
|
67
|
+
$[14] = variant;
|
|
68
|
+
$[15] = t4;
|
|
69
|
+
} else t4 = $[15];
|
|
67
70
|
let t5;
|
|
68
|
-
if ($[
|
|
71
|
+
if ($[16] !== props || $[17] !== ref || $[18] !== t3 || $[19] !== t4 || $[20] !== testId) {
|
|
69
72
|
t5 = /*#__PURE__*/ jsx("span", {
|
|
70
73
|
...props,
|
|
71
74
|
ref: ref,
|
|
@@ -74,13 +77,13 @@ const BarListPercent = (t0)=>{
|
|
|
74
77
|
className: t3,
|
|
75
78
|
children: t4
|
|
76
79
|
});
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
} else t5 = $[
|
|
80
|
+
$[16] = props;
|
|
81
|
+
$[17] = ref;
|
|
82
|
+
$[18] = t3;
|
|
83
|
+
$[19] = t4;
|
|
84
|
+
$[20] = testId;
|
|
85
|
+
$[21] = t5;
|
|
86
|
+
} else t5 = $[21];
|
|
84
87
|
return t5;
|
|
85
88
|
};
|
|
86
89
|
BarListPercent.displayName = "BarListPercent";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
3
4
|
import { ChartHoverCard } from "../internal/ChartHoverCard.js";
|
|
4
5
|
const LineChartHoverPopover = (t0)=>{
|
|
5
|
-
const $ = c(
|
|
6
|
+
const $ = c(7);
|
|
6
7
|
let props;
|
|
7
8
|
let ref;
|
|
8
9
|
if ($[0] !== t0) {
|
|
@@ -14,18 +15,21 @@ const LineChartHoverPopover = (t0)=>{
|
|
|
14
15
|
props = $[1];
|
|
15
16
|
ref = $[2];
|
|
16
17
|
}
|
|
18
|
+
const testId = useTestId("hover-popover");
|
|
17
19
|
let t1;
|
|
18
|
-
if ($[3] !== props || $[4] !== ref) {
|
|
20
|
+
if ($[3] !== props || $[4] !== ref || $[5] !== testId) {
|
|
19
21
|
t1 = /*#__PURE__*/ jsx(ChartHoverCard, {
|
|
20
22
|
ref: ref,
|
|
21
23
|
role: "tooltip",
|
|
22
24
|
"aria-live": "polite",
|
|
25
|
+
"data-testid": testId,
|
|
23
26
|
...props
|
|
24
27
|
});
|
|
25
28
|
$[3] = props;
|
|
26
29
|
$[4] = ref;
|
|
27
|
-
$[5] =
|
|
28
|
-
|
|
30
|
+
$[5] = testId;
|
|
31
|
+
$[6] = t1;
|
|
32
|
+
} else t1 = $[6];
|
|
29
33
|
return t1;
|
|
30
34
|
};
|
|
31
35
|
LineChartHoverPopover.displayName = "LineChartHoverPopover";
|
|
@@ -2,18 +2,20 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useContext, useEffect } from "react";
|
|
4
4
|
import { Line } from "recharts";
|
|
5
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
5
6
|
import { LINE_DASH_DASHARRAY, LINE_INACTIVE_OPACITY, LINE_STROKE_FILL, LINE_STROKE_WIDTH, resolveSeriesColor } from "./constants.js";
|
|
6
7
|
import { LineChartActiveContext, LineChartDataContext } from "./LineChartContext.js";
|
|
7
8
|
import { warnLineChartLine } from "./lib/warn.js";
|
|
8
9
|
const wrap = (cb)=>cb ? (_props, event)=>cb(event) : void 0;
|
|
9
10
|
const LineChartLine = (t0)=>{
|
|
10
|
-
const $ = c(
|
|
11
|
+
const $ = c(20);
|
|
11
12
|
const { seriesKey, curve: t1, disableAnimation: t2, connectNulls: t3, strokeWidth: t4, onClick, onMouseEnter, onMouseLeave } = t0;
|
|
12
13
|
const curve = void 0 === t1 ? "monotone" : t1;
|
|
13
14
|
const connectNulls = void 0 === t3 ? false : t3;
|
|
14
15
|
const strokeWidth = void 0 === t4 ? LINE_STROKE_WIDTH : t4;
|
|
15
16
|
const dataCtx = useContext(LineChartDataContext);
|
|
16
17
|
const { activeKey } = useContext(LineChartActiveContext);
|
|
18
|
+
const testId = useTestId("line");
|
|
17
19
|
const series = dataCtx?.seriesByKey.get(seriesKey);
|
|
18
20
|
const isHidden = dataCtx?.hiddenSet.has(seriesKey) ?? false;
|
|
19
21
|
useEffect(()=>{
|
|
@@ -51,7 +53,7 @@ const LineChartLine = (t0)=>{
|
|
|
51
53
|
} else t8 = $[5];
|
|
52
54
|
const t9 = isActive ? "true" : void 0;
|
|
53
55
|
let t10;
|
|
54
|
-
if ($[6] !== connectNulls || $[7] !== curve || $[8] !== opacity || $[9] !== series.label || $[10] !== seriesKey || $[11] !== stroke || $[12] !== strokeDasharray || $[13] !== strokeWidth || $[14] !== t6 || $[15] !== t7 || $[16] !== t8 || $[17] !== t9) {
|
|
56
|
+
if ($[6] !== connectNulls || $[7] !== curve || $[8] !== opacity || $[9] !== series.label || $[10] !== seriesKey || $[11] !== stroke || $[12] !== strokeDasharray || $[13] !== strokeWidth || $[14] !== t6 || $[15] !== t7 || $[16] !== t8 || $[17] !== t9 || $[18] !== testId) {
|
|
55
57
|
t10 = /*#__PURE__*/ jsx(Line, {
|
|
56
58
|
dataKey: seriesKey,
|
|
57
59
|
name: t5,
|
|
@@ -70,6 +72,7 @@ const LineChartLine = (t0)=>{
|
|
|
70
72
|
onMouseEnter: t7,
|
|
71
73
|
onMouseLeave: t8,
|
|
72
74
|
"data-slot": "line-chart-line",
|
|
75
|
+
"data-testid": testId,
|
|
73
76
|
"data-key": seriesKey,
|
|
74
77
|
"data-active": t9
|
|
75
78
|
});
|
|
@@ -85,8 +88,9 @@ const LineChartLine = (t0)=>{
|
|
|
85
88
|
$[15] = t7;
|
|
86
89
|
$[16] = t8;
|
|
87
90
|
$[17] = t9;
|
|
88
|
-
$[18] =
|
|
89
|
-
|
|
91
|
+
$[18] = testId;
|
|
92
|
+
$[19] = t10;
|
|
93
|
+
} else t10 = $[19];
|
|
90
94
|
return t10;
|
|
91
95
|
};
|
|
92
96
|
LineChartLine.displayName = "LineChartLine";
|
|
@@ -2,6 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import { ReferenceArea, usePlotArea } from "recharts";
|
|
5
|
+
import { useTestId } from "../../../utils/testId.js";
|
|
5
6
|
import { formatChartDateTime } from "../lib/timeFormatters.js";
|
|
6
7
|
import { lineChartZoomCursorPopoverClasses } from "./classes.js";
|
|
7
8
|
import { useZoomPendingListeners } from "./hooks/useZoomPendingListeners.js";
|
|
@@ -17,6 +18,7 @@ const LineChartZoomBrush = ({ disabled = false, formatRange = defaultFormatRange
|
|
|
17
18
|
const dataCtx = useContext(LineChartDataContext);
|
|
18
19
|
const zoomCtx = useContext(LineChartZoomContext);
|
|
19
20
|
const popoverRef = useRef(null);
|
|
21
|
+
const testId = useTestId('zoom-popover');
|
|
20
22
|
const plotArea = usePlotArea();
|
|
21
23
|
const rootRef = zoomCtx?.rootRef;
|
|
22
24
|
const drag = zoomCtx?.drag ?? null;
|
|
@@ -130,6 +132,7 @@ const LineChartZoomBrush = ({ disabled = false, formatRange = defaultFormatRange
|
|
|
130
132
|
const popoverContent = range && popoverPosition ? /*#__PURE__*/ jsx("div", {
|
|
131
133
|
ref: popoverRef,
|
|
132
134
|
"data-slot": "line-chart-zoom-cursor-popover",
|
|
135
|
+
"data-testid": testId,
|
|
133
136
|
"data-zoom-state": isPending ? 'pending' : 'dragging',
|
|
134
137
|
className: lineChartZoomCursorPopoverClasses,
|
|
135
138
|
style: {
|
|
@@ -14,7 +14,7 @@ const PLACEHOLDER_DATA = [
|
|
|
14
14
|
}
|
|
15
15
|
];
|
|
16
16
|
const PieChartDonut = (t0)=>{
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(35);
|
|
18
18
|
let children;
|
|
19
19
|
let className;
|
|
20
20
|
let props;
|
|
@@ -41,6 +41,7 @@ const PieChartDonut = (t0)=>{
|
|
|
41
41
|
const inactiveOpacity = void 0 === t1 ? 0.3 : t1;
|
|
42
42
|
const disableAnimation = void 0 === t2 ? false : t2;
|
|
43
43
|
const testId = useTestId("donut");
|
|
44
|
+
const sliceTestId = useTestId("slice");
|
|
44
45
|
const dataCtx = useContext(PieChartDataContext);
|
|
45
46
|
const { activeName } = useContext(PieChartActiveContext);
|
|
46
47
|
const { selectedSet } = useContext(PieChartSelectionContext);
|
|
@@ -68,7 +69,7 @@ const PieChartDonut = (t0)=>{
|
|
|
68
69
|
const isValidTotal = !!dataCtx?.isValidTotal;
|
|
69
70
|
const isMultiSlice = isValidTotal && dataCtx.data.length > 1;
|
|
70
71
|
let t5;
|
|
71
|
-
if ($[11] !== activeName || $[12] !== inactiveOpacity || $[13] !== isValidTotal || $[14] !== selectedSet) {
|
|
72
|
+
if ($[11] !== activeName || $[12] !== inactiveOpacity || $[13] !== isValidTotal || $[14] !== selectedSet || $[15] !== sliceTestId) {
|
|
72
73
|
t5 = (sectorProps)=>{
|
|
73
74
|
const { isActive: _isActive, index: _index_0, payload, ...sectorRest } = sectorProps;
|
|
74
75
|
if (!isValidTotal) return /*#__PURE__*/ jsx(Sector, {
|
|
@@ -92,6 +93,7 @@ const PieChartDonut = (t0)=>{
|
|
|
92
93
|
stroke: "none",
|
|
93
94
|
className: cn("outline-none transition-opacity duration-150 ease-out", datum_0?.className),
|
|
94
95
|
"data-slot": "pie-chart-slice",
|
|
96
|
+
"data-testid": sliceTestId,
|
|
95
97
|
"data-name": name,
|
|
96
98
|
"data-active": isActive ? "true" : void 0
|
|
97
99
|
});
|
|
@@ -100,31 +102,32 @@ const PieChartDonut = (t0)=>{
|
|
|
100
102
|
$[12] = inactiveOpacity;
|
|
101
103
|
$[13] = isValidTotal;
|
|
102
104
|
$[14] = selectedSet;
|
|
103
|
-
$[15] =
|
|
104
|
-
|
|
105
|
+
$[15] = sliceTestId;
|
|
106
|
+
$[16] = t5;
|
|
107
|
+
} else t5 = $[16];
|
|
105
108
|
const renderSlice = t5;
|
|
106
109
|
const pieData = isValidTotal ? dataCtx.data : PLACEHOLDER_DATA;
|
|
107
110
|
let t6;
|
|
108
|
-
if ($[
|
|
111
|
+
if ($[17] !== className) {
|
|
109
112
|
t6 = cn(pieChartDonutClasses, className);
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
} else t6 = $[
|
|
113
|
+
$[17] = className;
|
|
114
|
+
$[18] = t6;
|
|
115
|
+
} else t6 = $[18];
|
|
113
116
|
let t7;
|
|
114
|
-
if ($[
|
|
117
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
115
118
|
t7 = {
|
|
116
119
|
top: 0,
|
|
117
120
|
right: 0,
|
|
118
121
|
bottom: 0,
|
|
119
122
|
left: 0
|
|
120
123
|
};
|
|
121
|
-
$[
|
|
122
|
-
} else t7 = $[
|
|
124
|
+
$[19] = t7;
|
|
125
|
+
} else t7 = $[19];
|
|
123
126
|
const t8 = isMultiSlice ? PIE_DONUT_CORNER_RADIUS : 0;
|
|
124
127
|
const t9 = isMultiSlice ? PIE_DONUT_PADDING_ANGLE : 0;
|
|
125
128
|
const t10 = disableAnimation ? false : "auto";
|
|
126
129
|
let t11;
|
|
127
|
-
if ($[
|
|
130
|
+
if ($[20] !== handleEnter || $[21] !== handleLeave || $[22] !== pieData || $[23] !== renderSlice || $[24] !== t10 || $[25] !== t8 || $[26] !== t9) {
|
|
128
131
|
t11 = /*#__PURE__*/ jsx(PieChart, {
|
|
129
132
|
width: PIE_DONUT_SIZE,
|
|
130
133
|
height: PIE_DONUT_SIZE,
|
|
@@ -152,17 +155,17 @@ const PieChartDonut = (t0)=>{
|
|
|
152
155
|
shape: renderSlice
|
|
153
156
|
})
|
|
154
157
|
});
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
} else t11 = $[
|
|
158
|
+
$[20] = handleEnter;
|
|
159
|
+
$[21] = handleLeave;
|
|
160
|
+
$[22] = pieData;
|
|
161
|
+
$[23] = renderSlice;
|
|
162
|
+
$[24] = t10;
|
|
163
|
+
$[25] = t8;
|
|
164
|
+
$[26] = t9;
|
|
165
|
+
$[27] = t11;
|
|
166
|
+
} else t11 = $[27];
|
|
164
167
|
let t12;
|
|
165
|
-
if ($[
|
|
168
|
+
if ($[28] !== children || $[29] !== props || $[30] !== ref || $[31] !== t11 || $[32] !== t6 || $[33] !== testId) {
|
|
166
169
|
t12 = /*#__PURE__*/ jsxs("div", {
|
|
167
170
|
...props,
|
|
168
171
|
ref: ref,
|
|
@@ -175,14 +178,14 @@ const PieChartDonut = (t0)=>{
|
|
|
175
178
|
children
|
|
176
179
|
]
|
|
177
180
|
});
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else t12 = $[
|
|
181
|
+
$[28] = children;
|
|
182
|
+
$[29] = props;
|
|
183
|
+
$[30] = ref;
|
|
184
|
+
$[31] = t11;
|
|
185
|
+
$[32] = t6;
|
|
186
|
+
$[33] = testId;
|
|
187
|
+
$[34] = t12;
|
|
188
|
+
} else t12 = $[34];
|
|
186
189
|
return t12;
|
|
187
190
|
};
|
|
188
191
|
PieChartDonut.displayName = "PieChartDonut";
|