@uniformdev/mesh-sdk-react 20.49.2 → 20.49.3-alpha.47

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/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -29,14 +30,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
31
 
31
32
  // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
33
+ var index_exports = {};
34
+ __export(index_exports, {
34
35
  $createVariableNode: () => $createVariableNode,
35
36
  $isVariableNode: () => $isVariableNode,
36
- AddListButton: () => import_design_system53.AddListButton,
37
- Button: () => import_design_system53.Button,
37
+ AddListButton: () => import_design_system54.AddListButton,
38
+ Button: () => import_design_system54.Button,
38
39
  CHECKBOX_OPERATORS: () => CHECKBOX_OPERATORS,
39
- Callout: () => import_design_system53.Callout,
40
+ Callout: () => import_design_system54.Callout,
40
41
  ControlledValuePlugin: () => ControlledValuePlugin,
41
42
  DATE_OPERATORS: () => DATE_OPERATORS,
42
43
  DATE_TIME_OPERATORS: () => DATE_TIME_OPERATORS,
@@ -49,7 +50,11 @@ __export(src_exports, {
49
50
  DataTypeEditor: () => DataTypeEditor,
50
51
  DateEditor: () => DateEditor,
51
52
  DateRangeEditor: () => DateRangeEditor,
52
- DrawerContent: () => import_design_system53.DrawerContent,
53
+ DelegationContext: () => DelegationContext,
54
+ DelegationDisabledError: () => DelegationDisabledError,
55
+ DelegationGate: () => DelegationGate,
56
+ DelegationProvider: () => DelegationProvider,
57
+ DrawerContent: () => import_design_system54.DrawerContent,
53
58
  EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
54
59
  FilterButton: () => FilterButton2,
55
60
  FilterControls: () => FilterControls,
@@ -59,22 +64,22 @@ __export(src_exports, {
59
64
  FilterMenu: () => FilterMenu,
60
65
  FilterMultiChoiceEditor: () => FilterMultiChoiceEditor,
61
66
  FilterSingleChoiceEditor: () => FilterSingleChoiceEditor,
62
- Heading: () => import_design_system53.Heading,
67
+ Heading: () => import_design_system54.Heading,
63
68
  INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
64
69
  Icons: () => icons_exports,
65
- Input: () => import_design_system53.Input,
66
- InputComboBox: () => import_design_system53.InputComboBox,
67
- InputKeywordSearch: () => import_design_system53.InputKeywordSearch,
68
- InputSelect: () => import_design_system53.InputSelect,
69
- InputToggle: () => import_design_system53.InputToggle,
70
+ Input: () => import_design_system54.Input,
71
+ InputComboBox: () => import_design_system54.InputComboBox,
72
+ InputKeywordSearch: () => import_design_system54.InputKeywordSearch,
73
+ InputSelect: () => import_design_system54.InputSelect,
74
+ InputToggle: () => import_design_system54.InputToggle,
70
75
  InputVariables: () => InputVariables,
71
- Label: () => import_design_system53.Label,
76
+ Label: () => import_design_system54.Label,
72
77
  LinkButton: () => LinkButton,
73
- LoadingIndicator: () => import_design_system53.LoadingIndicator,
74
- LoadingOverlay: () => import_design_system53.LoadingOverlay,
78
+ LoadingIndicator: () => import_design_system54.LoadingIndicator,
79
+ LoadingOverlay: () => import_design_system54.LoadingOverlay,
75
80
  MULTI_SELECT_OPERATORS: () => MULTI_SELECT_OPERATORS,
76
- Menu: () => import_design_system53.Menu,
77
- MenuItem: () => import_design_system53.MenuItem,
81
+ Menu: () => import_design_system54.Menu,
82
+ MenuItem: () => import_design_system54.MenuItem,
78
83
  MeshApp: () => MeshApp,
79
84
  NUMBER_OPERATORS: () => NUMBER_OPERATORS,
80
85
  NumberEditor: () => NumberEditor,
@@ -93,22 +98,22 @@ __export(src_exports, {
93
98
  PUBLISH_STATUS_FIELD_OPERATORS: () => PUBLISH_STATUS_FIELD_OPERATORS,
94
99
  ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
95
100
  ParameterConnectionIndicator: () => ParameterConnectionIndicator,
96
- ParameterGroup: () => import_design_system53.ParameterGroup,
97
- ParameterImage: () => import_design_system53.ParameterImage,
98
- ParameterImageInner: () => import_design_system53.ParameterImageInner,
99
- ParameterInput: () => import_design_system53.ParameterInput,
100
- ParameterInputInner: () => import_design_system53.ParameterInputInner,
101
- ParameterLabel: () => import_design_system53.ParameterLabel,
102
- ParameterMenuButton: () => import_design_system53.ParameterMenuButton,
101
+ ParameterGroup: () => import_design_system54.ParameterGroup,
102
+ ParameterImage: () => import_design_system54.ParameterImage,
103
+ ParameterImageInner: () => import_design_system54.ParameterImageInner,
104
+ ParameterInput: () => import_design_system54.ParameterInput,
105
+ ParameterInputInner: () => import_design_system54.ParameterInputInner,
106
+ ParameterLabel: () => import_design_system54.ParameterLabel,
107
+ ParameterMenuButton: () => import_design_system54.ParameterMenuButton,
103
108
  ParameterOrSingleVariable: () => ParameterOrSingleVariable,
104
- ParameterSelect: () => import_design_system53.ParameterSelect,
105
- ParameterSelectInner: () => import_design_system53.ParameterSelectInner,
106
- ParameterShell: () => import_design_system53.ParameterShell,
109
+ ParameterSelect: () => import_design_system54.ParameterSelect,
110
+ ParameterSelectInner: () => import_design_system54.ParameterSelectInner,
111
+ ParameterShell: () => import_design_system54.ParameterShell,
107
112
  ParameterShellContext: () => import_design_system2.ParameterShellContext,
108
- ParameterTextarea: () => import_design_system53.ParameterTextarea,
109
- ParameterTextareaInner: () => import_design_system53.ParameterTextareaInner,
110
- ParameterToggle: () => import_design_system53.ParameterToggle,
111
- ParameterToggleInner: () => import_design_system53.ParameterToggleInner,
113
+ ParameterTextarea: () => import_design_system54.ParameterTextarea,
114
+ ParameterTextareaInner: () => import_design_system54.ParameterTextareaInner,
115
+ ParameterToggle: () => import_design_system54.ParameterToggle,
116
+ ParameterToggleInner: () => import_design_system54.ParameterToggleInner,
112
117
  ParameterVariables: () => ParameterVariables,
113
118
  QueryFilter: () => QueryFilter,
114
119
  RICHTEXT_OPERATORS: () => RICHTEXT_OPERATORS,
@@ -122,8 +127,8 @@ __export(src_exports, {
122
127
  RequestUrlInput: () => RequestUrlInput,
123
128
  SELECT_OPERATORS: () => SELECT_OPERATORS,
124
129
  SYSTEM_FIELD_OPERATORS: () => SYSTEM_FIELD_OPERATORS,
125
- ScrollableList: () => import_design_system53.ScrollableList,
126
- ScrollableListItem: () => import_design_system53.ScrollableListItem,
130
+ ScrollableList: () => import_design_system54.ScrollableList,
131
+ ScrollableListItem: () => import_design_system54.ScrollableListItem,
127
132
  SearchAndFilter: () => SearchAndFilter,
128
133
  SearchAndFilterContext: () => SearchAndFilterContext,
129
134
  SearchAndFilterOptionsContainer: () => SearchAndFilterOptionsContainer2,
@@ -134,13 +139,13 @@ __export(src_exports, {
134
139
  SortItems: () => SortItems,
135
140
  StatusMultiEditor: () => StatusMultiEditor,
136
141
  StatusSingleEditor: () => StatusSingleEditor,
137
- Switch: () => import_design_system53.Switch,
142
+ Switch: () => import_design_system54.Switch,
138
143
  TEXTBOX_OPERATORS: () => TEXTBOX_OPERATORS,
139
144
  TextEditor: () => TextEditor,
140
145
  TextMultiChoiceEditor: () => TextMultiChoiceEditor,
141
146
  TextVariableRenderer: () => TextVariableRenderer,
142
- Textarea: () => import_design_system53.Textarea,
143
- Theme: () => import_design_system53.Theme,
147
+ Textarea: () => import_design_system54.Textarea,
148
+ Theme: () => import_design_system54.Theme,
144
149
  USER_OPERATORS: () => USER_OPERATORS,
145
150
  VariableChip: () => VariableChip,
146
151
  VariableEditor: () => VariableEditor,
@@ -150,8 +155,10 @@ __export(src_exports, {
150
155
  VariablesProvider: () => VariablesProvider,
151
156
  bindableFiltersMapper: () => bindableFiltersMapper,
152
157
  convertConnectedDataToVariable: () => convertConnectedDataToVariable,
158
+ createDelegationFetch: () => createDelegationFetch,
153
159
  createLocationValidator: () => createLocationValidator,
154
160
  filterMapper: () => filterMapper,
161
+ isDelegationExpiredResponse: () => isDelegationExpiredResponse,
155
162
  prettifyBindExpression: () => prettifyBindExpression,
156
163
  readOnlyAttributes: () => readOnlyAttributes,
157
164
  serializeVariablesEditorSerializedState: () => serializeVariablesEditorSerializedState,
@@ -161,6 +168,8 @@ __export(src_exports, {
161
168
  urlEncodeRequestUrl: () => urlEncodeRequestUrl,
162
169
  useConnectedDataAsVariables: () => useConnectedDataAsVariables,
163
170
  useContentDataResourceLocaleInfo: () => useContentDataResourceLocaleInfo,
171
+ useDelegation: () => useDelegation,
172
+ useDelegationFetch: () => useDelegationFetch,
164
173
  useDynamicInputsAsVariables: () => useDynamicInputsAsVariables,
165
174
  useMeshLocation: () => useMeshLocation,
166
175
  useObjectSearchContext: () => useObjectSearchContext,
@@ -173,14 +182,14 @@ __export(src_exports, {
173
182
  useVariableEditor: () => useVariableEditor,
174
183
  useVariables: () => useVariables,
175
184
  useVariablesMenu: () => useVariablesMenu,
176
- utilityColors: () => import_design_system53.utilityColors,
185
+ utilityColors: () => import_design_system54.utilityColors,
177
186
  variableDefaultTextValue: () => variableDefaultTextValue,
178
187
  variablePrefix: () => variablePrefix,
179
188
  variableSuffix: () => variableSuffix,
180
189
  variablesToGroupedList: () => variablesToGroupedList,
181
190
  variablesToList: () => variablesToList
182
191
  });
183
- module.exports = __toCommonJS(src_exports);
192
+ module.exports = __toCommonJS(index_exports);
184
193
 
185
194
  // ../../scripts/emotion-jsx-shim.js
186
195
  var import_react = require("@emotion/react");
@@ -212,14 +221,14 @@ var SvgCaution = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
212
221
  xmlns: "http://www.w3.org/2000/svg",
213
222
  width: "1em",
214
223
  height: "1em",
215
- viewBox: "0 0 16 16",
216
224
  fill: "currentColor",
225
+ viewBox: "0 0 16 16",
217
226
  ...props,
218
227
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
219
228
  "path",
220
229
  {
221
230
  fillRule: "evenodd",
222
- d: "M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"
231
+ d: "M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002zm.133 11.497H6.987v-2.003h2.039zm0-3.004H6.987V5.987h2.039z"
223
232
  }
224
233
  )
225
234
  }
@@ -231,18 +240,18 @@ var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
231
240
  var SvgCheckmark = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
232
241
  "svg",
233
242
  {
243
+ xmlns: "http://www.w3.org/2000/svg",
234
244
  width: "1em",
235
245
  height: "1em",
236
- viewBox: "0 0 40 40",
237
246
  fill: "currentColor",
238
- xmlns: "http://www.w3.org/2000/svg",
247
+ viewBox: "0 0 40 40",
239
248
  ...props,
240
249
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
241
250
  "path",
242
251
  {
243
252
  fillRule: "evenodd",
244
- clipRule: "evenodd",
245
- d: "M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4Zm8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0l9.6-9.6Z"
253
+ d: "M20 39.2A19.2 19.2 0 1 0 20 .8a19.2 19.2 0 0 0 0 38.4m8.897-22.303a2.4 2.4 0 0 0-3.394-3.394L17.6 21.407l-3.103-3.104a2.4 2.4 0 0 0-3.394 3.394l4.8 4.8a2.4 2.4 0 0 0 3.394 0z",
254
+ clipRule: "evenodd"
246
255
  }
247
256
  )
248
257
  }
@@ -251,7 +260,7 @@ var Checkmark_default = SvgCheckmark;
251
260
 
252
261
  // src/assets/icons/ChevronDown.tsx
253
262
  var import_jsx_runtime3 = require("@emotion/react/jsx-runtime");
254
- var SvgChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414Z" }) });
263
+ var SvgChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5.293 8.293a1 1 0 0 1 1.414 0L12 13.586l5.293-5.293a1 1 0 1 1 1.414 1.414l-6 6a1 1 0 0 1-1.414 0l-6-6a1 1 0 0 1 0-1.414" }) });
255
264
  var ChevronDown_default = SvgChevronDown;
256
265
 
257
266
  // src/assets/icons/Close.tsx
@@ -262,12 +271,12 @@ var SvgClose = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
262
271
  xmlns: "http://www.w3.org/2000/svg",
263
272
  width: "1em",
264
273
  height: "1em",
265
- viewBox: "0 0 19 19",
266
274
  fill: "currentColor",
275
+ viewBox: "0 0 19 19",
267
276
  ...props,
268
277
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { fillRule: "evenodd", children: [
269
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0Z" }),
270
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66Z" })
278
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16.578 1.636a1.174 1.174 0 0 1 0 1.66L3.296 16.578a1.174 1.174 0 1 1-1.66-1.66L14.918 1.636a1.174 1.174 0 0 1 1.66 0" }),
279
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M1.636 1.636a1.174 1.174 0 0 1 1.66 0l13.282 13.282a1.174 1.174 0 1 1-1.66 1.66L1.636 3.296a1.174 1.174 0 0 1 0-1.66" })
271
280
  ] })
272
281
  }
273
282
  );
@@ -281,14 +290,14 @@ var SvgDanger = (props) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
281
290
  xmlns: "http://www.w3.org/2000/svg",
282
291
  width: "1em",
283
292
  height: "1em",
284
- viewBox: "0 0 12 16",
285
293
  fill: "currentColor",
294
+ viewBox: "0 0 12 16",
286
295
  ...props,
287
296
  children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
288
297
  "path",
289
298
  {
290
299
  fillRule: "evenodd",
291
- d: "M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"
300
+ d: "M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3z"
292
301
  }
293
302
  )
294
303
  }
@@ -303,14 +312,14 @@ var SvgExclamationPoint = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx
303
312
  xmlns: "http://www.w3.org/2000/svg",
304
313
  width: "1em",
305
314
  height: "1em",
306
- viewBox: "0 0 14 16",
307
315
  fill: "currentColor",
316
+ viewBox: "0 0 14 16",
308
317
  ...props,
309
318
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
310
319
  "path",
311
320
  {
312
321
  fillRule: "evenodd",
313
- d: "M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"
322
+ d: "M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7M7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7m1 3H6v5h2zm0 6H6v2h2z"
314
323
  }
315
324
  )
316
325
  }
@@ -324,7 +333,7 @@ var SvgInfo = (props) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", {
324
333
  "path",
325
334
  {
326
335
  xmlns: "http://www.w3.org/2000/svg",
327
- d: "M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0v-6zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"
336
+ d: "M11 10.98a1 1 0 1 1 2 0v6a1 1 0 1 1-2 0zm1-4.929a1 1 0 1 0 0 2 1 1 0 0 0 0-2"
328
337
  }
329
338
  ),
330
339
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -332,8 +341,8 @@ var SvgInfo = (props) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("svg", {
332
341
  {
333
342
  xmlns: "http://www.w3.org/2000/svg",
334
343
  fillRule: "evenodd",
335
- clipRule: "evenodd",
336
- d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0z"
344
+ d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2M4 12a8 8 0 1 0 16 0 8 8 0 0 0-16 0",
345
+ clipRule: "evenodd"
337
346
  }
338
347
  )
339
348
  ] });
@@ -347,14 +356,14 @@ var SvgLightbulb = (props) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
347
356
  xmlns: "http://www.w3.org/2000/svg",
348
357
  width: "1em",
349
358
  height: "1em",
350
- viewBox: "0 0 12 16",
351
359
  fill: "currentColor",
360
+ viewBox: "0 0 12 16",
352
361
  ...props,
353
362
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
354
363
  "path",
355
364
  {
356
365
  fillRule: "evenodd",
357
- d: "M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"
366
+ d: "M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5m3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48M4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2"
358
367
  }
359
368
  )
360
369
  }
@@ -366,18 +375,18 @@ var import_jsx_runtime9 = require("@emotion/react/jsx-runtime");
366
375
  var SvgMagnifyingGlass = (props) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
367
376
  "svg",
368
377
  {
378
+ xmlns: "http://www.w3.org/2000/svg",
369
379
  width: "1em",
370
380
  height: "1em",
371
- viewBox: "0 0 26 24",
372
381
  fill: "currentColor",
373
- xmlns: "http://www.w3.org/2000/svg",
382
+ viewBox: "0 0 26 24",
374
383
  ...props,
375
384
  children: [
376
385
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("g", { clipPath: "url(#magnifying-glass_svg__a)", children: [
377
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568 6.055 0 10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0Zm0 19.187c-4.937 0-8.954-3.866-8.954-8.618 0-4.752 4.017-8.618 8.954-8.618s8.954 3.866 8.954 8.618c0 4.752-4.017 8.618-8.954 8.618Z" }),
378
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m25.196 22.334-5.811-5.593a1.041 1.041 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38Z" })
386
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M11.539 0C5.484 0 .559 4.741.559 10.57c0 5.827 4.925 10.568 10.98 10.568s10.98-4.74 10.98-10.569C22.52 4.741 17.595 0 11.54 0m0 19.187c-4.937 0-8.954-3.866-8.954-8.618s4.017-8.618 8.954-8.618 8.954 3.866 8.954 8.618-4.017 8.618-8.954 8.618" }),
387
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "m25.196 22.334-5.811-5.593a1.04 1.04 0 0 0-1.434 0 .95.95 0 0 0 0 1.38l5.812 5.593c.198.19.457.286.716.286.26 0 .519-.096.717-.286a.95.95 0 0 0 0-1.38" })
379
388
  ] }),
380
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("clipPath", { id: "magnifying-glass_svg__a", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { fill: "#fff", transform: "translate(.558)", d: "M0 0h24.935v24H0z" }) }) })
389
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("clipPath", { id: "magnifying-glass_svg__a", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { fill: "#fff", d: "M.558 0h24.935v24H.558z" }) }) })
381
390
  ]
382
391
  }
383
392
  );
@@ -389,14 +398,14 @@ var SvgMaximizeAlt = (props) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("s
389
398
  "path",
390
399
  {
391
400
  xmlns: "http://www.w3.org/2000/svg",
392
- d: "M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3V3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3v6zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15v2zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2V3z"
401
+ d: "M3 3h6v2H6.462l4.843 4.843-1.415 1.414L5 6.367V9H3zm0 18h6v-2H6.376l4.929-4.928-1.415-1.414L5 17.548V15H3zm12 0h6v-6h-2v2.524l-4.867-4.866-1.414 1.414L17.647 19H15zm6-18h-6v2h2.562l-4.843 4.843 1.414 1.414L19 6.39V9h2z"
393
402
  }
394
403
  ) });
395
404
  var MaximizeAlt_default = SvgMaximizeAlt;
396
405
 
397
406
  // src/assets/icons/Minus.tsx
398
407
  var import_jsx_runtime11 = require("@emotion/react/jsx-runtime");
399
- var SvgMinus = (props) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z", fill: "currentColor" }) });
408
+ var SvgMinus = (props) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { fill: "currentColor", d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1" }) });
400
409
  var Minus_default = SvgMinus;
401
410
 
402
411
  // src/assets/icons/MoreVerticalAlt.tsx
@@ -405,7 +414,7 @@ var SvgMoreVerticalAlt = (props) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx
405
414
  "path",
406
415
  {
407
416
  xmlns: "http://www.w3.org/2000/svg",
408
- d: "M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"
417
+ d: "M14 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0m0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0m0 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0"
409
418
  }
410
419
  ) });
411
420
  var MoreVerticalAlt_default = SvgMoreVerticalAlt;
@@ -415,17 +424,51 @@ var import_jsx_runtime13 = require("@emotion/react/jsx-runtime");
415
424
  var SvgPlus = (props) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
416
425
  "svg",
417
426
  {
427
+ xmlns: "http://www.w3.org/2000/svg",
418
428
  width: "1em",
419
429
  height: "1em",
420
- viewBox: "0 0 46 46",
421
430
  fill: "currentColor",
422
- xmlns: "http://www.w3.org/2000/svg",
431
+ viewBox: "0 0 46 46",
423
432
  ...props,
424
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M44.203 21.203H24.797V1.797a1.797 1.797 0 1 0-3.594 0v19.406H1.797a1.797 1.797 0 1 0 0 3.594h19.406v19.406a1.797 1.797 0 0 0 3.594 0V24.797h19.406a1.797 1.797 0 0 0 0-3.594Z" })
433
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M44.203 21.203H24.797V1.797a1.797 1.797 0 1 0-3.594 0v19.406H1.797a1.797 1.797 0 1 0 0 3.594h19.406v19.406a1.797 1.797 0 0 0 3.594 0V24.797h19.406a1.797 1.797 0 0 0 0-3.594" })
425
434
  }
426
435
  );
427
436
  var Plus_default = SvgPlus;
428
437
 
438
+ // src/hooks/createDelegationFetch.ts
439
+ var import_mesh_sdk = require("@uniformdev/mesh-sdk");
440
+ async function isDelegationExpiredResponse(response) {
441
+ if (response.status !== 401) {
442
+ return false;
443
+ }
444
+ try {
445
+ const body = await response.clone().json();
446
+ return typeof body.code === "string" && body.code === import_mesh_sdk.DELEGATION_EXPIRED_CODE;
447
+ } catch (e) {
448
+ return false;
449
+ }
450
+ }
451
+ function createDelegationFetch(options) {
452
+ var _a, _b;
453
+ const fetchFn = (_a = options.fetch) != null ? _a : fetch;
454
+ const isExpired = (_b = options.isDelegationExpired) != null ? _b : isDelegationExpiredResponse;
455
+ return async (input3, init) => {
456
+ const headers = new Headers(init == null ? void 0 : init.headers);
457
+ headers.set(import_mesh_sdk.CSRF_HEADER_NAME, import_mesh_sdk.CSRF_HEADER_VALUE);
458
+ const initWithCsrf = { ...init, headers };
459
+ const response = await fetchFn(input3, initWithCsrf);
460
+ if (!await isExpired(response)) {
461
+ return response;
462
+ }
463
+ try {
464
+ await options.reacquire();
465
+ } catch (e) {
466
+ return response;
467
+ }
468
+ return fetchFn(input3, initWithCsrf);
469
+ };
470
+ }
471
+
429
472
  // src/hooks/useConnectedDataAsVariables.tsx
430
473
  var import_react2 = require("react");
431
474
  function useConnectedDataAsVariables(connectedData) {
@@ -444,12 +487,44 @@ function useConnectedDataAsVariables(connectedData) {
444
487
  );
445
488
  }
446
489
 
490
+ // src/hooks/useDelegation.ts
491
+ var import_react4 = require("react");
492
+
493
+ // src/components/Delegation/DelegationContext.ts
494
+ var import_react3 = require("react");
495
+ var DelegationContext = (0, import_react3.createContext)(null);
496
+
497
+ // src/hooks/useDelegation.ts
498
+ function useDelegation() {
499
+ const ctx = (0, import_react4.useContext)(DelegationContext);
500
+ if (!ctx) {
501
+ throw new Error("useDelegation must be used within a <DelegationProvider>");
502
+ }
503
+ return ctx;
504
+ }
505
+
506
+ // src/hooks/useDelegationFetch.ts
507
+ var import_react5 = require("react");
508
+ function useDelegationFetch(options) {
509
+ const { reacquire } = useDelegation();
510
+ const fetchImpl = options == null ? void 0 : options.fetch;
511
+ const isDelegationExpired = options == null ? void 0 : options.isDelegationExpired;
512
+ return (0, import_react5.useMemo)(
513
+ () => createDelegationFetch({
514
+ reacquire,
515
+ fetch: fetchImpl,
516
+ isDelegationExpired
517
+ }),
518
+ [reacquire, fetchImpl, isDelegationExpired]
519
+ );
520
+ }
521
+
447
522
  // src/hooks/useDynamicInputsAsVariables.tsx
448
523
  var import_canvas = require("@uniformdev/canvas");
449
- var import_react3 = require("react");
524
+ var import_react6 = require("react");
450
525
  var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
