@wallarm-org/design-system 3.4.1-rc-fix-data-display-category.3 → 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
|
@@ -2,6 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { cn } from "../../../../utils/cn.js";
|
|
5
|
+
import { TestIdProvider, useTestId } from "../../../../utils/testId.js";
|
|
5
6
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../Tooltip/index.js";
|
|
6
7
|
import { ChipSearchInput } from "./ChipSearchInput.js";
|
|
7
8
|
import { chipVariants, emptyValueHitTarget } from "./classes.js";
|
|
@@ -11,7 +12,7 @@ import { PairSeparator } from "./PairSeparator.js";
|
|
|
11
12
|
import { Segment } from "./Segment.js";
|
|
12
13
|
import { SEGMENT_VARIANT } from "./segmentVariant.js";
|
|
13
14
|
const FilterInputChip = (t0)=>{
|
|
14
|
-
const $ = c(
|
|
15
|
+
const $ = c(116);
|
|
15
16
|
let attribute;
|
|
16
17
|
let attributeDescription;
|
|
17
18
|
let chipId;
|
|
@@ -30,11 +31,12 @@ const FilterInputChip = (t0)=>{
|
|
|
30
31
|
let t3;
|
|
31
32
|
let t4;
|
|
32
33
|
let t5;
|
|
34
|
+
let testIdProp;
|
|
33
35
|
let value;
|
|
34
36
|
let valueParts;
|
|
35
37
|
let valueSeparator;
|
|
36
38
|
if ($[0] !== t0) {
|
|
37
|
-
({ ref, chipId, attribute, attributeDescription, operator, value, error: t1, valueParts, valueSeparator, errorValueIndices, building: t2, disabled: t3, valueMaxWidth: t4, caretMode: t5, pair, onRemove, onSegmentClick, onPairSegmentClick, className, style, ...props } = t0);
|
|
39
|
+
({ ref, chipId, attribute, attributeDescription, operator, value, error: t1, valueParts, valueSeparator, errorValueIndices, building: t2, disabled: t3, valueMaxWidth: t4, caretMode: t5, pair, onRemove, onSegmentClick, onPairSegmentClick, className, style, "data-testid": testIdProp, ...props } = t0);
|
|
38
40
|
$[0] = t0;
|
|
39
41
|
$[1] = attribute;
|
|
40
42
|
$[2] = attributeDescription;
|
|
@@ -54,9 +56,10 @@ const FilterInputChip = (t0)=>{
|
|
|
54
56
|
$[16] = t3;
|
|
55
57
|
$[17] = t4;
|
|
56
58
|
$[18] = t5;
|
|
57
|
-
$[19] =
|
|
58
|
-
$[20] =
|
|
59
|
-
$[21] =
|
|
59
|
+
$[19] = testIdProp;
|
|
60
|
+
$[20] = value;
|
|
61
|
+
$[21] = valueParts;
|
|
62
|
+
$[22] = valueSeparator;
|
|
60
63
|
} else {
|
|
61
64
|
attribute = $[1];
|
|
62
65
|
attributeDescription = $[2];
|
|
@@ -76,15 +79,17 @@ const FilterInputChip = (t0)=>{
|
|
|
76
79
|
t3 = $[16];
|
|
77
80
|
t4 = $[17];
|
|
78
81
|
t5 = $[18];
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
testIdProp = $[19];
|
|
83
|
+
value = $[20];
|
|
84
|
+
valueParts = $[21];
|
|
85
|
+
valueSeparator = $[22];
|
|
82
86
|
}
|
|
83
87
|
const error = void 0 === t1 ? false : t1;
|
|
84
88
|
const building = void 0 === t2 ? false : t2;
|
|
85
89
|
const disabled = void 0 === t3 ? false : t3;
|
|
86
90
|
const valueMaxWidth = void 0 === t4 ? 500 : t4;
|
|
87
91
|
const caretMode = void 0 === t5 ? "end" : t5;
|
|
92
|
+
const testId = useTestId("condition-chip", testIdProp);
|
|
88
93
|
const interactive = !disabled;
|
|
89
94
|
const internalRef = useRef(null);
|
|
90
95
|
const editing = useEditingContext();
|
|
@@ -94,7 +99,7 @@ const FilterInputChip = (t0)=>{
|
|
|
94
99
|
const effectivePairError = isEditingThisChip ? void 0 : pair?.error;
|
|
95
100
|
const hasError = !!effectiveError || !!effectivePairError;
|
|
96
101
|
let t6;
|
|
97
|
-
if ($[
|
|
102
|
+
if ($[23] !== activeSegment || $[24] !== onSegmentClick) {
|
|
98
103
|
t6 = (segment, e)=>{
|
|
99
104
|
if (!onSegmentClick) return;
|
|
100
105
|
if (activeSegment === segment) return;
|
|
@@ -103,13 +108,13 @@ const FilterInputChip = (t0)=>{
|
|
|
103
108
|
if (!anchorEl) return;
|
|
104
109
|
onSegmentClick(segment, anchorEl);
|
|
105
110
|
};
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
} else t6 = $[
|
|
111
|
+
$[23] = activeSegment;
|
|
112
|
+
$[24] = onSegmentClick;
|
|
113
|
+
$[25] = t6;
|
|
114
|
+
} else t6 = $[25];
|
|
110
115
|
const handleSegmentClick = t6;
|
|
111
116
|
let t7;
|
|
112
|
-
if ($[
|
|
117
|
+
if ($[26] !== onPairSegmentClick) {
|
|
113
118
|
t7 = (segment_0, e_0)=>{
|
|
114
119
|
if (!onPairSegmentClick) return;
|
|
115
120
|
e_0.stopPropagation();
|
|
@@ -117,14 +122,14 @@ const FilterInputChip = (t0)=>{
|
|
|
117
122
|
if (!anchorEl_0) return;
|
|
118
123
|
onPairSegmentClick(segment_0, anchorEl_0);
|
|
119
124
|
};
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
} else t7 = $[
|
|
125
|
+
$[26] = onPairSegmentClick;
|
|
126
|
+
$[27] = t7;
|
|
127
|
+
} else t7 = $[27];
|
|
123
128
|
const handlePairSegmentClick = t7;
|
|
124
129
|
const handleSegmentMouseDown = _temp;
|
|
125
130
|
const editingSide = editing?.editingSide ?? 0;
|
|
126
131
|
let t8;
|
|
127
|
-
if ($[
|
|
132
|
+
if ($[28] !== editing || $[29] !== editingSide || $[30] !== isEditingThisChip) {
|
|
128
133
|
t8 = (segment_1, t9)=>{
|
|
129
134
|
const side = void 0 === t9 ? 0 : t9;
|
|
130
135
|
return isEditingThisChip && editing.editingSegment === segment_1 && editingSide === side ? {
|
|
@@ -135,31 +140,31 @@ const FilterInputChip = (t0)=>{
|
|
|
135
140
|
onEditBlur: editing.onSegmentEditBlur
|
|
136
141
|
} : {};
|
|
137
142
|
};
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
} else t8 = $[
|
|
143
|
+
$[28] = editing;
|
|
144
|
+
$[29] = editingSide;
|
|
145
|
+
$[30] = isEditingThisChip;
|
|
146
|
+
$[31] = t8;
|
|
147
|
+
} else t8 = $[31];
|
|
143
148
|
const segmentEditProps = t8;
|
|
144
149
|
const baseActiveSegment = 0 === editingSide ? activeSegment : null;
|
|
145
150
|
const pairActiveSegment = 1 === editingSide ? activeSegment : null;
|
|
146
151
|
const t9 = true === effectiveError || effectiveError === SEGMENT_VARIANT.attribute;
|
|
147
152
|
let t10;
|
|
148
|
-
if ($[
|
|
153
|
+
if ($[32] !== handleSegmentClick || $[33] !== interactive) {
|
|
149
154
|
t10 = interactive ? (e_2)=>handleSegmentClick(SEGMENT_VARIANT.attribute, e_2) : void 0;
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
} else t10 = $[
|
|
155
|
+
$[32] = handleSegmentClick;
|
|
156
|
+
$[33] = interactive;
|
|
157
|
+
$[34] = t10;
|
|
158
|
+
} else t10 = $[34];
|
|
154
159
|
const t11 = interactive && building ? handleSegmentMouseDown : void 0;
|
|
155
160
|
let t12;
|
|
156
|
-
if ($[
|
|
161
|
+
if ($[35] !== segmentEditProps) {
|
|
157
162
|
t12 = segmentEditProps(SEGMENT_VARIANT.attribute);
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
} else t12 = $[
|
|
163
|
+
$[35] = segmentEditProps;
|
|
164
|
+
$[36] = t12;
|
|
165
|
+
} else t12 = $[36];
|
|
161
166
|
let t13;
|
|
162
|
-
if ($[
|
|
167
|
+
if ($[37] !== attribute || $[38] !== t10 || $[39] !== t11 || $[40] !== t12 || $[41] !== t9) {
|
|
163
168
|
t13 = /*#__PURE__*/ jsx(Segment, {
|
|
164
169
|
variant: SEGMENT_VARIANT.attribute,
|
|
165
170
|
className: "min-w-0 max-w-[180px] shrink",
|
|
@@ -169,43 +174,43 @@ const FilterInputChip = (t0)=>{
|
|
|
169
174
|
...t12,
|
|
170
175
|
children: attribute
|
|
171
176
|
});
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
} else t13 = $[
|
|
177
|
+
$[37] = attribute;
|
|
178
|
+
$[38] = t10;
|
|
179
|
+
$[39] = t11;
|
|
180
|
+
$[40] = t12;
|
|
181
|
+
$[41] = t9;
|
|
182
|
+
$[42] = t13;
|
|
183
|
+
} else t13 = $[42];
|
|
179
184
|
const attributeSegment = t13;
|
|
180
185
|
let t14;
|
|
181
|
-
if ($[
|
|
186
|
+
if ($[43] !== ref) {
|
|
182
187
|
t14 = (node)=>{
|
|
183
188
|
internalRef.current = node;
|
|
184
189
|
if ("function" == typeof ref) ref(node);
|
|
185
190
|
else if (ref) ref.current = node;
|
|
186
191
|
};
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else t14 = $[
|
|
192
|
+
$[43] = ref;
|
|
193
|
+
$[44] = t14;
|
|
194
|
+
} else t14 = $[44];
|
|
190
195
|
const setRefs = t14;
|
|
191
196
|
let t15;
|
|
192
|
-
if ($[
|
|
197
|
+
if ($[45] !== building || $[46] !== className || $[47] !== disabled || $[48] !== hasError || $[49] !== interactive || $[50] !== pair) {
|
|
193
198
|
t15 = cn(chipVariants({
|
|
194
199
|
error: hasError,
|
|
195
200
|
interactive,
|
|
196
201
|
disabled,
|
|
197
202
|
building
|
|
198
203
|
}), pair ? void 0 : "max-w-[320px]", className);
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
} else t15 = $[
|
|
204
|
+
$[45] = building;
|
|
205
|
+
$[46] = className;
|
|
206
|
+
$[47] = disabled;
|
|
207
|
+
$[48] = hasError;
|
|
208
|
+
$[49] = interactive;
|
|
209
|
+
$[50] = pair;
|
|
210
|
+
$[51] = t15;
|
|
211
|
+
} else t15 = $[51];
|
|
207
212
|
let t16;
|
|
208
|
-
if ($[
|
|
213
|
+
if ($[52] !== pair || $[53] !== style || $[54] !== valueMaxWidth) {
|
|
209
214
|
t16 = pair ? {
|
|
210
215
|
maxWidth: valueMaxWidth,
|
|
211
216
|
...style
|
|
@@ -213,26 +218,27 @@ const FilterInputChip = (t0)=>{
|
|
|
213
218
|
maxWidth: "none",
|
|
214
219
|
...style
|
|
215
220
|
};
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else t16 = $[
|
|
221
|
+
$[52] = pair;
|
|
222
|
+
$[53] = style;
|
|
223
|
+
$[54] = valueMaxWidth;
|
|
224
|
+
$[55] = t16;
|
|
225
|
+
} else t16 = $[55];
|
|
221
226
|
let t17;
|
|
222
|
-
if ($[
|
|
227
|
+
if ($[56] !== building) {
|
|
223
228
|
t17 = building && {
|
|
224
229
|
"data-building": ""
|
|
225
230
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else t17 = $[
|
|
231
|
+
$[56] = building;
|
|
232
|
+
$[57] = t17;
|
|
233
|
+
} else t17 = $[57];
|
|
229
234
|
let t18;
|
|
230
|
-
if ($[
|
|
235
|
+
if ($[58] !== attributeDescription || $[59] !== attributeSegment || $[60] !== baseActiveSegment || $[61] !== testId) {
|
|
231
236
|
t18 = attributeDescription ? /*#__PURE__*/ jsxs(Tooltip, {
|
|
232
237
|
disabled: baseActiveSegment === SEGMENT_VARIANT.attribute,
|
|
233
238
|
children: [
|
|
234
239
|
/*#__PURE__*/ jsx(TooltipTrigger, {
|
|
235
240
|
asChild: true,
|
|
241
|
+
"data-testid": testId && `${testId}--attribute`,
|
|
236
242
|
children: attributeSegment
|
|
237
243
|
}),
|
|
238
244
|
/*#__PURE__*/ jsx(TooltipContent, {
|
|
@@ -240,13 +246,14 @@ const FilterInputChip = (t0)=>{
|
|
|
240
246
|
})
|
|
241
247
|
]
|
|
242
248
|
}) : attributeSegment;
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
|
|
249
|
+
$[58] = attributeDescription;
|
|
250
|
+
$[59] = attributeSegment;
|
|
251
|
+
$[60] = baseActiveSegment;
|
|
252
|
+
$[61] = testId;
|
|
253
|
+
$[62] = t18;
|
|
254
|
+
} else t18 = $[62];
|
|
248
255
|
let t19;
|
|
249
|
-
if ($[
|
|
256
|
+
if ($[63] !== baseActiveSegment || $[64] !== building || $[65] !== handleSegmentClick || $[66] !== interactive || $[67] !== operator || $[68] !== segmentEditProps) {
|
|
250
257
|
t19 = (operator || baseActiveSegment === SEGMENT_VARIANT.operator) && /*#__PURE__*/ jsx(Segment, {
|
|
251
258
|
variant: SEGMENT_VARIANT.operator,
|
|
252
259
|
className: "shrink-0",
|
|
@@ -255,16 +262,16 @@ const FilterInputChip = (t0)=>{
|
|
|
255
262
|
...segmentEditProps(SEGMENT_VARIANT.operator),
|
|
256
263
|
children: operator ?? ""
|
|
257
264
|
});
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
} else t19 = $[
|
|
265
|
+
$[63] = baseActiveSegment;
|
|
266
|
+
$[64] = building;
|
|
267
|
+
$[65] = handleSegmentClick;
|
|
268
|
+
$[66] = interactive;
|
|
269
|
+
$[67] = operator;
|
|
270
|
+
$[68] = segmentEditProps;
|
|
271
|
+
$[69] = t19;
|
|
272
|
+
} else t19 = $[69];
|
|
266
273
|
let t20;
|
|
267
|
-
if ($[
|
|
274
|
+
if ($[70] !== baseActiveSegment || $[71] !== building || $[72] !== caretMode || $[73] !== effectiveError || $[74] !== errorValueIndices || $[75] !== handleSegmentClick || $[76] !== interactive || $[77] !== pair || $[78] !== segmentEditProps || $[79] !== value || $[80] !== valueMaxWidth || $[81] !== valueParts || $[82] !== valueSeparator) {
|
|
268
275
|
t20 = (value || baseActiveSegment === SEGMENT_VARIANT.value || !pair && effectiveError === SEGMENT_VARIANT.value) && /*#__PURE__*/ jsx(Segment, {
|
|
269
276
|
variant: SEGMENT_VARIANT.value,
|
|
270
277
|
className: value || pair ? pair ? "max-w-[90px] shrink" : "shrink-0" : emptyValueHitTarget,
|
|
@@ -284,23 +291,23 @@ const FilterInputChip = (t0)=>{
|
|
|
284
291
|
...segmentEditProps(SEGMENT_VARIANT.value),
|
|
285
292
|
children: value ?? ""
|
|
286
293
|
});
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
} else t20 = $[
|
|
294
|
+
$[70] = baseActiveSegment;
|
|
295
|
+
$[71] = building;
|
|
296
|
+
$[72] = caretMode;
|
|
297
|
+
$[73] = effectiveError;
|
|
298
|
+
$[74] = errorValueIndices;
|
|
299
|
+
$[75] = handleSegmentClick;
|
|
300
|
+
$[76] = interactive;
|
|
301
|
+
$[77] = pair;
|
|
302
|
+
$[78] = segmentEditProps;
|
|
303
|
+
$[79] = value;
|
|
304
|
+
$[80] = valueMaxWidth;
|
|
305
|
+
$[81] = valueParts;
|
|
306
|
+
$[82] = valueSeparator;
|
|
307
|
+
$[83] = t20;
|
|
308
|
+
} else t20 = $[83];
|
|
302
309
|
let t21;
|
|
303
|
-
if ($[
|
|
310
|
+
if ($[84] !== caretMode || $[85] !== effectivePairError || $[86] !== handlePairSegmentClick || $[87] !== interactive || $[88] !== pair || $[89] !== pairActiveSegment || $[90] !== segmentEditProps || $[91] !== valueMaxWidth) {
|
|
304
311
|
t21 = pair && /*#__PURE__*/ jsxs(Fragment, {
|
|
305
312
|
children: [
|
|
306
313
|
/*#__PURE__*/ jsx(PairSeparator, {}),
|
|
@@ -329,43 +336,38 @@ const FilterInputChip = (t0)=>{
|
|
|
329
336
|
})
|
|
330
337
|
]
|
|
331
338
|
});
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
} else t21 = $[
|
|
339
|
+
$[84] = caretMode;
|
|
340
|
+
$[85] = effectivePairError;
|
|
341
|
+
$[86] = handlePairSegmentClick;
|
|
342
|
+
$[87] = interactive;
|
|
343
|
+
$[88] = pair;
|
|
344
|
+
$[89] = pairActiveSegment;
|
|
345
|
+
$[90] = segmentEditProps;
|
|
346
|
+
$[91] = valueMaxWidth;
|
|
347
|
+
$[92] = t21;
|
|
348
|
+
} else t21 = $[92];
|
|
342
349
|
let t22;
|
|
343
|
-
if ($[
|
|
350
|
+
if ($[93] !== building || $[94] !== isEditingThisChip) {
|
|
344
351
|
t22 = building && !isEditingThisChip && /*#__PURE__*/ jsx(ChipSearchInput, {});
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
} else t22 = $[
|
|
352
|
+
$[93] = building;
|
|
353
|
+
$[94] = isEditingThisChip;
|
|
354
|
+
$[95] = t22;
|
|
355
|
+
} else t22 = $[95];
|
|
349
356
|
let t23;
|
|
350
|
-
if ($[
|
|
357
|
+
if ($[96] !== disabled || $[97] !== hasError || $[98] !== onRemove) {
|
|
351
358
|
t23 = onRemove && !disabled && /*#__PURE__*/ jsx(FilterInputRemoveButton, {
|
|
352
359
|
error: hasError,
|
|
353
360
|
onRemove: onRemove
|
|
354
361
|
});
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
} else t23 = $[
|
|
362
|
+
$[96] = disabled;
|
|
363
|
+
$[97] = hasError;
|
|
364
|
+
$[98] = onRemove;
|
|
365
|
+
$[99] = t23;
|
|
366
|
+
} else t23 = $[99];
|
|
360
367
|
let t24;
|
|
361
|
-
if ($[
|
|
362
|
-
t24 = /*#__PURE__*/ jsxs(
|
|
363
|
-
|
|
364
|
-
className: t15,
|
|
365
|
-
style: t16,
|
|
366
|
-
"data-slot": "filter-input-condition-chip",
|
|
367
|
-
...t17,
|
|
368
|
-
...props,
|
|
368
|
+
if ($[100] !== t18 || $[101] !== t19 || $[102] !== t20 || $[103] !== t21 || $[104] !== t22 || $[105] !== t23 || $[106] !== testId) {
|
|
369
|
+
t24 = /*#__PURE__*/ jsxs(TestIdProvider, {
|
|
370
|
+
value: testId,
|
|
369
371
|
children: [
|
|
370
372
|
t18,
|
|
371
373
|
t19,
|
|
@@ -375,20 +377,37 @@ const FilterInputChip = (t0)=>{
|
|
|
375
377
|
t23
|
|
376
378
|
]
|
|
377
379
|
});
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
380
|
+
$[100] = t18;
|
|
381
|
+
$[101] = t19;
|
|
382
|
+
$[102] = t20;
|
|
383
|
+
$[103] = t21;
|
|
384
|
+
$[104] = t22;
|
|
385
|
+
$[105] = t23;
|
|
386
|
+
$[106] = testId;
|
|
387
|
+
$[107] = t24;
|
|
388
|
+
} else t24 = $[107];
|
|
389
|
+
let t25;
|
|
390
|
+
if ($[108] !== props || $[109] !== setRefs || $[110] !== t15 || $[111] !== t16 || $[112] !== t17 || $[113] !== t24 || $[114] !== testId) {
|
|
391
|
+
t25 = /*#__PURE__*/ jsx("div", {
|
|
392
|
+
ref: setRefs,
|
|
393
|
+
className: t15,
|
|
394
|
+
style: t16,
|
|
395
|
+
"data-slot": "filter-input-condition-chip",
|
|
396
|
+
"data-testid": testId,
|
|
397
|
+
...t17,
|
|
398
|
+
...props,
|
|
399
|
+
children: t24
|
|
400
|
+
});
|
|
401
|
+
$[108] = props;
|
|
402
|
+
$[109] = setRefs;
|
|
403
|
+
$[110] = t15;
|
|
404
|
+
$[111] = t16;
|
|
405
|
+
$[112] = t17;
|
|
406
|
+
$[113] = t24;
|
|
407
|
+
$[114] = testId;
|
|
408
|
+
$[115] = t25;
|
|
409
|
+
} else t25 = $[115];
|
|
410
|
+
return t25;
|
|
392
411
|
};
|
|
393
412
|
FilterInputChip.displayName = "FilterInputChip";
|
|
394
413
|
function _temp(e_1) {
|
package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputRemoveButton.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { X } from "../../../../icons/X.js";
|
|
4
|
+
import { useTestId } from "../../../../utils/testId.js";
|
|
4
5
|
import { removeButtonVariants } from "./classes.js";
|
|
5
6
|
const FilterInputRemoveButton = (t0)=>{
|
|
6
|
-
const $ = c(
|
|
7
|
+
const $ = c(9);
|
|
7
8
|
const { error, onRemove } = t0;
|
|
9
|
+
const testId = useTestId("remove-button");
|
|
8
10
|
let t1;
|
|
9
11
|
if ($[0] !== onRemove) {
|
|
10
12
|
t1 = (e)=>{
|
|
@@ -30,19 +32,21 @@ const FilterInputRemoveButton = (t0)=>{
|
|
|
30
32
|
$[4] = t3;
|
|
31
33
|
} else t3 = $[4];
|
|
32
34
|
let t4;
|
|
33
|
-
if ($[5] !== t1 || $[6] !== t2) {
|
|
35
|
+
if ($[5] !== t1 || $[6] !== t2 || $[7] !== testId) {
|
|
34
36
|
t4 = /*#__PURE__*/ jsx("button", {
|
|
35
37
|
type: "button",
|
|
36
38
|
onClick: t1,
|
|
37
39
|
className: t2,
|
|
38
40
|
"data-slot": "filter-input-chip-delete",
|
|
41
|
+
"data-testid": testId,
|
|
39
42
|
"aria-label": "Remove filter",
|
|
40
43
|
children: t3
|
|
41
44
|
});
|
|
42
45
|
$[5] = t1;
|
|
43
46
|
$[6] = t2;
|
|
44
|
-
$[7] =
|
|
45
|
-
|
|
47
|
+
$[7] = testId;
|
|
48
|
+
$[8] = t4;
|
|
49
|
+
} else t4 = $[8];
|
|
46
50
|
return t4;
|
|
47
51
|
};
|
|
48
52
|
FilterInputRemoveButton.displayName = "FilterInputRemoveButton";
|
|
@@ -1,25 +1,34 @@
|
|
|
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 { segmentContainer, segmentTextVariants } from "./classes.js";
|
|
4
5
|
import { PAIR_SEPARATOR_SLOT } from "./segmentVariant.js";
|
|
5
6
|
const PairSeparator = ()=>{
|
|
6
|
-
const $ = c(
|
|
7
|
+
const $ = c(3);
|
|
8
|
+
const testId = useTestId("separator");
|
|
7
9
|
let t0;
|
|
8
10
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9
|
-
t0 = /*#__PURE__*/ jsx("
|
|
11
|
+
t0 = /*#__PURE__*/ jsx("p", {
|
|
12
|
+
className: segmentTextVariants({
|
|
13
|
+
variant: "operator"
|
|
14
|
+
}),
|
|
15
|
+
children: ";"
|
|
16
|
+
});
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
} else t0 = $[0];
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[1] !== testId) {
|
|
21
|
+
t1 = /*#__PURE__*/ jsx("div", {
|
|
10
22
|
className: `${segmentContainer} shrink-0`,
|
|
11
23
|
"data-slot": PAIR_SEPARATOR_SLOT,
|
|
24
|
+
"data-testid": testId,
|
|
12
25
|
"aria-hidden": true,
|
|
13
|
-
children:
|
|
14
|
-
className: segmentTextVariants({
|
|
15
|
-
variant: "operator"
|
|
16
|
-
}),
|
|
17
|
-
children: ";"
|
|
18
|
-
})
|
|
26
|
+
children: t0
|
|
19
27
|
});
|
|
20
|
-
$[
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
$[1] = testId;
|
|
29
|
+
$[2] = t1;
|
|
30
|
+
} else t1 = $[2];
|
|
31
|
+
return t1;
|
|
23
32
|
};
|
|
24
33
|
PairSeparator.displayName = "PairSeparator";
|
|
25
34
|
export { PairSeparator };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext, useEffect, useRef } from "react";
|
|
3
3
|
import { cn } from "../../../../utils/cn.js";
|
|
4
|
+
import { useTestId } from "../../../../utils/testId.js";
|
|
4
5
|
import { FilterInputContext } from "../../FilterInputContext/FilterInputContext.js";
|
|
5
6
|
import { applyEditCaret } from "./applyEditCaret.js";
|
|
6
7
|
import { editingValueMinWidth, segmentContainer, segmentTextVariants } from "./classes.js";
|
|
@@ -9,6 +10,7 @@ import { MultiValueSegment } from "./MultiValueSegment.js";
|
|
|
9
10
|
import { useSizerWidth } from "./model/useSizerWidth.js";
|
|
10
11
|
import { SEGMENT_VARIANT } from "./segmentVariant.js";
|
|
11
12
|
const Segment = ({ ref, variant, children, className, error, editing, editText, onEditChange, onEditKeyDown, onEditBlur, valueParts, valueSeparator = ', ', errorValueIndices, caretMode, valueMaxWidth, ...props })=>{
|
|
13
|
+
const testId = useTestId(variant);
|
|
12
14
|
const textRef = useRef(null);
|
|
13
15
|
const inputRef = useRef(null);
|
|
14
16
|
const sizerRef = useRef(null);
|
|
@@ -59,12 +61,14 @@ const Segment = ({ ref, variant, children, className, error, editing, editText,
|
|
|
59
61
|
valueSeparator: valueSeparator,
|
|
60
62
|
errorValueIndices: errorValueIndices,
|
|
61
63
|
className: className,
|
|
64
|
+
"data-testid": testId,
|
|
62
65
|
...props
|
|
63
66
|
});
|
|
64
67
|
return /*#__PURE__*/ jsx("div", {
|
|
65
68
|
ref: ref,
|
|
66
69
|
className: cn(segmentContainer, className),
|
|
67
70
|
"data-slot": `segment-${variant}`,
|
|
71
|
+
"data-testid": testId,
|
|
68
72
|
...isInteractive && {
|
|
69
73
|
role: 'button',
|
|
70
74
|
'aria-label': `Edit filter ${variant}`
|