@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.
Files changed (40) hide show
  1. package/dist/components/Chat/Chat.js +20 -18
  2. package/dist/components/Chat/ChatTrigger.js +37 -33
  3. package/dist/components/DateInput/internal/DateInputInternal.js +8 -4
  4. package/dist/components/DateRangeInput/DateRangeInputInternal.js +8 -4
  5. package/dist/components/DateRangeInput/DateRangeSeparator.js +15 -6
  6. package/dist/components/FileUpload/FileUploadItemReplaceTrigger.js +14 -11
  7. package/dist/components/FilterCascade/FilterCascadeLevel.js +18 -10
  8. package/dist/components/FilterInput/FilterInput.d.ts +2 -1
  9. package/dist/components/FilterInput/FilterInput.js +160 -142
  10. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.d.ts +2 -1
  11. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputChip.js +157 -138
  12. package/dist/components/FilterInput/FilterInputField/FilterInputChip/FilterInputRemoveButton.js +8 -4
  13. package/dist/components/FilterInput/FilterInputField/FilterInputChip/PairSeparator.js +20 -11
  14. package/dist/components/FilterInput/FilterInputField/FilterInputChip/Segment.js +4 -0
  15. package/dist/components/FilterInput/FilterInputField/FilterInputConnectorChip/FilterInputConnectorChip.js +98 -86
  16. package/dist/components/FilterInput/FilterInputField/FilterInputField.js +82 -70
  17. package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.d.ts +2 -1
  18. package/dist/components/FilterInput/FilterInputMenu/FilterInputFieldMenu/FilterInputFieldMenu.js +5 -1
  19. package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.d.ts +2 -1
  20. package/dist/components/FilterInput/FilterInputMenu/FilterInputOperatorMenu.js +20 -14
  21. package/dist/components/NavRail/NavRailItem.js +57 -55
  22. package/dist/components/Select/SelectInput/SelectInputItemRenderer.js +20 -13
  23. package/dist/components/Selection/SelectionItem.js +8 -4
  24. package/dist/components/SimpleCharts/AreaChart/AreaChartArea.js +8 -4
  25. package/dist/components/SimpleCharts/BarList/BarListPercent.js +16 -13
  26. package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.js +8 -4
  27. package/dist/components/SimpleCharts/LineChart/LineChartLine.js +8 -4
  28. package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.js +3 -0
  29. package/dist/components/SimpleCharts/PieChart/PieChartDonut.js +33 -30
  30. package/dist/components/Tree/TreeItemContent.js +18 -12
  31. package/dist/components/Tree/TreeItemHeader.js +49 -38
  32. package/dist/components/TreeView/TreeViewItem.js +46 -40
  33. package/dist/metadata/components.json +68 -512
  34. package/package.json +1 -1
  35. package/dist/components/TreeBase/TreeBase.d.ts +0 -31
  36. package/dist/components/TreeBase/TreeBase.js +0 -245
  37. package/dist/components/TreeBase/classes.d.ts +0 -7
  38. package/dist/components/TreeBase/classes.js +0 -10
  39. package/dist/components/TreeBase/index.d.ts +0 -1
  40. package/dist/components/TreeBase/index.js +0 -1
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from "react";
4
4
  import { CirclePlus } from "../../../../icons/CirclePlus.js";
5
5
  import { CircleSlash } from "../../../../icons/CircleSlash.js";
6
6
  import { cn } from "../../../../utils/cn.js";
7
+ import { useTestId } from "../../../../utils/testId.js";
7
8
  import { DropdownMenu, DropdownMenuContent, DropdownMenuFooter, DropdownMenuItem, DropdownMenuItemIcon, DropdownMenuItemText } from "../../../DropdownMenu/index.js";
8
9
  import { DropdownMenuTrigger } from "../../../DropdownMenu/DropdownMenuTrigger.js";
9
10
  import { Kbd, KbdGroup } from "../../../Kbd/index.js";