451
526
  function useDynamicInputsAsVariables(dynamicInputs) {
452
- return (0, import_react3.useMemo)(() => {
527
+ return (0, import_react6.useMemo)(() => {
453
528
  const result = Object.entries(dynamicInputs).reduce(
454
529
  (acc, [name2, input3]) => {
455
530
  const source = `from ${name2 === import_canvas.LOCALE_DYNAMIC_INPUT_NAME ? "current locale" : input3.type === "path" ? "URL path" : "query string"}`;
@@ -484,18 +559,18 @@ Current preview value: ${input3.value || "not provided"}`
484
559
  }
485
560
 
486
561
  // src/hooks/useMeshLocation.ts
487
- var import_react6 = require("react");
562
+ var import_react9 = require("react");
488
563
 
489
564
  // src/components/UniformMeshLocationContext.tsx
490
- var import_react5 = require("react");
565
+ var import_react8 = require("react");
491
566
 
492
567
  // src/components/UniformMeshSdkContext.tsx
493
568
  var import_design_system = require("@uniformdev/design-system");
494
- var import_react4 = require("react");
569
+ var import_react7 = require("react");
495
570
  var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
496
- var UniformMeshSdkContext = (0, import_react4.createContext)(void 0);
571
+ var UniformMeshSdkContext = (0, import_react7.createContext)(void 0);
497
572
  var useUniformMeshSdkContext = () => {
498
- const context = (0, import_react4.useContext)(UniformMeshSdkContext);
573
+ const context = (0, import_react7.useContext)(UniformMeshSdkContext);
499
574
  if (!context) {
500
575
  throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");
501
576
  }
@@ -510,13 +585,13 @@ function useUniformMeshSdk() {
510
585
 
511
586
  // src/components/UniformMeshLocationContext.tsx
512
587
  var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
513
- var UniformMeshLocationContext = (0, import_react5.createContext)(void 0);
588
+ var UniformMeshLocationContext = (0, import_react8.createContext)(void 0);
514
589
  var UniformMeshLocationContextProvider = ({
515
590
  children
516
591
  }) => {
517
592
  const sdk = useUniformMeshSdk();
518
- const [location, setLocation] = (0, import_react5.useState)(sdk.getCurrentLocation());
519
- (0, import_react5.useMemo)(() => {
593
+ const [location, setLocation] = (0, import_react8.useState)(sdk.getCurrentLocation());
594
+ (0, import_react8.useMemo)(() => {
520
595
  const valueChangeListener = (event) => {
521
596
  setLocation((old) => ({ ...old, value: event.newValue }));
522
597
  };
@@ -533,7 +608,7 @@ var UniformMeshLocationContextProvider = ({
533
608
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UniformMeshLocationContext.Provider, { value: { location }, children });
534
609
  };
535
610
  var useUniformMeshLocationContext = () => {
536
- const context = (0, import_react5.useContext)(UniformMeshLocationContext);
611
+ const context = (0, import_react8.useContext)(UniformMeshLocationContext);
537
612
  if (!context) {
538
613
  throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");
539
614
  }
@@ -546,9 +621,9 @@ function useMeshLocation(expectedLocation) {
546
621
  if (expectedLocation && location.type !== expectedLocation) {
547
622
  throw new Error(`Expected location type ${expectedLocation} but got ${location.type}`);
548
623
  }
549
- const backdoorLocation = (0, import_react6.useRef)(location);
624
+ const backdoorLocation = (0, import_react9.useRef)(location);
550
625
  backdoorLocation.current = location;
551
- const stabilizedSetValueProxy = (0, import_react6.useMemo)(
626
+ const stabilizedSetValueProxy = (0, import_react9.useMemo)(
552
627
  () => (dispatch) => {
553
628
  const { newValue, options } = dispatch(backdoorLocation.current.value);
554
629
  backdoorLocation.current.setValue(newValue, options);
@@ -567,7 +642,7 @@ var import_design_system2 = require("@uniformdev/design-system");
567
642
 
568
643
  // src/components/Variables/composer/ControlledValuePlugin.tsx
569
644
  var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
570
- var import_react7 = require("react");
645
+ var import_react10 = require("react");
571
646
 
572
647
  // src/components/Variables/util/serializeVariablesEditorState.ts
573
648
  var import_canvas2 = require("@uniformdev/canvas");
@@ -677,7 +752,7 @@ function refreshVariableNodeMetadata(editor) {
677
752
 
678
753
  // src/components/Variables/util/setVariablesEditorValue.ts
679
754
  function setVariablesEditorValue(editor, newValue, tag) {
680
- if (typeof newValue === "undefined" || typeof newValue === "string") {
755
+ if (newValue === null || typeof newValue === "undefined" || typeof newValue === "string") {
681
756
  const parsedState = editor.parseEditorState(deserializeVariablesEditorState(newValue));
682
757
  editor.setEditorState(parsedState.clone(null), {
683
758
  tag
@@ -711,7 +786,7 @@ function ControlledValuePlugin({
711
786
  extraDependencies
712
787
  }) {
713
788
  const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
714
- (0, import_react7.useEffect)(() => {
789
+ (0, import_react10.useEffect)(() => {
715
790
  var _a, _b;
716
791
  if (!enabled) {
717
792
  return;
@@ -732,7 +807,7 @@ function ControlledValuePlugin({
732
807
 
733
808
  // src/components/Variables/composer/VariableChip.tsx
734
809
  var import_design_system3 = require("@uniformdev/design-system");
735
- var import_react8 = require("react");
810
+ var import_react11 = require("react");
736
811
  var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
737
812
  function VariableChip({
738
813
  displayName,
@@ -748,7 +823,7 @@ function VariableChip({
748
823
  }) {
749
824
  const hasClickEvent = !!onClick;
750
825
  const referenceIsValidFr = isFresh ? true : referenceIsValid;
751
- const Wrapper = referenceIsValidFr === "warning" ? WarningVariableReference : referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? import_react8.Fragment : UndefinedVariableReference;
826
+ const Wrapper = referenceIsValidFr === "warning" ? WarningVariableReference : referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? import_react11.Fragment : UndefinedVariableReference;
752
827
  const extraTitle = !referenceIsValidFr ? errorMessage : hasClickEvent && clickToEdit ? "Click to edit" : void 0;
753
828
  const chippy = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system3.MultilineChip, { onClick, "aria-selected": selected ? true : void 0, "aria-disabled": disabled, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Wrapper, { children: displayName || reference }) });
754
829
  if (tooltip) {
@@ -814,7 +889,7 @@ var import_utils2 = require("@lexical/utils");
814
889
  var import_canvas5 = require("@uniformdev/canvas");
815
890
  var import_design_system6 = require("@uniformdev/design-system");
816
891
  var import_lexical5 = require("lexical");
817
- var import_react16 = require("react");
892
+ var import_react19 = require("react");
818
893
 
819
894
  // src/components/Variables/util/prettifyBindExpression.tsx
820
895
  function prettifyBindExpression(bindExpression) {
@@ -823,7 +898,7 @@ function prettifyBindExpression(bindExpression) {
823
898
  }
824
899
 
825
900
  // src/components/Variables/composer/VariablesPlugin.tsx
826
- var import_react14 = require("@emotion/react");
901
+ var import_react17 = require("@emotion/react");
827
902
  var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
828
903
  var import_LexicalTypeaheadMenuPlugin = require("@lexical/react/LexicalTypeaheadMenuPlugin");
829
904
  var import_utils = require("@lexical/utils");
@@ -832,12 +907,12 @@ var import_canvas4 = require("@uniformdev/canvas");
832
907
  var import_design_system5 = require("@uniformdev/design-system");
833
908
  var import_lite = require("dequal/lite");
834
909
  var import_lexical4 = require("lexical");
835
- var import_react15 = require("react");
910
+ var import_react18 = require("react");
836
911
  var import_react_dom = require("react-dom");
837
912
 
838
913
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
839
- var import_react9 = require("@emotion/react");
840
- var menuBtn = import_react9.css`
914
+ var import_react12 = require("@emotion/react");
915
+ var menuBtn = import_react12.css`
841
916
  background: none;
842
917
  border: none;
843
918
  color: var(--gray-500);
@@ -847,18 +922,18 @@ var menuBtn = import_react9.css`
847
922
  outline: none;
848
923
  }
849
924
  `;
850
- var menuItemTextGroup = import_react9.css`
925
+ var menuItemTextGroup = import_react12.css`
851
926
  align-items: flex-start;
852
927
  display: flex;
853
928
  flex-direction: column;
854
929
  gap: 0;
855
930
  line-height: 1em;
856
931
  `;
857
- var smallText = import_react9.css`
932
+ var smallText = import_react12.css`
858
933
  font-size: var(--fs-xs);
859
934
  color: var(--gray-500);
860
935
  `;
861
- var variablesTipText = import_react9.css`
936
+ var variablesTipText = import_react12.css`
862
937
  ${smallText}
863
938
  color: var(--gray-500);
864
939
  padding: 0 var(--spacing-sm);
@@ -866,18 +941,18 @@ var variablesTipText = import_react9.css`
866
941
 
867
942
  // src/components/Variables/VariablesProvider.tsx
868
943
  var import_mitt = __toESM(require("mitt"));
869
- var import_react13 = require("react");
944
+ var import_react16 = require("react");
870
945
 
871
946
  // src/components/Variables/util/useVariableEditTransaction.ts
872
- var import_react10 = require("react");
947
+ var import_react13 = require("react");
873
948
  function useVariableEditTransaction({
874
949
  events,
875
950
  dispatch,
876
951
  isEditing,
877
952
  variables
878
953
  }) {
879
- const [isEditingBinding, setIsEditingBinding] = (0, import_react10.useState)();
880
- (0, import_react10.useEffect)(() => {
954
+ const [isEditingBinding, setIsEditingBinding] = (0, import_react13.useState)();
955
+ (0, import_react13.useEffect)(() => {
881
956
  if (!isEditingBinding) {
882
957
  return;
883
958
  }
@@ -888,7 +963,7 @@ function useVariableEditTransaction({
888
963
  events.on("editCompleted", fn);
889
964
  return () => events.off("editCompleted", fn);
890
965
  }, [events, isEditingBinding, variables]);
891
- (0, import_react10.useEffect)(() => {
966
+ (0, import_react13.useEffect)(() => {
892
967
  if (!isEditing) {
893
968
  if (isEditingBinding) {
894
969
  isEditingBinding.resolve({ canceled: true });
@@ -896,7 +971,7 @@ function useVariableEditTransaction({
896
971
  setIsEditingBinding(void 0);
897
972
  }
898
973
  }, [isEditing, isEditingBinding]);
899
- return (0, import_react10.useCallback)(
974
+ return (0, import_react13.useCallback)(
900
975
  async function editVariableTxn(variable, context) {
901
976
  if (isEditingBinding) {
902
977
  dispatch({ type: "cancelEdit" });
@@ -916,15 +991,15 @@ function useVariableEditTransaction({
916
991
  }
917
992
 
918
993
  // src/components/Variables/VariableEditor.tsx
919
- var import_zod = require("@hookform/resolvers/zod");
994
+ var import_standard_schema = require("@hookform/resolvers/standard-schema");
920
995
  var import_design_system4 = require("@uniformdev/design-system");
921
- var import_react12 = require("react");
996
+ var import_react15 = require("react");
922
997
  var import_react_hook_form = require("react-hook-form");
923
- var z = __toESM(require("zod/v3"));
998
+ var z = __toESM(require("zod"));
924
999
 
925
1000
  // src/components/Variables/styles/VariableEditor.styles.ts
926
- var import_react11 = require("@emotion/react");
927
- var variablesFormContainer = import_react11.css`
1001
+ var import_react14 = require("@emotion/react");
1002
+ var variablesFormContainer = import_react14.css`
928
1003
  > * {
929
1004
  margin: var(--spacing-base) 0 0;
930
1005
  }
@@ -933,7 +1008,7 @@ var variablesFormContainer = import_react11.css`
933
1008
  // src/components/Variables/VariableEditor.tsx
934
1009
  var import_jsx_runtime18 = require("@emotion/react/jsx-runtime");
935
1010
  var schema = z.object({
936
- name: z.string().nonempty("Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
1011
+ name: z.string().min(1, "Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
937
1012
  default: z.string(),
938
1013
  displayName: z.string().optional(),
939
1014
  helpText: z.string().optional(),
@@ -959,7 +1034,7 @@ function VariableEditor({
959
1034
  order: currentVariable == null ? void 0 : currentVariable.order,
960
1035
  type: (_d = currentVariable == null ? void 0 : currentVariable.type) != null ? _d : ""
961
1036
  },
962
- resolver: (0, import_zod.zodResolver)(schema)
1037
+ resolver: (0, import_standard_schema.standardSchemaResolver)(schema)
963
1038
  });
964
1039
  const submitHandler = handleSubmit((values) => {
965
1040
  const finalValue = {
@@ -977,9 +1052,9 @@ function VariableEditor({
977
1052
  },
978
1053
  activeWhenEditing: true
979
1054
  });
980
- const nameRef = (0, import_react12.useRef)(null);
1055
+ const nameRef = (0, import_react15.useRef)(null);
981
1056
  const { ref, ...nameRegister } = register("name");
982
- (0, import_react12.useLayoutEffect)(() => {
1057
+ (0, import_react15.useLayoutEffect)(() => {
983
1058
  if (nameRef.current && !nameRef.current.value) {
984
1059
  nameRef.current.focus();
985
1060
  }
@@ -1055,7 +1130,7 @@ function VariableEditor({
1055
1130
 
1056
1131
  // src/components/Variables/VariablesProvider.tsx
1057
1132
  var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
1058
- var VariablesContext = (0, import_react13.createContext)(null);
1133
+ var VariablesContext = (0, import_react16.createContext)(null);
1059
1134
  function VariablesProvider({
1060
1135
  value,
1061
1136
  onChange,
@@ -1066,9 +1141,9 @@ function VariablesProvider({
1066
1141
  knownUndefinedValues = {},
1067
1142
  onChangeKnownUndefinedValue
1068
1143
  }) {
1069
- const [editing, setEditing] = (0, import_react13.useState)();
1070
- const [editingContext, setEditingContext] = (0, import_react13.useState)();
1071
- const events = (0, import_react13.useMemo)(
1144
+ const [editing, setEditing] = (0, import_react16.useState)();
1145
+ const [editingContext, setEditingContext] = (0, import_react16.useState)();
1146
+ const events = (0, import_react16.useMemo)(
1072
1147
  () => (0, import_mitt.default)(),
1073
1148
  []
1074
1149
  );
@@ -1076,7 +1151,7 @@ function VariablesProvider({
1076
1151
  throw new Error("onChange must be provided when readOnly is false");
1077
1152
  }
1078
1153
  const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
1079
- const valueBasedContextValue = (0, import_react13.useMemo)(
1154
+ const valueBasedContextValue = (0, import_react16.useMemo)(
1080
1155
  () => ({
1081
1156
  flatVariables: flattenVariables(value),
1082
1157
  dispatch: (event) => {
@@ -1120,7 +1195,7 @@ function VariablesProvider({
1120
1195
  isEditing: typeof editing !== "undefined",
1121
1196
  variables: value
1122
1197
  });
1123
- const contextValue = (0, import_react13.useMemo)(() => {
1198
+ const contextValue = (0, import_react16.useMemo)(() => {
1124
1199
  return {
1125
1200
  ...valueBasedContextValue,
1126
1201
  editVariableTxn,
@@ -1131,7 +1206,7 @@ function VariablesProvider({
1131
1206
  isLoading: !!isLoading
1132
1207
  };
1133
1208
  }, [valueBasedContextValue, editVariableTxn, editing, events, knownUndefinedValues, isLoading]);
1134
- (0, import_react13.useEffect)(() => {
1209
+ (0, import_react16.useEffect)(() => {
1135
1210
  if (editing === void 0) {
1136
1211
  return;
1137
1212
  }
@@ -1180,7 +1255,7 @@ function VariablesProvider({
1180
1255
  ] });
1181
1256
  }
1182
1257
  function useVariables(returnEmptyWithoutProvider = false) {
1183
- const context = (0, import_react13.useContext)(VariablesContext);
1258
+ const context = (0, import_react16.useContext)(VariablesContext);
1184
1259
  if (!context) {
1185
1260
  if (returnEmptyWithoutProvider) {
1186
1261
  return {
@@ -1292,6 +1367,11 @@ var DISCONNECT_VARIABLE_COMMAND = (0, import_lexical4.createCommand)(
1292
1367
  "uniform:disconnect-variable"
1293
1368
  );
1294
1369
  var INSERT_VARIABLE_COMMAND = (0, import_lexical4.createCommand)("uniform:insert-variable");
1370
+ function isEditorFocused(editor) {
1371
+ var _a;
1372
+ const rootElement = editor.getRootElement();
1373
+ return (_a = rootElement == null ? void 0 : rootElement.contains(rootElement.ownerDocument.activeElement)) != null ? _a : false;
1374
+ }
1295
1375
  var DollarSignVariablesRegex = /(^.*)(\$\$(.{0,20}))$/;
1296
1376
  function getPossibleQueryMatch(text) {
1297
1377
  const match = DollarSignVariablesRegex.exec(text);
@@ -1315,7 +1395,7 @@ function useVariablesMenu({
1315
1395
  getEditorContext
1316
1396
  }) {
1317
1397
  const { variables, canDispatch, readOnly } = useVariables(true);
1318
- const canEditVariable = (0, import_react15.useCallback)(
1398
+ const canEditVariable = (0, import_react18.useCallback)(
1319
1399
  (name2, variable) => (
1320
1400
  // name === '' means new var. Add var perms computed by menu options.
1321
1401
  name2 === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -1323,7 +1403,7 @@ function useVariablesMenu({
1323
1403
  [canDispatch, enableEditingVariables, readOnly]
1324
1404
  );
1325
1405
  const canAddVariable = canDispatch && showAddVariableMenuOption && !readOnly;
1326
- const { groupedVariables, menuOptions } = (0, import_react15.useMemo)(() => {
1406
+ const { groupedVariables, menuOptions } = (0, import_react18.useMemo)(() => {
1327
1407
  const groupedVariables2 = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
1328
1408
  if (canAddVariable) {
1329
1409
  groupedVariables2.unshift({
@@ -1345,7 +1425,7 @@ function useVariablesMenu({
1345
1425
  );
1346
1426
  return { menuOptions: menuOptions2, groupedVariables: groupedVariables2 };
1347
1427
  }, [variables, filterVariable, getEditorContext, canAddVariable, showAddVariableMenuOption]);
1348
- const onSelect = (0, import_react15.useCallback)(
1428
+ const onSelect = (0, import_react18.useCallback)(
1349
1429
  ({ queryString, value, nodeToReplace, editor, overwriteExistingValue }) => {
1350
1430
  if (value === ADD_VARIABLE_OPTION) {
1351
1431
  editor.update(() => {
@@ -1394,9 +1474,9 @@ function VariablesPlugin({
1394
1474
  }) {
1395
1475
  const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
1396
1476
  const { variables, dispatch, isEditing, canDispatch, readOnly, knownUndefinedValues, isLoading } = useVariables(true);
1397
- const variablesRef = (0, import_react15.useRef)({ variables, knownUndefinedValues, isLoading });
1477
+ const variablesRef = (0, import_react18.useRef)({ variables, knownUndefinedValues, isLoading });
1398
1478
  variablesRef.current = { variables, knownUndefinedValues, isLoading };
1399
- const canEditVariable = (0, import_react15.useCallback)(
1479
+ const canEditVariable = (0, import_react18.useCallback)(
1400
1480
  (name2, variable) => (
1401
1481
  // name === '' means new var. Add var perms computed by menu options.
1402
1482
  name2 === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -1404,13 +1484,13 @@ function VariablesPlugin({
1404
1484
  [canDispatch, enableEditingVariables, readOnly]
1405
1485
  );
1406
1486
  const { editVariable } = useVariableEditor();
1407
- const [queryString, setQueryString] = (0, import_react15.useState)(null);
1487
+ const [queryString, setQueryString] = (0, import_react18.useState)(null);
1408
1488
  const { groupedVariables, menuOptions, onSelect } = useVariablesMenu({
1409
1489
  showAddVariableMenuOption,
1410
1490
  filterVariable,
1411
1491
  getEditorContext
1412
1492
  });
1413
- const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react15.useMemo)(() => {
1493
+ const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react18.useMemo)(() => {
1414
1494
  if (!queryString) {
1415
1495
  return {
1416
1496
  filteredGroupedVariables: groupedVariables,
@@ -1433,7 +1513,7 @@ function VariablesPlugin({
1433
1513
  )
1434
1514
  };
1435
1515
  }, [queryString, groupedVariables, menuOptions]);
1436
- const onSelectOption = (0, import_react15.useCallback)(
1516
+ const onSelectOption = (0, import_react18.useCallback)(
1437
1517
  (selectedOption, nodeToReplace, closeMenu) => {
1438
1518
  onSelect({
1439
1519
  queryString: queryString != null ? queryString : void 0,
@@ -1446,7 +1526,7 @@ function VariablesPlugin({
1446
1526
  },
1447
1527
  [editor, onSelect, queryString, replaceValueOnVariableInsert]
1448
1528
  );
1449
- (0, import_react15.useEffect)(() => {
1529
+ (0, import_react18.useEffect)(() => {
1450
1530
  return (0, import_utils.mergeRegister)(
1451
1531
  editor.registerCommand(
1452
1532
  EDIT_VARIABLE_COMMAND,
@@ -1586,7 +1666,7 @@ function VariablesPlugin({
1586
1666
  replaceValueOnVariableInsert,
1587
1667
  disableVariableDisplayNames
1588
1668
  ]);
1589
- const updateExistingNodeIfChanged = (0, import_react15.useCallback)(
1669
+ const computeUpdatedVariableNodeState = (0, import_react18.useCallback)(
1590
1670
  (variableNode) => {
1591
1671
  var _a, _b, _c, _d;
1592
1672
  const targetVar = variablesRef.current.variables[variableNode.reference];
@@ -1594,7 +1674,7 @@ function VariablesPlugin({
1594
1674
  const isLoadingVariables = variablesRef.current.isLoading;
1595
1675
  const currentState = variableNode.getState();
1596
1676
  if (currentState.isFresh && !targetVar && !targetUndefinedVar) {
1597
- return;
1677
+ return void 0;
1598
1678
  }
1599
1679
  const tooltip = (_d = (_c = (_b = (_a = targetVar == null ? void 0 : targetVar.tooltip) != null ? _a : targetVar == null ? void 0 : targetVar.helpText) != null ? _b : targetUndefinedVar == null ? void 0 : targetUndefinedVar.error) != null ? _c : targetUndefinedVar == null ? void 0 : targetUndefinedVar.warning) != null ? _d : targetUndefinedVar == null ? void 0 : targetUndefinedVar.info;
1600
1680
  const displayName = disableVariableDisplayNames ? prettifyBindExpression(variableNode.reference) : (targetVar == null ? void 0 : targetVar.displayName) || (targetUndefinedVar == null ? void 0 : targetUndefinedVar.displayName) || prettifyBindExpression(variableNode.reference);
@@ -1607,27 +1687,51 @@ function VariablesPlugin({
1607
1687
  tooltip,
1608
1688
  isFresh: false
1609
1689
  };
1610
- if (!(0, import_lite.dequal)(currentState, newState)) {
1690
+ return (0, import_lite.dequal)(currentState, newState) ? void 0 : newState;
1691
+ },
1692
+ [canEditVariable, disableVariableDisplayNames]
1693
+ );
1694
+ const updateExistingNodeIfChanged = (0, import_react18.useCallback)(
1695
+ (variableNode) => {
1696
+ const newState = computeUpdatedVariableNodeState(variableNode);
1697
+ if (newState) {
1611
1698
  variableNode.setState(newState);
1612
1699
  }
1613
1700
  },
1614
- [canEditVariable, disableVariableDisplayNames]
1701
+ [computeUpdatedVariableNodeState]
1615
1702
  );
1616
- (0, import_react15.useEffect)(() => {
1617
- let selection;
1703
+ (0, import_react18.useEffect)(() => {
1704
+ const pendingUpdates = [];
1618
1705
  editor.read(() => {
1619
- selection = (0, import_lexical4.$getSelection)();
1706
+ (0, import_utils.$dfs)().forEach(({ node }) => {
1707
+ if ($isVariableNode(node)) {
1708
+ const newState = computeUpdatedVariableNodeState(node);
1709
+ if (newState) {
1710
+ pendingUpdates.push({ key: node.getKey(), newState });
1711
+ }
1712
+ }
1713
+ });
1620
1714
  });
1715
+ if (pendingUpdates.length === 0) {
1716
+ return;
1717
+ }
1718
+ const shouldSyncDomSelection = isEditorFocused(editor);
1621
1719
  editor.update(() => {
1622
1720
  var _a;
1623
- (0, import_lexical4.$addUpdateTag)("skip-dom-selection");
1624
- (0, import_lexical4.$setSelection)((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
1625
- (0, import_utils.$dfs)().filter(({ node }) => $isVariableNode(node)).forEach(({ node: variableNode }) => {
1626
- updateExistingNodeIfChanged(variableNode);
1721
+ const selection = (0, import_lexical4.$getSelection)();
1722
+ pendingUpdates.forEach(({ key, newState }) => {
1723
+ const node = (0, import_lexical4.$getNodeByKey)(key);
1724
+ if ($isVariableNode(node)) {
1725
+ node.setState(newState);
1726
+ }
1627
1727
  });
1728
+ (0, import_lexical4.$setSelection)((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
1729
+ if (!shouldSyncDomSelection) {
1730
+ (0, import_lexical4.$addUpdateTag)(import_lexical4.SKIP_DOM_SELECTION_TAG);
1731
+ }
1628
1732
  });
1629
- }, [editor, variables, knownUndefinedValues, canEditVariable, updateExistingNodeIfChanged]);
1630
- (0, import_react15.useEffect)(() => {
1733
+ }, [editor, variables, knownUndefinedValues, computeUpdatedVariableNodeState]);
1734
+ (0, import_react18.useEffect)(() => {
1631
1735
  return editor.registerNodeTransform(VariableNode, (variableNode) => {
1632
1736
  updateExistingNodeIfChanged(variableNode);
1633
1737
  });
@@ -1652,7 +1756,7 @@ function VariablesPlugin({
1652
1756
  "div",
1653
1757
  {
1654
1758
  "data-auto-resize-opt-in": true,
1655
- css: import_react14.css`
1759
+ css: import_react17.css`
1656
1760
  box-shadow: var(--shadow-base);
1657
1761
  border-radius: var(--rounded-base);
1658
1762
  background: var(--gray-50);
@@ -1816,7 +1920,7 @@ function VariableNodeComponent({
1816
1920
  const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
1817
1921
  const [isSelected, setSelected, clearSelection] = (0, import_useLexicalNodeSelection.useLexicalNodeSelection)(nodeKey);
1818
1922
  const readOnly = !editor.isEditable();
1819
- const onDelete = (0, import_react16.useCallback)(
1923
+ const onDelete = (0, import_react19.useCallback)(
1820
1924
  (event) => {
1821
1925
  if (isSelected && (0, import_lexical5.$isNodeSelection)((0, import_lexical5.$getSelection)())) {
1822
1926
  event.preventDefault();
@@ -1829,7 +1933,7 @@ function VariableNodeComponent({
1829
1933
  },
1830
1934
  [isSelected, nodeKey]
1831
1935
  );
1832
- (0, import_react16.useEffect)(() => {
1936
+ (0, import_react19.useEffect)(() => {
1833
1937
  return (0, import_utils2.mergeRegister)(
1834
1938
  editor.registerCommand(import_lexical5.KEY_DELETE_COMMAND, onDelete, import_lexical5.COMMAND_PRIORITY_LOW),
1835
1939
  editor.registerCommand(import_lexical5.KEY_BACKSPACE_COMMAND, onDelete, import_lexical5.COMMAND_PRIORITY_LOW),
@@ -1917,9 +2021,9 @@ function $isTargetWithinDecorator(target) {
1917
2021
  }
1918
2022
 
1919
2023
  // src/components/Variables/InputVariables.tsx
1920
- var import_react27 = require("@emotion/react");
2024
+ var import_react31 = require("@emotion/react");
1921
2025
  var import_design_system9 = require("@uniformdev/design-system");
1922
- var import_react28 = require("react");
2026
+ var import_react32 = require("react");
1923
2027
  var import_uuid = require("uuid");
1924
2028
 
1925
2029
  // src/components/Variables/composer/EditorRefPlugin.tsx
@@ -1940,10 +2044,10 @@ function EditorRefPlugin({
1940
2044
  var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
1941
2045
  var import_utils3 = require("@lexical/utils");
1942
2046
  var import_lexical6 = require("lexical");
1943
- var import_react17 = require("react");
2047
+ var import_react20 = require("react");
1944
2048
  function PasteTransformerPlugin({ transformPaste }) {
1945
2049
  const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
1946
- (0, import_react17.useEffect)(() => {
2050
+ (0, import_react20.useEffect)(() => {
1947
2051
  return (0, import_utils3.mergeRegister)(
1948
2052
  editor.registerCommand(
1949
2053
  import_lexical6.PASTE_COMMAND,
@@ -1968,17 +2072,17 @@ function PasteTransformerPlugin({ transformPaste }) {
1968
2072
  }
1969
2073
 
1970
2074
  // src/components/Variables/styles/InputVariables.styles.ts
1971
- var import_react18 = require("@emotion/react");
1972
- var menuContainer = import_react18.css`
2075
+ var import_react21 = require("@emotion/react");
2076
+ var menuContainer = import_react21.css`
1973
2077
  position: relative;
1974
2078
  `;
1975
- var menuBtn2 = import_react18.css`
2079
+ var menuBtn2 = import_react21.css`
1976
2080
  position: absolute;
1977
2081
  top: 50%;
1978
2082
  right: var(--spacing-sm);
1979
2083
  transform: translateY(-50%);
1980
2084
  `;
1981
- var input = import_react18.css`
2085
+ var input = import_react21.css`
1982
2086
  --input-padding: 12px var(--spacing-lg) 12px var(--spacing-sm);
1983
2087
  appearance: none;
1984
2088
  background-color: var(--white);
@@ -2023,17 +2127,20 @@ var input = import_react18.css`
2023
2127
  margin: 0;
2024
2128
  }
2025
2129
  `;
2026
- var inputCompact = import_react18.css`
2130
+ var inputCompact = import_react21.css`
2027
2131
  border: 1px solid var(--white);
2028
2132
  padding-block: var(--spacing-sm);
2029
- min-height: 39px;
2030
2133
  font-size: var(--fs-sm);
2134
+
2135
+ && {
2136
+ min-height: 39px;
2137
+ }
2031
2138
  `;
2032
- var inputDisabled = import_react18.css`
2139
+ var inputDisabled = import_react21.css`
2033
2140
  cursor: not-allowed;
2034
2141
  opacity: var(--opacity-50);
2035
2142
  `;
2036
- var placeholderCaption = import_react18.css`
2143
+ var placeholderCaption = import_react21.css`
2037
2144
  position: absolute;
2038
2145
  color: var(--gray-400);
2039
2146
  inset: 12px var(--spacing-base) 12px var(--spacing-sm);
@@ -2042,14 +2149,14 @@ var placeholderCaption = import_react18.css`
2042
2149
  white-space: nowrap;
2043
2150
  pointer-events: none;
2044
2151
  `;
2045
- var placeholderCompact = import_react18.css`
2152
+ var placeholderCompact = import_react21.css`
2046
2153
  inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);
2047
2154
  `;
2048
2155
 
2049
2156
  // src/components/Variables/styles/ParameterVariables.styles.ts
2050
- var import_react19 = require("@emotion/react");
2157
+ var import_react22 = require("@emotion/react");
2051
2158
  var import_design_system7 = require("@uniformdev/design-system");
2052
- var variableBindButton = import_react19.css`
2159
+ var variableBindButton = import_react22.css`
2053
2160
  --hover-color: var(--accent-dark-hover);
2054
2161
  --active-color: var(--accent-dark-active);
2055
2162
  border: 1px solid transparent;
@@ -2092,7 +2199,7 @@ var variableBindButton = import_react19.css`
2092
2199
  max-height: unset;
2093
2200
  }
2094
2201
  `;
2095
- var input2 = import_react19.css`
2202
+ var input2 = import_react22.css`
2096
2203
  display: block;
2097
2204
  appearance: none;
2098
2205
  box-sizing: border-box;
@@ -2146,7 +2253,7 @@ var input2 = import_react19.css`
2146
2253
  margin: 0;
2147
2254
  }
2148
2255
  `;
2149
- var inputMultiLine = (lines) => import_react19.css`
2256
+ var inputMultiLine = (lines) => import_react22.css`
2150
2257
  ${import_design_system7.scrollbarStyles}
2151
2258
  // 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
2152
2259
  // as the text looked to close to the bottom of the input
@@ -2157,7 +2264,7 @@ var inputMultiLine = (lines) => import_react19.css`
2157
2264
 
2158
2265
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2159
2266
  var import_canvas6 = require("@uniformdev/canvas");
2160
- var import_react20 = require("react");
2267
+ var import_react23 = require("react");
2161
2268
  function useInputVariablesState({
2162
2269
  value,
2163
2270
  onChange,
@@ -2173,14 +2280,14 @@ function useInputVariablesState({
2173
2280
  }) {
2174
2281
  const { variables } = useVariables(true);
2175
2282
  const variableReferenceCountInValue = (0, import_canvas6.hasReferencedVariables)(value != null ? value : "");
2176
- const [lastKnownId, setLastKnownId] = (0, import_react20.useState)(id);
2177
- const [hadVariablesInValue, setHadVariablesInValue] = (0, import_react20.useState)(variableReferenceCountInValue > 0);
2178
- (0, import_react20.useEffect)(() => {
2283
+ const [lastKnownId, setLastKnownId] = (0, import_react23.useState)(id);
2284
+ const [hadVariablesInValue, setHadVariablesInValue] = (0, import_react23.useState)(variableReferenceCountInValue > 0);
2285
+ (0, import_react23.useEffect)(() => {
2179
2286
  if (variableReferenceCountInValue) {
2180
2287
  setHadVariablesInValue(true);
2181
2288
  }
2182
2289
  }, [variableReferenceCountInValue]);
2183
- (0, import_react20.useEffect)(() => {
2290
+ (0, import_react23.useEffect)(() => {
2184
2291
  if (id !== lastKnownId) {
2185
2292
  setLastKnownId(id);
2186
2293
  setHadVariablesInValue(variableReferenceCountInValue > 0);
@@ -2189,7 +2296,7 @@ function useInputVariablesState({
2189
2296
  const hadVariablesInValueForReals = inputWhenNoVariables ? hadVariablesInValue : variableReferenceCountInValue > 0;
2190
2297
  const disableVariablesForReals = disableVariables || Object.keys(variables).length === 0 && !showAddVariableMenuOption;
2191
2298
  const disableResetForReals = !inputWhenNoVariables || !hadVariablesInValueForReals;
2192
- const sharedMenuProps = (0, import_react20.useMemo)(
2299
+ const sharedMenuProps = (0, import_react23.useMemo)(
2193
2300
  () => ({
2194
2301
  menuTooltip,
2195
2302
  showAddVariableMenuOption,
@@ -2222,8 +2329,8 @@ function useInputVariablesState({
2222
2329
  }
2223
2330
 
2224
2331
  // src/components/Variables/toolbox/VariableField.styles.ts
2225
- var import_react21 = require("@emotion/react");
2226
- var labelText = import_react21.css`
2332
+ var import_react24 = require("@emotion/react");
2333
+ var labelText = import_react24.css`
2227
2334
  align-items: center;
2228
2335
  display: flex;
2229
2336
  gap: var(--spacing-xs);
@@ -2239,7 +2346,7 @@ var import_lexical7 = require("lexical");
2239
2346
  var import_BsFillPlusCircleFill = require("@react-icons/all-files/bs/BsFillPlusCircleFill");
2240
2347
  var import_CgUsbC = require("@react-icons/all-files/cg/CgUsbC");
2241
2348
  var import_design_system8 = require("@uniformdev/design-system");
2242
- var import_react22 = require("react");
2349
+ var import_react25 = require("react");
2243
2350
  var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
2244
2351
  function SelectVariableMenu({
2245
2352
  onSelectVariable,
@@ -2254,7 +2361,7 @@ function SelectVariableMenu({
2254
2361
  filterVariable
2255
2362
  }) {
2256
2363
  const { variables, canDispatch, readOnly } = useVariables(true);
2257
- const btnRef = (0, import_react22.useRef)(null);
2364
+ const btnRef = (0, import_react25.useRef)(null);
2258
2365
  const { editVariable } = useVariableEditor();
2259
2366
  const variablesGroups = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
2260
2367
  const showAddVariableMenuOptionForReals = showAddVariableMenuOption && canDispatch && !readOnly;
@@ -2387,14 +2494,14 @@ var import_LexicalAutoFocusPlugin = require("@lexical/react/LexicalAutoFocusPlug
2387
2494
  var import_LexicalClearEditorPlugin = require("@lexical/react/LexicalClearEditorPlugin");
2388
2495
  var import_LexicalComposer = require("@lexical/react/LexicalComposer");
2389
2496
  var import_LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
2390
- var import_react25 = require("react");
2497
+ var import_react29 = require("react");
2391
2498
 
2392
2499
  // src/components/Variables/composer/DisablePlugin.tsx
2393
2500
  var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
2394
- var import_react23 = require("react");
2501
+ var import_react26 = require("react");
2395
2502
  function DisablePlugin({ disabled }) {
2396
2503
  const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
2397
- (0, import_react23.useEffect)(() => {
2504
+ (0, import_react26.useEffect)(() => {
2398
2505
  editor.setEditable(!disabled);
2399
2506
  }, [editor, disabled]);
2400
2507
  return null;
@@ -2403,10 +2510,10 @@ function DisablePlugin({ disabled }) {
2403
2510
  // src/components/Variables/composer/SingleLineTextPlugin.tsx
2404
2511
  var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
2405
2512
  var import_lexical8 = require("lexical");
2406
- var import_react24 = require("react");
2513
+ var import_react27 = require("react");
2407
2514
  function SingleLineTextPlugin() {
2408
2515
  const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
2409
- (0, import_react24.useEffect)(() => {
2516
+ (0, import_react27.useEffect)(() => {
2410
2517
  editor.registerNodeTransform(import_lexical8.LineBreakNode, (node) => {
2411
2518
  node.remove();
2412
2519
  });
@@ -2414,6 +2521,13 @@ function SingleLineTextPlugin() {
2414
2521
  return null;
2415
2522
  }
2416
2523
 
2524
+ // src/components/Variables/toolbox/useVariablesComposerFlushPending.ts
2525
+ var import_react28 = require("react");
2526
+ var VariablesComposerFlushPendingContext = (0, import_react28.createContext)(false);
2527
+ function useVariablesComposerFlushPending() {
2528
+ return (0, import_react28.useContext)(VariablesComposerFlushPendingContext);
2529
+ }
2530
+
2417
2531
  // src/components/Variables/toolbox/VariablesComposer.tsx
2418
2532
  var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
2419
2533
  function VariablesComposer(props) {
@@ -2427,8 +2541,9 @@ function VariablesComposer(props) {
2427
2541
  autoFocus,
2428
2542
  ...variablesPluginProps
2429
2543
  } = props;
2430
- const [lastEmittedValue, setLastEmittedValue] = (0, import_react25.useState)(value);
2431
- const editorConfig = (0, import_react25.useMemo)(
2544
+ const [lastEmittedValue, setLastEmittedValue] = (0, import_react29.useState)(value);
2545
+ const [flushPending, setFlushPending] = (0, import_react29.useState)(false);
2546
+ const editorConfig = (0, import_react29.useMemo)(
2432
2547
  () => ({
2433
2548
  namespace: "uniform",
2434
2549
  onError(error) {
@@ -2437,11 +2552,29 @@ function VariablesComposer(props) {
2437
2552
  nodes: [VariableNode],
2438
2553
  editorState: deserializeVariablesEditorState(props.value)
2439
2554
  }),
2440
- // eslint-disable-next-line react-hooks/exhaustive-deps
2555
+ // oxlint-disable-next-line react/exhaustive-deps
2556
+ []
2557
+ );
2558
+ const editorState = (0, import_react29.useRef)(void 0);
2559
+ const updateTimeout = (0, import_react29.useRef)(void 0);
2560
+ const flushDepsRef = (0, import_react29.useRef)({ onChange, lastEmittedValue });
2561
+ flushDepsRef.current = { onChange, lastEmittedValue };
2562
+ (0, import_react29.useEffect)(
2563
+ () => () => {
2564
+ if (!updateTimeout.current) {
2565
+ return;
2566
+ }
2567
+ clearTimeout(updateTimeout.current);
2568
+ const { onChange: emit, lastEmittedValue: lastEmitted } = flushDepsRef.current;
2569
+ const valueToEmit = editorState.current ? serializeVariablesEditorState(editorState.current) : void 0;
2570
+ const shouldEmit = editorState.current != null && valueToEmit !== lastEmitted;
2571
+ if (!shouldEmit) {
2572
+ return;
2573
+ }
2574
+ queueMicrotask(() => emit(valueToEmit));
2575
+ },
2441
2576
  []
2442
2577
  );
2443
- const editorState = (0, import_react25.useRef)(void 0);
2444
- const updateTimeout = (0, import_react25.useRef)(void 0);
2445
2578
  if (typeof document === "undefined") return null;
2446
2579
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
2447
2580
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -2453,6 +2586,7 @@ function VariablesComposer(props) {
2453
2586
  if (updateTimeout.current) {
2454
2587
  clearTimeout(updateTimeout.current);
2455
2588
  }
2589
+ setFlushPending(true);
2456
2590
  updateTimeout.current = window.setTimeout(() => {
2457
2591
  if (editorState.current) {
2458
2592
  const valueToEmit = serializeVariablesEditorState(editorState.current);
@@ -2461,6 +2595,8 @@ function VariablesComposer(props) {
2461
2595
  onChange(valueToEmit);
2462
2596
  }
2463
2597
  }
2598
+ setFlushPending(false);
2599
+ updateTimeout.current = void 0;
2464
2600
  }, 400);
2465
2601
  }
2466
2602
  }
@@ -2470,7 +2606,7 @@ function VariablesComposer(props) {
2470
2606
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariablesPlugin, { ...variablesPluginProps }),
2471
2607
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DisablePlugin, { disabled }),
2472
2608
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: autoFocus ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}) : null }),
2473
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children })
2609
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariablesComposerFlushPendingContext.Provider, { value: flushPending, children })
2474
2610
  ] });
2475
2611
  }
2476
2612
 
@@ -2483,18 +2619,27 @@ var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin")
2483
2619
  var import_LexicalPlainTextPlugin = require("@lexical/react/LexicalPlainTextPlugin");
2484
2620
  var import_utils4 = require("@lexical/utils");
2485
2621
  var import_lexical9 = require("lexical");
2486
- var import_react26 = require("react");
2622
+ var import_react30 = require("react");
2487
2623
  var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
2488
2624
  function VariablesComposerInput({
2489
- css: css23,
2625
+ css: css24,
2490
2626
  placeholder,
2491
2627
  ...contentEditableProps
2492
2628
  }) {
2629
+ const flushPending = useVariablesComposerFlushPending();
2493
2630
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
2494
2631
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2495
2632
  import_LexicalPlainTextPlugin.PlainTextPlugin,
2496
2633
  {
2497
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_LexicalContentEditable.ContentEditable, { ...contentEditableProps, placeholder: null, "aria-placeholder": void 0 }),
2634
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2635
+ import_LexicalContentEditable.ContentEditable,
2636
+ {
2637
+ ...contentEditableProps,
2638
+ "data-flush-pending": flushPending,
2639
+ placeholder: null,
2640
+ "aria-placeholder": void 0
2641
+ }
2642
+ ),
2498
2643
  placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: placeholder }) : null,
2499
2644
  ErrorBoundary: import_LexicalErrorBoundary.LexicalErrorBoundary
2500
2645
  }
@@ -2505,7 +2650,7 @@ function VariablesComposerInput({
2505
2650
  }
2506
2651
  function RichishCopyAndPastePlugin() {
2507
2652
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
2508
- (0, import_react26.useEffect)(() => {
2653
+ (0, import_react30.useEffect)(() => {
2509
2654
  return (0, import_utils4.mergeRegister)(
2510
2655
  editor.registerCommand(
2511
2656
  import_lexical9.COPY_COMMAND,
@@ -2612,7 +2757,7 @@ function InputVariables(props) {
2612
2757
  singleTokenMode,
2613
2758
  disableVariableDisplayNames
2614
2759
  } = props;
2615
- const [finalId] = (0, import_react28.useState)(id != null ? id : () => (0, import_uuid.v4)());
2760
+ const [finalId] = (0, import_react32.useState)(id != null ? id : (() => (0, import_uuid.v4)()));
2616
2761
  const { dispatch, canDispatch, isEditing } = useVariables(true);
2617
2762
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
2618
2763
  const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
@@ -2631,7 +2776,7 @@ function InputVariables(props) {
2631
2776
  {
2632
2777
  align: "center",
2633
2778
  gap: "xs",
2634
- css: import_react27.css`
2779
+ css: import_react31.css`
2635
2780
  position: relative;
2636
2781
  & > div:first-of-type {
2637
2782
  flex-grow: 1;
@@ -2760,7 +2905,7 @@ function InputVariablesOverlayMenu({
2760
2905
  var import_CgUsbC2 = require("@react-icons/all-files/cg/CgUsbC");
2761
2906
  var import_canvas7 = require("@uniformdev/canvas");
2762
2907
  var import_design_system10 = require("@uniformdev/design-system");
2763
- var import_react29 = require("react");
2908
+ var import_react33 = require("react");
2764
2909
  var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
2765
2910
  function ParameterConnectionIndicator({
2766
2911
  children,
@@ -2771,7 +2916,7 @@ function ParameterConnectionIndicator({
2771
2916
  overrideMenuButtonParentMargin,
2772
2917
  renderMenuInPortal = false
2773
2918
  }) {
2774
- const hasVariablesInValue = (0, import_react29.useMemo)(() => {
2919
+ const hasVariablesInValue = (0, import_react33.useMemo)(() => {
2775
2920
  let result = false;
2776
2921
  (0, import_canvas7.bindVariablesToObject)({
2777
2922
  value,
@@ -2816,21 +2961,21 @@ function ParameterConnectionIndicator({
2816
2961
 
2817
2962
  // src/components/Variables/ParameterOrSingleVariable.tsx
2818
2963
  var import_design_system11 = require("@uniformdev/design-system");
2819
- var import_react31 = require("react");
2964
+ var import_react35 = require("react");
2820
2965
 
2821
2966
  // src/components/Variables/composer/OnDisconnectPlugin.tsx
2822
2967
  var import_LexicalComposerContext10 = require("@lexical/react/LexicalComposerContext");
2823
2968
  var import_utils5 = require("@lexical/utils");
2824
2969
  var import_lexical10 = require("lexical");
2825
- var import_react30 = require("react");
2970
+ var import_react34 = require("react");
2826
2971
  function OnDisconnectPlugin({
2827
2972
  onDisconnect
2828
2973
  }) {
2829
2974
  const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
2830
2975
  const { variables } = useVariables(true);
2831
- const variablesRef = (0, import_react30.useRef)(variables);
2976
+ const variablesRef = (0, import_react34.useRef)(variables);
2832
2977
  variablesRef.current = variables;
2833
- (0, import_react30.useEffect)(() => {
2978
+ (0, import_react34.useEffect)(() => {
2834
2979
  return (0, import_utils5.mergeRegister)(
2835
2980
  editor.registerCommand(
2836
2981
  DISCONNECT_VARIABLE_COMMAND,
@@ -2875,7 +3020,7 @@ function ParameterOrSingleVariable(props) {
2875
3020
  hasVariablesInValue,
2876
3021
  setHadVariablesInValue
2877
3022
  } = useInputVariablesState(props);
2878
- const handleDisconnect = (0, import_react31.useCallback)(
3023
+ const handleDisconnect = (0, import_react35.useCallback)(
2879
3024
  (variable) => {
2880
3025
  setHadVariablesInValue(false);
2881
3026
  if (onDisconnect) {
@@ -2928,7 +3073,7 @@ function ParameterOrSingleVariable(props) {
2928
3073
  }
2929
3074
 
2930
3075
  // src/components/Variables/ParameterVariables.tsx
2931
- var import_react32 = require("@emotion/react");
3076
+ var import_react36 = require("@emotion/react");
2932
3077
  var import_design_system12 = require("@uniformdev/design-system");
2933
3078
  var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
2934
3079
  function ParameterVariables(props) {
@@ -2985,8 +3130,8 @@ function ParameterVariables(props) {
2985
3130
  "data-text-value": value,
2986
3131
  css: [
2987
3132
  input2,
2988
- typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : import_react32.css``,
2989
- inputCss != null ? inputCss : import_react32.css``
3133
+ typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : import_react36.css``,
3134
+ inputCss != null ? inputCss : import_react36.css``
2990
3135
  ]
2991
3136
  }
2992
3137
  )
@@ -3022,18 +3167,18 @@ ${prettifyBindExpression(bindExpression)}`
3022
3167
  }
3023
3168
 
3024
3169
  // src/components/Variables/VariablesList.tsx
3025
- var import_react35 = require("@emotion/react");
3170
+ var import_react39 = require("@emotion/react");
3026
3171
  var import_dnd2 = require("@hello-pangea/dnd");
3027
3172
  var import_CgTrash = require("@react-icons/all-files/cg/CgTrash");
3028
3173
  var import_design_system13 = require("@uniformdev/design-system");
3029
3174
 
3030
3175
  // src/components/DragDropContext.tsx
3031
3176
  var import_dnd = require("@hello-pangea/dnd");
3032
- var import_react33 = require("react");
3177
+ var import_react37 = require("react");
3033
3178
  var import_react_use = require("react-use");
3034
3179
  var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
3035
3180
  function DragDropContext({ children, ...props }) {
3036
- const [isReady, setIsReady] = (0, import_react33.useState)(false);
3181
+ const [isReady, setIsReady] = (0, import_react37.useState)(false);
3037
3182
  (0, import_react_use.useDebounce)(
3038
3183
  () => {
3039
3184
  setIsReady(true);
@@ -3045,8 +3190,8 @@ function DragDropContext({ children, ...props }) {
3045
3190
  }
3046
3191
 
3047
3192
  // src/components/Variables/styles/VariablesList.styles.ts
3048
- var import_react34 = require("@emotion/react");
3049
- var tableRow = (isDragging) => import_react34.css`
3193
+ var import_react38 = require("@emotion/react");
3194
+ var tableRow = (isDragging) => import_react38.css`
3050
3195
  position: relative;
3051
3196
  ${isDragging ? `
3052
3197
  display: table;
@@ -3054,7 +3199,7 @@ var tableRow = (isDragging) => import_react34.css`
3054
3199
  top: auto !important;
3055
3200
  ` : void 0}
3056
3201
  `;
3057
- var tableCellDragIcon = import_react34.css`
3202
+ var tableCellDragIcon = import_react38.css`
3058
3203
  &::after {
3059
3204
  content: '';
3060
3205
  display: block;
@@ -3072,7 +3217,7 @@ var tableCellDragIcon = import_react34.css`
3072
3217
  opacity: 1;
3073
3218
  }
3074
3219
  `;
3075
- var variableName = import_react34.css`
3220
+ var variableName = import_react38.css`
3076
3221
  border: none;
3077
3222
  font-weight: var(--fw-medium);
3078
3223
  padding: 0;
@@ -3082,7 +3227,7 @@ var variableName = import_react34.css`
3082
3227
  white-space: nowrap;
3083
3228
  max-width: 20ch;
3084
3229
  `;
3085
- var variableValue = import_react34.css`
3230
+ var variableValue = import_react38.css`
3086
3231
  overflow: hidden;
3087
3232
  text-overflow: ellipsis;
3088
3233
  white-space: nowrap;
@@ -3161,7 +3306,7 @@ function VariablesList() {
3161
3306
  title: `delete ${text}`,
3162
3307
  css: [
3163
3308
  import_design_system13.button,
3164
- import_react35.css`
3309
+ import_react39.css`
3165
3310
  background: transparent;
3166
3311
  `
3167
3312
  ],
@@ -3291,9 +3436,9 @@ function TextVariableRenderer({ definition, value, setValue }) {
3291
3436
  }
3292
3437
 
3293
3438
  // src/components/Request/RequestBody.tsx
3294
- var import_react37 = require("@emotion/react");
3439
+ var import_react41 = require("@emotion/react");
3295
3440
  var import_design_system15 = require("@uniformdev/design-system");
3296
- var import_react38 = require("react");
3441
+ var import_react42 = require("react");
3297
3442
 
3298
3443
  // src/components/Request/RequestProvider.tsx
3299
3444
  var React4 = __toESM(require("react"));
@@ -3381,11 +3526,11 @@ function useRequest() {
3381
3526
  }
3382
3527
 
3383
3528
  // src/components/Request/styles/Request.styles.ts
3384
- var import_react36 = require("@emotion/react");
3385
- var innerContentStyles = import_react36.css`
3529
+ var import_react40 = require("@emotion/react");
3530
+ var innerContentStyles = import_react40.css`
3386
3531
  background: var(--white);
3387
3532
  `;
3388
- var requestTypeContainer = (bgColor) => import_react36.css`
3533
+ var requestTypeContainer = (bgColor) => import_react40.css`
3389
3534
  align-items: start;
3390
3535
  background: ${bgColor};
3391
3536
  display: grid;
@@ -3423,11 +3568,11 @@ var LANGUAGE_TO_CONTENT_TYPE = {
3423
3568
  };
3424
3569
  function RequestBody() {
3425
3570
  const { request, dispatch } = useRequest();
3426
- const [language, setLanguage] = (0, import_react38.useState)("json");
3571
+ const [language, setLanguage] = (0, import_react42.useState)("json");
3427
3572
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3428
3573
  "div",
3429
3574
  {
3430
- css: import_react37.css`
3575
+ css: import_react41.css`
3431
3576
  background: var(--white);
3432
3577
  `,
3433
3578
  children: [
@@ -3435,7 +3580,7 @@ function RequestBody() {
3435
3580
  RequestTypeContainer,
3436
3581
  {
3437
3582
  bgColor: "var(--gray-100)",
3438
- css: import_react37.css`
3583
+ css: import_react41.css`
3439
3584
  padding: var(--spacing-sm) var(--spacing-base);
3440
3585
  `,
3441
3586
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
@@ -3712,8 +3857,8 @@ function RequestParameters({
3712
3857
  }
3713
3858
 
3714
3859
  // src/components/Request/RequestUrl.tsx
3715
- var import_react39 = require("@emotion/react");
3716
- var import_react40 = require("react");
3860
+ var import_react43 = require("@emotion/react");
3861
+ var import_react44 = require("react");
3717
3862
 
3718
3863
  // src/components/Request/urlEncodeRequestParameter.ts
3719
3864
  function urlEncodeRequestUrl(url, varValues) {
@@ -3739,7 +3884,7 @@ function RequestUrl() {
3739
3884
  var _a, _b;
3740
3885
  const { variables } = useVariables();
3741
3886
  const { request } = useRequest();
3742
- const mergedParameters = (0, import_react40.useMemo)(() => {
3887
+ const mergedParameters = (0, import_react44.useMemo)(() => {
3743
3888
  var _a2;
3744
3889
  if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
3745
3890
  return request.parameters;
@@ -3749,7 +3894,7 @@ function RequestUrl() {
3749
3894
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3750
3895
  "small",
3751
3896
  {
3752
- css: import_react39.css`
3897
+ css: import_react43.css`
3753
3898
  display: inline-block;
3754
3899
  margin-bottom: var(--spacing-xs);
3755
3900
  word-break: break-word;
@@ -3982,24 +4127,207 @@ function convertRequestDataToDataType(dataType, requestData) {
3982
4127
  };
3983
4128
  }
3984
4129
 
3985
- // src/components/MeshApp.tsx
4130
+ // src/components/Delegation/DelegationGate.tsx
3986
4131
  var import_design_system19 = require("@uniformdev/design-system");
4132
+ var import_react46 = require("react");
4133
+
4134
+ // src/components/Delegation/styles/DelegationGate.style.ts
4135
+ var import_react45 = require("@emotion/react");
4136
+ var delegationGateStyle = import_react45.css`
4137
+ min-height: 12rem;
4138
+ width: 100%;
4139
+ `;
4140
+
4141
+ // src/components/Delegation/DelegationGate.tsx
4142
+ var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
4143
+ function DefaultDelegationLoading() {
4144
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { css: delegationGateStyle, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
4145
+ }
4146
+ function DefaultDelegationDisabled() {
4147
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Callout, { type: "caution", title: "Feature unavailable", children: "This app requires permissions that are not currently enabled. Please contact your Uniform administrator to enable identity delegation for this integration." });
4148
+ }
4149
+ function DefaultDelegationError({ error }) {
4150
+ (0, import_react46.useEffect)(() => {
4151
+ console.error("Delegation connection failed", error);
4152
+ }, [error]);
4153
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Callout, { type: "error", title: "Connection error", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "Failed to connect to Uniform. Try again, or contact your administrator if the problem persists." }) });
4154
+ }
4155
+ function DelegationGate({
4156
+ children,
4157
+ loadingComponent,
4158
+ disabledComponent,
4159
+ errorComponent
4160
+ }) {
4161
+ const { status, error } = useDelegation();
4162
+ if (status === "active") {
4163
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
4164
+ }
4165
+ if (status === "idle" || status === "acquiring") {
4166
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationLoading, {}) });
4167
+ }
4168
+ if (status === "disabled") {
4169
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationDisabled, {}) });
4170
+ }
4171
+ if (status === "error") {
4172
+ const resolvedError = error != null ? error : new Error("Unknown delegation error");
4173
+ if (errorComponent !== void 0) {
4174
+ if (typeof errorComponent === "function") {
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent({ error: resolvedError }) });
4176
+ }
4177
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent });
4178
+ }
4179
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationError, { error: resolvedError });
4180
+ }
4181
+ return null;
4182
+ }
4183
+
4184
+ // src/components/Delegation/DelegationProvider.tsx
4185
+ var import_react47 = require("react");
4186
+ var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
4187
+ var DelegationDisabledError = class extends Error {
4188
+ constructor() {
4189
+ super("Identity delegation is not enabled for this integration.");
4190
+ this.name = "DelegationDisabledError";
4191
+ }
4192
+ };
4193
+ var DEFAULT_REVALIDATE_AFTER_MS = 30 * 1e3;
4194
+ function DelegationProvider({
4195
+ sdk,
4196
+ onSessionToken,
4197
+ checkActive,
4198
+ revalidateOnFocus = true,
4199
+ revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
4200
+ children
4201
+ }) {
4202
+ const [status, setStatus] = (0, import_react47.useState)("idle");
4203
+ const [error, setError] = (0, import_react47.useState)(null);
4204
+ const mountedRef = (0, import_react47.useRef)(true);
4205
+ const statusRef = (0, import_react47.useRef)("idle");
4206
+ statusRef.current = status;
4207
+ const acquirePromiseRef = (0, import_react47.useRef)(null);
4208
+ const acquire = (0, import_react47.useCallback)(() => {
4209
+ if (acquirePromiseRef.current) {
4210
+ return acquirePromiseRef.current;
4211
+ }
4212
+ const run = (async () => {
4213
+ if (statusRef.current !== "active") {
4214
+ setStatus("acquiring");
4215
+ }
4216
+ setError(null);
4217
+ try {
4218
+ const isActive = await checkActive();
4219
+ if (isActive) {
4220
+ if (mountedRef.current) {
4221
+ setStatus("active");
4222
+ }
4223
+ return;
4224
+ }
4225
+ if (!mountedRef.current) {
4226
+ return;
4227
+ }
4228
+ const sessionToken = await sdk.getSessionToken();
4229
+ if (!mountedRef.current) {
4230
+ return;
4231
+ }
4232
+ if (!sessionToken) {
4233
+ if (mountedRef.current) {
4234
+ setStatus("disabled");
4235
+ }
4236
+ throw new DelegationDisabledError();
4237
+ }
4238
+ await onSessionToken(sessionToken);
4239
+ if (mountedRef.current) {
4240
+ setStatus("active");
4241
+ }
4242
+ } catch (err) {
4243
+ const error2 = err instanceof Error ? err : new Error(String(err));
4244
+ if (mountedRef.current && !(err instanceof DelegationDisabledError)) {
4245
+ setError(error2);
4246
+ setStatus("error");
4247
+ }
4248
+ throw error2;
4249
+ }
4250
+ })();
4251
+ acquirePromiseRef.current = run.finally(() => {
4252
+ acquirePromiseRef.current = null;
4253
+ });
4254
+ return acquirePromiseRef.current;
4255
+ }, [sdk, onSessionToken, checkActive]);
4256
+ (0, import_react47.useEffect)(() => {
4257
+ mountedRef.current = true;
4258
+ void acquire().catch(() => {
4259
+ });
4260
+ return () => {
4261
+ mountedRef.current = false;
4262
+ };
4263
+ }, [acquire]);
4264
+ const revalidate = (0, import_react47.useCallback)(async () => {
4265
+ if (acquirePromiseRef.current) {
4266
+ return;
4267
+ }
4268
+ if (statusRef.current !== "active") {
4269
+ return;
4270
+ }
4271
+ try {
4272
+ const isActive = await checkActive();
4273
+ if (!mountedRef.current) {
4274
+ return;
4275
+ }
4276
+ if (!isActive) {
4277
+ void acquire().catch(() => {
4278
+ });
4279
+ }
4280
+ } catch (e) {
4281
+ }
4282
+ }, [checkActive, acquire]);
4283
+ (0, import_react47.useEffect)(() => {
4284
+ if (!revalidateOnFocus) {
4285
+ return;
4286
+ }
4287
+ if (typeof document === "undefined") {
4288
+ return;
4289
+ }
4290
+ let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
4291
+ const handleVisibilityChange = () => {
4292
+ if (document.visibilityState === "hidden") {
4293
+ hiddenAt = Date.now();
4294
+ return;
4295
+ }
4296
+ if (document.visibilityState === "visible") {
4297
+ const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
4298
+ hiddenAt = null;
4299
+ if (elapsed >= revalidateAfterMs) {
4300
+ void revalidate();
4301
+ }
4302
+ }
4303
+ };
4304
+ document.addEventListener("visibilitychange", handleVisibilityChange);
4305
+ return () => {
4306
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
4307
+ };
4308
+ }, [revalidateOnFocus, revalidateAfterMs, revalidate]);
4309
+ const value = (0, import_react47.useMemo)(() => ({ status, error, reacquire: acquire }), [status, error, acquire]);
4310
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DelegationContext.Provider, { value, children });
4311
+ }
4312
+
4313
+ // src/components/MeshApp.tsx
4314
+ var import_design_system20 = require("@uniformdev/design-system");
3987
4315
 
3988
4316
  // src/hooks/useInitializeUniformMeshSdk.ts
3989
- var import_mesh_sdk = require("@uniformdev/mesh-sdk");
3990
- var import_react41 = require("react");
4317
+ var import_mesh_sdk2 = require("@uniformdev/mesh-sdk");
4318
+ var import_react48 = require("react");
3991
4319
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3992
- const [error, setError] = (0, import_react41.useState)();
3993
- const [sdk, setSdk] = (0, import_react41.useState)();
3994
- const initializationInProgress = (0, import_react41.useRef)(false);
3995
- (0, import_react41.useEffect)(
4320
+ const [error, setError] = (0, import_react48.useState)();
4321
+ const [sdk, setSdk] = (0, import_react48.useState)();
4322
+ const initializationInProgress = (0, import_react48.useRef)(false);
4323
+ (0, import_react48.useEffect)(
3996
4324
  () => {
3997
4325
  if (typeof window === "undefined" || sdk) {
3998
4326
  return;
3999
4327
  }
4000
4328
  if (typeof window.UniformMeshSDK === "undefined" && !initializationInProgress.current) {
4001
4329
  initializationInProgress.current = true;
4002
- (0, import_mesh_sdk.initializeUniformMeshSDK)({ autoResizingDisabled }).then((sdk2) => {
4330
+ (0, import_mesh_sdk2.initializeUniformMeshSDK)({ autoResizingDisabled }).then((sdk2) => {
4003
4331
  setSdk(sdk2);
4004
4332
  }).catch((err) => {
4005
4333
  setError(err);
@@ -4010,7 +4338,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4010
4338
  setSdk(window.UniformMeshSDK);
4011
4339
  }
4012
4340
  },
4013
- // eslint-disable-next-line react-hooks/exhaustive-deps
4341
+ // oxlint-disable-next-line react/exhaustive-deps
4014
4342
  [autoResizingDisabled]
4015
4343
  );
4016
4344
  return {
@@ -4025,7 +4353,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4025
4353
  };
4026
4354
 
4027
4355
  // src/components/MeshApp.tsx
4028
- var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
4356
+ var import_jsx_runtime47 = require("@emotion/react/jsx-runtime");
4029
4357
  var MeshApp = ({
4030
4358
  children,
4031
4359
  loadingComponent,
@@ -4034,36 +4362,36 @@ var MeshApp = ({
4034
4362
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
4035
4363
  if (initializing || !sdk) {
4036
4364
  const LoadingComponent = loadingComponent;
4037
- return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.LoadingIndicator, {});
4365
+ return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.LoadingIndicator, {});
4038
4366
  }
4039
4367
  if (error) {
4040
4368
  const ErrorComponent = errorComponent;
4041
4369
  if (ErrorComponent) {
4042
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ErrorComponent, { error });
4370
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorComponent, { error });
4043
4371
  }
4044
4372
  throw error;
4045
4373
  }
4046
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
4047
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Theme, {}),
4048
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UniformMeshLocationContextProvider, { children })
4374
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
4375
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.Theme, {}),
4376
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(UniformMeshLocationContextProvider, { children }) })
4049
4377
  ] });
4050
4378
  };
4051
4379
 
4052
4380
  // src/components/ObjectSearch/DataRefreshButton.tsx
4053
- var import_react42 = require("@emotion/react");
4054
- var import_design_system20 = require("@uniformdev/design-system");
4055
- var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
4381
+ var import_react49 = require("@emotion/react");
4382
+ var import_design_system21 = require("@uniformdev/design-system");
4383
+ var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
4056
4384
  var DataRefreshButton = ({
4057
4385
  buttonText,
4058
4386
  isLoading,
4059
4387
  onRefreshData,
4060
4388
  ...props
4061
4389
  }) => {
4062
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system20.Button, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
4063
- !isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4064
- import_design_system20.LoadingIndicator,
4390
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_design_system21.Button, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
4391
+ !isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4392
+ import_design_system21.LoadingIndicator,
4065
4393
  {
4066
- css: import_react42.css`
4394
+ css: import_react49.css`
4067
4395
  ${isLoading ? "opacity: 0.2;" : void 0}
4068
4396
  `
4069
4397
  }
@@ -4073,15 +4401,15 @@ var DataRefreshButton = ({
4073
4401
  };
4074
4402
 
4075
4403
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4076
- var import_react45 = require("@emotion/react");
4404
+ var import_react52 = require("@emotion/react");
4077
4405
  var import_canvas9 = require("@uniformdev/canvas");
4078
- var import_design_system23 = require("@uniformdev/design-system");
4406
+ var import_design_system24 = require("@uniformdev/design-system");
4079
4407
 
4080
4408
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
4081
4409
  var import_canvas8 = require("@uniformdev/canvas");
4082
- var import_react43 = require("react");
4083
- var import_jsx_runtime47 = require("@emotion/react/jsx-runtime");
4084
- var ObjectSearchContext = (0, import_react43.createContext)({
4410
+ var import_react50 = require("react");
4411
+ var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
4412
+ var ObjectSearchContext = (0, import_react50.createContext)({
4085
4413
  onSetQuery: () => {
4086
4414
  },
4087
4415
  onSelectItem: () => {
@@ -4102,16 +4430,16 @@ var ObjectSearchProvider = ({
4102
4430
  children,
4103
4431
  defaultQuery
4104
4432
  }) => {
4105
- const [query, setQuery] = (0, import_react43.useState)({
4433
+ const [query, setQuery] = (0, import_react50.useState)({
4106
4434
  contentType: "",
4107
4435
  keyword: "",
4108
4436
  ...defaultQuery
4109
4437
  });
4110
4438
  const { flatVariables } = useVariables(true);
4111
- const querySearchDeferred = (0, import_react43.useDeferredValue)(query);
4112
- const [selectedItems, setSelectedItems] = (0, import_react43.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4113
- const [list, setList] = (0, import_react43.useState)({});
4114
- const onSetQuery = (0, import_react43.useCallback)(
4439
+ const querySearchDeferred = (0, import_react50.useDeferredValue)(query);
4440
+ const [selectedItems, setSelectedItems] = (0, import_react50.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4441
+ const [list, setList] = (0, import_react50.useState)({});
4442
+ const onSetQuery = (0, import_react50.useCallback)(
4115
4443
  (value2) => {
4116
4444
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
4117
4445
  return setQuery({
@@ -4123,7 +4451,7 @@ var ObjectSearchProvider = ({
4123
4451
  },
4124
4452
  [setQuery]
4125
4453
  );
4126
- const onSelectItem = (0, import_react43.useCallback)(
4454
+ const onSelectItem = (0, import_react50.useCallback)(
4127
4455
  (selectedResult) => {
4128
4456
  if (Array.isArray(selectedResult)) {
4129
4457
  setSelectedItems(selectedResult);
@@ -4137,17 +4465,17 @@ var ObjectSearchProvider = ({
4137
4465
  },
4138
4466
  [setSelectedItems, selectedItems]
4139
4467
  );
4140
- const onRemoveAllSelectedItems = (0, import_react43.useCallback)(() => {
4468
+ const onRemoveAllSelectedItems = (0, import_react50.useCallback)(() => {
4141
4469
  setSelectedItems([]);
4142
4470
  }, [setSelectedItems]);
4143
- const onSetList = (0, import_react43.useCallback)(
4471
+ const onSetList = (0, import_react50.useCallback)(
4144
4472
  (value2) => {
4145
4473
  setList(value2);
4146
4474
  },
4147
4475
  [setList]
4148
4476
  );
4149
- const boundQuery = (0, import_react43.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
4150
- const value = (0, import_react43.useMemo)(
4477
+ const boundQuery = (0, import_react50.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
4478
+ const value = (0, import_react50.useMemo)(
4151
4479
  () => ({
4152
4480
  boundQuery,
4153
4481
  onSetQuery,
@@ -4171,10 +4499,10 @@ var ObjectSearchProvider = ({
4171
4499
  onSetList
4172
4500
  ]
4173
4501
  );
4174
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ObjectSearchContext.Provider, { value, children });
4502
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchContext.Provider, { value, children });
4175
4503
  };
4176
4504
  function useObjectSearchContext() {
4177
- return (0, import_react43.useContext)(ObjectSearchContext);
4505
+ return (0, import_react50.useContext)(ObjectSearchContext);
4178
4506
  }
4179
4507
  function bindQuery(query, inputs) {
4180
4508
  const { result, errors } = (0, import_canvas8.bindVariablesToObject)({
@@ -4189,12 +4517,12 @@ function bindQuery(query, inputs) {
4189
4517
  }
4190
4518
 
4191
4519
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4192
- var import_design_system22 = require("@uniformdev/design-system");
4520
+ var import_design_system23 = require("@uniformdev/design-system");
4193
4521
 
4194
4522
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
4195
- var import_react44 = require("@emotion/react");
4196
- var import_design_system21 = require("@uniformdev/design-system");
4197
- var ObjectListItemContainer = import_react44.css`
4523
+ var import_react51 = require("@emotion/react");
4524
+ var import_design_system22 = require("@uniformdev/design-system");
4525
+ var ObjectListItemContainer = import_react51.css`
4198
4526
  align-items: center;
4199
4527
  border: 1px solid var(--gray-300);
4200
4528
  border-radius: var(--rounded-base);
@@ -4203,12 +4531,12 @@ var ObjectListItemContainer = import_react44.css`
4203
4531
  grid-template-columns: 1fr auto;
4204
4532
  padding: var(--spacing-sm);
4205
4533
  `;
4206
- var ObjectListItemContainerDisabled = import_react44.css`
4534
+ var ObjectListItemContainerDisabled = import_react51.css`
4207
4535
  opacity: var(--opacity-50);
4208
4536
  pointer-events: none;
4209
4537
  `;
4210
- var ObjectListItemLoading = import_react44.css`
4211
- animation: ${import_design_system21.skeletonLoading} 1s linear infinite alternate;
4538
+ var ObjectListItemLoading = import_react51.css`
4539
+ animation: ${import_design_system22.skeletonLoading} 1s linear infinite alternate;
4212
4540
  border-color: transparent;
4213
4541
  min-height: 42px;
4214
4542
  position: relative;
@@ -4231,43 +4559,43 @@ var ObjectListItemLoading = import_react44.css`
4231
4559
  width: 1rem;
4232
4560
  }
4233
4561
  `;
4234
- var ObjectListItemHeadingGroup = import_react44.css`
4562
+ var ObjectListItemHeadingGroup = import_react51.css`
4235
4563
  align-items: center;
4236
4564
  display: grid;
4237
4565
  `;
4238
- var ObjectListItemThumbnail = import_react44.css`
4566
+ var ObjectListItemThumbnail = import_react51.css`
4239
4567
  width: 30px;
4240
4568
  height: 30px;
4241
4569
  object-fit: cover;
4242
4570
  `;
4243
- var ObjectListItemTitle = import_react44.css`
4571
+ var ObjectListItemTitle = import_react51.css`
4244
4572
  color: var(--typography-base);
4245
4573
  display: block;
4246
4574
  font-size: var(--fs-sm);
4247
4575
  `;
4248
- var ObjectListItemSubtitle = import_react44.css`
4576
+ var ObjectListItemSubtitle = import_react51.css`
4249
4577
  color: var(--gray-500);
4250
4578
  display: block;
4251
4579
  font-size: var(--fs-xs);
4252
4580
  line-height: 1;
4253
4581
  `;
4254
- var ObjectListItemInfoContainer = import_react44.css`
4582
+ var ObjectListItemInfoContainer = import_react51.css`
4255
4583
  align-items: center;
4256
4584
  display: flex;
4257
4585
  gap: var(--spacing-sm);
4258
4586
  justify-content: center;
4259
4587
  `;
4260
- var ObjectListItemControlledContent = import_react44.css`
4588
+ var ObjectListItemControlledContent = import_react51.css`
4261
4589
  display: flex;
4262
4590
  gap: var(--spacing-sm);
4263
4591
  `;
4264
- var ObjectListItemUnControlledContent = import_react44.css`
4592
+ var ObjectListItemUnControlledContent = import_react51.css`
4265
4593
  margin-top: var(--spacing-sm);
4266
4594
  grid-column: 1 / -1;
4267
4595
  `;
4268
4596
 
4269
4597
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4270
- var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
4598
+ var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
4271
4599
  var ObjectSearchListItem = ({
4272
4600
  id,
4273
4601
  title,
@@ -4292,7 +4620,7 @@ var ObjectSearchListItem = ({
4292
4620
  return onSelectItem([selectedItem]);
4293
4621
  };
4294
4622
  const selected = selectedListItems.some((item) => item.id === id);
4295
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4623
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4296
4624
  "div",
4297
4625
  {
4298
4626
  role: "listitem",
@@ -4300,7 +4628,7 @@ var ObjectSearchListItem = ({
4300
4628
  "data-testid": "list-item",
4301
4629
  ...props,
4302
4630
  children: [
4303
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4631
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4304
4632
  "div",
4305
4633
  {
4306
4634
  role: "button",
@@ -4308,7 +4636,7 @@ var ObjectSearchListItem = ({
4308
4636
  css: ObjectListItemControlledContent,
4309
4637
  "aria-disabled": disabled,
4310
4638
  children: [
4311
- imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4639
+ imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4312
4640
  "img",
4313
4641
  {
4314
4642
  src: imageUrl,
@@ -4317,28 +4645,28 @@ var ObjectSearchListItem = ({
4317
4645
  loading: "lazy"
4318
4646
  }
4319
4647
  ) : null,
4320
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4321
- !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4322
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4648
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4649
+ !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4650
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4323
4651
  ] })
4324
4652
  ]
4325
4653
  }
4326
4654
  ),
4327
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
4328
- selected ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_design_system22.Chip, { text: "selected", size: "xs" }) : null,
4329
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_design_system22.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4655
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
4656
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Chip, { text: "selected", size: "xs" }) : null,
4657
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4330
4658
  ] }),
4331
- !children ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { css: ObjectListItemUnControlledContent, children })
4659
+ !children ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { css: ObjectListItemUnControlledContent, children })
4332
4660
  ]
4333
4661
  }
4334
4662
  );
4335
4663
  };
4336
4664
  var ObjectSearchListItemLoadingSkeleton = () => {
4337
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4665
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4338
4666
  };
4339
4667
 
4340
4668
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4341
- var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
4669
+ var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
4342
4670
  var ObjectSearchContainer = ({
4343
4671
  label,
4344
4672
  enableDynamicInputToResultId,
@@ -4350,19 +4678,19 @@ var ObjectSearchContainer = ({
4350
4678
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
4351
4679
  const { flatVariables } = useVariables(true);
4352
4680
  const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
4353
- const listItems = resultList != null ? resultList : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4354
- import_design_system23.ScrollableList,
4681
+ const listItems = resultList != null ? resultList : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4682
+ import_design_system24.ScrollableList,
4355
4683
  {
4356
4684
  role: "list",
4357
- css: import_react45.css`
4685
+ css: import_react52.css`
4358
4686
  > div {
4359
4687
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
4360
4688
  }
4361
4689
  `,
4362
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DefaultResultList, {})
4690
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DefaultResultList, {})
4363
4691
  }
4364
4692
  );
4365
- const body = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system23.VerticalRhythm, { children: [
4693
+ const body = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
4366
4694
  searchFilters,
4367
4695
  listItems
4368
4696
  ] });
@@ -4393,8 +4721,8 @@ var ObjectSearchContainer = ({
4393
4721
  }
4394
4722
  ]);
4395
4723
  };
4396
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system23.VerticalRhythm, { children: [
4397
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system23.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4724
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
4725
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4398
4726
  InputVariables,
4399
4727
  {
4400
4728
  label,
@@ -4416,21 +4744,21 @@ var DefaultResultList = () => {
4416
4744
  var _a;
4417
4745
  const { list } = useObjectSearchContext();
4418
4746
  if (!list.items) {
4419
- return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i));
4747
+ return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i));
4420
4748
  }
4421
4749
  if (list.items.length === 0) {
4422
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system23.Callout, { type: "info", children: "No results were found" });
4750
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Callout, { type: "info", children: "No results were found" });
4423
4751
  }
4424
- return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchListItem, { ...item }, item.id));
4752
+ return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItem, { ...item }, item.id));
4425
4753
  };
4426
4754
 
4427
4755
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4428
- var import_design_system24 = require("@uniformdev/design-system");
4429
- var import_react47 = require("react");
4756
+ var import_design_system25 = require("@uniformdev/design-system");
4757
+ var import_react54 = require("react");
4430
4758
 
4431
4759
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
4432
- var import_react46 = require("@emotion/react");
4433
- var ObjectSearchFilterContainerLabel = import_react46.css`
4760
+ var import_react53 = require("@emotion/react");
4761
+ var ObjectSearchFilterContainerLabel = import_react53.css`
4434
4762
  align-items: center;
4435
4763
  display: flex;
4436
4764
  font-size: var(--fs-sm);
@@ -4438,18 +4766,18 @@ var ObjectSearchFilterContainerLabel = import_react46.css`
4438
4766
  line-height: 1rem;
4439
4767
  margin-bottom: var(--spacing-sm);
4440
4768
  `;
4441
- var ObjectSearchFilterContainer = import_react46.css`
4769
+ var ObjectSearchFilterContainer = import_react53.css`
4442
4770
  display: grid;
4443
4771
  gap: var(--spacing-base);
4444
4772
  `;
4445
- var ObjectSearchFilterGrid = (gridColumns) => import_react46.css`
4773
+ var ObjectSearchFilterGrid = (gridColumns) => import_react53.css`
4446
4774
  display: grid;
4447
4775
  grid-template-columns: ${gridColumns};
4448
4776
  gap: var(--spacing-base);
4449
4777
  `;
4450
4778
 
4451
4779
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4452
- var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
4780
+ var import_jsx_runtime52 = require("@emotion/react/jsx-runtime");
4453
4781
  var ObjectSearchFilter = ({
4454
4782
  requireContentType,
4455
4783
  typeSelectorAllTypesOptionText = "All content types",
@@ -4460,7 +4788,7 @@ var ObjectSearchFilter = ({
4460
4788
  }) => {
4461
4789
  var _a, _b;
4462
4790
  const { query, onSetQuery } = useObjectSearchContext();
4463
- const [searchState, setSearchState] = (0, import_react47.useState)({
4791
+ const [searchState, setSearchState] = (0, import_react54.useState)({
4464
4792
  contentType: (_a = query.contentType) != null ? _a : "",
4465
4793
  keyword: (_b = query.keyword) != null ? _b : ""
4466
4794
  });
@@ -4470,7 +4798,7 @@ var ObjectSearchFilter = ({
4470
4798
  });
4471
4799
  onSetQuery({ ...query, ...value });
4472
4800
  };
4473
- const memoizedSelectOptions = (0, import_react47.useMemo)(() => {
4801
+ const memoizedSelectOptions = (0, import_react54.useMemo)(() => {
4474
4802
  if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
4475
4803
  return [];
4476
4804
  }
@@ -4480,7 +4808,7 @@ var ObjectSearchFilter = ({
4480
4808
  ];
4481
4809
  }, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
4482
4810
  const shouldRenderSelect = memoizedSelectOptions.length > 0;
4483
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4811
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4484
4812
  "fieldset",
4485
4813
  {
4486
4814
  css: [
@@ -4488,8 +4816,8 @@ var ObjectSearchFilter = ({
4488
4816
  ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
4489
4817
  ],
4490
4818
  children: [
4491
- memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4492
- import_design_system24.InputSelect,
4819
+ memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4820
+ import_design_system25.InputSelect,
4493
4821
  {
4494
4822
  label: selectLabel,
4495
4823
  showLabel: false,
@@ -4498,8 +4826,8 @@ var ObjectSearchFilter = ({
4498
4826
  value: query.contentType
4499
4827
  }
4500
4828
  ) : null,
4501
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4502
- import_design_system24.DebouncedInputKeywordSearch,
4829
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4830
+ import_design_system25.DebouncedInputKeywordSearch,
4503
4831
  {
4504
4832
  inputFieldName: searchInputName,
4505
4833
  placeholder: searchInputPlaceholderText,
@@ -4515,27 +4843,27 @@ var ObjectSearchFilter = ({
4515
4843
  };
4516
4844
 
4517
4845
  // src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
4518
- var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
4846
+ var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
4519
4847
  var ObjectSearchFilterContainer2 = ({ children }) => {
4520
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { css: ObjectSearchFilterContainer, children }) });
4848
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { css: ObjectSearchFilterContainer, children }) });
4521
4849
  };
4522
4850
 
4523
4851
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4524
- var import_design_system26 = require("@uniformdev/design-system");
4852
+ var import_design_system27 = require("@uniformdev/design-system");
4525
4853
  var import_timeago = require("timeago.js");
4526
4854
 
4527
4855
  // src/components/Image/Image.tsx
4528
- var import_jsx_runtime52 = require("@emotion/react/jsx-runtime");
4856
+ var import_jsx_runtime54 = require("@emotion/react/jsx-runtime");
4529
4857
  function Image({ src, alt, className }) {
4530
4858
  const CompImage = src && typeof src !== "string" ? src : null;
4531
- return CompImage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CompImage, { className }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src, alt, className });
4859
+ return CompImage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CompImage, { className }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src, alt, className });
4532
4860
  }
4533
4861
 
4534
4862
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
4535
- var import_react48 = require("@emotion/react");
4536
- var import_design_system25 = require("@uniformdev/design-system");
4537
- var ButtonStyles = import_react48.css`
4538
- ${import_design_system25.button}
4863
+ var import_react55 = require("@emotion/react");
4864
+ var import_design_system26 = require("@uniformdev/design-system");
4865
+ var ButtonStyles = import_react55.css`
4866
+ ${import_design_system26.button}
4539
4867
  background: transparent;
4540
4868
  border: 1px solid var(--typography-base);
4541
4869
  color: var(--typography-base);
@@ -4562,20 +4890,20 @@ var ButtonStyles = import_react48.css`
4562
4890
  text-decoration: none;
4563
4891
  }
4564
4892
  `;
4565
- var ButtonIcon = import_react48.css`
4893
+ var ButtonIcon = import_react55.css`
4566
4894
  width: 1rem;
4567
4895
  height: 1rem;
4568
4896
  `;
4569
4897
 
4570
4898
  // src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
4571
- var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
4899
+ var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
4572
4900
  var ObjectSearchResultItemButton = ({
4573
4901
  text,
4574
4902
  icon,
4575
4903
  ...props
4576
4904
  }) => {
4577
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("button", { type: "button", css: ButtonStyles, ...props, children: [
4578
- !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Image, { src: icon, css: ButtonIcon }),
4905
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", css: ButtonStyles, ...props, children: [
4906
+ !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Image, { src: icon, css: ButtonIcon }),
4579
4907
  text
4580
4908
  ] });
4581
4909
  };
@@ -4584,15 +4912,15 @@ var LinkButton = ({
4584
4912
  icon,
4585
4913
  ...props
4586
4914
  }) => {
4587
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4588
- !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Image, { src: icon, css: ButtonIcon }),
4915
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4916
+ !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Image, { src: icon, css: ButtonIcon }),
4589
4917
  text
4590
4918
  ] });
4591
4919
  };
4592
4920
 
4593
4921
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
4594
- var import_react49 = require("@emotion/react");
4595
- var ObjectSearchResultItemContainer = import_react49.css`
4922
+ var import_react56 = require("@emotion/react");
4923
+ var ObjectSearchResultItemContainer = import_react56.css`
4596
4924
  align-items: center;
4597
4925
  border: 1px solid var(--gray-300);
4598
4926
  border-radius: var(--rounded-base);
@@ -4608,7 +4936,7 @@ var ObjectSearchResultItemContainer = import_react49.css`
4608
4936
  }
4609
4937
  }
4610
4938
  `;
4611
- var ObjectSearchDragHandle = import_react49.css`
4939
+ var ObjectSearchDragHandle = import_react56.css`
4612
4940
  border-left: 2px dotted var(--gray-300);
4613
4941
  border-right: 2px dotted var(--gray-300);
4614
4942
  position: absolute;
@@ -4617,47 +4945,47 @@ var ObjectSearchDragHandle = import_react49.css`
4617
4945
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4618
4946
  opacity: 0;
4619
4947
  `;
4620
- var ObjectSearchResultItemSubtitle = import_react49.css`
4948
+ var ObjectSearchResultItemSubtitle = import_react56.css`
4621
4949
  color: var(--gray-500);
4622
4950
  display: block;
4623
4951
  font-size: var(--fs-xs);
4624
4952
  line-height: 1;
4625
4953
  `;
4626
- var ObjectSearchResultItemTitle = import_react49.css`
4954
+ var ObjectSearchResultItemTitle = import_react56.css`
4627
4955
  align-items: center;
4628
4956
  color: var(--typography-base);
4629
4957
  display: flex;
4630
4958
  gap: var(--spacing-xs);
4631
4959
  `;
4632
- var ObjectSearchResultItemTimeStamp = import_react49.css`
4960
+ var ObjectSearchResultItemTimeStamp = import_react56.css`
4633
4961
  color: var(--gray-500);
4634
4962
  font-size: var(--fs-xs);
4635
4963
  `;
4636
- var ObjectSearchResultItemTitleLink = import_react49.css`
4964
+ var ObjectSearchResultItemTitleLink = import_react56.css`
4637
4965
  text-decoration: none;
4638
4966
  color: var(--primary-action-default);
4639
4967
  font-size: var(--fs-sm);
4640
4968
  `;
4641
- var ObjectSearchAuthorStateGroup = import_react49.css`
4969
+ var ObjectSearchAuthorStateGroup = import_react56.css`
4642
4970
  align-items: center;
4643
4971
  display: flex;
4644
4972
  gap: var(--spacing-sm);
4645
4973
  `;
4646
- var ObjectSearchUpdateGroup = import_react49.css`
4974
+ var ObjectSearchUpdateGroup = import_react56.css`
4647
4975
  display: grid;
4648
4976
  `;
4649
- var ObjectSearchContentContainer = import_react49.css`
4977
+ var ObjectSearchContentContainer = import_react56.css`
4650
4978
  display: flex;
4651
4979
  gap: var(--spacing-base);
4652
4980
  `;
4653
- var ObjectSearchImage = import_react49.css`
4981
+ var ObjectSearchImage = import_react56.css`
4654
4982
  width: 56px;
4655
4983
  height: 56px;
4656
4984
  object-fit: cover;
4657
4985
  `;
4658
4986
 
4659
4987
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4660
- var import_jsx_runtime54 = require("@emotion/react/jsx-runtime");
4988
+ var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
4661
4989
  var ObjectSearchResultItem = ({
4662
4990
  id,
4663
4991
  title,
@@ -4681,10 +5009,10 @@ var ObjectSearchResultItem = ({
4681
5009
  onSelectItem({ id, title: id });
4682
5010
  onRemove == null ? void 0 : onRemove();
4683
5011
  };
4684
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
4685
- disableDnD ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4686
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchContentContainer, children: [
4687
- !imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5012
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
5013
+ disableDnD ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
5014
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchContentContainer, children: [
5015
+ !imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4688
5016
  "img",
4689
5017
  {
4690
5018
  src: imageUrl,
@@ -4693,11 +5021,11 @@ var ObjectSearchResultItem = ({
4693
5021
  loading: "lazy"
4694
5022
  }
4695
5023
  ),
4696
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
4697
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4698
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
4699
- onClick ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4700
- import_design_system26.Link,
5024
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
5025
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
5026
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
5027
+ onClick ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5028
+ import_design_system27.Link,
4701
5029
  {
4702
5030
  onClick: (e) => {
4703
5031
  e.preventDefault();
@@ -4708,28 +5036,28 @@ var ObjectSearchResultItem = ({
4708
5036
  text: title != null ? title : name,
4709
5037
  css: ObjectSearchResultItemTitleLink
4710
5038
  }
4711
- ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: title != null ? title : name }),
4712
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
5039
+ ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: title != null ? title : name }),
5040
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4713
5041
  ] }),
4714
- !createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
4715
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Chip, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4716
- !createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
4717
- !createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
4718
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: "Last updated: " }),
5042
+ !createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
5043
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Chip, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
5044
+ !createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
5045
+ !createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
5046
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("strong", { children: "Last updated: " }),
4719
5047
  (0, import_timeago.format)(createdAt)
4720
5048
  ] }),
4721
- !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
4722
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: "Last published: " }),
5049
+ !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
5050
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("strong", { children: "Last published: " }),
4723
5051
  (0, import_timeago.format)(publishedAt)
4724
5052
  ] })
4725
5053
  ] })
4726
5054
  ] }),
4727
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children })
5055
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children })
4728
5056
  ] })
4729
5057
  ] }) }),
4730
- !editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
4731
- !editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4732
- hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
5058
+ !editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
5059
+ !editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
5060
+ hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4733
5061
  ] })
4734
5062
  ] });
4735
5063
  };
@@ -4750,35 +5078,35 @@ function legacyThemeMapper(theme) {
4750
5078
 
4751
5079
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4752
5080
  var import_dnd3 = require("@hello-pangea/dnd");
4753
- var import_design_system27 = require("@uniformdev/design-system");
5081
+ var import_design_system28 = require("@uniformdev/design-system");
4754
5082
 
4755
5083
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4756
- var import_react50 = require("@emotion/react");
4757
- var ObjectSearchResultListContainer = import_react50.css`
5084
+ var import_react57 = require("@emotion/react");
5085
+ var ObjectSearchResultListContainer = import_react57.css`
4758
5086
  align-items: center;
4759
5087
  display: flex;
4760
5088
  gap: var(--spacing-sm);
4761
5089
  justify-content: space-between;
4762
5090
  `;
4763
- var ObjectSearchDragContainer = import_react50.css`
5091
+ var ObjectSearchDragContainer = import_react57.css`
4764
5092
  margin: 0 0 var(--spacing-sm);
4765
5093
  `;
4766
- var ObjectSearchContainerDragging = import_react50.css`
5094
+ var ObjectSearchContainerDragging = import_react57.css`
4767
5095
  box-shadow: var(--shadow-base);
4768
5096
  opacity: var(--opacity-50);
4769
5097
  `;
4770
- var ObjectSearchResultListCounterContainer = import_react50.css`
5098
+ var ObjectSearchResultListCounterContainer = import_react57.css`
4771
5099
  align-items: center;
4772
5100
  display: flex;
4773
5101
  gap: var(--spacing-sm);
4774
5102
  `;
4775
- var ObjectSearchResultListTitle = import_react50.css`
5103
+ var ObjectSearchResultListTitle = import_react57.css`
4776
5104
  font-weight: var(--fw-bold);
4777
5105
  line-height: 1;
4778
5106
  `;
4779
5107
 
4780
5108
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4781
- var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
5109
+ var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
4782
5110
  var DroppableHack2 = import_dnd3.Droppable;
4783
5111
  var DraggableHack2 = import_dnd3.Draggable;
4784
5112
  function ObjectSearchResultList({
@@ -4788,7 +5116,7 @@ function ObjectSearchResultList({
4788
5116
  hideRemoveButton = false,
4789
5117
  resultLabelOverride,
4790
5118
  additionalButtons,
4791
- renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ObjectSearchResultItem, { ...value }),
5119
+ renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ObjectSearchResultItem, { ...value }),
4792
5120
  multiSelectId,
4793
5121
  disableDnD = false,
4794
5122
  getContainerForDnDReparenting,
@@ -4815,7 +5143,7 @@ function ObjectSearchResultList({
4815
5143
  ...item,
4816
5144
  disableDnD: selectedListItems.length === 1 || disableDnD
4817
5145
  });
4818
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5146
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4819
5147
  "div",
4820
5148
  {
4821
5149
  css: [
@@ -4830,17 +5158,17 @@ function ObjectSearchResultList({
4830
5158
  }
4831
5159
  );
4832
5160
  };
4833
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4834
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { role: "group", css: ObjectSearchResultListContainer, children: [
4835
- !resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
4836
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
5161
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
5162
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { role: "group", css: ObjectSearchResultListContainer, children: [
5163
+ !resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
5164
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
4837
5165
  " ",
4838
- !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_design_system27.Counter, { count: selectedListItems.length })
5166
+ !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_design_system28.Counter, { count: selectedListItems.length })
4839
5167
  ] }) : resultLabelOverride,
4840
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
5168
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
4841
5169
  additionalButtons,
4842
- hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4843
- import_design_system27.Button,
5170
+ hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5171
+ import_design_system28.Button,
4844
5172
  {
4845
5173
  buttonType: "ghostDestructive",
4846
5174
  size: "xs",
@@ -4851,15 +5179,15 @@ function ObjectSearchResultList({
4851
5179
  )
4852
5180
  ] })
4853
5181
  ] }),
4854
- !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5182
+ !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4855
5183
  DroppableHack2,
4856
5184
  {
4857
5185
  droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
4858
5186
  renderClone: getContainerForDnDReparenting ? getDraggableItem : void 0,
4859
5187
  getContainerForClone: getContainerForDnDReparenting,
4860
- children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
5188
+ children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4861
5189
  selectedListItems.map((item, i) => {
4862
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5190
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4863
5191
  DraggableHack2,
4864
5192
  {
4865
5193
  draggableId: item.id,
@@ -4878,9 +5206,9 @@ function ObjectSearchResultList({
4878
5206
  }
4879
5207
 
4880
5208
  // src/components/ObjectSearch/QueryFilter.tsx
4881
- var import_design_system28 = require("@uniformdev/design-system");
4882
- var import_react51 = require("react");
4883
- var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
5209
+ var import_design_system29 = require("@uniformdev/design-system");
5210
+ var import_react58 = require("react");
5211
+ var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
4884
5212
  var QueryFilter = ({
4885
5213
  requireContentType,
4886
5214
  queryFilterTitle = "Configure Query",
@@ -4908,7 +5236,7 @@ var QueryFilter = ({
4908
5236
  }) => {
4909
5237
  var _a, _b, _c, _d, _e, _f, _g;
4910
5238
  const { query, onSetQuery } = useObjectSearchContext();
4911
- const [queryState, setQueryState] = (0, import_react51.useState)({
5239
+ const [queryState, setQueryState] = (0, import_react58.useState)({
4912
5240
  contentType: (_a = query.contentType) != null ? _a : "",
4913
5241
  keyword: (_b = query.keyword) != null ? _b : "",
4914
5242
  count: (_c = query.count) != null ? _c : 5,
@@ -4919,13 +5247,13 @@ var QueryFilter = ({
4919
5247
  setQueryState((prev) => ({ ...prev, ...value }));
4920
5248
  onSetQuery({ ...query, ...value });
4921
5249
  };
4922
- (0, import_react51.useEffect)(() => {
5250
+ (0, import_react58.useEffect)(() => {
4923
5251
  onSetQuery(queryState);
4924
5252
  }, []);
4925
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("fieldset", { children: [
4926
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
4927
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_design_system28.VerticalRhythm, { children: [
4928
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5253
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("fieldset", { children: [
5254
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
5255
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_design_system29.VerticalRhythm, { children: [
5256
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4929
5257
  InputVariables,
4930
5258
  {
4931
5259
  label: searchInputLabel,
@@ -4933,8 +5261,8 @@ var QueryFilter = ({
4933
5261
  onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
4934
5262
  disableInlineMenu: true,
4935
5263
  id: "qf_searchText",
4936
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4937
- import_design_system28.DebouncedInputKeywordSearch,
5264
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5265
+ import_design_system29.DebouncedInputKeywordSearch,
4938
5266
  {
4939
5267
  id: "qf_searchText",
4940
5268
  inputFieldName: searchInputName,
@@ -4947,8 +5275,8 @@ var QueryFilter = ({
4947
5275
  )
4948
5276
  }
4949
5277
  ),
4950
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
4951
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5278
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
5279
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4952
5280
  InputVariables,
4953
5281
  {
4954
5282
  label: contentTypeLabel,
@@ -4956,8 +5284,8 @@ var QueryFilter = ({
4956
5284
  value: (_g = queryState.contentType) != null ? _g : "",
4957
5285
  onChange: (newType) => handleFilterChange({ contentType: newType }),
4958
5286
  disableInlineMenu: true,
4959
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4960
- import_design_system28.InputSelect,
5287
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5288
+ import_design_system29.InputSelect,
4961
5289
  {
4962
5290
  id: "qf_contentType",
4963
5291
  label: contentTypeLabel,
@@ -4970,7 +5298,7 @@ var QueryFilter = ({
4970
5298
  )
4971
5299
  }
4972
5300
  ),
4973
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5301
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4974
5302
  InputVariables,
4975
5303
  {
4976
5304
  label: countLabel,
@@ -4979,8 +5307,8 @@ var QueryFilter = ({
4979
5307
  onChange: (newCount) => handleFilterChange({ count: newCount }),
4980
5308
  disableInlineMenu: true,
4981
5309
  valueToResetTo: "5",
4982
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4983
- import_design_system28.Input,
5310
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5311
+ import_design_system29.Input,
4984
5312
  {
4985
5313
  id: "qf_count",
4986
5314
  label: countLabel,
@@ -4994,8 +5322,8 @@ var QueryFilter = ({
4994
5322
  }
4995
5323
  )
4996
5324
  ] }),
4997
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
4998
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5325
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
5326
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4999
5327
  InputVariables,
5000
5328
  {
5001
5329
  id: "qf_sortBy",
@@ -5003,8 +5331,8 @@ var QueryFilter = ({
5003
5331
  value: queryState.sortBy,
5004
5332
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
5005
5333
  disableInlineMenu: true,
5006
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5007
- import_design_system28.InputSelect,
5334
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5335
+ import_design_system29.InputSelect,
5008
5336
  {
5009
5337
  label: sortLabel,
5010
5338
  id: "qf_sortBy",
@@ -5017,7 +5345,7 @@ var QueryFilter = ({
5017
5345
  )
5018
5346
  }
5019
5347
  ),
5020
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5348
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5021
5349
  InputVariables,
5022
5350
  {
5023
5351
  label: sortOrderLabel,
@@ -5025,8 +5353,8 @@ var QueryFilter = ({
5025
5353
  value: queryState.sortOrder,
5026
5354
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
5027
5355
  disableInlineMenu: true,
5028
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5029
- import_design_system28.InputSelect,
5356
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5357
+ import_design_system29.InputSelect,
5030
5358
  {
5031
5359
  label: sortOrderLabel,
5032
5360
  id: "qf_sortOrder",
@@ -5045,8 +5373,8 @@ var QueryFilter = ({
5045
5373
  };
5046
5374
 
5047
5375
  // src/components/ParamTypeDynamicDataProvider.tsx
5048
- var import_react52 = require("react");
5049
- var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
5376
+ var import_react59 = require("react");
5377
+ var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
5050
5378
  function ParamTypeDynamicDataProvider(props) {
5051
5379
  const { children } = props;
5052
5380
  const {
@@ -5054,11 +5382,11 @@ function ParamTypeDynamicDataProvider(props) {
5054
5382
  } = useMeshLocation("paramType");
5055
5383
  const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
5056
5384
  const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
5057
- const variables = (0, import_react52.useMemo)(
5385
+ const variables = (0, import_react59.useMemo)(
5058
5386
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
5059
5387
  [dynamicInputsAsVariables, connectedDataAsVariables]
5060
5388
  );
5061
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VariablesProvider, { value: variables, onChange: () => {
5389
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(VariablesProvider, { value: variables, onChange: () => {
5062
5390
  }, editVariableComponent: JsonMeshVariableEditor, children });
5063
5391
  }
5064
5392
  var JsonMeshVariableEditor = ({
@@ -5067,9 +5395,9 @@ var JsonMeshVariableEditor = ({
5067
5395
  variable,
5068
5396
  context
5069
5397
  }) => {
5070
- const sillyRef = (0, import_react52.useRef)(false);
5398
+ const sillyRef = (0, import_react59.useRef)(false);
5071
5399
  const { editConnectedData } = useMeshLocation("paramType");
5072
- (0, import_react52.useEffect)(() => {
5400
+ (0, import_react59.useEffect)(() => {
5073
5401
  if (sillyRef.current) {
5074
5402
  return;
5075
5403
  }
@@ -5505,6 +5833,12 @@ var MULTI_SELECT_OPERATORS = [
5505
5833
  editorType: "multiChoice",
5506
5834
  expectedValueType: "array"
5507
5835
  },
5836
+ {
5837
+ label: "is all of...",
5838
+ value: "all",
5839
+ editorType: "multiChoice",
5840
+ expectedValueType: "array"
5841
+ },
5508
5842
  {
5509
5843
  label: "is empty",
5510
5844
  value: "ndef",
@@ -5532,10 +5866,10 @@ var MULTI_SELECT_OPERATORS = [
5532
5866
  ];
5533
5867
 
5534
5868
  // src/components/SearchAndFilter/editors/DateEditor.tsx
5535
- var import_design_system29 = require("@uniformdev/design-system");
5536
- var import_react53 = require("react");
5869
+ var import_design_system30 = require("@uniformdev/design-system");
5870
+ var import_react60 = require("react");
5537
5871
  var import_react_use2 = require("react-use");
5538
- var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
5872
+ var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
5539
5873
  var DateEditor = ({
5540
5874
  onChange,
5541
5875
  ariaLabel,
@@ -5544,10 +5878,10 @@ var DateEditor = ({
5544
5878
  readOnly,
5545
5879
  valueTestId
5546
5880
  }) => {
5547
- const [innerValue, setInnerValue] = (0, import_react53.useState)(value != null ? value : "");
5881
+ const [innerValue, setInnerValue] = (0, import_react60.useState)(value != null ? value : "");
5548
5882
  (0, import_react_use2.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
5549
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5550
- import_design_system29.Input,
5883
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5884
+ import_design_system30.Input,
5551
5885
  {
5552
5886
  type: "date",
5553
5887
  label: ariaLabel,
@@ -5562,22 +5896,22 @@ var DateEditor = ({
5562
5896
  };
5563
5897
 
5564
5898
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5565
- var import_design_system31 = require("@uniformdev/design-system");
5566
- var import_react54 = require("react");
5899
+ var import_design_system32 = require("@uniformdev/design-system");
5900
+ var import_react61 = require("react");
5567
5901
  var import_react_use3 = require("react-use");
5568
5902
 
5569
5903
  // src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
5570
- var import_design_system30 = require("@uniformdev/design-system");
5571
- var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
5904
+ var import_design_system31 = require("@uniformdev/design-system");
5905
+ var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
5572
5906
  var ErrorContainer = ({ errorMessage }) => {
5573
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5907
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5574
5908
  "div",
5575
5909
  {
5576
5910
  css: {
5577
5911
  gridColumn: "span 6",
5578
5912
  order: 6
5579
5913
  },
5580
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system30.FieldMessage, { errorMessage })
5914
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_design_system31.FieldMessage, { errorMessage })
5581
5915
  }
5582
5916
  );
5583
5917
  };
@@ -5590,7 +5924,7 @@ var twoColumnGrid = {
5590
5924
  };
5591
5925
 
5592
5926
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5593
- var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
5927
+ var import_jsx_runtime62 = require("@emotion/react/jsx-runtime");
5594
5928
  var DateRangeEditor = ({
5595
5929
  ariaLabel,
5596
5930
  onChange,
@@ -5599,9 +5933,9 @@ var DateRangeEditor = ({
5599
5933
  readOnly,
5600
5934
  valueTestId
5601
5935
  }) => {
5602
- const [minDateValue, setMinDateValue] = (0, import_react54.useState)(value ? value[0] : "");
5603
- const [maxDateValue, setMaxDateValue] = (0, import_react54.useState)(value ? value[1] : "");
5604
- const [error, setError] = (0, import_react54.useState)("");
5936
+ const [minDateValue, setMinDateValue] = (0, import_react61.useState)(value ? value[0] : "");
5937
+ const [maxDateValue, setMaxDateValue] = (0, import_react61.useState)(value ? value[1] : "");
5938
+ const [error, setError] = (0, import_react61.useState)("");
5605
5939
  (0, import_react_use3.useDebounce)(
5606
5940
  () => {
5607
5941
  if (minDateValue && maxDateValue && !error) {
@@ -5613,7 +5947,7 @@ var DateRangeEditor = ({
5613
5947
  500,
5614
5948
  [minDateValue, maxDateValue]
5615
5949
  );
5616
- (0, import_react54.useEffect)(() => {
5950
+ (0, import_react61.useEffect)(() => {
5617
5951
  if (!minDateValue || !maxDateValue) {
5618
5952
  return;
5619
5953
  }
@@ -5648,10 +5982,10 @@ var DateRangeEditor = ({
5648
5982
  setMaxDateValue("");
5649
5983
  }
5650
5984
  }, [minDateValue, maxDateValue, setError]);
5651
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
5652
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5653
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5654
- import_design_system31.Input,
5985
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
5986
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5987
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5988
+ import_design_system32.Input,
5655
5989
  {
5656
5990
  label: `${ariaLabel}-min-date`,
5657
5991
  type: "date",
@@ -5664,8 +5998,8 @@ var DateRangeEditor = ({
5664
5998
  "data-testid": "value-low"
5665
5999
  }
5666
6000
  ),
5667
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5668
- import_design_system31.Input,
6001
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
6002
+ import_design_system32.Input,
5669
6003
  {
5670
6004
  label: `${ariaLabel}-max-date`,
5671
6005
  type: "date",
@@ -5679,13 +6013,13 @@ var DateRangeEditor = ({
5679
6013
  }
5680
6014
  )
5681
6015
  ] }),
5682
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorContainer, { errorMessage: error })
6016
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ErrorContainer, { errorMessage: error })
5683
6017
  ] });
5684
6018
  };
5685
6019
 
5686
6020
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5687
- var import_design_system32 = require("@uniformdev/design-system");
5688
- var import_react55 = require("react");
6021
+ var import_design_system33 = require("@uniformdev/design-system");
6022
+ var import_react62 = require("react");
5689
6023
 
5690
6024
  // src/components/SearchAndFilter/editors/shared/readOnlyAttributes.tsx
5691
6025
  var readOnlyAttributes = {
@@ -5695,7 +6029,7 @@ var readOnlyAttributes = {
5695
6029
  };
5696
6030
 
5697
6031
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5698
- var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
6032
+ var import_jsx_runtime63 = require("@emotion/react/jsx-runtime");
5699
6033
  var FilterMultiChoiceEditor = ({
5700
6034
  value,
5701
6035
  options,
@@ -5706,12 +6040,12 @@ var FilterMultiChoiceEditor = ({
5706
6040
  }) => {
5707
6041
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5708
6042
  const isClearable = !readOnly || !disabled;
5709
- const { groupedOptions, selectedOptions } = (0, import_react55.useMemo)(
5710
- () => (0, import_design_system32.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
6043
+ const { groupedOptions, selectedOptions } = (0, import_react62.useMemo)(
6044
+ () => (0, import_design_system33.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
5711
6045
  [options, value]
5712
6046
  );
5713
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5714
- import_design_system32.InputComboBox,
6047
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6048
+ import_design_system33.InputComboBox,
5715
6049
  {
5716
6050
  ...props,
5717
6051
  placeholder: "Type to search...",
@@ -5720,7 +6054,7 @@ var FilterMultiChoiceEditor = ({
5720
6054
  isClearable,
5721
6055
  isDisabled: disabled,
5722
6056
  onChange: (e) => {
5723
- const selectedValues = (0, import_design_system32.getComboBoxSelectedSelectableGroups)(e);
6057
+ const selectedValues = (0, import_design_system33.getComboBoxSelectedSelectableGroups)(e);
5724
6058
  return props.onChange([...selectedValues]);
5725
6059
  },
5726
6060
  value: selectedOptions,
@@ -5739,9 +6073,9 @@ var FilterMultiChoiceEditor = ({
5739
6073
  };
5740
6074
 
5741
6075
  // src/components/SearchAndFilter/editors/FilterSingleChoiceEditor.tsx
5742
- var import_design_system33 = require("@uniformdev/design-system");
5743
- var import_react56 = require("react");
5744
- var import_jsx_runtime62 = require("@emotion/react/jsx-runtime");
6076
+ var import_design_system34 = require("@uniformdev/design-system");
6077
+ var import_react63 = require("react");
6078
+ var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
5745
6079
  var FilterSingleChoiceEditor = ({
5746
6080
  options,
5747
6081
  value,
@@ -5751,16 +6085,16 @@ var FilterSingleChoiceEditor = ({
5751
6085
  valueTestId
5752
6086
  }) => {
5753
6087
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5754
- const { groupedOptions, selectedOptions } = (0, import_react56.useMemo)(
5755
- () => (0, import_design_system33.convertComboBoxGroupsToSelectableGroups)({
6088
+ const { groupedOptions, selectedOptions } = (0, import_react63.useMemo)(
6089
+ () => (0, import_design_system34.convertComboBoxGroupsToSelectableGroups)({
5756
6090
  options: options != null ? options : [],
5757
6091
  selectedItems: new Set(value ? [String(value)] : void 0),
5758
6092
  selectionMode: "single"
5759
6093
  }),
5760
6094
  [options, value]
5761
6095
  );
5762
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5763
- import_design_system33.InputComboBox,
6096
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
6097
+ import_design_system34.InputComboBox,
5764
6098
  {
5765
6099
  placeholder: "Type to search...",
5766
6100
  options: groupedOptions,
@@ -5788,10 +6122,10 @@ var FilterSingleChoiceEditor = ({
5788
6122
  };
5789
6123
 
5790
6124
  // src/components/SearchAndFilter/editors/NumberEditor.tsx
5791
- var import_design_system34 = require("@uniformdev/design-system");
5792
- var import_react57 = require("react");
6125
+ var import_design_system35 = require("@uniformdev/design-system");
6126
+ var import_react64 = require("react");
5793
6127
  var import_react_use4 = require("react-use");
5794
- var import_jsx_runtime63 = require("@emotion/react/jsx-runtime");
6128
+ var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
5795
6129
  var NumberEditor = ({
5796
6130
  ariaLabel,
5797
6131
  onChange,
@@ -5800,10 +6134,10 @@ var NumberEditor = ({
5800
6134
  readOnly,
5801
6135
  valueTestId
5802
6136
  }) => {
5803
- const [innerValue, setInnerValue] = (0, import_react57.useState)(value != null ? value : "");
6137
+ const [innerValue, setInnerValue] = (0, import_react64.useState)(value != null ? value : "");
5804
6138
  (0, import_react_use4.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
5805
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5806
- import_design_system34.Input,
6139
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
6140
+ import_design_system35.Input,
5807
6141
  {
5808
6142
  label: ariaLabel,
5809
6143
  type: "number",
@@ -5819,10 +6153,10 @@ var NumberEditor = ({
5819
6153
  };
5820
6154
 
5821
6155
  // src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
5822
- var import_design_system35 = require("@uniformdev/design-system");
5823
- var import_react58 = require("react");
6156
+ var import_design_system36 = require("@uniformdev/design-system");
6157
+ var import_react65 = require("react");
5824
6158
  var import_react_use5 = require("react-use");
5825
- var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
6159
+ var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
5826
6160
  var NumberRangeEditor = ({
5827
6161
  onChange,
5828
6162
  disabled,
@@ -5831,9 +6165,9 @@ var NumberRangeEditor = ({
5831
6165
  readOnly,
5832
6166
  valueTestId
5833
6167
  }) => {
5834
- const [minValue, setMinValue] = (0, import_react58.useState)("");
5835
- const [maxValue, setMaxValue] = (0, import_react58.useState)("");
5836
- const [error, setError] = (0, import_react58.useState)("");
6168
+ const [minValue, setMinValue] = (0, import_react65.useState)("");
6169
+ const [maxValue, setMaxValue] = (0, import_react65.useState)("");
6170
+ const [error, setError] = (0, import_react65.useState)("");
5837
6171
  (0, import_react_use5.useDebounce)(
5838
6172
  () => {
5839
6173
  if (minValue && maxValue && !error) {
@@ -5845,7 +6179,7 @@ var NumberRangeEditor = ({
5845
6179
  500,
5846
6180
  [minValue, maxValue]
5847
6181
  );
5848
- (0, import_react58.useEffect)(() => {
6182
+ (0, import_react65.useEffect)(() => {
5849
6183
  if (!maxValue && !minValue) {
5850
6184
  return;
5851
6185
  }
@@ -5867,10 +6201,10 @@ var NumberRangeEditor = ({
5867
6201
  setMaxValue(maxValue);
5868
6202
  }
5869
6203
  }, [maxValue, minValue, setError]);
5870
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
5871
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5872
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5873
- import_design_system35.Input,
6204
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
6205
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
6206
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6207
+ import_design_system36.Input,
5874
6208
  {
5875
6209
  label: `${ariaLabel}-min`,
5876
6210
  type: "number",
@@ -5885,8 +6219,8 @@ var NumberRangeEditor = ({
5885
6219
  "data-testid": "value-low"
5886
6220
  }
5887
6221
  ),
5888
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5889
- import_design_system35.Input,
6222
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6223
+ import_design_system36.Input,
5890
6224
  {
5891
6225
  type: "number",
5892
6226
  label: `${ariaLabel}-max`,
@@ -5902,20 +6236,20 @@ var NumberRangeEditor = ({
5902
6236
  }
5903
6237
  )
5904
6238
  ] }),
5905
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorContainer, { errorMessage: error })
6239
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorContainer, { errorMessage: error })
5906
6240
  ] });
5907
6241
  };
5908
6242
 
5909
6243
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5910
- var import_design_system37 = require("@uniformdev/design-system");
5911
- var import_react59 = require("react");
6244
+ var import_design_system38 = require("@uniformdev/design-system");
6245
+ var import_react66 = require("react");
5912
6246
 
5913
6247
  // src/components/SearchAndFilter/editors/shared/CustomOptions.tsx
5914
- var import_design_system36 = require("@uniformdev/design-system");
5915
- var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
6248
+ var import_design_system37 = require("@uniformdev/design-system");
6249
+ var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
5916
6250
  var CustomOptions = ({ label, value }) => {
5917
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5918
- import_design_system36.StatusBullet,
6251
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6252
+ import_design_system37.StatusBullet,
5919
6253
  {
5920
6254
  status: label,
5921
6255
  message: Array.isArray(value) ? value.join(",") : value
@@ -5924,7 +6258,7 @@ var CustomOptions = ({ label, value }) => {
5924
6258
  };
5925
6259
 
5926
6260
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5927
- var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
6261
+ var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
5928
6262
  var StatusMultiEditor = ({
5929
6263
  options,
5930
6264
  value,
@@ -5934,17 +6268,17 @@ var StatusMultiEditor = ({
5934
6268
  valueTestId
5935
6269
  }) => {
5936
6270
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5937
- const { groupedOptions, selectedOptions } = (0, import_react59.useMemo)(
5938
- () => (0, import_design_system37.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
6271
+ const { groupedOptions, selectedOptions } = (0, import_react66.useMemo)(
6272
+ () => (0, import_design_system38.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
5939
6273
  [options, value]
5940
6274
  );
5941
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5942
- import_design_system37.InputComboBox,
6275
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6276
+ import_design_system38.InputComboBox,
5943
6277
  {
5944
6278
  options: groupedOptions != null ? groupedOptions : [],
5945
6279
  isMulti: true,
5946
6280
  onChange: (e) => {
5947
- const selectedValues = (0, import_design_system37.getComboBoxSelectedSelectableGroups)(e);
6281
+ const selectedValues = (0, import_design_system38.getComboBoxSelectedSelectableGroups)(e);
5948
6282
  return onChange([...selectedValues]);
5949
6283
  },
5950
6284
  formatOptionLabel: CustomOptions,
@@ -5965,9 +6299,9 @@ var StatusMultiEditor = ({
5965
6299
  };
5966
6300
 
5967
6301
  // src/components/SearchAndFilter/editors/StatusSingleEditor.tsx
5968
- var import_design_system38 = require("@uniformdev/design-system");
5969
- var import_react60 = require("react");
5970
- var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
6302
+ var import_design_system39 = require("@uniformdev/design-system");
6303
+ var import_react67 = require("react");
6304
+ var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
5971
6305
  var StatusSingleEditor = ({
5972
6306
  options,
5973
6307
  value,
@@ -5977,16 +6311,16 @@ var StatusSingleEditor = ({
5977
6311
  valueTestId
5978
6312
  }) => {
5979
6313
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5980
- const { groupedOptions, selectedOptions } = (0, import_react60.useMemo)(
5981
- () => (0, import_design_system38.convertComboBoxGroupsToSelectableGroups)({
6314
+ const { groupedOptions, selectedOptions } = (0, import_react67.useMemo)(
6315
+ () => (0, import_design_system39.convertComboBoxGroupsToSelectableGroups)({
5982
6316
  options: options != null ? options : [],
5983
6317
  selectedItems: new Set(value ? [value] : void 0),
5984
6318
  selectionMode: "single"
5985
6319
  }),
5986
6320
  [options, value]
5987
6321
  );
5988
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5989
- import_design_system38.InputComboBox,
6322
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6323
+ import_design_system39.InputComboBox,
5990
6324
  {
5991
6325
  options: groupedOptions,
5992
6326
  onChange: (e) => {
@@ -6013,10 +6347,10 @@ var StatusSingleEditor = ({
6013
6347
  };
6014
6348
 
6015
6349
  // src/components/SearchAndFilter/editors/TextEditor.tsx
6016
- var import_design_system39 = require("@uniformdev/design-system");
6017
- var import_react61 = require("react");
6350
+ var import_design_system40 = require("@uniformdev/design-system");
6351
+ var import_react68 = require("react");
6018
6352
  var import_react_use6 = require("react-use");
6019
- var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
6353
+ var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
6020
6354
  var TextEditor = ({
6021
6355
  onChange,
6022
6356
  ariaLabel,
@@ -6024,10 +6358,10 @@ var TextEditor = ({
6024
6358
  readOnly,
6025
6359
  valueTestId
6026
6360
  }) => {
6027
- const [innerValue, setInnerValue] = (0, import_react61.useState)(value != null ? value : "");
6361
+ const [innerValue, setInnerValue] = (0, import_react68.useState)(value != null ? value : "");
6028
6362
  (0, import_react_use6.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
6029
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6030
- import_design_system39.Input,
6363
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
6364
+ import_design_system40.Input,
6031
6365
  {
6032
6366
  showLabel: false,
6033
6367
  label: ariaLabel,
@@ -6041,9 +6375,9 @@ var TextEditor = ({
6041
6375
  };
6042
6376
 
6043
6377
  // src/components/SearchAndFilter/editors/TextMultiChoiceEditor.tsx
6044
- var import_design_system40 = require("@uniformdev/design-system");
6045
- var import_react62 = require("react");
6046
- var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
6378
+ var import_design_system41 = require("@uniformdev/design-system");
6379
+ var import_react69 = require("react");
6380
+ var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
6047
6381
  var TextMultiChoiceEditor = ({
6048
6382
  value,
6049
6383
  disabled,
@@ -6053,14 +6387,14 @@ var TextMultiChoiceEditor = ({
6053
6387
  }) => {
6054
6388
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
6055
6389
  const isClearable = !readOnly || !disabled;
6056
- const { groupedOptions, selectedOptions } = (0, import_react62.useMemo)(() => {
6390
+ const { groupedOptions, selectedOptions } = (0, import_react69.useMemo)(() => {
6057
6391
  var _a;
6058
6392
  const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
6059
6393
  const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
6060
- return (0, import_design_system40.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
6394
+ return (0, import_design_system41.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
6061
6395
  }, [value]);
6062
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6063
- import_design_system40.InputCreatableComboBox,
6396
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6397
+ import_design_system41.InputCreatableComboBox,
6064
6398
  {
6065
6399
  ...props,
6066
6400
  placeholder: "Type a value\u2026",
@@ -6070,7 +6404,7 @@ var TextMultiChoiceEditor = ({
6070
6404
  isClearable,
6071
6405
  isDisabled: disabled,
6072
6406
  onChange: (e) => {
6073
- const selectedValues = (0, import_design_system40.getComboBoxSelectedSelectableGroups)(e);
6407
+ const selectedValues = (0, import_design_system41.getComboBoxSelectedSelectableGroups)(e);
6074
6408
  return props.onChange([...selectedValues]);
6075
6409
  },
6076
6410
  value: selectedOptions,
@@ -6089,31 +6423,31 @@ var TextMultiChoiceEditor = ({
6089
6423
  };
6090
6424
 
6091
6425
  // src/components/SearchAndFilter/FilterButton.tsx
6092
- var import_design_system42 = require("@uniformdev/design-system");
6426
+ var import_design_system43 = require("@uniformdev/design-system");
6093
6427
 
6094
6428
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
6095
- var import_react63 = require("@emotion/react");
6096
- var import_design_system41 = require("@uniformdev/design-system");
6097
- var SearchAndFilterControlsWrapper = (gridColumns) => import_react63.css`
6429
+ var import_react70 = require("@emotion/react");
6430
+ var import_design_system42 = require("@uniformdev/design-system");
6431
+ var SearchAndFilterControlsWrapper = (gridColumns) => import_react70.css`
6098
6432
  align-items: stretch;
6099
6433
  display: grid;
6100
6434
  grid-template-columns: ${gridColumns};
6101
6435
  gap: var(--spacing-sm);
6102
6436
  `;
6103
- var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react63.css`
6437
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react70.css`
6104
6438
  align-items: stretch;
6105
6439
  display: grid;
6106
6440
  grid-template-columns: ${gridColumns};
6107
6441
  gap: var(--spacing-sm);
6108
6442
  `;
6109
- var ConditionalFilterRow = import_react63.css`
6443
+ var ConditionalFilterRow = import_react70.css`
6110
6444
  align-items: baseline;
6111
6445
  display: grid;
6112
6446
  grid-template-columns: 35px 1fr;
6113
6447
  gap: var(--spacing-sm);
6114
6448
  margin-left: var(--spacing-base);
6115
6449
 
6116
- ${(0, import_design_system41.cq)("380px")} {
6450
+ ${(0, import_design_system42.cq)("380px")} {
6117
6451
  &:after {
6118
6452
  content: '';
6119
6453
  display: block;
@@ -6132,22 +6466,22 @@ var ConditionalFilterRow = import_react63.css`
6132
6466
  grid-template-columns: 50px 1fr;
6133
6467
  }
6134
6468
 
6135
- ${(0, import_design_system41.cq)("580px")} {
6469
+ ${(0, import_design_system42.cq)("580px")} {
6136
6470
  &:after {
6137
6471
  display: none;
6138
6472
  }
6139
6473
  }
6140
6474
 
6141
6475
  @media (prefers-reduced-motion: no-preference) {
6142
- animation: ${import_design_system41.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6476
+ animation: ${import_design_system42.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6143
6477
  }
6144
6478
  `;
6145
- var ConditionalInputRow = import_react63.css`
6479
+ var ConditionalInputRow = import_react70.css`
6146
6480
  display: flex;
6147
6481
  gap: var(--spacing-sm);
6148
6482
  flex-wrap: wrap;
6149
6483
 
6150
- ${(0, import_design_system41.cq)("380px")} {
6484
+ ${(0, import_design_system42.cq)("380px")} {
6151
6485
  & > div:nth-child(-n + 2) {
6152
6486
  width: calc(50% - var(--spacing-sm));
6153
6487
  }
@@ -6156,7 +6490,7 @@ var ConditionalInputRow = import_react63.css`
6156
6490
  width: calc(100% - 48px);
6157
6491
  }
6158
6492
  }
6159
- ${(0, import_design_system41.cq)("764px")} {
6493
+ ${(0, import_design_system42.cq)("764px")} {
6160
6494
  align-items: flex-start;
6161
6495
  display: grid;
6162
6496
  grid-template-columns: 250px 160px 1fr 32px;
@@ -6166,18 +6500,20 @@ var ConditionalInputRow = import_react63.css`
6166
6500
  }
6167
6501
  }
6168
6502
  `;
6169
- var ConditionalInputRowEmpty = import_react63.css`
6503
+ var ConditionalInputRowEmpty = import_react70.css`
6170
6504
  flex-wrap: nowrap;
6171
6505
  `;
6172
- var SearchInput = import_react63.css`
6173
- max-height: 40px;
6174
- min-height: unset;
6506
+ var SearchInput = import_react70.css`
6507
+ && {
6508
+ max-height: 40px;
6509
+ min-height: unset;
6510
+ }
6175
6511
  `;
6176
- var BindableKeywordSearchInputStyles = import_react63.css`
6512
+ var BindableKeywordSearchInputStyles = import_react70.css`
6177
6513
  position: relative;
6178
6514
  width: 100%;
6179
6515
 
6180
- & [data-lexical-editor='true'] {
6516
+ && [data-lexical-editor='true'] {
6181
6517
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
6182
6518
  font-size: var(--fs-sm);
6183
6519
  border-radius: var(--rounded-full);
@@ -6188,19 +6524,19 @@ var BindableKeywordSearchInputStyles = import_react63.css`
6188
6524
  white-space: nowrap;
6189
6525
  }
6190
6526
  `;
6191
- var ClearSearchButtonContainer = import_react63.css`
6527
+ var ClearSearchButtonContainer = import_react70.css`
6192
6528
  align-items: center;
6193
6529
  display: flex;
6194
6530
  position: absolute;
6195
6531
  inset: 0 var(--spacing-lg) 0 auto;
6196
6532
  `;
6197
- var ClearSearchButtonStyles = import_react63.css`
6533
+ var ClearSearchButtonStyles = import_react70.css`
6198
6534
  background: none;
6199
6535
  border: none;
6200
6536
  padding: 0;
6201
6537
  pointer-events: all;
6202
6538
  `;
6203
- var FilterButton = import_react63.css`
6539
+ var FilterButton = import_react70.css`
6204
6540
  align-items: center;
6205
6541
  background: var(--white);
6206
6542
  border: 1px solid var(--gray-300);
@@ -6237,13 +6573,13 @@ var FilterButton = import_react63.css`
6237
6573
  opacity: var(--opacity-50);
6238
6574
  }
6239
6575
  `;
6240
- var FilterButtonText = import_react63.css`
6576
+ var FilterButtonText = import_react70.css`
6241
6577
  overflow: hidden;
6242
6578
  text-overflow: ellipsis;
6243
6579
  white-space: nowrap;
6244
6580
  max-width: 14ch;
6245
6581
  `;
6246
- var FilterButtonSelected = import_react63.css`
6582
+ var FilterButtonSelected = import_react70.css`
6247
6583
  background: var(--gray-100);
6248
6584
  border-color: var(--gray-300);
6249
6585
 
@@ -6251,7 +6587,7 @@ var FilterButtonSelected = import_react63.css`
6251
6587
  color: var(--accent-dark);
6252
6588
  }
6253
6589
  `;
6254
- var FilterButtonWithOptions = import_react63.css`
6590
+ var FilterButtonWithOptions = import_react70.css`
6255
6591
  :where([aria-expanded='true']) {
6256
6592
  background: var(--purple-rain-100);
6257
6593
  border-color: var(--accent-light);
@@ -6263,14 +6599,14 @@ var FilterButtonWithOptions = import_react63.css`
6263
6599
  }
6264
6600
  }
6265
6601
  `;
6266
- var SearchIcon = import_react63.css`
6602
+ var SearchIcon = import_react70.css`
6267
6603
  color: var(--icon-color);
6268
6604
  position: absolute;
6269
6605
  inset: 0 var(--spacing-base) 0 auto;
6270
6606
  margin: auto;
6271
6607
  transition: color var(--duration-fast) var(--timing-ease-out);
6272
6608
  `;
6273
- var AddConditionalBtn = import_react63.css`
6609
+ var AddConditionalBtn = import_react70.css`
6274
6610
  align-items: center;
6275
6611
  background: transparent;
6276
6612
  border: none;
@@ -6289,14 +6625,14 @@ var AddConditionalBtn = import_react63.css`
6289
6625
  color: var(--gray-400);
6290
6626
  }
6291
6627
  `;
6292
- var Title = import_react63.css`
6628
+ var Title = import_react70.css`
6293
6629
  color: var(--typography-light);
6294
6630
 
6295
6631
  &:focus {
6296
6632
  outline: none;
6297
6633
  }
6298
6634
  `;
6299
- var ResetConditionsBtn = import_react63.css`
6635
+ var ResetConditionsBtn = import_react70.css`
6300
6636
  background: transparent;
6301
6637
  border: none;
6302
6638
  color: var(--action-destructive-default);
@@ -6311,13 +6647,32 @@ var ResetConditionsBtn = import_react63.css`
6311
6647
  color: var(--gray-400);
6312
6648
  }
6313
6649
  `;
6314
- var IconBtn = import_react63.css`
6650
+ var CriteriaGroupOperatorTrigger = import_react70.css`
6651
+ && {
6652
+ padding: 0;
6653
+ border-radius: var(--rounded-sm);
6654
+ font-size: inherit;
6655
+ line-height: inherit;
6656
+ color: inherit;
6657
+
6658
+ > div {
6659
+ gap: 2px;
6660
+ }
6661
+
6662
+ svg {
6663
+ width: 10px;
6664
+ height: 10px;
6665
+ color: var(--gray-400);
6666
+ }
6667
+ }
6668
+ `;
6669
+ var IconBtn = import_react70.css`
6315
6670
  align-self: center;
6316
6671
  background: transparent;
6317
6672
  border: none;
6318
6673
  padding: var(--spacing-sm);
6319
6674
  `;
6320
- var SearchAndFilterOptionsContainer = import_react63.css`
6675
+ var SearchAndFilterOptionsContainer = import_react70.css`
6321
6676
  background: var(--gray-50);
6322
6677
  border: 1px solid var(--gray-300);
6323
6678
  border-radius: var(--rounded-base);
@@ -6328,17 +6683,17 @@ var SearchAndFilterOptionsContainer = import_react63.css`
6328
6683
  padding: var(--spacing-md) 0 var(--spacing-base);
6329
6684
  will-change: height;
6330
6685
  `;
6331
- var SearchAndFilterOptionsInnerContainer = import_react63.css`
6686
+ var SearchAndFilterOptionsInnerContainer = import_react70.css`
6332
6687
  display: flex;
6333
6688
  flex-direction: column;
6334
6689
  gap: var(--spacing-sm);
6335
6690
  padding-inline: var(--spacing-md);
6336
6691
  `;
6337
- var SearchAndFilterButtonGroup = import_react63.css`
6692
+ var SearchAndFilterButtonGroup = import_react70.css`
6338
6693
  margin-top: var(--spacing-xs);
6339
6694
  margin-left: calc(56px + var(--spacing-md));
6340
6695
  `;
6341
- var SearchAndFilterAdditionalContainer = import_react63.css`
6696
+ var SearchAndFilterAdditionalContainer = import_react70.css`
6342
6697
  align-items: center;
6343
6698
  border-top: 1px solid var(--gray-300);
6344
6699
  display: flex;
@@ -6348,17 +6703,17 @@ var SearchAndFilterAdditionalContainer = import_react63.css`
6348
6703
  `;
6349
6704
 
6350
6705
  // src/components/SearchAndFilter/FilterButton.tsx
6351
- var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
6706
+ var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
6352
6707
  var FilterButton2 = ({
6353
6708
  text = "Filters",
6354
- icon = import_design_system42.customIcons["filter-add"],
6709
+ icon = import_design_system43.customIcons["filter-add"],
6355
6710
  filterCount,
6356
6711
  hasSelectedValue,
6357
6712
  dataTestId,
6358
6713
  showDropdownIcon,
6359
6714
  ...props
6360
6715
  }) => {
6361
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
6716
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
6362
6717
  "button",
6363
6718
  {
6364
6719
  type: "button",
@@ -6370,10 +6725,10 @@ var FilterButton2 = ({
6370
6725
  ...props,
6371
6726
  "data-testid": dataTestId,
6372
6727
  children: [
6373
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
6374
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { css: FilterButtonText, children: text }),
6375
- filterCount ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
6376
- showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6728
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
6729
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { css: FilterButtonText, children: text }),
6730
+ filterCount ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
6731
+ showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6377
6732
  ]
6378
6733
  }
6379
6734
  );
@@ -6382,25 +6737,25 @@ var FilterButton2 = ({
6382
6737
  // src/components/SearchAndFilter/FilterControls.tsx
6383
6738
  var import_CgClose = require("@react-icons/all-files/cg/CgClose");
6384
6739
  var import_canvas10 = require("@uniformdev/canvas");
6385
- var import_design_system44 = require("@uniformdev/design-system");
6740
+ var import_design_system45 = require("@uniformdev/design-system");
6386
6741
  var import_lexical11 = require("lexical");
6387
- var import_react65 = require("react");
6742
+ var import_react72 = require("react");
6388
6743
  var import_react_use7 = require("react-use");
6389
6744
  var import_uuid2 = require("uuid");
6390
6745
 
6391
6746
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6392
- var import_design_system43 = require("@uniformdev/design-system");
6393
- var import_react64 = require("react");
6747
+ var import_design_system44 = require("@uniformdev/design-system");
6748
+ var import_react71 = require("react");
6394
6749
 
6395
6750
  // src/components/SearchAndFilter/FilterEditor.tsx
6396
- var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
6751
+ var import_jsx_runtime73 = require("@emotion/react/jsx-runtime");
6397
6752
  var FilterEditorRenderer = ({ editorType, ...props }) => {
6398
6753
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
6399
6754
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
6400
6755
  if (!Editor || editorType === "empty") {
6401
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", {});
6756
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", {});
6402
6757
  }
6403
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Editor, { ...props });
6758
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Editor, { ...props });
6404
6759
  };
6405
6760
  var filterMapper = {
6406
6761
  multiChoice: FilterMultiChoiceEditor,
@@ -6418,9 +6773,9 @@ var filterMapper = {
6418
6773
  function withInputVariables(WrappedComponent, noSwapping = false) {
6419
6774
  const WithInputVariables = (props) => {
6420
6775
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
6421
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props });
6776
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props });
6422
6777
  }
6423
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6778
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6424
6779
  InputVariables,
6425
6780
  {
6426
6781
  "data-testid": "filter-value",
@@ -6429,7 +6784,7 @@ function withInputVariables(WrappedComponent, noSwapping = false) {
6429
6784
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
6430
6785
  value: props.value,
6431
6786
  disabled: props.disabled,
6432
- inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props })
6787
+ inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props })
6433
6788
  }
6434
6789
  );
6435
6790
  };
@@ -6439,9 +6794,9 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6439
6794
  const WithInputVariables = (props) => {
6440
6795
  var _a;
6441
6796
  if (!props.bindable || props.disabled || props.readOnly) {
6442
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props });
6797
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props });
6443
6798
  }
6444
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6799
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6445
6800
  InputVariables,
6446
6801
  {
6447
6802
  "data-testid": "filter-value",
@@ -6449,7 +6804,7 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6449
6804
  showMenuPosition: "inline-right",
6450
6805
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
6451
6806
  value: (_a = props.value) == null ? void 0 : _a[0],
6452
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props })
6807
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props })
6453
6808
  }
6454
6809
  );
6455
6810
  };
@@ -6465,8 +6820,8 @@ var bindableFiltersMapper = {
6465
6820
  };
6466
6821
 
6467
6822
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6468
- var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
6469
- var SearchAndFilterContext = (0, import_react64.createContext)({
6823
+ var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
6824
+ var SearchAndFilterContext = (0, import_react71.createContext)({
6470
6825
  searchTerm: "",
6471
6826
  setSearchTerm: () => {
6472
6827
  },
@@ -6486,6 +6841,7 @@ var SearchAndFilterContext = (0, import_react64.createContext)({
6486
6841
  validFilterQuery: [],
6487
6842
  filterMapper: {},
6488
6843
  totalResults: 0,
6844
+ isLoading: false,
6489
6845
  allowBindingSearchTerm: false
6490
6846
  });
6491
6847
  var SearchAndFilterProvider = ({
@@ -6499,21 +6855,22 @@ var SearchAndFilterProvider = ({
6499
6855
  resetFilterValues = [{ field: "", operator: "", value: "" }],
6500
6856
  onResetFilterValues,
6501
6857
  totalResults,
6858
+ isLoading,
6502
6859
  filterMapper: filterMapper2 = filterMapper,
6503
6860
  children,
6504
6861
  allowBindingSearchTerm
6505
6862
  }) => {
6506
- const [searchTerm, setSearchTerm] = (0, import_react64.useState)(defaultSearchTerm);
6507
- const deferredSearchTerm = (0, import_react64.useDeferredValue)(searchTerm);
6508
- const [filterVisibility, setFilterVisibility] = (0, import_react64.useState)(alwaysVisible || filterVisible);
6509
- const handleSearchTerm = (0, import_react64.useCallback)(
6863
+ const [searchTerm, setSearchTerm] = (0, import_react71.useState)(defaultSearchTerm);
6864
+ const deferredSearchTerm = (0, import_react71.useDeferredValue)(searchTerm);
6865
+ const [filterVisibility, setFilterVisibility] = (0, import_react71.useState)(alwaysVisible || filterVisible);
6866
+ const handleSearchTerm = (0, import_react71.useCallback)(
6510
6867
  (term) => {
6511
6868
  setSearchTerm(term);
6512
6869
  onSearchChange == null ? void 0 : onSearchChange(term);
6513
6870
  },
6514
6871
  [setSearchTerm, onSearchChange]
6515
6872
  );
6516
- const handleToggleFilterVisibility = (0, import_react64.useCallback)(
6873
+ const handleToggleFilterVisibility = (0, import_react71.useCallback)(
6517
6874
  (visible) => {
6518
6875
  if (alwaysVisible) {
6519
6876
  return;
@@ -6522,30 +6879,31 @@ var SearchAndFilterProvider = ({
6522
6879
  },
6523
6880
  [alwaysVisible]
6524
6881
  );
6525
- const handleAddFilter = (0, import_react64.useCallback)(() => {
6882
+ const handleAddFilter = (0, import_react71.useCallback)(() => {
6526
6883
  onChange([...filters, { field: "", operator: "", value: "" }]);
6527
6884
  }, [filters, onChange]);
6528
- const handleResetFilters = (0, import_react64.useCallback)(() => {
6885
+ const handleResetFilters = (0, import_react71.useCallback)(() => {
6886
+ setSearchTerm("");
6529
6887
  if (onResetFilterValues) {
6530
6888
  return onResetFilterValues();
6531
6889
  }
6532
6890
  onSearchChange == null ? void 0 : onSearchChange("");
6533
6891
  onChange(resetFilterValues);
6534
6892
  }, [onChange, resetFilterValues, onSearchChange, onResetFilterValues]);
6535
- const handleDeleteFilter = (0, import_react64.useCallback)(
6893
+ const handleDeleteFilter = (0, import_react71.useCallback)(
6536
6894
  (index) => {
6537
6895
  const remainingFilters = filters.filter((_, i) => i !== index);
6538
6896
  onChange(remainingFilters);
6539
6897
  },
6540
6898
  [filters, onChange]
6541
6899
  );
6542
- const validFilterQuery = (0, import_react64.useMemo)(() => {
6900
+ const validFilterQuery = (0, import_react71.useMemo)(() => {
6543
6901
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
6544
6902
  if (hasValidFilters) {
6545
6903
  return filters;
6546
6904
  }
6547
6905
  }, [filters]);
6548
- (0, import_react64.useEffect)(() => {
6906
+ (0, import_react71.useEffect)(() => {
6549
6907
  if (filterVisibility) {
6550
6908
  const handleEscKeyFilterClose = (e) => {
6551
6909
  if (e.key === "Escape") {
@@ -6558,7 +6916,7 @@ var SearchAndFilterProvider = ({
6558
6916
  };
6559
6917
  }
6560
6918
  }, [filterVisibility, handleToggleFilterVisibility]);
6561
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
6919
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6562
6920
  SearchAndFilterContext.Provider,
6563
6921
  {
6564
6922
  value: {
@@ -6574,20 +6932,21 @@ var SearchAndFilterProvider = ({
6574
6932
  filterOptions,
6575
6933
  validFilterQuery,
6576
6934
  totalResults,
6935
+ isLoading,
6577
6936
  filterMapper: filterMapper2,
6578
6937
  allowBindingSearchTerm
6579
6938
  },
6580
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.VerticalRhythm, { children })
6939
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_design_system44.VerticalRhythm, { children })
6581
6940
  }
6582
6941
  );
6583
6942
  };
6584
6943
  var useSearchAndFilter = () => {
6585
- const value = (0, import_react64.useContext)(SearchAndFilterContext);
6944
+ const value = (0, import_react71.useContext)(SearchAndFilterContext);
6586
6945
  return { ...value };
6587
6946
  };
6588
6947
 
6589
6948
  // src/components/SearchAndFilter/FilterControls.tsx
6590
- var import_jsx_runtime73 = require("@emotion/react/jsx-runtime");
6949
+ var import_jsx_runtime75 = require("@emotion/react/jsx-runtime");
6591
6950
  var FilterControls = ({
6592
6951
  children,
6593
6952
  hideSearchInput
@@ -6600,25 +6959,27 @@ var FilterControls = ({
6600
6959
  searchTerm,
6601
6960
  allowBindingSearchTerm
6602
6961
  } = useSearchAndFilter();
6603
- const editorRef = (0, import_react65.useRef)(null);
6962
+ const editorRef = (0, import_react72.useRef)(null);
6604
6963
  const variableRefernceCountInSearchTerm = (0, import_canvas10.hasReferencedVariables)(searchTerm);
6605
- const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react65.useState)("data-resource-search-term-input");
6606
- const [localSearchTerm, setLocalSearchTerm] = (0, import_react65.useState)(searchTerm);
6964
+ const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react72.useState)("data-resource-search-term-input");
6965
+ const [localSearchTerm, setLocalSearchTerm] = (0, import_react72.useState)(searchTerm);
6607
6966
  (0, import_react_use7.useDebounce)(
6608
6967
  () => {
6609
- setSearchTerm(localSearchTerm);
6968
+ if (localSearchTerm !== searchTerm) {
6969
+ setSearchTerm(localSearchTerm);
6970
+ }
6610
6971
  },
6611
6972
  300,
6612
6973
  [localSearchTerm]
6613
6974
  );
6614
- (0, import_react65.useEffect)(() => {
6975
+ (0, import_react72.useEffect)(() => {
6615
6976
  if (searchTerm === "") {
6616
6977
  setLocalSearchTerm("");
6617
6978
  setIdToResetInputVariables(`data-resource-search-term-input-${(0, import_uuid2.v4)()}`);
6618
6979
  }
6619
6980
  }, [searchTerm]);
6620
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
6621
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6981
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
6982
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6622
6983
  FilterButton2,
6623
6984
  {
6624
6985
  "aria-controls": "search-and-filter-options",
@@ -6631,8 +6992,8 @@ var FilterControls = ({
6631
6992
  dataTestId: "filters-button"
6632
6993
  }
6633
6994
  ),
6634
- hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6635
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6995
+ hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6996
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6636
6997
  InputVariables,
6637
6998
  {
6638
6999
  label: "",
@@ -6642,8 +7003,8 @@ var FilterControls = ({
6642
7003
  value: localSearchTerm,
6643
7004
  onChange: (value) => setLocalSearchTerm(value != null ? value : ""),
6644
7005
  disableVariables: !allowBindingSearchTerm,
6645
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6646
- import_design_system44.InputKeywordSearch,
7006
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7007
+ import_design_system45.InputKeywordSearch,
6647
7008
  {
6648
7009
  placeholder: "Search...",
6649
7010
  onSearchTextChanged: (e) => setLocalSearchTerm(e),
@@ -6661,7 +7022,7 @@ var FilterControls = ({
6661
7022
  )
6662
7023
  }
6663
7024
  ),
6664
- variableRefernceCountInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
7025
+ variableRefernceCountInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6665
7026
  "button",
6666
7027
  {
6667
7028
  css: ClearSearchButtonStyles,
@@ -6675,7 +7036,7 @@ var FilterControls = ({
6675
7036
  },
6676
7037
  type: "button",
6677
7038
  "data-testid": "keyword-search-clear-button",
6678
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_design_system44.Icon, { icon: import_CgClose.CgClose, iconColor: "red", size: "1rem" })
7039
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_design_system45.Icon, { icon: import_CgClose.CgClose, iconColor: "red", size: "1rem" })
6679
7040
  }
6680
7041
  ) }) : null
6681
7042
  ] }),
@@ -6685,8 +7046,8 @@ var FilterControls = ({
6685
7046
 
6686
7047
  // src/components/SearchAndFilter/FilterItem.tsx
6687
7048
  var import_CgTrash2 = require("@react-icons/all-files/cg/CgTrash");
6688
- var import_design_system45 = require("@uniformdev/design-system");
6689
- var import_react66 = require("react");
7049
+ var import_design_system46 = require("@uniformdev/design-system");
7050
+ var import_react73 = require("react");
6690
7051
 
6691
7052
  // src/components/SearchAndFilter/util/isFilterBindable.ts
6692
7053
  function isFilterBindable(filter, operator) {
@@ -6695,7 +7056,7 @@ function isFilterBindable(filter, operator) {
6695
7056
  }
6696
7057
 
6697
7058
  // src/components/SearchAndFilter/FilterItem.tsx
6698
- var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
7059
+ var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
6699
7060
  var FilterItem = ({
6700
7061
  index,
6701
7062
  operatorOptions,
@@ -6705,7 +7066,8 @@ var FilterItem = ({
6705
7066
  onOperatorChange,
6706
7067
  onValueChange,
6707
7068
  initialCriteriaTitle = "Where",
6708
- criteriaGroupOperator = "and"
7069
+ criteriaGroupOperator = "and",
7070
+ onCriteriaGroupOperatorChange
6709
7071
  }) => {
6710
7072
  var _a, _b;
6711
7073
  const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
@@ -6713,7 +7075,7 @@ var FilterItem = ({
6713
7075
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
6714
7076
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
6715
7077
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
6716
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react66.useMemo)(() => {
7078
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react73.useMemo)(() => {
6717
7079
  var _a2;
6718
7080
  const currentSelectedFilterGroup = filterOptions.find((item) => {
6719
7081
  var _a3;
@@ -6743,10 +7105,47 @@ var FilterItem = ({
6743
7105
  } : {};
6744
7106
  const CustomLeftHandComponent = selectedFieldValue == null ? void 0 : selectedFieldValue.leftHandSideComponentWhenSelected;
6745
7107
  const isEmptyOperator = metaDataPossibleOptions === "empty";
6746
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
6747
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: index === 0 ? initialCriteriaTitle : criteriaGroupOperator }),
6748
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
6749
- CustomLeftHandComponent ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7108
+ const joinLabel = index === 0 ? initialCriteriaTitle : index === 1 && onCriteriaGroupOperatorChange ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7109
+ import_design_system46.Menu,
7110
+ {
7111
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7112
+ import_design_system46.DropdownStyleMenuTrigger,
7113
+ {
7114
+ bgColor: "transparent",
7115
+ css: CriteriaGroupOperatorTrigger,
7116
+ "data-testid": "criteria-group-operator",
7117
+ "aria-label": "criteria group operator",
7118
+ children: criteriaGroupOperator
7119
+ }
7120
+ ),
7121
+ size: "small",
7122
+ placement: "bottom-start",
7123
+ children: [
7124
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7125
+ import_design_system46.SelectableMenuItem,
7126
+ {
7127
+ selected: criteriaGroupOperator === "and",
7128
+ onClick: () => onCriteriaGroupOperatorChange("and"),
7129
+ "data-testid": "criteria-group-operator-and",
7130
+ children: "and"
7131
+ }
7132
+ ),
7133
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7134
+ import_design_system46.SelectableMenuItem,
7135
+ {
7136
+ selected: criteriaGroupOperator === "or",
7137
+ onClick: () => onCriteriaGroupOperatorChange("or"),
7138
+ "data-testid": "criteria-group-operator-or",
7139
+ children: "or"
7140
+ }
7141
+ )
7142
+ ]
7143
+ }
7144
+ ) : criteriaGroupOperator;
7145
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
7146
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: joinLabel }),
7147
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
7148
+ CustomLeftHandComponent ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6750
7149
  CustomLeftHandComponent,
6751
7150
  {
6752
7151
  filterOption: selectedFieldValue,
@@ -6756,8 +7155,8 @@ var FilterItem = ({
6756
7155
  onFilterOptionChange("");
6757
7156
  }
6758
7157
  }
6759
- ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6760
- import_design_system45.InputComboBox,
7158
+ ) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7159
+ import_design_system46.InputComboBox,
6761
7160
  {
6762
7161
  "aria-label": label,
6763
7162
  options: filterOptions,
@@ -6783,8 +7182,8 @@ var FilterItem = ({
6783
7182
  name: `filter-field-${index}`
6784
7183
  }
6785
7184
  ),
6786
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6787
- import_design_system45.InputComboBox,
7185
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7186
+ import_design_system46.InputComboBox,
6788
7187
  {
6789
7188
  "aria-label": operatorLabel,
6790
7189
  options: operatorOptions,
@@ -6807,7 +7206,7 @@ var FilterItem = ({
6807
7206
  name: `filter-operator-${index}`
6808
7207
  }
6809
7208
  ),
6810
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7209
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6811
7210
  FilterEditorRenderer,
6812
7211
  {
6813
7212
  "aria-label": metaDataLabel,
@@ -6822,7 +7221,7 @@ var FilterItem = ({
6822
7221
  filterFieldName: filters[index].field
6823
7222
  }
6824
7223
  ),
6825
- readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7224
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6826
7225
  "button",
6827
7226
  {
6828
7227
  type: "button",
@@ -6831,7 +7230,7 @@ var FilterItem = ({
6831
7230
  css: IconBtn,
6832
7231
  "data-testid": "delete-filter",
6833
7232
  disabled: filters.length === 1,
6834
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_design_system45.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
7233
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_design_system46.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
6835
7234
  }
6836
7235
  )
6837
7236
  ] })
@@ -6840,21 +7239,21 @@ var FilterItem = ({
6840
7239
 
6841
7240
  // src/components/SearchAndFilter/FilterItems.tsx
6842
7241
  var import_CgMathPlus = require("@react-icons/all-files/cg/CgMathPlus");
6843
- var import_design_system47 = require("@uniformdev/design-system");
7242
+ var import_design_system48 = require("@uniformdev/design-system");
6844
7243
 
6845
7244
  // src/components/SearchAndFilter/FilterMenu.tsx
6846
- var import_design_system46 = require("@uniformdev/design-system");
6847
- var import_react67 = __toESM(require("react"));
6848
- var import_jsx_runtime75 = require("@emotion/react/jsx-runtime");
7245
+ var import_design_system47 = require("@uniformdev/design-system");
7246
+ var import_react74 = __toESM(require("react"));
7247
+ var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
6849
7248
  var SearchAndFilterOptionsContainer2 = ({
6850
7249
  buttonRow,
6851
7250
  additionalFiltersContainer,
6852
7251
  children
6853
7252
  }) => {
6854
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
6855
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
6856
- buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6857
- import_design_system46.HorizontalRhythm,
7253
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
7254
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
7255
+ buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7256
+ import_design_system47.HorizontalRhythm,
6858
7257
  {
6859
7258
  css: SearchAndFilterButtonGroup,
6860
7259
  gap: "sm",
@@ -6863,7 +7262,7 @@ var SearchAndFilterOptionsContainer2 = ({
6863
7262
  children: buttonRow
6864
7263
  }
6865
7264
  ) : null,
6866
- additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
7265
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
6867
7266
  ] });
6868
7267
  };
6869
7268
  var FilterMenu = ({
@@ -6876,22 +7275,22 @@ var FilterMenu = ({
6876
7275
  resetButtonText = "reset"
6877
7276
  }) => {
6878
7277
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6879
- const innerMenuRef = import_react67.default.useRef(null);
6880
- (0, import_react67.useEffect)(() => {
7278
+ const innerMenuRef = import_react74.default.useRef(null);
7279
+ (0, import_react74.useEffect)(() => {
6881
7280
  var _a;
6882
7281
  if (filterVisibility) {
6883
7282
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
6884
7283
  }
6885
7284
  }, [filterVisibility]);
6886
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_design_system46.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
7285
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system47.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
6887
7286
  SearchAndFilterOptionsContainer2,
6888
7287
  {
6889
7288
  buttonRow: menuControls,
6890
7289
  additionalFiltersContainer,
6891
7290
  children: [
6892
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_design_system46.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
6893
- filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
6894
- (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7291
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system47.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
7292
+ filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
7293
+ (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
6895
7294
  "button",
6896
7295
  {
6897
7296
  type: "button",
@@ -7002,14 +7401,15 @@ function hasBindings(currentValue) {
7002
7401
  }
7003
7402
 
7004
7403
  // src/components/SearchAndFilter/FilterItems.tsx
7005
- var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
7404
+ var import_jsx_runtime78 = require("@emotion/react/jsx-runtime");
7006
7405
  var FilterItems = ({
7007
7406
  addButtonText = "add condition",
7008
7407
  additionalFiltersContainer,
7009
7408
  filterTitle,
7010
7409
  resetButtonText,
7011
7410
  initialCriteriaTitle,
7012
- criteriaGroupOperator
7411
+ criteriaGroupOperator,
7412
+ onCriteriaGroupOperatorChange
7013
7413
  }) => {
7014
7414
  const { filterOptions, filters, setFilters, handleAddFilter } = useSearchAndFilter();
7015
7415
  const handleUpdateFilter = (index, prop, value) => {
@@ -7018,7 +7418,7 @@ var FilterItems = ({
7018
7418
  next[index] = { ...next[index], [prop]: value };
7019
7419
  if (prop === "operator") {
7020
7420
  const newOperatorId = value;
7021
- const currentFilter = next[index];
7421
+ const currentFilter = filters[index];
7022
7422
  if (!newOperatorId) {
7023
7423
  throw new Error("you bad");
7024
7424
  }
@@ -7039,12 +7439,12 @@ var FilterItems = ({
7039
7439
  }
7040
7440
  setFilters(next);
7041
7441
  };
7042
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7442
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7043
7443
  FilterMenu,
7044
7444
  {
7045
7445
  id: "search-and-filter-options",
7046
7446
  dataTestId: "search-and-filter-options",
7047
- menuControls: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7447
+ menuControls: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
7048
7448
  "button",
7049
7449
  {
7050
7450
  type: "button",
@@ -7052,7 +7452,7 @@ var FilterItems = ({
7052
7452
  onClick: handleAddFilter,
7053
7453
  "data-testid": "add-filter",
7054
7454
  children: [
7055
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_design_system47.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7455
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_design_system48.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7056
7456
  addButtonText
7057
7457
  ]
7058
7458
  }
@@ -7068,7 +7468,7 @@ var FilterItems = ({
7068
7468
  })) == null ? void 0 : _a.options) != null ? _b : [];
7069
7469
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
7070
7470
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
7071
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7471
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7072
7472
  FilterItem,
7073
7473
  {
7074
7474
  index: i,
@@ -7079,7 +7479,8 @@ var FilterItems = ({
7079
7479
  onFilterDynamicChange: (e) => handleUpdateFilter(i, "dynamicField", e),
7080
7480
  valueOptions: possibleValueOptions,
7081
7481
  initialCriteriaTitle,
7082
- criteriaGroupOperator
7482
+ criteriaGroupOperator,
7483
+ onCriteriaGroupOperatorChange
7083
7484
  },
7084
7485
  i
7085
7486
  );
@@ -7089,11 +7490,11 @@ var FilterItems = ({
7089
7490
  };
7090
7491
 
7091
7492
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7092
- var import_design_system49 = require("@uniformdev/design-system");
7493
+ var import_design_system50 = require("@uniformdev/design-system");
7093
7494
 
7094
7495
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
7095
- var import_design_system48 = require("@uniformdev/design-system");
7096
- var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
7496
+ var import_design_system49 = require("@uniformdev/design-system");
7497
+ var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
7097
7498
  var SearchAndFilterResultContainer = ({
7098
7499
  buttonText,
7099
7500
  clearButtonLabel = "clear",
@@ -7102,7 +7503,7 @@ var SearchAndFilterResultContainer = ({
7102
7503
  onHandleClear,
7103
7504
  hideClearButton
7104
7505
  }) => {
7105
- const { searchTerm, totalResults, filters, handleResetFilters, setSearchTerm } = useSearchAndFilter();
7506
+ const { searchTerm, totalResults, filters, handleResetFilters, setSearchTerm, isLoading } = useSearchAndFilter();
7106
7507
  const emptyFilters = filters.length === 0 || filters.every((filter) => !filter.value);
7107
7508
  const getTextValue = ({
7108
7509
  defaultPropText,
@@ -7133,7 +7534,7 @@ var SearchAndFilterResultContainer = ({
7133
7534
  filterText: "No results match the selected filters",
7134
7535
  fallbackText: "No matching results found"
7135
7536
  });
7136
- if (totalResults && totalResults > 0) {
7537
+ if (isLoading || totalResults === void 0 || totalResults > 0) {
7137
7538
  return null;
7138
7539
  }
7139
7540
  const handleClearSearch = () => {
@@ -7144,19 +7545,19 @@ var SearchAndFilterResultContainer = ({
7144
7545
  handleResetFilters();
7145
7546
  }
7146
7547
  };
7147
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
7148
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system48.HorizontalRhythm, { children: [
7149
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { children: [
7548
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7549
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.HorizontalRhythm, { children: [
7550
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { children: [
7150
7551
  totalResults,
7151
7552
  " results ",
7152
7553
  searchTerm ? `for "${searchTerm}"` : null
7153
7554
  ] }),
7154
- !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system48.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7555
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7155
7556
  ] }),
7156
- totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system48.Callout, { title: automateCalloutTitle, type: "note", children: [
7157
- calloutText ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system48.Paragraph, { children: calloutText }) : null,
7158
- hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7159
- import_design_system48.Button,
7557
+ totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.Callout, { title: automateCalloutTitle, type: "note", children: [
7558
+ calloutText ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Paragraph, { children: calloutText }) : null,
7559
+ hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7560
+ import_design_system49.Button,
7160
7561
  {
7161
7562
  buttonType: "tertiaryOutline",
7162
7563
  size: "xs",
@@ -7170,25 +7571,26 @@ var SearchAndFilterResultContainer = ({
7170
7571
  };
7171
7572
 
7172
7573
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7173
- var import_jsx_runtime78 = require("@emotion/react/jsx-runtime");
7574
+ var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
7174
7575
  var SearchAndFilter = ({
7175
7576
  filters,
7176
7577
  filterOptions,
7177
7578
  filterVisible,
7178
7579
  filterControls,
7179
7580
  viewSwitchControls,
7180
- resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SearchAndFilterResultContainer, {}),
7581
+ resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SearchAndFilterResultContainer, {}),
7181
7582
  filterMapper: filterMapper2 = filterMapper,
7182
7583
  additionalFiltersContainer,
7183
7584
  onChange,
7184
7585
  defaultSearchTerm,
7185
7586
  onSearchChange,
7186
7587
  totalResults,
7588
+ isLoading,
7187
7589
  allowBindingSearchTerm = false,
7188
7590
  resetFilterValues = [],
7189
7591
  onResetFilterValues
7190
7592
  }) => {
7191
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7593
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7192
7594
  SearchAndFilterProvider,
7193
7595
  {
7194
7596
  filters,
@@ -7198,22 +7600,23 @@ var SearchAndFilter = ({
7198
7600
  defaultSearchTerm,
7199
7601
  onSearchChange,
7200
7602
  totalResults,
7603
+ isLoading,
7201
7604
  resetFilterValues,
7202
7605
  filterMapper: filterMapper2,
7203
7606
  allowBindingSearchTerm,
7204
7607
  onResetFilterValues,
7205
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_design_system49.VerticalRhythm, { "data-testid": "search-and-filter", children: [
7206
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7207
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7608
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_design_system50.VerticalRhythm, { "data-testid": "search-and-filter", children: [
7609
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7610
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7208
7611
  "div",
7209
7612
  {
7210
7613
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
7211
- children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7614
+ children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7212
7615
  }
7213
7616
  ),
7214
7617
  viewSwitchControls
7215
7618
  ] }),
7216
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FilterItems, { additionalFiltersContainer }),
7619
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FilterItems, { additionalFiltersContainer }),
7217
7620
  resultsContainerView
7218
7621
  ] })
7219
7622
  }
@@ -7221,18 +7624,18 @@ var SearchAndFilter = ({
7221
7624
  };
7222
7625
 
7223
7626
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
7224
- var import_design_system50 = require("@uniformdev/design-system");
7225
- var import_react68 = require("react");
7627
+ var import_design_system51 = require("@uniformdev/design-system");
7628
+ var import_react75 = require("react");
7226
7629
  var import_react_use8 = require("react-use");
7227
- var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
7228
- var SearchOnlyContext = (0, import_react68.createContext)({
7630
+ var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
7631
+ var SearchOnlyContext = (0, import_react75.createContext)({
7229
7632
  searchTerm: "",
7230
7633
  setSearchTerm: () => {
7231
7634
  }
7232
7635
  });
7233
7636
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7234
7637
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
7235
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react68.useState)("");
7638
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react75.useState)("");
7236
7639
  (0, import_react_use8.useDebounce)(
7237
7640
  () => {
7238
7641
  setSearchTerm(localeSearchTerm);
@@ -7241,15 +7644,15 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7241
7644
  300,
7242
7645
  [localeSearchTerm]
7243
7646
  );
7244
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7647
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7245
7648
  SearchOnlyContext.Provider,
7246
7649
  {
7247
7650
  value: {
7248
7651
  searchTerm,
7249
7652
  setSearchTerm: setLocaleSearchTerm
7250
7653
  },
7251
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7252
- import_design_system50.InputKeywordSearch,
7654
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7655
+ import_design_system51.InputKeywordSearch,
7253
7656
  {
7254
7657
  placeholder: "Search...",
7255
7658
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -7263,18 +7666,18 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7263
7666
  };
7264
7667
 
7265
7668
  // src/components/SearchAndFilter/SortItems.tsx
7266
- var import_design_system52 = require("@uniformdev/design-system");
7669
+ var import_design_system53 = require("@uniformdev/design-system");
7267
7670
 
7268
7671
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
7269
- var import_react69 = require("@emotion/react");
7270
- var import_design_system51 = require("@uniformdev/design-system");
7271
- var ConditionalFilterRow2 = import_react69.css`
7672
+ var import_react76 = require("@emotion/react");
7673
+ var import_design_system52 = require("@uniformdev/design-system");
7674
+ var ConditionalFilterRow2 = import_react76.css`
7272
7675
  display: grid;
7273
7676
  grid-template-columns: 35px 1fr;
7274
7677
  gap: var(--spacing-sm);
7275
7678
  margin-left: var(--spacing-base);
7276
7679
 
7277
- ${(0, import_design_system51.cq)("380px")} {
7680
+ ${(0, import_design_system52.cq)("380px")} {
7278
7681
  align-items: center;
7279
7682
 
7280
7683
  &:after {
@@ -7295,22 +7698,22 @@ var ConditionalFilterRow2 = import_react69.css`
7295
7698
  grid-template-columns: 50px 1fr;
7296
7699
  }
7297
7700
 
7298
- ${(0, import_design_system51.cq)("580px")} {
7701
+ ${(0, import_design_system52.cq)("580px")} {
7299
7702
  &:after {
7300
7703
  display: none;
7301
7704
  }
7302
7705
  }
7303
7706
 
7304
7707
  @media (prefers-reduced-motion: no-preference) {
7305
- animation: ${import_design_system51.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
7708
+ animation: ${import_design_system52.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
7306
7709
  }
7307
7710
  `;
7308
- var ConditionalInputRow2 = import_react69.css`
7711
+ var ConditionalInputRow2 = import_react76.css`
7309
7712
  display: flex;
7310
7713
  gap: var(--spacing-sm);
7311
7714
  flex-wrap: wrap;
7312
7715
 
7313
- ${(0, import_design_system51.cq)("380px")} {
7716
+ ${(0, import_design_system52.cq)("380px")} {
7314
7717
  & > div:nth-child(-n + 2) {
7315
7718
  width: calc(50% - var(--spacing-sm));
7316
7719
  }
@@ -7319,7 +7722,7 @@ var ConditionalInputRow2 = import_react69.css`
7319
7722
  width: calc(100% - 48px);
7320
7723
  }
7321
7724
  }
7322
- ${(0, import_design_system51.cq)("580px")} {
7725
+ ${(0, import_design_system52.cq)("580px")} {
7323
7726
  display: grid;
7324
7727
  grid-template-columns: 200px 160px 1fr 32px;
7325
7728
 
@@ -7328,11 +7731,13 @@ var ConditionalInputRow2 = import_react69.css`
7328
7731
  }
7329
7732
  }
7330
7733
  `;
7331
- var SearchInput2 = import_react69.css`
7332
- max-height: 40px;
7333
- min-height: unset;
7734
+ var SearchInput2 = import_react76.css`
7735
+ && {
7736
+ max-height: 40px;
7737
+ min-height: unset;
7738
+ }
7334
7739
  `;
7335
- var FilterButton3 = import_react69.css`
7740
+ var FilterButton3 = import_react76.css`
7336
7741
  align-items: center;
7337
7742
  background: var(--white);
7338
7743
  border: 1px solid var(--gray-300);
@@ -7369,13 +7774,13 @@ var FilterButton3 = import_react69.css`
7369
7774
  opacity: var(--opacity-50);
7370
7775
  }
7371
7776
  `;
7372
- var FilterButtonText2 = import_react69.css`
7777
+ var FilterButtonText2 = import_react76.css`
7373
7778
  overflow: hidden;
7374
7779
  text-overflow: ellipsis;
7375
7780
  white-space: nowrap;
7376
7781
  max-width: 14ch;
7377
7782
  `;
7378
- var FilterButtonSelected2 = import_react69.css`
7783
+ var FilterButtonSelected2 = import_react76.css`
7379
7784
  background: var(--gray-100);
7380
7785
  border-color: var(--gray-300);
7381
7786
 
@@ -7383,7 +7788,7 @@ var FilterButtonSelected2 = import_react69.css`
7383
7788
  color: var(--accent-dark);
7384
7789
  }
7385
7790
  `;
7386
- var FilterButtonWithOptions2 = import_react69.css`
7791
+ var FilterButtonWithOptions2 = import_react76.css`
7387
7792
  :where([aria-expanded='true']) {
7388
7793
  background: var(--purple-rain-100);
7389
7794
  border-color: var(--accent-light);
@@ -7395,14 +7800,14 @@ var FilterButtonWithOptions2 = import_react69.css`
7395
7800
  }
7396
7801
  }
7397
7802
  `;
7398
- var SearchIcon2 = import_react69.css`
7803
+ var SearchIcon2 = import_react76.css`
7399
7804
  color: var(--icon-color);
7400
7805
  position: absolute;
7401
7806
  inset: 0 var(--spacing-base) 0 auto;
7402
7807
  margin: auto;
7403
7808
  transition: color var(--duration-fast) var(--timing-ease-out);
7404
7809
  `;
7405
- var AddConditionalBtn2 = import_react69.css`
7810
+ var AddConditionalBtn2 = import_react76.css`
7406
7811
  align-items: center;
7407
7812
  background: transparent;
7408
7813
  border: none;
@@ -7421,14 +7826,14 @@ var AddConditionalBtn2 = import_react69.css`
7421
7826
  color: var(--gray-400);
7422
7827
  }
7423
7828
  `;
7424
- var Title2 = import_react69.css`
7829
+ var Title2 = import_react76.css`
7425
7830
  color: var(--typography-light);
7426
7831
 
7427
7832
  &:focus {
7428
7833
  outline: none;
7429
7834
  }
7430
7835
  `;
7431
- var ResetConditionsBtn2 = import_react69.css`
7836
+ var ResetConditionsBtn2 = import_react76.css`
7432
7837
  background: transparent;
7433
7838
  border: none;
7434
7839
  color: var(--action-destructive-default);
@@ -7440,12 +7845,12 @@ var ResetConditionsBtn2 = import_react69.css`
7440
7845
  color: var(--action-destructive-hover);
7441
7846
  }
7442
7847
  `;
7443
- var IconBtn2 = import_react69.css`
7848
+ var IconBtn2 = import_react76.css`
7444
7849
  background: transparent;
7445
7850
  border: none;
7446
7851
  padding: var(--spacing-sm);
7447
7852
  `;
7448
- var SearchAndFilterOptionsContainer3 = import_react69.css`
7853
+ var SearchAndFilterOptionsContainer3 = import_react76.css`
7449
7854
  background: var(--gray-50);
7450
7855
  border: 1px solid var(--gray-300);
7451
7856
  border-radius: var(--rounded-base);
@@ -7458,34 +7863,34 @@ var SearchAndFilterOptionsContainer3 = import_react69.css`
7458
7863
  position: relative;
7459
7864
  z-index: 1;
7460
7865
  `;
7461
- var SearchAndFilterOptionsInnerContainer2 = import_react69.css`
7866
+ var SearchAndFilterOptionsInnerContainer2 = import_react76.css`
7462
7867
  display: flex;
7463
7868
  flex-direction: column;
7464
7869
  gap: var(--spacing-sm);
7465
7870
  padding-inline: var(--spacing-md);
7466
7871
  `;
7467
- var SearchAndFilterButtonGroup2 = import_react69.css`
7872
+ var SearchAndFilterButtonGroup2 = import_react76.css`
7468
7873
  margin-top: var(--spacing-xs);
7469
7874
  margin-left: calc(56px + var(--spacing-md));
7470
7875
  `;
7471
- var SortFilterWrapper = (hiddenLocaleInput) => import_react69.css`
7876
+ var SortFilterWrapper = (hiddenLocaleInput) => import_react76.css`
7472
7877
  align-items: center;
7473
7878
  display: flex;
7474
7879
  gap: var(--spacing-base);
7475
7880
  flex-grow: 1;
7476
7881
 
7477
- ${(0, import_design_system51.cq)("420px")} {
7882
+ ${(0, import_design_system52.cq)("420px")} {
7478
7883
  display: grid;
7479
7884
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
7480
7885
  }
7481
7886
  `;
7482
- var SortFilterInputRow = import_react69.css`
7887
+ var SortFilterInputRow = import_react76.css`
7483
7888
  align-items: center;
7484
7889
  display: grid;
7485
7890
  grid-template-columns: 1fr auto;
7486
7891
  gap: var(--spacing-base);
7487
7892
  `;
7488
- var InputVariableWrapper = import_react69.css`
7893
+ var InputVariableWrapper = import_react76.css`
7489
7894
  flex-grow: 1;
7490
7895
 
7491
7896
  // we need to override label styles nested within the input variable
@@ -7496,7 +7901,7 @@ var InputVariableWrapper = import_react69.css`
7496
7901
  `;
7497
7902
 
7498
7903
  // src/components/SearchAndFilter/SortItems.tsx
7499
- var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
7904
+ var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
7500
7905
  var SortItems = ({
7501
7906
  sortByLabel = "Sort by",
7502
7907
  localeLabel = "Show locale",
@@ -7518,11 +7923,11 @@ var SortItems = ({
7518
7923
  return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
7519
7924
  })) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
7520
7925
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
7521
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7522
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_design_system52.VerticalRhythm, { gap: "xs", children: [
7523
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { css: Title2, children: sortByLabel }),
7524
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: SortFilterInputRow, children: [
7525
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7926
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7927
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_design_system53.VerticalRhythm, { gap: "xs", children: [
7928
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { css: Title2, children: sortByLabel }),
7929
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: SortFilterInputRow, children: [
7930
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7526
7931
  InputVariables,
7527
7932
  {
7528
7933
  disableInlineMenu: disableSortBinding,
@@ -7530,8 +7935,8 @@ var SortItems = ({
7530
7935
  value: sortField,
7531
7936
  valueToResetTo: "created_at",
7532
7937
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
7533
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7534
- import_design_system52.InputComboBox,
7938
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7939
+ import_design_system53.InputComboBox,
7535
7940
  {
7536
7941
  id: "sort-by-field",
7537
7942
  "aria-label": "Sort by",
@@ -7553,7 +7958,7 @@ var SortItems = ({
7553
7958
  )
7554
7959
  }
7555
7960
  ),
7556
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7961
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7557
7962
  InputVariables,
7558
7963
  {
7559
7964
  disableInlineMenu: disableSortBinding,
@@ -7561,8 +7966,8 @@ var SortItems = ({
7561
7966
  valueToResetTo: "DESC",
7562
7967
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
7563
7968
  onChange: (e) => onSortChange(`${sortField}_${e}`),
7564
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7565
- import_design_system52.SegmentedControl,
7969
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7970
+ import_design_system53.SegmentedControl,
7566
7971
  {
7567
7972
  noCheckmark: true,
7568
7973
  name: "sortBy",
@@ -7593,15 +7998,15 @@ var SortItems = ({
7593
7998
  )
7594
7999
  ] })
7595
8000
  ] }),
7596
- hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system52.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8001
+ hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system53.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7597
8002
  InputVariables,
7598
8003
  {
7599
8004
  label: localeLabelValue,
7600
8005
  value: localeValue,
7601
8006
  showMenuPosition: "inline-right",
7602
8007
  onChange: (e) => onLocaleChange(e != null ? e : ""),
7603
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7604
- import_design_system52.InputSelect,
8008
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8009
+ import_design_system53.InputSelect,
7605
8010
  {
7606
8011
  name: "localeReturned",
7607
8012
  "aria-label": localeLabelValue,
@@ -7631,7 +8036,7 @@ function createLocationValidator(setValue, validate) {
7631
8036
 
7632
8037
  // src/utils/useContentDataResourceLocaleInfo.ts
7633
8038
  var import_canvas12 = require("@uniformdev/canvas");
7634
- var import_react70 = require("react");
8039
+ var import_react77 = require("react");
7635
8040
  function useContentDataResourceLocaleInfo({
7636
8041
  locale,
7637
8042
  defaultLocale,
@@ -7639,12 +8044,12 @@ function useContentDataResourceLocaleInfo({
7639
8044
  dynamicInputs
7640
8045
  }) {
7641
8046
  var _a;
7642
- const setLocaleRef = (0, import_react70.useRef)(setLocale);
8047
+ const setLocaleRef = (0, import_react77.useRef)(setLocale);
7643
8048
  setLocaleRef.current = setLocale;
7644
8049
  const { flatVariables } = useVariables();
7645
8050
  const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas12.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas12.createVariableReference)(import_canvas12.LOCALE_DYNAMIC_INPUT_NAME) : defaultLocale != null ? defaultLocale : "";
7646
8051
  const boundLocale = (_a = (0, import_canvas12.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7647
- (0, import_react70.useEffect)(() => {
8052
+ (0, import_react77.useEffect)(() => {
7648
8053
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7649
8054
  setLocaleRef.current(effectiveLocale);
7650
8055
  }
@@ -7653,8 +8058,8 @@ function useContentDataResourceLocaleInfo({
7653
8058
  }
7654
8059
 
7655
8060
  // src/index.ts
7656
- var import_design_system53 = require("@uniformdev/design-system");
7657
- __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
8061
+ var import_design_system54 = require("@uniformdev/design-system");
8062
+ __reExport(index_exports, require("@uniformdev/mesh-sdk"), module.exports);
7658
8063
  // Annotate the CommonJS export names for ESM import in node:
7659
8064
  0 && (module.exports = {
7660
8065
  $createVariableNode,
@@ -7675,6 +8080,10 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
7675
8080
  DataTypeEditor,
7676
8081
  DateEditor,
7677
8082
  DateRangeEditor,
8083
+ DelegationContext,
8084
+ DelegationDisabledError,
8085
+ DelegationGate,
8086
+ DelegationProvider,
7678
8087
  DrawerContent,
7679
8088
  EDIT_VARIABLE_COMMAND,
7680
8089
  FilterButton,
@@ -7776,8 +8185,10 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
7776
8185
  VariablesProvider,
7777
8186
  bindableFiltersMapper,
7778
8187
  convertConnectedDataToVariable,
8188
+ createDelegationFetch,
7779
8189
  createLocationValidator,
7780
8190
  filterMapper,
8191
+ isDelegationExpiredResponse,
7781
8192
  prettifyBindExpression,
7782
8193
  readOnlyAttributes,
7783
8194
  serializeVariablesEditorSerializedState,
@@ -7787,6 +8198,8 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
7787
8198
  urlEncodeRequestUrl,
7788
8199
  useConnectedDataAsVariables,
7789
8200
  useContentDataResourceLocaleInfo,
8201
+ useDelegation,
8202
+ useDelegationFetch,
7790
8203
  useDynamicInputsAsVariables,
7791
8204
  useMeshLocation,
7792
8205
  useObjectSearchContext,