@@ -13,8 +14,9 @@ import { VARIANT_LABELS } from "../../lib/constants.js";
13
14
  import { chipVariants, segmentContainer } from "../FilterInputChip/classes.js";
14
15
  import { connectorTextVariants } from "./classes.js";
15
16
  const FilterInputConnectorChip = (t0)=>{
16
- const $ = c(40);
17
+ const $ = c(44);
17
18
  const { chipId, variant, onChange, className } = t0;
19
+ const testId = useTestId("connector-chip");
18
20
  const { menuOpen, closeAutocompleteMenu } = useFilterInputContext();
19
21
  const [open, setOpen] = useState(false);
20
22
  const triggerRef = useRef(null);
@@ -83,16 +85,13 @@ const FilterInputConnectorChip = (t0)=>{
83
85
  } else t9 = $[10];
84
86
  let t10;
85
87
  if ($[11] !== t6 || $[12] !== t7 || $[13] !== t9) {
86
- t10 = /*#__PURE__*/ jsx(DropdownMenuTrigger, {
87
- asChild: true,
88
- children: /*#__PURE__*/ jsx("button", {
89
- ref: triggerRef,
90
- type: "button",
91
- className: t6,
92
- "data-slot": "filter-input-connector-chip",
93
- "aria-label": t7,
94
- children: t9
95
- })
88
+ t10 = /*#__PURE__*/ jsx("button", {
89
+ ref: triggerRef,
90
+ type: "button",
91
+ className: t6,
92
+ "data-slot": "filter-input-connector-chip",
93
+ "aria-label": t7,
94
+ children: t9
96
95
  });
97
96
  $[11] = t6;
98
97
  $[12] = t7;
@@ -100,78 +99,89 @@ const FilterInputConnectorChip = (t0)=>{
100
99
  $[14] = t10;
101
100
  } else t10 = $[14];
102
101
  let t11;
103
- if ($[15] !== chipId || $[16] !== onChange) {
104
- t11 = ()=>onChange(chipId, "and");
105
- $[15] = chipId;
106
- $[16] = onChange;
102
+ if ($[15] !== t10 || $[16] !== testId) {
103
+ t11 = /*#__PURE__*/ jsx(DropdownMenuTrigger, {
104
+ asChild: true,
105
+ "data-testid": testId,
106
+ children: t10
107
+ });
108
+ $[15] = t10;
109
+ $[16] = testId;
107
110
  $[17] = t11;
108
111
  } else t11 = $[17];
109
112
  let t12;
113
+ if ($[18] !== chipId || $[19] !== onChange) {
114
+ t12 = ()=>onChange(chipId, "and");
115
+ $[18] = chipId;
116
+ $[19] = onChange;
117
+ $[20] = t12;
118
+ } else t12 = $[20];
110
119
  let t13;
111
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
112
- t12 = /*#__PURE__*/ jsx(DropdownMenuItemIcon, {
120
+ let t14;
121
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
122
+ t13 = /*#__PURE__*/ jsx(DropdownMenuItemIcon, {
113
123
  children: /*#__PURE__*/ jsx(CirclePlus, {})
114
124
  });
115
- t13 = /*#__PURE__*/ jsx(DropdownMenuItemText, {
125
+ t14 = /*#__PURE__*/ jsx(DropdownMenuItemText, {
116
126
  children: "AND"
117
127
  });
118
- $[18] = t12;
119
- $[19] = t13;
128
+ $[21] = t13;
129
+ $[22] = t14;
120
130
  } else {
121
- t12 = $[18];
122
- t13 = $[19];
131
+ t13 = $[21];
132
+ t14 = $[22];
123
133
  }
124
- let t14;
125
- if ($[20] !== t11) {
126
- t14 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
134
+ let t15;
135
+ if ($[23] !== t12) {
136
+ t15 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
127
137
  value: "and",
128
- onSelect: t11,
138
+ onSelect: t12,
129
139
  children: [
130
- t12,
131
- t13
140
+ t13,
141
+ t14
132
142
  ]
133
143
  });
134
- $[20] = t11;
135
- $[21] = t14;
136
- } else t14 = $[21];
137
- let t15;
138
- if ($[22] !== chipId || $[23] !== onChange) {
139
- t15 = ()=>onChange(chipId, "or");
140
- $[22] = chipId;
141
- $[23] = onChange;
144
+ $[23] = t12;
142
145
  $[24] = t15;
143
146
  } else t15 = $[24];
144
147
  let t16;
148
+ if ($[25] !== chipId || $[26] !== onChange) {
149
+ t16 = ()=>onChange(chipId, "or");
150
+ $[25] = chipId;
151
+ $[26] = onChange;
152
+ $[27] = t16;
153
+ } else t16 = $[27];
145
154
  let t17;
146
- if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
147
- t16 = /*#__PURE__*/ jsx(DropdownMenuItemIcon, {
155
+ let t18;
156
+ if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
157
+ t17 = /*#__PURE__*/ jsx(DropdownMenuItemIcon, {
148
158
  children: /*#__PURE__*/ jsx(CircleSlash, {})
149
159
  });
150
- t17 = /*#__PURE__*/ jsx(DropdownMenuItemText, {
160
+ t18 = /*#__PURE__*/ jsx(DropdownMenuItemText, {
151
161
  children: "OR"
152
162
  });
153
- $[25] = t16;
154
- $[26] = t17;
163
+ $[28] = t17;
164
+ $[29] = t18;
155
165
  } else {
156
- t16 = $[25];
157
- t17 = $[26];
166
+ t17 = $[28];
167
+ t18 = $[29];
158
168
  }
159
- let t18;
160
- if ($[27] !== t15) {
161
- t18 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
169
+ let t19;
170
+ if ($[30] !== t16) {
171
+ t19 = /*#__PURE__*/ jsxs(DropdownMenuItem, {
162
172
  value: "or",
163
- onSelect: t15,
173
+ onSelect: t16,
164
174
  children: [
165
- t16,
166
- t17
175
+ t17,
176
+ t18
167
177
  ]
168
178
  });
169
- $[27] = t15;
170
- $[28] = t18;
171
- } else t18 = $[28];
172
- let t19;
173
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
174
- t19 = /*#__PURE__*/ jsxs("span", {
179
+ $[30] = t16;
180
+ $[31] = t19;
181
+ } else t19 = $[31];
182
+ let t20;
183
+ if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
184
+ t20 = /*#__PURE__*/ jsxs("span", {
175
185
  className: "flex items-center gap-4",
176
186
  children: [
177
187
  /*#__PURE__*/ jsxs(KbdGroup, {
@@ -187,14 +197,14 @@ const FilterInputConnectorChip = (t0)=>{
187
197
  "to navigate"
188
198
  ]
189
199
  });
190
- $[29] = t19;
191
- } else t19 = $[29];
192
- let t20;
193
- if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
194
- t20 = /*#__PURE__*/ jsxs(DropdownMenuFooter, {
200
+ $[32] = t20;
201
+ } else t20 = $[32];
202
+ let t21;
203
+ if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
204
+ t21 = /*#__PURE__*/ jsxs(DropdownMenuFooter, {
195
205
  className: "justify-start",
196
206
  children: [
197
- t19,
207
+ t20,
198
208
  /*#__PURE__*/ jsxs("span", {
199
209
  className: "flex items-center gap-4",
200
210
  children: [
@@ -208,42 +218,44 @@ const FilterInputConnectorChip = (t0)=>{
208
218
  })
209
219
  ]
210
220
  });
211
- $[30] = t20;
212
- } else t20 = $[30];
213
- let t21;
214
- if ($[31] !== t14 || $[32] !== t18) {
215
- t21 = /*#__PURE__*/ jsxs(DropdownMenuContent, {
221
+ $[33] = t21;
222
+ } else t21 = $[33];
223
+ let t22;
224
+ if ($[34] !== t15 || $[35] !== t19) {
225
+ t22 = /*#__PURE__*/ jsxs(DropdownMenuContent, {
216
226
  className: "w-auto min-w-64",
217
227
  "data-filter-input-menu": "true",
218
228
  children: [
219
- t14,
220
- t18,
221
- t20
229
+ t15,
230
+ t19,
231
+ t21
222
232
  ]
223
233
  });
224
- $[31] = t14;
225
- $[32] = t18;
226
- $[33] = t21;
227
- } else t21 = $[33];
228
- let t22;
229
- if ($[34] !== handleOpenChange || $[35] !== positioning || $[36] !== t10 || $[37] !== t21 || $[38] !== t5) {
230
- t22 = /*#__PURE__*/ jsxs(DropdownMenu, {
234
+ $[34] = t15;
235
+ $[35] = t19;
236
+ $[36] = t22;
237
+ } else t22 = $[36];
238
+ let t23;
239
+ if ($[37] !== handleOpenChange || $[38] !== positioning || $[39] !== t11 || $[40] !== t22 || $[41] !== t5 || $[42] !== testId) {
240
+ t23 = /*#__PURE__*/ jsxs(DropdownMenu, {
241
+ "data-testid": testId,
231
242
  positioning: positioning,
232
243
  open: t5,
233
244
  onOpenChange: handleOpenChange,
234
245
  children: [
235
- t10,
236
- t21
246
+ t11,
247
+ t22
237
248
  ]
238
249
  });
239
- $[34] = handleOpenChange;
240
- $[35] = positioning;
241
- $[36] = t10;
242
- $[37] = t21;
243
- $[38] = t5;
244
- $[39] = t22;
245
- } else t22 = $[39];
246
- return t22;
250
+ $[37] = handleOpenChange;
251
+ $[38] = positioning;
252
+ $[39] = t11;
253
+ $[40] = t22;
254
+ $[41] = t5;
255
+ $[42] = testId;
256
+ $[43] = t23;
257
+ } else t23 = $[43];
258
+ return t23;
247
259
  };
248
260
  FilterInputConnectorChip.displayName = "FilterInputConnectorChip";
249
261
  export { FilterInputConnectorChip };
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { cn } from "../../../utils/cn.js";
4
+ import { TestIdProvider, useTestId } from "../../../utils/testId.js";
4
5
  import { inputVariants } from "../../Input/classes.js";
5
6
  import { ScrollArea, ScrollAreaScrollbar, ScrollAreaViewport } from "../../ScrollArea/index.js";
6
7
  import { useFilterInputContext } from "../FilterInputContext/index.js";
@@ -14,7 +15,7 @@ import { useChipsSplitting } from "./hooks/useChipsSplitting.js";
14
15
  import { useExpandCollapse } from "./hooks/useExpandCollapse.js";
15
16
  import { useSegmentEditKeyboard } from "./hooks/useSegmentEditKeyboard.js";
16
17
  const FilterInputField = (t0)=>{
17
- const $ = c(86);
18
+ const $ = c(89);
18
19
  let className;
19
20
  let props;
20
21
  if ($[0] !== t0) {
@@ -27,6 +28,7 @@ const FilterInputField = (t0)=>{
27
28
  props = $[2];
28
29
  }
29
30
  const { chips, buildingChipData, buildingChipRef, insertIndex, insertAfterConnector, error, onAreaClick, onGapClick, onChipClick, onBuildingChipClick, onConnectorChange, onChipRemove, editingChipId, editingSegment, editingSide, segmentFilterText, onSegmentFilterChange, onCancelSegmentEdit, onCustomValueCommit, onCustomAttributeCommit, onCustomOperatorCommit, onSwitchEditSegment, onRemoveEditingChip, menuRef } = useFilterInputContext();
31
+ const testId = useTestId();
30
32
  const hasContent = chips.length > 0 || null != buildingChipData;
31
33
  const { isExpanded, isOverflowing, innerRef, toggleExpand, multiRow } = useExpandCollapse();
32
34
  const { chipsBefore, chipsAfter, hideTrailingGap, hideLeadingGap } = useChipsSplitting(chips, insertIndex, insertAfterConnector);
@@ -200,90 +202,100 @@ const FilterInputField = (t0)=>{
200
202
  $[51] = t15;
201
203
  } else t15 = $[51];
202
204
  let t16;
203
- if ($[52] !== innerRef || $[53] !== t10 || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t8) {
204
- t16 = /*#__PURE__*/ jsx(ScrollAreaViewport, {
205
+ if ($[52] !== t12 || $[53] !== t13 || $[54] !== t14 || $[55] !== t15 || $[56] !== testId) {
206
+ t16 = /*#__PURE__*/ jsxs(TestIdProvider, {
207
+ value: testId,
208
+ children: [
209
+ t12,
210
+ t13,
211
+ t14,
212
+ t15
213
+ ]
214
+ });
215
+ $[52] = t12;
216
+ $[53] = t13;
217
+ $[54] = t14;
218
+ $[55] = t15;
219
+ $[56] = testId;
220
+ $[57] = t16;
221
+ } else t16 = $[57];
222
+ let t17;
223
+ if ($[58] !== innerRef || $[59] !== t10 || $[60] !== t11 || $[61] !== t16 || $[62] !== t8) {
224
+ t17 = /*#__PURE__*/ jsx(ScrollAreaViewport, {
205
225
  style: t7,
206
- children: /*#__PURE__*/ jsxs("div", {
226
+ children: /*#__PURE__*/ jsx("div", {
207
227
  ref: innerRef,
208
228
  "data-filter-input-inner": "",
209
229
  className: t8,
210
230
  style: t10,
211
231
  onClick: t11,
212
- children: [
213
- t12,
214
- t13,
215
- t14,
216
- t15
217
- ]
232
+ children: t16
218
233
  })
219
234
  });
220
- $[52] = innerRef;
221
- $[53] = t10;
222
- $[54] = t11;
223
- $[55] = t12;
224
- $[56] = t13;
225
- $[57] = t14;
226
- $[58] = t15;
227
- $[59] = t8;
228
- $[60] = t16;
229
- } else t16 = $[60];
230
- let t17;
231
- if ($[61] !== isExpanded) {
232
- t17 = !isExpanded && /*#__PURE__*/ jsx(ScrollAreaScrollbar, {
235
+ $[58] = innerRef;
236
+ $[59] = t10;
237
+ $[60] = t11;
238
+ $[61] = t16;
239
+ $[62] = t8;
240
+ $[63] = t17;
241
+ } else t17 = $[63];
242
+ let t18;
243
+ if ($[64] !== isExpanded) {
244
+ t18 = !isExpanded && /*#__PURE__*/ jsx(ScrollAreaScrollbar, {
233
245
  orientation: "vertical"
234
246
  });
235
- $[61] = isExpanded;
236
- $[62] = t17;
237
- } else t17 = $[62];
238
- let t18;
239
- if ($[63] !== t16 || $[64] !== t17 || $[65] !== t6) {
240
- t18 = /*#__PURE__*/ jsxs(ScrollArea, {
247
+ $[64] = isExpanded;
248
+ $[65] = t18;
249
+ } else t18 = $[65];
250
+ let t19;
251
+ if ($[66] !== t17 || $[67] !== t18 || $[68] !== t6) {
252
+ t19 = /*#__PURE__*/ jsxs(ScrollArea, {
241
253
  className: "h-auto flex-1 min-w-0",
242
254
  style: t6,
243
255
  children: [
244
- t16,
245
- t17
256
+ t17,
257
+ t18
246
258
  ]
247
259
  });
248
- $[63] = t16;
249
- $[64] = t17;
250
- $[65] = t6;
251
- $[66] = t18;
252
- } else t18 = $[66];
253
- let t19;
254
- if ($[67] !== isExpanded || $[68] !== isOverflowing || $[69] !== toggleExpand) {
255
- t19 = /*#__PURE__*/ jsx(FilterInputFieldActions, {
260
+ $[66] = t17;
261
+ $[67] = t18;
262
+ $[68] = t6;
263
+ $[69] = t19;
264
+ } else t19 = $[69];
265
+ let t20;
266
+ if ($[70] !== isExpanded || $[71] !== isOverflowing || $[72] !== toggleExpand) {
267
+ t20 = /*#__PURE__*/ jsx(FilterInputFieldActions, {
256
268
  isExpanded: isExpanded,
257
269
  isOverflowing: isOverflowing,
258
270
  onToggleExpand: toggleExpand
259
271
  });
260
- $[67] = isExpanded;
261
- $[68] = isOverflowing;
262
- $[69] = toggleExpand;
263
- $[70] = t19;
264
- } else t19 = $[70];
265
- let t20;
266
- if ($[71] !== props || $[72] !== t18 || $[73] !== t19 || $[74] !== t3 || $[75] !== t4) {
267
- t20 = /*#__PURE__*/ jsxs("div", {
272
+ $[70] = isExpanded;
273
+ $[71] = isOverflowing;
274
+ $[72] = toggleExpand;
275
+ $[73] = t20;
276
+ } else t20 = $[73];
277
+ let t21;
278
+ if ($[74] !== props || $[75] !== t19 || $[76] !== t20 || $[77] !== t3 || $[78] !== t4) {
279
+ t21 = /*#__PURE__*/ jsxs("div", {
268
280
  className: t3,
269
281
  "data-slot": "filter-input",
270
282
  onClick: t4,
271
283
  ...props,
272
284
  children: [
273
- t18,
274
- t19
285
+ t19,
286
+ t20
275
287
  ]
276
288
  });
277
- $[71] = props;
278
- $[72] = t18;
279
- $[73] = t19;
280
- $[74] = t3;
281
- $[75] = t4;
289
+ $[74] = props;
290
+ $[75] = t19;
282
291
  $[76] = t20;
283
- } else t20 = $[76];
284
- let t21;
285
- if ($[77] !== editingChipId || $[78] !== editingSegment || $[79] !== editingSide || $[80] !== handleSegmentEditBlur || $[81] !== handleSegmentEditKeyDown || $[82] !== onSegmentFilterChange || $[83] !== segmentFilterText || $[84] !== t20) {
286
- t21 = /*#__PURE__*/ jsx(EditingProvider, {
292
+ $[77] = t3;
293
+ $[78] = t4;
294
+ $[79] = t21;
295
+ } else t21 = $[79];
296
+ let t22;
297
+ if ($[80] !== editingChipId || $[81] !== editingSegment || $[82] !== editingSide || $[83] !== handleSegmentEditBlur || $[84] !== handleSegmentEditKeyDown || $[85] !== onSegmentFilterChange || $[86] !== segmentFilterText || $[87] !== t21) {
298
+ t22 = /*#__PURE__*/ jsx(EditingProvider, {
287
299
  editingChipId: editingChipId,
288
300
  editingSegment: editingSegment,
289
301
  editingSide: editingSide,
@@ -291,19 +303,19 @@ const FilterInputField = (t0)=>{
291
303
  onSegmentFilterChange: onSegmentFilterChange,
292
304
  onSegmentEditKeyDown: handleSegmentEditKeyDown,
293
305
  onSegmentEditBlur: handleSegmentEditBlur,
294
- children: t20
306
+ children: t21
295
307
  });
296
- $[77] = editingChipId;
297
- $[78] = editingSegment;
298
- $[79] = editingSide;
299
- $[80] = handleSegmentEditBlur;
300
- $[81] = handleSegmentEditKeyDown;
301
- $[82] = onSegmentFilterChange;
302
- $[83] = segmentFilterText;
303
- $[84] = t20;
304
- $[85] = t21;
305
- } else t21 = $[85];
306
- return t21;
308
+ $[80] = editingChipId;
309
+ $[81] = editingSegment;
310
+ $[82] = editingSide;
311
+ $[83] = handleSegmentEditBlur;
312
+ $[84] = handleSegmentEditKeyDown;
313
+ $[85] = onSegmentFilterChange;
314
+ $[86] = segmentFilterText;
315
+ $[87] = t21;
316
+ $[88] = t22;
317
+ } else t22 = $[88];
318
+ return t22;
307
319
  };
308
320
  FilterInputField.displayName = "FilterInputField";
309
321
  export { FilterInputField };
@@ -1,6 +1,7 @@
1
1
  import { type FC, type RefObject } from 'react';
2
+ import { type TestableProps } from '../../../../utils/testId.js';
2
3
  import type { Condition, FieldGroup, FieldMetadata } from '../../types.js';
3
- export interface FilterInputFieldMenuProps {
4
+ export interface FilterInputFieldMenuProps extends TestableProps {
4
5
  fields: FieldMetadata[];
5
6
  /** Text from the input to filter displayed fields */
6
7
  filterText?: string;
@@ -1,6 +1,7 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo, useRef } from "react";
3
3
  import { cn } from "../../../../utils/cn.js";
4
+ import { useTestId } from "../../../../utils/testId.js";
4
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuFooter } from "../../../DropdownMenu/index.js";
5
6
  import { Kbd } from "../../../Kbd/Kbd.js";
6
7
  import { KbdGroup } from "../../../Kbd/KbdGroup.js";
@@ -11,7 +12,8 @@ import { useMenuScrollHighlightSync } from "../hooks/useMenuScrollHighlightSync.
11
12
  import { MenuEmptyState } from "../MenuEmptyState.js";
12
13
  import { FieldMenuPopover } from "./FieldMenuPopover.js";
13
14
  import { FieldSections, OperatorsSection, RecentSection, SuggestionsSection } from "./FieldMenuSections.js";
14
- const FilterInputFieldMenu = ({ fields, filterText = '', onSelect, open = false, onOpenChange, recentConditions = [], suggestedFields = [], fieldGroups, onSelectAnd, onSelectOr, onEscape, positioning, inputRef, menuRef, className })=>{
15
+ const FilterInputFieldMenu = ({ fields, filterText = '', onSelect, open = false, onOpenChange, recentConditions = [], suggestedFields = [], fieldGroups, onSelectAnd, onSelectOr, onEscape, positioning, inputRef, menuRef, className, 'data-testid': testIdProp })=>{
16
+ const testId = useTestId('field-menu', testIdProp);
15
17
  const limitedRecentConditions = useMemo(()=>recentConditions.slice(0, 3), [
16
18
  recentConditions
17
19
  ]);
@@ -76,6 +78,7 @@ const FilterInputFieldMenu = ({ fields, filterText = '', onSelect, open = false,
76
78
  return /*#__PURE__*/ jsxs(Fragment, {
77
79
  children: [
78
80
  /*#__PURE__*/ jsx(DropdownMenu, {
81
+ "data-testid": testId,
79
82
  open: open && hasResults,
80
83
  onOpenChange: onOpenChange,
81
84
  onRequestDismiss: keepOpenOnMenuHandoff,
@@ -87,6 +90,7 @@ const FilterInputFieldMenu = ({ fields, filterText = '', onSelect, open = false,
87
90
  ref: menuRef,
88
91
  className: cn('w-[300px] max-h-[430px]', className),
89
92
  "data-slot": "filter-input-field-menu",
93
+ "data-testid": testId,
90
94
  "data-filter-input-menu": "true",
91
95
  children: [
92
96
  !filterText && showRecent && /*#__PURE__*/ jsx(RecentSection, {
@@ -1,7 +1,8 @@
1
1
  import type { RefObject } from 'react';
2
2
  import { type FC } from 'react';
3
+ import { type TestableProps } from '../../../utils/testId.js';
3
4
  import type { FieldType, FilterOperator } from '../types.js';
4
- export interface FilterInputOperatorMenuProps {
5
+ export interface FilterInputOperatorMenuProps extends TestableProps {
5
6
  /**
6
7
  * The field type to determine which operators to show
7
8
  */
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { Fragment } from "react";
4
4
  import { cn } from "../../../utils/cn.js";
5
+ import { useTestId } from "../../../utils/testId.js";
5
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemText, DropdownMenuSeparator } from "../../DropdownMenu/index.js";
6
7
  import { Kbd } from "../../Kbd/Kbd.js";
7
8
  import { KbdGroup } from "../../Kbd/KbdGroup.js";
@@ -22,10 +23,11 @@ const HIDE_SYMBOLS_FOR = new Set([
22
23
  "boolean"
23
24
  ]);
24
25
  const FilterInputOperatorMenu = (t0)=>{
25
- const $ = c(45);
26
- const { fieldType, operators, onSelect, open: t1, onOpenChange, onEscape, positioning, inputRef, filterText: t2, menuRef, className } = t0;
26
+ const $ = c(47);
27
+ const { fieldType, operators, onSelect, open: t1, onOpenChange, onEscape, positioning, inputRef, filterText: t2, menuRef, className, "data-testid": testIdProp } = t0;
27
28
  const open = void 0 === t1 ? false : t1;
28
29
  const filterText = void 0 === t2 ? "" : t2;
30
+ const testId = useTestId("operator-menu", testIdProp);
29
31
  let t3;
30
32
  if ($[0] !== filterText) {
31
33
  t3 = filterText.toLowerCase();
@@ -160,11 +162,12 @@ const FilterInputOperatorMenu = (t0)=>{
160
162
  $[33] = t12;
161
163
  } else t12 = $[33];
162
164
  let t13;
163
- if ($[34] !== menuRef || $[35] !== t10 || $[36] !== t11) {
165
+ if ($[34] !== menuRef || $[35] !== t10 || $[36] !== t11 || $[37] !== testId) {
164
166
  t13 = /*#__PURE__*/ jsxs(DropdownMenuContent, {
165
167
  ref: menuRef,
166
168
  className: t10,
167
169
  "data-filter-input-menu": "true",
170
+ "data-testid": testId,
168
171
  children: [
169
172
  t11,
170
173
  t12
@@ -173,11 +176,13 @@ const FilterInputOperatorMenu = (t0)=>{
173
176
  $[34] = menuRef;
174
177
  $[35] = t10;
175
178
  $[36] = t11;
176
- $[37] = t13;
177
- } else t13 = $[37];
179
+ $[37] = testId;
180
+ $[38] = t13;
181
+ } else t13 = $[38];
178
182
  let t14;
179
- if ($[38] !== highlightedValue || $[39] !== onHighlightChange || $[40] !== onOpenChange || $[41] !== open || $[42] !== positioning || $[43] !== t13) {
183
+ if ($[39] !== highlightedValue || $[40] !== onHighlightChange || $[41] !== onOpenChange || $[42] !== open || $[43] !== positioning || $[44] !== t13 || $[45] !== testId) {
180
184
  t14 = /*#__PURE__*/ jsx(DropdownMenu, {
185
+ "data-testid": testId,
181
186
  open: open,
182
187
  onOpenChange: onOpenChange,
183
188
  onRequestDismiss: keepOpenOnMenuHandoff,
@@ -187,14 +192,15 @@ const FilterInputOperatorMenu = (t0)=>{
187
192
  onHighlightChange: onHighlightChange,
188
193
  children: t13
189
194
  });
190
- $[38] = highlightedValue;
191
- $[39] = onHighlightChange;
192
- $[40] = onOpenChange;
193
- $[41] = open;
194
- $[42] = positioning;
195
- $[43] = t13;
196
- $[44] = t14;
197
- } else t14 = $[44];
195
+ $[39] = highlightedValue;
196
+ $[40] = onHighlightChange;
197
+ $[41] = onOpenChange;
198
+ $[42] = open;
199
+ $[43] = positioning;
200
+ $[44] = t13;
201
+ $[45] = testId;
202
+ $[46] = t14;
203
+ } else t14 = $[46];
198
204
  return t14;
199
205
  };
200
206
  FilterInputOperatorMenu.displayName = "FilterInputOperatorMenu";