@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.esm.js CHANGED
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  var __defProp = Object.defineProperty;
2
3
  var __export = (target, all) => {
3
4
  for (var name2 in all)
@@ -34,14 +35,14 @@ var SvgCaution = (props) => /* @__PURE__ */ jsx2(
34
35
  xmlns: "http://www.w3.org/2000/svg",
35
36
  width: "1em",
36
37
  height: "1em",
37
- viewBox: "0 0 16 16",
38
38
  fill: "currentColor",
39
+ viewBox: "0 0 16 16",
39
40
  ...props,
40
41
  children: /* @__PURE__ */ jsx2(
41
42
  "path",
42
43
  {
43
44
  fillRule: "evenodd",
44
- 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"
45
+ 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"
45
46
  }
46
47
  )
47
48
  }
@@ -53,18 +54,18 @@ import { jsx as jsx3 } from "@emotion/react/jsx-runtime";
53
54
  var SvgCheckmark = (props) => /* @__PURE__ */ jsx3(
54
55
  "svg",
55
56
  {
57
+ xmlns: "http://www.w3.org/2000/svg",
56
58
  width: "1em",
57
59
  height: "1em",
58
- viewBox: "0 0 40 40",
59
60
  fill: "currentColor",
60
- xmlns: "http://www.w3.org/2000/svg",
61
+ viewBox: "0 0 40 40",
61
62
  ...props,
62
63
  children: /* @__PURE__ */ jsx3(
63
64
  "path",
64
65
  {
65
66
  fillRule: "evenodd",
66
- clipRule: "evenodd",
67
- 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"
67
+ 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",
68
+ clipRule: "evenodd"
68
69
  }
69
70
  )
70
71
  }
@@ -73,7 +74,7 @@ var Checkmark_default = SvgCheckmark;
73
74
 
74
75
  // src/assets/icons/ChevronDown.tsx
75
76
  import { jsx as jsx4 } from "@emotion/react/jsx-runtime";
76
- var SvgChevronDown = (props) => /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ jsx4("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" }) });
77
+ var SvgChevronDown = (props) => /* @__PURE__ */ jsx4("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ jsx4("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" }) });
77
78
  var ChevronDown_default = SvgChevronDown;
78
79
 
79
80
  // src/assets/icons/Close.tsx
@@ -84,12 +85,12 @@ var SvgClose = (props) => /* @__PURE__ */ jsx5(
84
85
  xmlns: "http://www.w3.org/2000/svg",
85
86
  width: "1em",
86
87
  height: "1em",
87
- viewBox: "0 0 19 19",
88
88
  fill: "currentColor",
89
+ viewBox: "0 0 19 19",
89
90
  ...props,
90
91
  children: /* @__PURE__ */ jsxs("g", { fillRule: "evenodd", children: [
91
- /* @__PURE__ */ jsx5("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" }),
92
- /* @__PURE__ */ jsx5("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" })
92
+ /* @__PURE__ */ jsx5("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" }),
93
+ /* @__PURE__ */ jsx5("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" })
93
94
  ] })
94
95
  }
95
96
  );
@@ -103,14 +104,14 @@ var SvgDanger = (props) => /* @__PURE__ */ jsx6(
103
104
  xmlns: "http://www.w3.org/2000/svg",
104
105
  width: "1em",
105
106
  height: "1em",
106
- viewBox: "0 0 12 16",
107
107
  fill: "currentColor",
108
+ viewBox: "0 0 12 16",
108
109
  ...props,
109
110
  children: /* @__PURE__ */ jsx6(
110
111
  "path",
111
112
  {
112
113
  fillRule: "evenodd",
113
- 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"
114
+ 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"
114
115
  }
115
116
  )
116
117
  }
@@ -125,14 +126,14 @@ var SvgExclamationPoint = (props) => /* @__PURE__ */ jsx7(
125
126
  xmlns: "http://www.w3.org/2000/svg",
126
127
  width: "1em",
127
128
  height: "1em",
128
- viewBox: "0 0 14 16",
129
129
  fill: "currentColor",
130
+ viewBox: "0 0 14 16",
130
131
  ...props,
131
132
  children: /* @__PURE__ */ jsx7(
132
133
  "path",
133
134
  {
134
135
  fillRule: "evenodd",
135
- 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"
136
+ 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"
136
137
  }
137
138
  )
138
139
  }
@@ -146,7 +147,7 @@ var SvgInfo = (props) => /* @__PURE__ */ jsxs2("svg", { width: "1em", height: "1
146
147
  "path",
147
148
  {
148
149
  xmlns: "http://www.w3.org/2000/svg",
149
- 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"
150
+ 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"
150
151
  }
151
152
  ),
152
153
  /* @__PURE__ */ jsx8(
@@ -154,8 +155,8 @@ var SvgInfo = (props) => /* @__PURE__ */ jsxs2("svg", { width: "1em", height: "1
154
155
  {
155
156
  xmlns: "http://www.w3.org/2000/svg",
156
157
  fillRule: "evenodd",
157
- clipRule: "evenodd",
158
- 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"
158
+ 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",
159
+ clipRule: "evenodd"
159
160
  }
160
161
  )
161
162
  ] });
@@ -169,14 +170,14 @@ var SvgLightbulb = (props) => /* @__PURE__ */ jsx9(
169
170
  xmlns: "http://www.w3.org/2000/svg",
170
171
  width: "1em",
171
172
  height: "1em",
172
- viewBox: "0 0 12 16",
173
173
  fill: "currentColor",
174
+ viewBox: "0 0 12 16",
174
175
  ...props,
175
176
  children: /* @__PURE__ */ jsx9(
176
177
  "path",
177
178
  {
178
179
  fillRule: "evenodd",
179
- 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"
180
+ 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"
180
181
  }
181
182
  )
182
183
  }
@@ -188,18 +189,18 @@ import { jsx as jsx10, jsxs as jsxs3 } from "@emotion/react/jsx-runtime";
188
189
  var SvgMagnifyingGlass = (props) => /* @__PURE__ */ jsxs3(
189
190
  "svg",
190
191
  {
192
+ xmlns: "http://www.w3.org/2000/svg",
191
193
  width: "1em",
192
194
  height: "1em",
193
- viewBox: "0 0 26 24",
194
195
  fill: "currentColor",
195
- xmlns: "http://www.w3.org/2000/svg",
196
+ viewBox: "0 0 26 24",
196
197
  ...props,
197
198
  children: [
198
199
  /* @__PURE__ */ jsxs3("g", { clipPath: "url(#magnifying-glass_svg__a)", children: [
199
- /* @__PURE__ */ jsx10("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" }),
200
- /* @__PURE__ */ jsx10("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" })
200
+ /* @__PURE__ */ jsx10("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" }),
201
+ /* @__PURE__ */ jsx10("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" })
201
202
  ] }),
202
- /* @__PURE__ */ jsx10("defs", { children: /* @__PURE__ */ jsx10("clipPath", { id: "magnifying-glass_svg__a", children: /* @__PURE__ */ jsx10("path", { fill: "#fff", transform: "translate(.558)", d: "M0 0h24.935v24H0z" }) }) })
203
+ /* @__PURE__ */ jsx10("defs", { children: /* @__PURE__ */ jsx10("clipPath", { id: "magnifying-glass_svg__a", children: /* @__PURE__ */ jsx10("path", { fill: "#fff", d: "M.558 0h24.935v24H.558z" }) }) })
203
204
  ]
204
205
  }
205
206
  );
@@ -211,14 +212,14 @@ var SvgMaximizeAlt = (props) => /* @__PURE__ */ jsx11("svg", { width: "1em", hei
211
212
  "path",
212
213
  {
213
214
  xmlns: "http://www.w3.org/2000/svg",
214
- 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"
215
+ 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"
215
216
  }
216
217
  ) });
217
218
  var MaximizeAlt_default = SvgMaximizeAlt;
218
219
 
219
220
  // src/assets/icons/Minus.tsx
220
221
  import { jsx as jsx12 } from "@emotion/react/jsx-runtime";
221
- var SvgMinus = (props) => /* @__PURE__ */ jsx12("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx12("path", { d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z", fill: "currentColor" }) });
222
+ var SvgMinus = (props) => /* @__PURE__ */ jsx12("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", ...props, children: /* @__PURE__ */ jsx12("path", { fill: "currentColor", d: "M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1" }) });
222
223
  var Minus_default = SvgMinus;
223
224
 
224
225
  // src/assets/icons/MoreVerticalAlt.tsx
@@ -227,7 +228,7 @@ var SvgMoreVerticalAlt = (props) => /* @__PURE__ */ jsx13("svg", { width: "1em",
227
228
  "path",
228
229
  {
229
230
  xmlns: "http://www.w3.org/2000/svg",
230
- 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"
231
+ 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"
231
232
  }
232
233
  ) });
233
234
  var MoreVerticalAlt_default = SvgMoreVerticalAlt;
@@ -237,17 +238,51 @@ import { jsx as jsx14 } from "@emotion/react/jsx-runtime";
237
238
  var SvgPlus = (props) => /* @__PURE__ */ jsx14(
238
239
  "svg",
239
240
  {
241
+ xmlns: "http://www.w3.org/2000/svg",
240
242
  width: "1em",
241
243
  height: "1em",
242
- viewBox: "0 0 46 46",
243
244
  fill: "currentColor",
244
- xmlns: "http://www.w3.org/2000/svg",
245
+ viewBox: "0 0 46 46",
245
246
  ...props,
246
- children: /* @__PURE__ */ jsx14("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" })
247
+ children: /* @__PURE__ */ jsx14("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" })
247
248
  }
248
249
  );
249
250
  var Plus_default = SvgPlus;
250
251
 
252
+ // src/hooks/createDelegationFetch.ts
253
+ import { CSRF_HEADER_NAME, CSRF_HEADER_VALUE, DELEGATION_EXPIRED_CODE } from "@uniformdev/mesh-sdk";
254
+ async function isDelegationExpiredResponse(response) {
255
+ if (response.status !== 401) {
256
+ return false;
257
+ }
258
+ try {
259
+ const body = await response.clone().json();
260
+ return typeof body.code === "string" && body.code === DELEGATION_EXPIRED_CODE;
261
+ } catch (e) {
262
+ return false;
263
+ }
264
+ }
265
+ function createDelegationFetch(options) {
266
+ var _a, _b;
267
+ const fetchFn = (_a = options.fetch) != null ? _a : fetch;
268
+ const isExpired = (_b = options.isDelegationExpired) != null ? _b : isDelegationExpiredResponse;
269
+ return async (input3, init) => {
270
+ const headers = new Headers(init == null ? void 0 : init.headers);
271
+ headers.set(CSRF_HEADER_NAME, CSRF_HEADER_VALUE);
272
+ const initWithCsrf = { ...init, headers };
273
+ const response = await fetchFn(input3, initWithCsrf);
274
+ if (!await isExpired(response)) {
275
+ return response;
276
+ }
277
+ try {
278
+ await options.reacquire();
279
+ } catch (e) {
280
+ return response;
281
+ }
282
+ return fetchFn(input3, initWithCsrf);
283
+ };
284
+ }
285
+
251
286
  // src/hooks/useConnectedDataAsVariables.tsx
252
287
  import { useMemo } from "react";
253
288
  function useConnectedDataAsVariables(connectedData) {
@@ -266,12 +301,44 @@ function useConnectedDataAsVariables(connectedData) {
266
301
  );
267
302
  }
268
303
 
304
+ // src/hooks/useDelegation.ts
305
+ import { useContext } from "react";
306
+
307
+ // src/components/Delegation/DelegationContext.ts
308
+ import { createContext } from "react";
309
+ var DelegationContext = createContext(null);
310
+
311
+ // src/hooks/useDelegation.ts
312
+ function useDelegation() {
313
+ const ctx = useContext(DelegationContext);
314
+ if (!ctx) {
315
+ throw new Error("useDelegation must be used within a <DelegationProvider>");
316
+ }
317
+ return ctx;
318
+ }
319
+
320
+ // src/hooks/useDelegationFetch.ts
321
+ import { useMemo as useMemo2 } from "react";
322
+ function useDelegationFetch(options) {
323
+ const { reacquire } = useDelegation();
324
+ const fetchImpl = options == null ? void 0 : options.fetch;
325
+ const isDelegationExpired = options == null ? void 0 : options.isDelegationExpired;
326
+ return useMemo2(
327
+ () => createDelegationFetch({
328
+ reacquire,
329
+ fetch: fetchImpl,
330
+ isDelegationExpired
331
+ }),
332
+ [reacquire, fetchImpl, isDelegationExpired]
333
+ );
334
+ }
335
+
269
336
  // src/hooks/useDynamicInputsAsVariables.tsx
270
337
  import { LOCALE_DYNAMIC_INPUT_NAME } from "@uniformdev/canvas";
271
- import { useMemo as useMemo2 } from "react";
338
+ import { useMemo as useMemo3 } from "react";
272
339
  import { Fragment, jsx as jsx15 } from "@emotion/react/jsx-runtime";
273
340
  function useDynamicInputsAsVariables(dynamicInputs) {
274
- return useMemo2(() => {
341
+ return useMemo3(() => {
275
342
  const result = Object.entries(dynamicInputs).reduce(
276
343
  (acc, [name2, input3]) => {
277
344
  const source = `from ${name2 === LOCALE_DYNAMIC_INPUT_NAME ? "current locale" : input3.type === "path" ? "URL path" : "query string"}`;
@@ -306,18 +373,18 @@ Current preview value: ${input3.value || "not provided"}`
306
373
  }
307
374
 
308
375
  // src/hooks/useMeshLocation.ts
309
- import { useMemo as useMemo4, useRef } from "react";
376
+ import { useMemo as useMemo5, useRef } from "react";
310
377
 
311
378
  // src/components/UniformMeshLocationContext.tsx
312
- import { createContext as createContext2, useContext as useContext2, useMemo as useMemo3, useState } from "react";
379
+ import { createContext as createContext3, useContext as useContext3, useMemo as useMemo4, useState } from "react";
313
380
 
314
381
  // src/components/UniformMeshSdkContext.tsx
315
382
  import { Theme } from "@uniformdev/design-system";
316
- import { createContext, useContext } from "react";
383
+ import { createContext as createContext2, useContext as useContext2 } from "react";
317
384
  import { jsx as jsx16, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
318
- var UniformMeshSdkContext = createContext(void 0);
385
+ var UniformMeshSdkContext = createContext2(void 0);
319
386
  var useUniformMeshSdkContext = () => {
320
- const context = useContext(UniformMeshSdkContext);
387
+ const context = useContext2(UniformMeshSdkContext);
321
388
  if (!context) {
322
389
  throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");
323
390
  }
@@ -332,13 +399,13 @@ function useUniformMeshSdk() {
332
399
 
333
400
  // src/components/UniformMeshLocationContext.tsx
334
401
  import { jsx as jsx17 } from "@emotion/react/jsx-runtime";
335
- var UniformMeshLocationContext = createContext2(void 0);
402
+ var UniformMeshLocationContext = createContext3(void 0);
336
403
  var UniformMeshLocationContextProvider = ({
337
404
  children
338
405
  }) => {
339
406
  const sdk = useUniformMeshSdk();
340
407
  const [location, setLocation] = useState(sdk.getCurrentLocation());
341
- useMemo3(() => {
408
+ useMemo4(() => {
342
409
  const valueChangeListener = (event) => {
343
410
  setLocation((old) => ({ ...old, value: event.newValue }));
344
411
  };
@@ -355,7 +422,7 @@ var UniformMeshLocationContextProvider = ({
355
422
  return /* @__PURE__ */ jsx17(UniformMeshLocationContext.Provider, { value: { location }, children });
356
423
  };
357
424
  var useUniformMeshLocationContext = () => {
358
- const context = useContext2(UniformMeshLocationContext);
425
+ const context = useContext3(UniformMeshLocationContext);
359
426
  if (!context) {
360
427
  throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");
361
428
  }
@@ -370,7 +437,7 @@ function useMeshLocation(expectedLocation) {
370
437
  }
371
438
  const backdoorLocation = useRef(location);
372
439
  backdoorLocation.current = location;
373
- const stabilizedSetValueProxy = useMemo4(
440
+ const stabilizedSetValueProxy = useMemo5(
374
441
  () => (dispatch) => {
375
442
  const { newValue, options } = dispatch(backdoorLocation.current.value);
376
443
  backdoorLocation.current.setValue(newValue, options);
@@ -502,7 +569,7 @@ function refreshVariableNodeMetadata(editor) {
502
569
 
503
570
  // src/components/Variables/util/setVariablesEditorValue.ts
504
571
  function setVariablesEditorValue(editor, newValue, tag) {
505
- if (typeof newValue === "undefined" || typeof newValue === "string") {
572
+ if (newValue === null || typeof newValue === "undefined" || typeof newValue === "string") {
506
573
  const parsedState = editor.parseEditorState(deserializeVariablesEditorState(newValue));
507
574
  editor.setEditorState(parsedState.clone(null), {
508
575
  tag
@@ -684,9 +751,10 @@ import {
684
751
  $isNodeSelection,
685
752
  $setSelection,
686
753
  COMMAND_PRIORITY_NORMAL,
687
- createCommand
754
+ createCommand,
755
+ SKIP_DOM_SELECTION_TAG
688
756
  } from "lexical";
689
- import { useCallback as useCallback2, useEffect as useEffect4, useMemo as useMemo6, useRef as useRef3, useState as useState4 } from "react";
757
+ import { useCallback as useCallback2, useEffect as useEffect4, useMemo as useMemo7, useRef as useRef3, useState as useState4 } from "react";
690
758
  import { createPortal } from "react-dom";
691
759
 
692
760
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
@@ -720,7 +788,7 @@ var variablesTipText = css`
720
788
 
721
789
  // src/components/Variables/VariablesProvider.tsx
722
790
  import mitt from "mitt";
723
- import { createContext as createContext3, useContext as useContext3, useEffect as useEffect3, useMemo as useMemo5, useState as useState3 } from "react";
791
+ import { createContext as createContext4, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo6, useState as useState3 } from "react";
724
792
 
725
793
  // src/components/Variables/util/useVariableEditTransaction.ts
726
794
  import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
@@ -770,11 +838,11 @@ function useVariableEditTransaction({
770
838
  }
771
839
 
772
840
  // src/components/Variables/VariableEditor.tsx
773
- import { zodResolver } from "@hookform/resolvers/zod";
841
+ import { standardSchemaResolver } from "@hookform/resolvers/standard-schema";
774
842
  import { Button, Callout, HorizontalRhythm, Input, useShortcut } from "@uniformdev/design-system";
775
843
  import { useLayoutEffect, useRef as useRef2 } from "react";
776
844
  import { useForm } from "react-hook-form";
777
- import * as z from "zod/v3";
845
+ import * as z from "zod";
778
846
 
779
847
  // src/components/Variables/styles/VariableEditor.styles.ts
780
848
  import { css as css2 } from "@emotion/react";
@@ -787,7 +855,7 @@ var variablesFormContainer = css2`
787
855
  // src/components/Variables/VariableEditor.tsx
788
856
  import { jsx as jsx19, jsxs as jsxs5 } from "@emotion/react/jsx-runtime";
789
857
  var schema = z.object({
790
- name: z.string().nonempty("Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
858
+ name: z.string().min(1, "Name can't be empty").regex(/^[^${}]+$/, "$, {, and } are reserved characters and cannot be used in a variable name"),
791
859
  default: z.string(),
792
860
  displayName: z.string().optional(),
793
861
  helpText: z.string().optional(),
@@ -813,7 +881,7 @@ function VariableEditor({
813
881
  order: currentVariable == null ? void 0 : currentVariable.order,
814
882
  type: (_d = currentVariable == null ? void 0 : currentVariable.type) != null ? _d : ""
815
883
  },
816
- resolver: zodResolver(schema)
884
+ resolver: standardSchemaResolver(schema)
817
885
  });
818
886
  const submitHandler = handleSubmit((values) => {
819
887
  const finalValue = {
@@ -909,7 +977,7 @@ function VariableEditor({
909
977
 
910
978
  // src/components/Variables/VariablesProvider.tsx
911
979
  import { jsx as jsx20, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
912
- var VariablesContext = createContext3(null);
980
+ var VariablesContext = createContext4(null);
913
981
  function VariablesProvider({
914
982
  value,
915
983
  onChange,
@@ -922,7 +990,7 @@ function VariablesProvider({
922
990
  }) {
923
991
  const [editing, setEditing] = useState3();
924
992
  const [editingContext, setEditingContext] = useState3();
925
- const events = useMemo5(
993
+ const events = useMemo6(
926
994
  () => mitt(),
927
995
  []
928
996
  );
@@ -930,7 +998,7 @@ function VariablesProvider({
930
998
  throw new Error("onChange must be provided when readOnly is false");
931
999
  }
932
1000
  const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
933
- const valueBasedContextValue = useMemo5(
1001
+ const valueBasedContextValue = useMemo6(
934
1002
  () => ({
935
1003
  flatVariables: flattenVariables(value),
936
1004
  dispatch: (event) => {
@@ -974,7 +1042,7 @@ function VariablesProvider({
974
1042
  isEditing: typeof editing !== "undefined",
975
1043
  variables: value
976
1044
  });
977
- const contextValue = useMemo5(() => {
1045
+ const contextValue = useMemo6(() => {
978
1046
  return {
979
1047
  ...valueBasedContextValue,
980
1048
  editVariableTxn,
@@ -1034,7 +1102,7 @@ function VariablesProvider({
1034
1102
  ] });
1035
1103
  }
1036
1104
  function useVariables(returnEmptyWithoutProvider = false) {
1037
- const context = useContext3(VariablesContext);
1105
+ const context = useContext4(VariablesContext);
1038
1106
  if (!context) {
1039
1107
  if (returnEmptyWithoutProvider) {
1040
1108
  return {
@@ -1146,6 +1214,11 @@ var DISCONNECT_VARIABLE_COMMAND = createCommand(
1146
1214
  "uniform:disconnect-variable"
1147
1215
  );
1148
1216
  var INSERT_VARIABLE_COMMAND = createCommand("uniform:insert-variable");
1217
+ function isEditorFocused(editor) {
1218
+ var _a;
1219
+ const rootElement = editor.getRootElement();
1220
+ return (_a = rootElement == null ? void 0 : rootElement.contains(rootElement.ownerDocument.activeElement)) != null ? _a : false;
1221
+ }
1149
1222
  var DollarSignVariablesRegex = /(^.*)(\$\$(.{0,20}))$/;
1150
1223
  function getPossibleQueryMatch(text) {
1151
1224
  const match = DollarSignVariablesRegex.exec(text);
@@ -1177,7 +1250,7 @@ function useVariablesMenu({
1177
1250
  [canDispatch, enableEditingVariables, readOnly]
1178
1251
  );
1179
1252
  const canAddVariable = canDispatch && showAddVariableMenuOption && !readOnly;
1180
- const { groupedVariables, menuOptions } = useMemo6(() => {
1253
+ const { groupedVariables, menuOptions } = useMemo7(() => {
1181
1254
  const groupedVariables2 = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
1182
1255
  if (canAddVariable) {
1183
1256
  groupedVariables2.unshift({
@@ -1264,7 +1337,7 @@ function VariablesPlugin({
1264
1337
  filterVariable,
1265
1338
  getEditorContext
1266
1339
  });
1267
- const { filteredGroupedVariables, filteredMenuOptions } = useMemo6(() => {
1340
+ const { filteredGroupedVariables, filteredMenuOptions } = useMemo7(() => {
1268
1341
  if (!queryString) {
1269
1342
  return {
1270
1343
  filteredGroupedVariables: groupedVariables,
@@ -1440,7 +1513,7 @@ function VariablesPlugin({
1440
1513
  replaceValueOnVariableInsert,
1441
1514
  disableVariableDisplayNames
1442
1515
  ]);
1443
- const updateExistingNodeIfChanged = useCallback2(
1516
+ const computeUpdatedVariableNodeState = useCallback2(
1444
1517
  (variableNode) => {
1445
1518
  var _a, _b, _c, _d;
1446
1519
  const targetVar = variablesRef.current.variables[variableNode.reference];
@@ -1448,7 +1521,7 @@ function VariablesPlugin({
1448
1521
  const isLoadingVariables = variablesRef.current.isLoading;
1449
1522
  const currentState = variableNode.getState();
1450
1523
  if (currentState.isFresh && !targetVar && !targetUndefinedVar) {
1451
- return;
1524
+ return void 0;
1452
1525
  }
1453
1526
  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;
1454
1527
  const displayName = disableVariableDisplayNames ? prettifyBindExpression(variableNode.reference) : (targetVar == null ? void 0 : targetVar.displayName) || (targetUndefinedVar == null ? void 0 : targetUndefinedVar.displayName) || prettifyBindExpression(variableNode.reference);
@@ -1461,26 +1534,50 @@ function VariablesPlugin({
1461
1534
  tooltip,
1462
1535
  isFresh: false
1463
1536
  };
1464
- if (!dequal(currentState, newState)) {
1537
+ return dequal(currentState, newState) ? void 0 : newState;
1538
+ },
1539
+ [canEditVariable, disableVariableDisplayNames]
1540
+ );
1541
+ const updateExistingNodeIfChanged = useCallback2(
1542
+ (variableNode) => {
1543
+ const newState = computeUpdatedVariableNodeState(variableNode);
1544
+ if (newState) {
1465
1545
  variableNode.setState(newState);
1466
1546
  }
1467
1547
  },
1468
- [canEditVariable, disableVariableDisplayNames]
1548
+ [computeUpdatedVariableNodeState]
1469
1549
  );
1470
1550
  useEffect4(() => {
1471
- let selection;
1551
+ const pendingUpdates = [];
1472
1552
  editor.read(() => {
1473
- selection = $getSelection();
1553
+ $dfs().forEach(({ node }) => {
1554
+ if ($isVariableNode(node)) {
1555
+ const newState = computeUpdatedVariableNodeState(node);
1556
+ if (newState) {
1557
+ pendingUpdates.push({ key: node.getKey(), newState });
1558
+ }
1559
+ }
1560
+ });
1474
1561
  });
1562
+ if (pendingUpdates.length === 0) {
1563
+ return;
1564
+ }
1565
+ const shouldSyncDomSelection = isEditorFocused(editor);
1475
1566
  editor.update(() => {
1476
1567
  var _a;
1477
- $addUpdateTag("skip-dom-selection");
1478
- $setSelection((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
1479
- $dfs().filter(({ node }) => $isVariableNode(node)).forEach(({ node: variableNode }) => {
1480
- updateExistingNodeIfChanged(variableNode);
1568
+ const selection = $getSelection();
1569
+ pendingUpdates.forEach(({ key, newState }) => {
1570
+ const node = $getNodeByKey(key);
1571
+ if ($isVariableNode(node)) {
1572
+ node.setState(newState);
1573
+ }
1481
1574
  });
1575
+ $setSelection((_a = selection == null ? void 0 : selection.clone()) != null ? _a : null);
1576
+ if (!shouldSyncDomSelection) {
1577
+ $addUpdateTag(SKIP_DOM_SELECTION_TAG);
1578
+ }
1482
1579
  });
1483
- }, [editor, variables, knownUndefinedValues, canEditVariable, updateExistingNodeIfChanged]);
1580
+ }, [editor, variables, knownUndefinedValues, computeUpdatedVariableNodeState]);
1484
1581
  useEffect4(() => {
1485
1582
  return editor.registerNodeTransform(VariableNode, (variableNode) => {
1486
1583
  updateExistingNodeIfChanged(variableNode);
@@ -1886,8 +1983,11 @@ var input = css4`
1886
1983
  var inputCompact = css4`
1887
1984
  border: 1px solid var(--white);
1888
1985
  padding-block: var(--spacing-sm);
1889
- min-height: 39px;
1890
1986
  font-size: var(--fs-sm);
1987
+
1988
+ && {
1989
+ min-height: 39px;
1990
+ }
1891
1991
  `;
1892
1992
  var inputDisabled = css4`
1893
1993
  cursor: not-allowed;
@@ -2017,7 +2117,7 @@ var inputMultiLine = (lines) => css5`
2017
2117
 
2018
2118
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2019
2119
  import { hasReferencedVariables } from "@uniformdev/canvas";
2020
- import { useEffect as useEffect7, useMemo as useMemo7, useState as useState5 } from "react";
2120
+ import { useEffect as useEffect7, useMemo as useMemo8, useState as useState5 } from "react";
2021
2121
  function useInputVariablesState({
2022
2122
  value,
2023
2123
  onChange,
@@ -2049,7 +2149,7 @@ function useInputVariablesState({
2049
2149
  const hadVariablesInValueForReals = inputWhenNoVariables ? hadVariablesInValue : variableReferenceCountInValue > 0;
2050
2150
  const disableVariablesForReals = disableVariables || Object.keys(variables).length === 0 && !showAddVariableMenuOption;
2051
2151
  const disableResetForReals = !inputWhenNoVariables || !hadVariablesInValueForReals;
2052
- const sharedMenuProps = useMemo7(
2152
+ const sharedMenuProps = useMemo8(
2053
2153
  () => ({
2054
2154
  menuTooltip,
2055
2155
  showAddVariableMenuOption,
@@ -2247,7 +2347,7 @@ import { AutoFocusPlugin } from "@lexical/react/LexicalAutoFocusPlugin";
2247
2347
  import { ClearEditorPlugin } from "@lexical/react/LexicalClearEditorPlugin";
2248
2348
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
2249
2349
  import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
2250
- import { useMemo as useMemo8, useRef as useRef5, useState as useState6 } from "react";
2350
+ import { useEffect as useEffect10, useMemo as useMemo9, useRef as useRef5, useState as useState6 } from "react";
2251
2351
 
2252
2352
  // src/components/Variables/composer/DisablePlugin.tsx
2253
2353
  import { useLexicalComposerContext as useLexicalComposerContext7 } from "@lexical/react/LexicalComposerContext";
@@ -2274,6 +2374,13 @@ function SingleLineTextPlugin() {
2274
2374
  return null;
2275
2375
  }
2276
2376
 
2377
+ // src/components/Variables/toolbox/useVariablesComposerFlushPending.ts
2378
+ import { createContext as createContext5, useContext as useContext5 } from "react";
2379
+ var VariablesComposerFlushPendingContext = createContext5(false);
2380
+ function useVariablesComposerFlushPending() {
2381
+ return useContext5(VariablesComposerFlushPendingContext);
2382
+ }
2383
+
2277
2384
  // src/components/Variables/toolbox/VariablesComposer.tsx
2278
2385
  import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs10 } from "@emotion/react/jsx-runtime";
2279
2386
  function VariablesComposer(props) {
@@ -2288,7 +2395,8 @@ function VariablesComposer(props) {
2288
2395
  ...variablesPluginProps
2289
2396
  } = props;
2290
2397
  const [lastEmittedValue, setLastEmittedValue] = useState6(value);
2291
- const editorConfig = useMemo8(
2398
+ const [flushPending, setFlushPending] = useState6(false);
2399
+ const editorConfig = useMemo9(
2292
2400
  () => ({
2293
2401
  namespace: "uniform",
2294
2402
  onError(error) {
@@ -2297,11 +2405,29 @@ function VariablesComposer(props) {
2297
2405
  nodes: [VariableNode],
2298
2406
  editorState: deserializeVariablesEditorState(props.value)
2299
2407
  }),
2300
- // eslint-disable-next-line react-hooks/exhaustive-deps
2408
+ // oxlint-disable-next-line react/exhaustive-deps
2301
2409
  []
2302
2410
  );
2303
2411
  const editorState = useRef5(void 0);
2304
2412
  const updateTimeout = useRef5(void 0);
2413
+ const flushDepsRef = useRef5({ onChange, lastEmittedValue });
2414
+ flushDepsRef.current = { onChange, lastEmittedValue };
2415
+ useEffect10(
2416
+ () => () => {
2417
+ if (!updateTimeout.current) {
2418
+ return;
2419
+ }
2420
+ clearTimeout(updateTimeout.current);
2421
+ const { onChange: emit, lastEmittedValue: lastEmitted } = flushDepsRef.current;
2422
+ const valueToEmit = editorState.current ? serializeVariablesEditorState(editorState.current) : void 0;
2423
+ const shouldEmit = editorState.current != null && valueToEmit !== lastEmitted;
2424
+ if (!shouldEmit) {
2425
+ return;
2426
+ }
2427
+ queueMicrotask(() => emit(valueToEmit));
2428
+ },
2429
+ []
2430
+ );
2305
2431
  if (typeof document === "undefined") return null;
2306
2432
  return /* @__PURE__ */ jsxs10(LexicalComposer, { initialConfig: editorConfig, children: [
2307
2433
  /* @__PURE__ */ jsx26(
@@ -2313,6 +2439,7 @@ function VariablesComposer(props) {
2313
2439
  if (updateTimeout.current) {
2314
2440
  clearTimeout(updateTimeout.current);
2315
2441
  }
2442
+ setFlushPending(true);
2316
2443
  updateTimeout.current = window.setTimeout(() => {
2317
2444
  if (editorState.current) {
2318
2445
  const valueToEmit = serializeVariablesEditorState(editorState.current);
@@ -2321,6 +2448,8 @@ function VariablesComposer(props) {
2321
2448
  onChange(valueToEmit);
2322
2449
  }
2323
2450
  }
2451
+ setFlushPending(false);
2452
+ updateTimeout.current = void 0;
2324
2453
  }, 400);
2325
2454
  }
2326
2455
  }
@@ -2330,7 +2459,7 @@ function VariablesComposer(props) {
2330
2459
  /* @__PURE__ */ jsx26(VariablesPlugin, { ...variablesPluginProps }),
2331
2460
  /* @__PURE__ */ jsx26(DisablePlugin, { disabled }),
2332
2461
  /* @__PURE__ */ jsx26(Fragment5, { children: autoFocus ? /* @__PURE__ */ jsx26(AutoFocusPlugin, {}) : null }),
2333
- /* @__PURE__ */ jsx26(Fragment5, { children })
2462
+ /* @__PURE__ */ jsx26(VariablesComposerFlushPendingContext.Provider, { value: flushPending, children })
2334
2463
  ] });
2335
2464
  }
2336
2465
 
@@ -2355,18 +2484,27 @@ import {
2355
2484
  CUT_COMMAND,
2356
2485
  PASTE_COMMAND as PASTE_COMMAND2
2357
2486
  } from "lexical";
2358
- import { useEffect as useEffect10 } from "react";
2487
+ import { useEffect as useEffect11 } from "react";
2359
2488
  import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs11 } from "@emotion/react/jsx-runtime";
2360
2489
  function VariablesComposerInput({
2361
- css: css23,
2490
+ css: css24,
2362
2491
  placeholder,
2363
2492
  ...contentEditableProps
2364
2493
  }) {
2494
+ const flushPending = useVariablesComposerFlushPending();
2365
2495
  return /* @__PURE__ */ jsxs11("div", { children: [
2366
2496
  /* @__PURE__ */ jsx27(
2367
2497
  PlainTextPlugin,
2368
2498
  {
2369
- contentEditable: /* @__PURE__ */ jsx27(ContentEditable, { ...contentEditableProps, placeholder: null, "aria-placeholder": void 0 }),
2499
+ contentEditable: /* @__PURE__ */ jsx27(
2500
+ ContentEditable,
2501
+ {
2502
+ ...contentEditableProps,
2503
+ "data-flush-pending": flushPending,
2504
+ placeholder: null,
2505
+ "aria-placeholder": void 0
2506
+ }
2507
+ ),
2370
2508
  placeholder: placeholder ? /* @__PURE__ */ jsx27(Fragment6, { children: placeholder }) : null,
2371
2509
  ErrorBoundary: LexicalErrorBoundary
2372
2510
  }
@@ -2377,7 +2515,7 @@ function VariablesComposerInput({
2377
2515
  }
2378
2516
  function RichishCopyAndPastePlugin() {
2379
2517
  const [editor] = useLexicalComposerContext9();
2380
- useEffect10(() => {
2518
+ useEffect11(() => {
2381
2519
  return mergeRegister4(
2382
2520
  editor.registerCommand(
2383
2521
  COPY_COMMAND,
@@ -2484,7 +2622,7 @@ function InputVariables(props) {
2484
2622
  singleTokenMode,
2485
2623
  disableVariableDisplayNames
2486
2624
  } = props;
2487
- const [finalId] = useState7(id != null ? id : () => v4());
2625
+ const [finalId] = useState7(id != null ? id : (() => v4()));
2488
2626
  const { dispatch, canDispatch, isEditing } = useVariables(true);
2489
2627
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
2490
2628
  const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
@@ -2632,7 +2770,7 @@ function InputVariablesOverlayMenu({
2632
2770
  import { CgUsbC as CgUsbC2 } from "@react-icons/all-files/cg/CgUsbC";
2633
2771
  import { bindVariablesToObject } from "@uniformdev/canvas";
2634
2772
  import { HorizontalRhythm as HorizontalRhythm5, Menu as Menu2 } from "@uniformdev/design-system";
2635
- import { useMemo as useMemo9 } from "react";
2773
+ import { useMemo as useMemo10 } from "react";
2636
2774
  import { jsx as jsx29, jsxs as jsxs13 } from "@emotion/react/jsx-runtime";
2637
2775
  function ParameterConnectionIndicator({
2638
2776
  children,
@@ -2643,7 +2781,7 @@ function ParameterConnectionIndicator({
2643
2781
  overrideMenuButtonParentMargin,
2644
2782
  renderMenuInPortal = false
2645
2783
  }) {
2646
- const hasVariablesInValue = useMemo9(() => {
2784
+ const hasVariablesInValue = useMemo10(() => {
2647
2785
  let result = false;
2648
2786
  bindVariablesToObject({
2649
2787
  value,
@@ -2694,7 +2832,7 @@ import { useCallback as useCallback4 } from "react";
2694
2832
  import { useLexicalComposerContext as useLexicalComposerContext10 } from "@lexical/react/LexicalComposerContext";
2695
2833
  import { mergeRegister as mergeRegister5 } from "@lexical/utils";
2696
2834
  import { $getNodeByKey as $getNodeByKey3, COMMAND_PRIORITY_HIGH as COMMAND_PRIORITY_HIGH3 } from "lexical";
2697
- import { useEffect as useEffect11, useRef as useRef6 } from "react";
2835
+ import { useEffect as useEffect12, useRef as useRef6 } from "react";
2698
2836
  function OnDisconnectPlugin({
2699
2837
  onDisconnect
2700
2838
  }) {
@@ -2702,7 +2840,7 @@ function OnDisconnectPlugin({
2702
2840
  const { variables } = useVariables(true);
2703
2841
  const variablesRef = useRef6(variables);
2704
2842
  variablesRef.current = variables;
2705
- useEffect11(() => {
2843
+ useEffect12(() => {
2706
2844
  return mergeRegister5(
2707
2845
  editor.registerCommand(
2708
2846
  DISCONNECT_VARIABLE_COMMAND,
@@ -3615,7 +3753,7 @@ function RequestParameters({
3615
3753
 
3616
3754
  // src/components/Request/RequestUrl.tsx
3617
3755
  import { css as css13 } from "@emotion/react";
3618
- import { useMemo as useMemo11 } from "react";
3756
+ import { useMemo as useMemo12 } from "react";
3619
3757
 
3620
3758
  // src/components/Request/urlEncodeRequestParameter.ts
3621
3759
  function urlEncodeRequestUrl(url, varValues) {
@@ -3641,7 +3779,7 @@ function RequestUrl() {
3641
3779
  var _a, _b;
3642
3780
  const { variables } = useVariables();
3643
3781
  const { request } = useRequest();
3644
- const mergedParameters = useMemo11(() => {
3782
+ const mergedParameters = useMemo12(() => {
3645
3783
  var _a2;
3646
3784
  if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
3647
3785
  return request.parameters;
@@ -3884,17 +4022,200 @@ function convertRequestDataToDataType(dataType, requestData) {
3884
4022
  };
3885
4023
  }
3886
4024
 
4025
+ // src/components/Delegation/DelegationGate.tsx
4026
+ import { Callout as Callout3, LoadingOverlay } from "@uniformdev/design-system";
4027
+ import { useEffect as useEffect13 } from "react";
4028
+
4029
+ // src/components/Delegation/styles/DelegationGate.style.ts
4030
+ import { css as css14 } from "@emotion/react";
4031
+ var delegationGateStyle = css14`
4032
+ min-height: 12rem;
4033
+ width: 100%;
4034
+ `;
4035
+
4036
+ // src/components/Delegation/DelegationGate.tsx
4037
+ import { Fragment as Fragment10, jsx as jsx46 } from "@emotion/react/jsx-runtime";
4038
+ function DefaultDelegationLoading() {
4039
+ return /* @__PURE__ */ jsx46("div", { css: delegationGateStyle, children: /* @__PURE__ */ jsx46(LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
4040
+ }
4041
+ function DefaultDelegationDisabled() {
4042
+ return /* @__PURE__ */ jsx46(Callout3, { 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." });
4043
+ }
4044
+ function DefaultDelegationError({ error }) {
4045
+ useEffect13(() => {
4046
+ console.error("Delegation connection failed", error);
4047
+ }, [error]);
4048
+ return /* @__PURE__ */ jsx46(Callout3, { type: "error", title: "Connection error", children: /* @__PURE__ */ jsx46("p", { children: "Failed to connect to Uniform. Try again, or contact your administrator if the problem persists." }) });
4049
+ }
4050
+ function DelegationGate({
4051
+ children,
4052
+ loadingComponent,
4053
+ disabledComponent,
4054
+ errorComponent
4055
+ }) {
4056
+ const { status, error } = useDelegation();
4057
+ if (status === "active") {
4058
+ return /* @__PURE__ */ jsx46(Fragment10, { children });
4059
+ }
4060
+ if (status === "idle" || status === "acquiring") {
4061
+ return /* @__PURE__ */ jsx46(Fragment10, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ jsx46(DefaultDelegationLoading, {}) });
4062
+ }
4063
+ if (status === "disabled") {
4064
+ return /* @__PURE__ */ jsx46(Fragment10, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ jsx46(DefaultDelegationDisabled, {}) });
4065
+ }
4066
+ if (status === "error") {
4067
+ const resolvedError = error != null ? error : new Error("Unknown delegation error");
4068
+ if (errorComponent !== void 0) {
4069
+ if (typeof errorComponent === "function") {
4070
+ return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent({ error: resolvedError }) });
4071
+ }
4072
+ return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent });
4073
+ }
4074
+ return /* @__PURE__ */ jsx46(DefaultDelegationError, { error: resolvedError });
4075
+ }
4076
+ return null;
4077
+ }
4078
+
4079
+ // src/components/Delegation/DelegationProvider.tsx
4080
+ import { useCallback as useCallback5, useEffect as useEffect14, useMemo as useMemo13, useRef as useRef7, useState as useState11 } from "react";
4081
+ import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
4082
+ var DelegationDisabledError = class extends Error {
4083
+ constructor() {
4084
+ super("Identity delegation is not enabled for this integration.");
4085
+ this.name = "DelegationDisabledError";
4086
+ }
4087
+ };
4088
+ var DEFAULT_REVALIDATE_AFTER_MS = 30 * 1e3;
4089
+ function DelegationProvider({
4090
+ sdk,
4091
+ onSessionToken,
4092
+ checkActive,
4093
+ revalidateOnFocus = true,
4094
+ revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
4095
+ children
4096
+ }) {
4097
+ const [status, setStatus] = useState11("idle");
4098
+ const [error, setError] = useState11(null);
4099
+ const mountedRef = useRef7(true);
4100
+ const statusRef = useRef7("idle");
4101
+ statusRef.current = status;
4102
+ const acquirePromiseRef = useRef7(null);
4103
+ const acquire = useCallback5(() => {
4104
+ if (acquirePromiseRef.current) {
4105
+ return acquirePromiseRef.current;
4106
+ }
4107
+ const run = (async () => {
4108
+ if (statusRef.current !== "active") {
4109
+ setStatus("acquiring");
4110
+ }
4111
+ setError(null);
4112
+ try {
4113
+ const isActive = await checkActive();
4114
+ if (isActive) {
4115
+ if (mountedRef.current) {
4116
+ setStatus("active");
4117
+ }
4118
+ return;
4119
+ }
4120
+ if (!mountedRef.current) {
4121
+ return;
4122
+ }
4123
+ const sessionToken = await sdk.getSessionToken();
4124
+ if (!mountedRef.current) {
4125
+ return;
4126
+ }
4127
+ if (!sessionToken) {
4128
+ if (mountedRef.current) {
4129
+ setStatus("disabled");
4130
+ }
4131
+ throw new DelegationDisabledError();
4132
+ }
4133
+ await onSessionToken(sessionToken);
4134
+ if (mountedRef.current) {
4135
+ setStatus("active");
4136
+ }
4137
+ } catch (err) {
4138
+ const error2 = err instanceof Error ? err : new Error(String(err));
4139
+ if (mountedRef.current && !(err instanceof DelegationDisabledError)) {
4140
+ setError(error2);
4141
+ setStatus("error");
4142
+ }
4143
+ throw error2;
4144
+ }
4145
+ })();
4146
+ acquirePromiseRef.current = run.finally(() => {
4147
+ acquirePromiseRef.current = null;
4148
+ });
4149
+ return acquirePromiseRef.current;
4150
+ }, [sdk, onSessionToken, checkActive]);
4151
+ useEffect14(() => {
4152
+ mountedRef.current = true;
4153
+ void acquire().catch(() => {
4154
+ });
4155
+ return () => {
4156
+ mountedRef.current = false;
4157
+ };
4158
+ }, [acquire]);
4159
+ const revalidate = useCallback5(async () => {
4160
+ if (acquirePromiseRef.current) {
4161
+ return;
4162
+ }
4163
+ if (statusRef.current !== "active") {
4164
+ return;
4165
+ }
4166
+ try {
4167
+ const isActive = await checkActive();
4168
+ if (!mountedRef.current) {
4169
+ return;
4170
+ }
4171
+ if (!isActive) {
4172
+ void acquire().catch(() => {
4173
+ });
4174
+ }
4175
+ } catch (e) {
4176
+ }
4177
+ }, [checkActive, acquire]);
4178
+ useEffect14(() => {
4179
+ if (!revalidateOnFocus) {
4180
+ return;
4181
+ }
4182
+ if (typeof document === "undefined") {
4183
+ return;
4184
+ }
4185
+ let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
4186
+ const handleVisibilityChange = () => {
4187
+ if (document.visibilityState === "hidden") {
4188
+ hiddenAt = Date.now();
4189
+ return;
4190
+ }
4191
+ if (document.visibilityState === "visible") {
4192
+ const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
4193
+ hiddenAt = null;
4194
+ if (elapsed >= revalidateAfterMs) {
4195
+ void revalidate();
4196
+ }
4197
+ }
4198
+ };
4199
+ document.addEventListener("visibilitychange", handleVisibilityChange);
4200
+ return () => {
4201
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
4202
+ };
4203
+ }, [revalidateOnFocus, revalidateAfterMs, revalidate]);
4204
+ const value = useMemo13(() => ({ status, error, reacquire: acquire }), [status, error, acquire]);
4205
+ return /* @__PURE__ */ jsx47(DelegationContext.Provider, { value, children });
4206
+ }
4207
+
3887
4208
  // src/components/MeshApp.tsx
3888
- import { LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
4209
+ import { IconsProvider, LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
3889
4210
 
3890
4211
  // src/hooks/useInitializeUniformMeshSdk.ts
3891
4212
  import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
3892
- import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
4213
+ import { useEffect as useEffect15, useRef as useRef8, useState as useState12 } from "react";
3893
4214
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3894
- const [error, setError] = useState11();
3895
- const [sdk, setSdk] = useState11();
3896
- const initializationInProgress = useRef7(false);
3897
- useEffect12(
4215
+ const [error, setError] = useState12();
4216
+ const [sdk, setSdk] = useState12();
4217
+ const initializationInProgress = useRef8(false);
4218
+ useEffect15(
3898
4219
  () => {
3899
4220
  if (typeof window === "undefined" || sdk) {
3900
4221
  return;
@@ -3912,7 +4233,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3912
4233
  setSdk(window.UniformMeshSDK);
3913
4234
  }
3914
4235
  },
3915
- // eslint-disable-next-line react-hooks/exhaustive-deps
4236
+ // oxlint-disable-next-line react/exhaustive-deps
3916
4237
  [autoResizingDisabled]
3917
4238
  );
3918
4239
  return {
@@ -3927,7 +4248,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3927
4248
  };
3928
4249
 
3929
4250
  // src/components/MeshApp.tsx
3930
- import { jsx as jsx46, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
4251
+ import { jsx as jsx48, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
3931
4252
  var MeshApp = ({
3932
4253
  children,
3933
4254
  loadingComponent,
@@ -3936,25 +4257,25 @@ var MeshApp = ({
3936
4257
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
3937
4258
  if (initializing || !sdk) {
3938
4259
  const LoadingComponent = loadingComponent;
3939
- return LoadingComponent ? /* @__PURE__ */ jsx46(LoadingComponent, {}) : /* @__PURE__ */ jsx46(LoadingIndicator2, {});
4260
+ return LoadingComponent ? /* @__PURE__ */ jsx48(LoadingComponent, {}) : /* @__PURE__ */ jsx48(LoadingIndicator2, {});
3940
4261
  }
3941
4262
  if (error) {
3942
4263
  const ErrorComponent = errorComponent;
3943
4264
  if (ErrorComponent) {
3944
- return /* @__PURE__ */ jsx46(ErrorComponent, { error });
4265
+ return /* @__PURE__ */ jsx48(ErrorComponent, { error });
3945
4266
  }
3946
4267
  throw error;
3947
4268
  }
3948
4269
  return /* @__PURE__ */ jsxs21(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
3949
- /* @__PURE__ */ jsx46(Theme2, {}),
3950
- /* @__PURE__ */ jsx46(UniformMeshLocationContextProvider, { children })
4270
+ /* @__PURE__ */ jsx48(Theme2, {}),
4271
+ /* @__PURE__ */ jsx48(IconsProvider, { children: /* @__PURE__ */ jsx48(UniformMeshLocationContextProvider, { children }) })
3951
4272
  ] });
3952
4273
  };
3953
4274
 
3954
4275
  // src/components/ObjectSearch/DataRefreshButton.tsx
3955
- import { css as css14 } from "@emotion/react";
4276
+ import { css as css15 } from "@emotion/react";
3956
4277
  import { Button as Button2, LoadingIndicator as LoadingIndicator3 } from "@uniformdev/design-system";
3957
- import { jsx as jsx47, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4278
+ import { jsx as jsx49, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
3958
4279
  var DataRefreshButton = ({
3959
4280
  buttonText,
3960
4281
  isLoading,
@@ -3962,10 +4283,10 @@ var DataRefreshButton = ({
3962
4283
  ...props
3963
4284
  }) => {
3964
4285
  return /* @__PURE__ */ jsxs22(Button2, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
3965
- !isLoading ? null : /* @__PURE__ */ jsx47(
4286
+ !isLoading ? null : /* @__PURE__ */ jsx49(
3966
4287
  LoadingIndicator3,
3967
4288
  {
3968
- css: css14`
4289
+ css: css15`
3969
4290
  ${isLoading ? "opacity: 0.2;" : void 0}
3970
4291
  `
3971
4292
  }
@@ -3975,22 +4296,22 @@ var DataRefreshButton = ({
3975
4296
  };
3976
4297
 
3977
4298
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
3978
- import { css as css16 } from "@emotion/react";
4299
+ import { css as css17 } from "@emotion/react";
3979
4300
  import { bindVariables } from "@uniformdev/canvas";
3980
- import { Callout as Callout3, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
4301
+ import { Callout as Callout4, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
3981
4302
 
3982
4303
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
3983
4304
  import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
3984
4305
  import {
3985
- createContext as createContext5,
3986
- useCallback as useCallback5,
3987
- useContext as useContext5,
4306
+ createContext as createContext7,
4307
+ useCallback as useCallback6,
4308
+ useContext as useContext7,
3988
4309
  useDeferredValue,
3989
- useMemo as useMemo12,
3990
- useState as useState12
4310
+ useMemo as useMemo14,
4311
+ useState as useState13
3991
4312
  } from "react";
3992
- import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
3993
- var ObjectSearchContext = createContext5({
4313
+ import { jsx as jsx50 } from "@emotion/react/jsx-runtime";
4314
+ var ObjectSearchContext = createContext7({
3994
4315
  onSetQuery: () => {
3995
4316
  },
3996
4317
  onSelectItem: () => {
@@ -4011,16 +4332,16 @@ var ObjectSearchProvider = ({
4011
4332
  children,
4012
4333
  defaultQuery
4013
4334
  }) => {
4014
- const [query, setQuery] = useState12({
4335
+ const [query, setQuery] = useState13({
4015
4336
  contentType: "",
4016
4337
  keyword: "",
4017
4338
  ...defaultQuery
4018
4339
  });
4019
4340
  const { flatVariables } = useVariables(true);
4020
4341
  const querySearchDeferred = useDeferredValue(query);
4021
- const [selectedItems, setSelectedItems] = useState12(currentlySelectedItems != null ? currentlySelectedItems : []);
4022
- const [list, setList] = useState12({});
4023
- const onSetQuery = useCallback5(
4342
+ const [selectedItems, setSelectedItems] = useState13(currentlySelectedItems != null ? currentlySelectedItems : []);
4343
+ const [list, setList] = useState13({});
4344
+ const onSetQuery = useCallback6(
4024
4345
  (value2) => {
4025
4346
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
4026
4347
  return setQuery({
@@ -4032,7 +4353,7 @@ var ObjectSearchProvider = ({
4032
4353
  },
4033
4354
  [setQuery]
4034
4355
  );
4035
- const onSelectItem = useCallback5(
4356
+ const onSelectItem = useCallback6(
4036
4357
  (selectedResult) => {
4037
4358
  if (Array.isArray(selectedResult)) {
4038
4359
  setSelectedItems(selectedResult);
@@ -4046,17 +4367,17 @@ var ObjectSearchProvider = ({
4046
4367
  },
4047
4368
  [setSelectedItems, selectedItems]
4048
4369
  );
4049
- const onRemoveAllSelectedItems = useCallback5(() => {
4370
+ const onRemoveAllSelectedItems = useCallback6(() => {
4050
4371
  setSelectedItems([]);
4051
4372
  }, [setSelectedItems]);
4052
- const onSetList = useCallback5(
4373
+ const onSetList = useCallback6(
4053
4374
  (value2) => {
4054
4375
  setList(value2);
4055
4376
  },
4056
4377
  [setList]
4057
4378
  );
4058
- const boundQuery = useMemo12(() => bindQuery(query, flatVariables), [query, flatVariables]);
4059
- const value = useMemo12(
4379
+ const boundQuery = useMemo14(() => bindQuery(query, flatVariables), [query, flatVariables]);
4380
+ const value = useMemo14(
4060
4381
  () => ({
4061
4382
  boundQuery,
4062
4383
  onSetQuery,
@@ -4080,10 +4401,10 @@ var ObjectSearchProvider = ({
4080
4401
  onSetList
4081
4402
  ]
4082
4403
  );
4083
- return /* @__PURE__ */ jsx48(ObjectSearchContext.Provider, { value, children });
4404
+ return /* @__PURE__ */ jsx50(ObjectSearchContext.Provider, { value, children });
4084
4405
  };
4085
4406
  function useObjectSearchContext() {
4086
- return useContext5(ObjectSearchContext);
4407
+ return useContext7(ObjectSearchContext);
4087
4408
  }
4088
4409
  function bindQuery(query, inputs) {
4089
4410
  const { result, errors } = bindVariablesToObject2({
@@ -4101,9 +4422,9 @@ function bindQuery(query, inputs) {
4101
4422
  import { Chip, Popover } from "@uniformdev/design-system";
4102
4423
 
4103
4424
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
4104
- import { css as css15 } from "@emotion/react";
4425
+ import { css as css16 } from "@emotion/react";
4105
4426
  import { skeletonLoading } from "@uniformdev/design-system";
4106
- var ObjectListItemContainer = css15`
4427
+ var ObjectListItemContainer = css16`
4107
4428
  align-items: center;
4108
4429
  border: 1px solid var(--gray-300);
4109
4430
  border-radius: var(--rounded-base);
@@ -4112,11 +4433,11 @@ var ObjectListItemContainer = css15`
4112
4433
  grid-template-columns: 1fr auto;
4113
4434
  padding: var(--spacing-sm);
4114
4435
  `;
4115
- var ObjectListItemContainerDisabled = css15`
4436
+ var ObjectListItemContainerDisabled = css16`
4116
4437
  opacity: var(--opacity-50);
4117
4438
  pointer-events: none;
4118
4439
  `;
4119
- var ObjectListItemLoading = css15`
4440
+ var ObjectListItemLoading = css16`
4120
4441
  animation: ${skeletonLoading} 1s linear infinite alternate;
4121
4442
  border-color: transparent;
4122
4443
  min-height: 42px;
@@ -4140,43 +4461,43 @@ var ObjectListItemLoading = css15`
4140
4461
  width: 1rem;
4141
4462
  }
4142
4463
  `;
4143
- var ObjectListItemHeadingGroup = css15`
4464
+ var ObjectListItemHeadingGroup = css16`
4144
4465
  align-items: center;
4145
4466
  display: grid;
4146
4467
  `;
4147
- var ObjectListItemThumbnail = css15`
4468
+ var ObjectListItemThumbnail = css16`
4148
4469
  width: 30px;
4149
4470
  height: 30px;
4150
4471
  object-fit: cover;
4151
4472
  `;
4152
- var ObjectListItemTitle = css15`
4473
+ var ObjectListItemTitle = css16`
4153
4474
  color: var(--typography-base);
4154
4475
  display: block;
4155
4476
  font-size: var(--fs-sm);
4156
4477
  `;
4157
- var ObjectListItemSubtitle = css15`
4478
+ var ObjectListItemSubtitle = css16`
4158
4479
  color: var(--gray-500);
4159
4480
  display: block;
4160
4481
  font-size: var(--fs-xs);
4161
4482
  line-height: 1;
4162
4483
  `;
4163
- var ObjectListItemInfoContainer = css15`
4484
+ var ObjectListItemInfoContainer = css16`
4164
4485
  align-items: center;
4165
4486
  display: flex;
4166
4487
  gap: var(--spacing-sm);
4167
4488
  justify-content: center;
4168
4489
  `;
4169
- var ObjectListItemControlledContent = css15`
4490
+ var ObjectListItemControlledContent = css16`
4170
4491
  display: flex;
4171
4492
  gap: var(--spacing-sm);
4172
4493
  `;
4173
- var ObjectListItemUnControlledContent = css15`
4494
+ var ObjectListItemUnControlledContent = css16`
4174
4495
  margin-top: var(--spacing-sm);
4175
4496
  grid-column: 1 / -1;
4176
4497
  `;
4177
4498
 
4178
4499
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4179
- import { jsx as jsx49, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4500
+ import { jsx as jsx51, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4180
4501
  var ObjectSearchListItem = ({
4181
4502
  id,
4182
4503
  title,
@@ -4217,7 +4538,7 @@ var ObjectSearchListItem = ({
4217
4538
  css: ObjectListItemControlledContent,
4218
4539
  "aria-disabled": disabled,
4219
4540
  children: [
4220
- imageUrl ? /* @__PURE__ */ jsx49(
4541
+ imageUrl ? /* @__PURE__ */ jsx51(
4221
4542
  "img",
4222
4543
  {
4223
4544
  src: imageUrl,
@@ -4227,27 +4548,27 @@ var ObjectSearchListItem = ({
4227
4548
  }
4228
4549
  ) : null,
4229
4550
  /* @__PURE__ */ jsxs23("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4230
- !contentType ? null : /* @__PURE__ */ jsx49("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4231
- /* @__PURE__ */ jsx49("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4551
+ !contentType ? null : /* @__PURE__ */ jsx51("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4552
+ /* @__PURE__ */ jsx51("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4232
4553
  ] })
4233
4554
  ]
4234
4555
  }
4235
4556
  ),
4236
4557
  /* @__PURE__ */ jsxs23("div", { css: ObjectListItemInfoContainer, children: [
4237
- selected ? /* @__PURE__ */ jsx49(Chip, { text: "selected", size: "xs" }) : null,
4238
- !popoverData ? null : /* @__PURE__ */ jsx49(Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4558
+ selected ? /* @__PURE__ */ jsx51(Chip, { text: "selected", size: "xs" }) : null,
4559
+ !popoverData ? null : /* @__PURE__ */ jsx51(Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4239
4560
  ] }),
4240
- !children ? null : /* @__PURE__ */ jsx49("div", { css: ObjectListItemUnControlledContent, children })
4561
+ !children ? null : /* @__PURE__ */ jsx51("div", { css: ObjectListItemUnControlledContent, children })
4241
4562
  ]
4242
4563
  }
4243
4564
  );
4244
4565
  };
4245
4566
  var ObjectSearchListItemLoadingSkeleton = () => {
4246
- return /* @__PURE__ */ jsx49("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4567
+ return /* @__PURE__ */ jsx51("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4247
4568
  };
4248
4569
 
4249
4570
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4250
- import { jsx as jsx50, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4571
+ import { jsx as jsx52, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4251
4572
  var ObjectSearchContainer = ({
4252
4573
  label,
4253
4574
  enableDynamicInputToResultId,
@@ -4259,16 +4580,16 @@ var ObjectSearchContainer = ({
4259
4580
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
4260
4581
  const { flatVariables } = useVariables(true);
4261
4582
  const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
4262
- const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx50(
4583
+ const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx52(
4263
4584
  ScrollableList,
4264
4585
  {
4265
4586
  role: "list",
4266
- css: css16`
4587
+ css: css17`
4267
4588
  > div {
4268
4589
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
4269
4590
  }
4270
4591
  `,
4271
- children: /* @__PURE__ */ jsx50(DefaultResultList, {})
4592
+ children: /* @__PURE__ */ jsx52(DefaultResultList, {})
4272
4593
  }
4273
4594
  );
4274
4595
  const body = /* @__PURE__ */ jsxs24(VerticalRhythm3, { children: [
@@ -4303,7 +4624,7 @@ var ObjectSearchContainer = ({
4303
4624
  ]);
4304
4625
  };
4305
4626
  return /* @__PURE__ */ jsxs24(VerticalRhythm3, { children: [
4306
- /* @__PURE__ */ jsx50(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx50(
4627
+ /* @__PURE__ */ jsx52(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx52(
4307
4628
  InputVariables,
4308
4629
  {
4309
4630
  label,
@@ -4325,21 +4646,21 @@ var DefaultResultList = () => {
4325
4646
  var _a;
4326
4647
  const { list } = useObjectSearchContext();
4327
4648
  if (!list.items) {
4328
- return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx50(ObjectSearchListItemLoadingSkeleton, {}, i));
4649
+ return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx52(ObjectSearchListItemLoadingSkeleton, {}, i));
4329
4650
  }
4330
4651
  if (list.items.length === 0) {
4331
- return /* @__PURE__ */ jsx50(Callout3, { type: "info", children: "No results were found" });
4652
+ return /* @__PURE__ */ jsx52(Callout4, { type: "info", children: "No results were found" });
4332
4653
  }
4333
- return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx50(ObjectSearchListItem, { ...item }, item.id));
4654
+ return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx52(ObjectSearchListItem, { ...item }, item.id));
4334
4655
  };
4335
4656
 
4336
4657
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4337
4658
  import { DebouncedInputKeywordSearch, InputSelect as InputSelect3 } from "@uniformdev/design-system";
4338
- import { useMemo as useMemo13, useState as useState13 } from "react";
4659
+ import { useMemo as useMemo15, useState as useState14 } from "react";
4339
4660
 
4340
4661
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
4341
- import { css as css17 } from "@emotion/react";
4342
- var ObjectSearchFilterContainerLabel = css17`
4662
+ import { css as css18 } from "@emotion/react";
4663
+ var ObjectSearchFilterContainerLabel = css18`
4343
4664
  align-items: center;
4344
4665
  display: flex;
4345
4666
  font-size: var(--fs-sm);
@@ -4347,18 +4668,18 @@ var ObjectSearchFilterContainerLabel = css17`
4347
4668
  line-height: 1rem;
4348
4669
  margin-bottom: var(--spacing-sm);
4349
4670
  `;
4350
- var ObjectSearchFilterContainer = css17`
4671
+ var ObjectSearchFilterContainer = css18`
4351
4672
  display: grid;
4352
4673
  gap: var(--spacing-base);
4353
4674
  `;
4354
- var ObjectSearchFilterGrid = (gridColumns) => css17`
4675
+ var ObjectSearchFilterGrid = (gridColumns) => css18`
4355
4676
  display: grid;
4356
4677
  grid-template-columns: ${gridColumns};
4357
4678
  gap: var(--spacing-base);
4358
4679
  `;
4359
4680
 
4360
4681
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4361
- import { jsx as jsx51, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4682
+ import { jsx as jsx53, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4362
4683
  var ObjectSearchFilter = ({
4363
4684
  requireContentType,
4364
4685
  typeSelectorAllTypesOptionText = "All content types",
@@ -4369,7 +4690,7 @@ var ObjectSearchFilter = ({
4369
4690
  }) => {
4370
4691
  var _a, _b;
4371
4692
  const { query, onSetQuery } = useObjectSearchContext();
4372
- const [searchState, setSearchState] = useState13({
4693
+ const [searchState, setSearchState] = useState14({
4373
4694
  contentType: (_a = query.contentType) != null ? _a : "",
4374
4695
  keyword: (_b = query.keyword) != null ? _b : ""
4375
4696
  });
@@ -4379,7 +4700,7 @@ var ObjectSearchFilter = ({
4379
4700
  });
4380
4701
  onSetQuery({ ...query, ...value });
4381
4702
  };
4382
- const memoizedSelectOptions = useMemo13(() => {
4703
+ const memoizedSelectOptions = useMemo15(() => {
4383
4704
  if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
4384
4705
  return [];
4385
4706
  }
@@ -4397,7 +4718,7 @@ var ObjectSearchFilter = ({
4397
4718
  ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
4398
4719
  ],
4399
4720
  children: [
4400
- memoizedSelectOptions.length ? /* @__PURE__ */ jsx51(
4721
+ memoizedSelectOptions.length ? /* @__PURE__ */ jsx53(
4401
4722
  InputSelect3,
4402
4723
  {
4403
4724
  label: selectLabel,
@@ -4407,7 +4728,7 @@ var ObjectSearchFilter = ({
4407
4728
  value: query.contentType
4408
4729
  }
4409
4730
  ) : null,
4410
- /* @__PURE__ */ jsx51(
4731
+ /* @__PURE__ */ jsx53(
4411
4732
  DebouncedInputKeywordSearch,
4412
4733
  {
4413
4734
  inputFieldName: searchInputName,
@@ -4424,9 +4745,9 @@ var ObjectSearchFilter = ({
4424
4745
  };
4425
4746
 
4426
4747
  // src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
4427
- import { jsx as jsx52 } from "@emotion/react/jsx-runtime";
4748
+ import { jsx as jsx54 } from "@emotion/react/jsx-runtime";
4428
4749
  var ObjectSearchFilterContainer2 = ({ children }) => {
4429
- return /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52("div", { css: ObjectSearchFilterContainer, children }) });
4750
+ return /* @__PURE__ */ jsx54("div", { children: /* @__PURE__ */ jsx54("div", { css: ObjectSearchFilterContainer, children }) });
4430
4751
  };
4431
4752
 
4432
4753
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
@@ -4434,16 +4755,16 @@ import { Button as Button3, Chip as Chip2, Link, Popover as Popover2 } from "@un
4434
4755
  import { format as timeagoFormat } from "timeago.js";
4435
4756
 
4436
4757
  // src/components/Image/Image.tsx
4437
- import { jsx as jsx53 } from "@emotion/react/jsx-runtime";
4758
+ import { jsx as jsx55 } from "@emotion/react/jsx-runtime";
4438
4759
  function Image({ src, alt, className }) {
4439
4760
  const CompImage = src && typeof src !== "string" ? src : null;
4440
- return CompImage ? /* @__PURE__ */ jsx53(CompImage, { className }) : /* @__PURE__ */ jsx53("img", { src, alt, className });
4761
+ return CompImage ? /* @__PURE__ */ jsx55(CompImage, { className }) : /* @__PURE__ */ jsx55("img", { src, alt, className });
4441
4762
  }
4442
4763
 
4443
4764
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
4444
- import { css as css18 } from "@emotion/react";
4765
+ import { css as css19 } from "@emotion/react";
4445
4766
  import { button as button2 } from "@uniformdev/design-system";
4446
- var ButtonStyles = css18`
4767
+ var ButtonStyles = css19`
4447
4768
  ${button2}
4448
4769
  background: transparent;
4449
4770
  border: 1px solid var(--typography-base);
@@ -4471,20 +4792,20 @@ var ButtonStyles = css18`
4471
4792
  text-decoration: none;
4472
4793
  }
4473
4794
  `;
4474
- var ButtonIcon = css18`
4795
+ var ButtonIcon = css19`
4475
4796
  width: 1rem;
4476
4797
  height: 1rem;
4477
4798
  `;
4478
4799
 
4479
4800
  // src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
4480
- import { jsx as jsx54, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
4801
+ import { jsx as jsx56, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
4481
4802
  var ObjectSearchResultItemButton = ({
4482
4803
  text,
4483
4804
  icon,
4484
4805
  ...props
4485
4806
  }) => {
4486
4807
  return /* @__PURE__ */ jsxs26("button", { type: "button", css: ButtonStyles, ...props, children: [
4487
- !icon ? null : /* @__PURE__ */ jsx54(Image, { src: icon, css: ButtonIcon }),
4808
+ !icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
4488
4809
  text
4489
4810
  ] });
4490
4811
  };
@@ -4494,14 +4815,14 @@ var LinkButton = ({
4494
4815
  ...props
4495
4816
  }) => {
4496
4817
  return /* @__PURE__ */ jsxs26("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4497
- !icon ? null : /* @__PURE__ */ jsx54(Image, { src: icon, css: ButtonIcon }),
4818
+ !icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
4498
4819
  text
4499
4820
  ] });
4500
4821
  };
4501
4822
 
4502
4823
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
4503
- import { css as css19 } from "@emotion/react";
4504
- var ObjectSearchResultItemContainer = css19`
4824
+ import { css as css20 } from "@emotion/react";
4825
+ var ObjectSearchResultItemContainer = css20`
4505
4826
  align-items: center;
4506
4827
  border: 1px solid var(--gray-300);
4507
4828
  border-radius: var(--rounded-base);
@@ -4517,7 +4838,7 @@ var ObjectSearchResultItemContainer = css19`
4517
4838
  }
4518
4839
  }
4519
4840
  `;
4520
- var ObjectSearchDragHandle = css19`
4841
+ var ObjectSearchDragHandle = css20`
4521
4842
  border-left: 2px dotted var(--gray-300);
4522
4843
  border-right: 2px dotted var(--gray-300);
4523
4844
  position: absolute;
@@ -4526,47 +4847,47 @@ var ObjectSearchDragHandle = css19`
4526
4847
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4527
4848
  opacity: 0;
4528
4849
  `;
4529
- var ObjectSearchResultItemSubtitle = css19`
4850
+ var ObjectSearchResultItemSubtitle = css20`
4530
4851
  color: var(--gray-500);
4531
4852
  display: block;
4532
4853
  font-size: var(--fs-xs);
4533
4854
  line-height: 1;
4534
4855
  `;
4535
- var ObjectSearchResultItemTitle = css19`
4856
+ var ObjectSearchResultItemTitle = css20`
4536
4857
  align-items: center;
4537
4858
  color: var(--typography-base);
4538
4859
  display: flex;
4539
4860
  gap: var(--spacing-xs);
4540
4861
  `;
4541
- var ObjectSearchResultItemTimeStamp = css19`
4862
+ var ObjectSearchResultItemTimeStamp = css20`
4542
4863
  color: var(--gray-500);
4543
4864
  font-size: var(--fs-xs);
4544
4865
  `;
4545
- var ObjectSearchResultItemTitleLink = css19`
4866
+ var ObjectSearchResultItemTitleLink = css20`
4546
4867
  text-decoration: none;
4547
4868
  color: var(--primary-action-default);
4548
4869
  font-size: var(--fs-sm);
4549
4870
  `;
4550
- var ObjectSearchAuthorStateGroup = css19`
4871
+ var ObjectSearchAuthorStateGroup = css20`
4551
4872
  align-items: center;
4552
4873
  display: flex;
4553
4874
  gap: var(--spacing-sm);
4554
4875
  `;
4555
- var ObjectSearchUpdateGroup = css19`
4876
+ var ObjectSearchUpdateGroup = css20`
4556
4877
  display: grid;
4557
4878
  `;
4558
- var ObjectSearchContentContainer = css19`
4879
+ var ObjectSearchContentContainer = css20`
4559
4880
  display: flex;
4560
4881
  gap: var(--spacing-base);
4561
4882
  `;
4562
- var ObjectSearchImage = css19`
4883
+ var ObjectSearchImage = css20`
4563
4884
  width: 56px;
4564
4885
  height: 56px;
4565
4886
  object-fit: cover;
4566
4887
  `;
4567
4888
 
4568
4889
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4569
- import { jsx as jsx55, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
4890
+ import { jsx as jsx57, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
4570
4891
  var ObjectSearchResultItem = ({
4571
4892
  id,
4572
4893
  title,
@@ -4591,9 +4912,9 @@ var ObjectSearchResultItem = ({
4591
4912
  onRemove == null ? void 0 : onRemove();
4592
4913
  };
4593
4914
  return /* @__PURE__ */ jsxs27("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
4594
- disableDnD ? null : /* @__PURE__ */ jsx55("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4595
- /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsxs27("div", { css: ObjectSearchContentContainer, children: [
4596
- !imageUrl ? null : /* @__PURE__ */ jsx55(
4915
+ disableDnD ? null : /* @__PURE__ */ jsx57("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4916
+ /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsxs27("div", { css: ObjectSearchContentContainer, children: [
4917
+ !imageUrl ? null : /* @__PURE__ */ jsx57(
4597
4918
  "img",
4598
4919
  {
4599
4920
  src: imageUrl,
@@ -4603,9 +4924,9 @@ var ObjectSearchResultItem = ({
4603
4924
  }
4604
4925
  ),
4605
4926
  /* @__PURE__ */ jsxs27("div", { children: [
4606
- /* @__PURE__ */ jsx55("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4927
+ /* @__PURE__ */ jsx57("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4607
4928
  /* @__PURE__ */ jsxs27("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
4608
- onClick ? /* @__PURE__ */ jsx55(
4929
+ onClick ? /* @__PURE__ */ jsx57(
4609
4930
  Link,
4610
4931
  {
4611
4932
  onClick: (e) => {
@@ -4617,28 +4938,28 @@ var ObjectSearchResultItem = ({
4617
4938
  text: title != null ? title : name,
4618
4939
  css: ObjectSearchResultItemTitleLink
4619
4940
  }
4620
- ) : /* @__PURE__ */ jsx55("span", { children: title != null ? title : name }),
4621
- !popoverData ? null : /* @__PURE__ */ jsx55(Popover2, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4941
+ ) : /* @__PURE__ */ jsx57("span", { children: title != null ? title : name }),
4942
+ !popoverData ? null : /* @__PURE__ */ jsx57(Popover2, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4622
4943
  ] }),
4623
4944
  !createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchAuthorStateGroup, children: [
4624
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx55(Chip2, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4945
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx57(Chip2, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4625
4946
  !createdAt && !publishedAt ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchUpdateGroup, children: [
4626
4947
  !createdAt ? null : /* @__PURE__ */ jsxs27("small", { css: ObjectSearchResultItemTimeStamp, children: [
4627
- /* @__PURE__ */ jsx55("strong", { children: "Last updated: " }),
4948
+ /* @__PURE__ */ jsx57("strong", { children: "Last updated: " }),
4628
4949
  timeagoFormat(createdAt)
4629
4950
  ] }),
4630
4951
  !publishedAt ? null : /* @__PURE__ */ jsxs27("small", { css: ObjectSearchResultItemTimeStamp, children: [
4631
- /* @__PURE__ */ jsx55("strong", { children: "Last published: " }),
4952
+ /* @__PURE__ */ jsx57("strong", { children: "Last published: " }),
4632
4953
  timeagoFormat(publishedAt)
4633
4954
  ] })
4634
4955
  ] })
4635
4956
  ] }),
4636
- /* @__PURE__ */ jsx55("div", { children })
4957
+ /* @__PURE__ */ jsx57("div", { children })
4637
4958
  ] })
4638
4959
  ] }) }),
4639
4960
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchAuthorStateGroup, children: [
4640
- !editLink ? null : /* @__PURE__ */ jsx55(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4641
- hideRemoveButton ? null : /* @__PURE__ */ jsx55(Button3, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4961
+ !editLink ? null : /* @__PURE__ */ jsx57(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4962
+ hideRemoveButton ? null : /* @__PURE__ */ jsx57(Button3, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4642
4963
  ] })
4643
4964
  ] });
4644
4965
  };
@@ -4665,32 +4986,32 @@ import {
4665
4986
  import { Button as Button4, Counter } from "@uniformdev/design-system";
4666
4987
 
4667
4988
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4668
- import { css as css20 } from "@emotion/react";
4669
- var ObjectSearchResultListContainer = css20`
4989
+ import { css as css21 } from "@emotion/react";
4990
+ var ObjectSearchResultListContainer = css21`
4670
4991
  align-items: center;
4671
4992
  display: flex;
4672
4993
  gap: var(--spacing-sm);
4673
4994
  justify-content: space-between;
4674
4995
  `;
4675
- var ObjectSearchDragContainer = css20`
4996
+ var ObjectSearchDragContainer = css21`
4676
4997
  margin: 0 0 var(--spacing-sm);
4677
4998
  `;
4678
- var ObjectSearchContainerDragging = css20`
4999
+ var ObjectSearchContainerDragging = css21`
4679
5000
  box-shadow: var(--shadow-base);
4680
5001
  opacity: var(--opacity-50);
4681
5002
  `;
4682
- var ObjectSearchResultListCounterContainer = css20`
5003
+ var ObjectSearchResultListCounterContainer = css21`
4683
5004
  align-items: center;
4684
5005
  display: flex;
4685
5006
  gap: var(--spacing-sm);
4686
5007
  `;
4687
- var ObjectSearchResultListTitle = css20`
5008
+ var ObjectSearchResultListTitle = css21`
4688
5009
  font-weight: var(--fw-bold);
4689
5010
  line-height: 1;
4690
5011
  `;
4691
5012
 
4692
5013
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4693
- import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
5014
+ import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
4694
5015
  var DroppableHack2 = Droppable2;
4695
5016
  var DraggableHack2 = Draggable2;
4696
5017
  function ObjectSearchResultList({
@@ -4700,7 +5021,7 @@ function ObjectSearchResultList({
4700
5021
  hideRemoveButton = false,
4701
5022
  resultLabelOverride,
4702
5023
  additionalButtons,
4703
- renderResultComponent = (value) => /* @__PURE__ */ jsx56(ObjectSearchResultItem, { ...value }),
5024
+ renderResultComponent = (value) => /* @__PURE__ */ jsx58(ObjectSearchResultItem, { ...value }),
4704
5025
  multiSelectId,
4705
5026
  disableDnD = false,
4706
5027
  getContainerForDnDReparenting,
@@ -4727,7 +5048,7 @@ function ObjectSearchResultList({
4727
5048
  ...item,
4728
5049
  disableDnD: selectedListItems.length === 1 || disableDnD
4729
5050
  });
4730
- return /* @__PURE__ */ jsx56(
5051
+ return /* @__PURE__ */ jsx58(
4731
5052
  "div",
4732
5053
  {
4733
5054
  css: [
@@ -4742,16 +5063,16 @@ function ObjectSearchResultList({
4742
5063
  }
4743
5064
  );
4744
5065
  };
4745
- return /* @__PURE__ */ jsxs28(Fragment10, { children: [
5066
+ return /* @__PURE__ */ jsxs28(Fragment11, { children: [
4746
5067
  /* @__PURE__ */ jsxs28("div", { role: "group", css: ObjectSearchResultListContainer, children: [
4747
5068
  !resultLabelOverride ? /* @__PURE__ */ jsxs28("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
4748
- /* @__PURE__ */ jsx56("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
5069
+ /* @__PURE__ */ jsx58("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
4749
5070
  " ",
4750
- !selectedListItems.length ? null : /* @__PURE__ */ jsx56(Counter, { count: selectedListItems.length })
5071
+ !selectedListItems.length ? null : /* @__PURE__ */ jsx58(Counter, { count: selectedListItems.length })
4751
5072
  ] }) : resultLabelOverride,
4752
5073
  /* @__PURE__ */ jsxs28("div", { css: ObjectSearchResultListCounterContainer, children: [
4753
5074
  additionalButtons,
4754
- hideRemoveButton ? null : /* @__PURE__ */ jsx56(
5075
+ hideRemoveButton ? null : /* @__PURE__ */ jsx58(
4755
5076
  Button4,
4756
5077
  {
4757
5078
  buttonType: "ghostDestructive",
@@ -4763,7 +5084,7 @@ function ObjectSearchResultList({
4763
5084
  )
4764
5085
  ] })
4765
5086
  ] }),
4766
- !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx56(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx56(
5087
+ !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx58(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx58(
4767
5088
  DroppableHack2,
4768
5089
  {
4769
5090
  droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
@@ -4771,7 +5092,7 @@ function ObjectSearchResultList({
4771
5092
  getContainerForClone: getContainerForDnDReparenting,
4772
5093
  children: (provided) => /* @__PURE__ */ jsxs28("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4773
5094
  selectedListItems.map((item, i) => {
4774
- return /* @__PURE__ */ jsx56(
5095
+ return /* @__PURE__ */ jsx58(
4775
5096
  DraggableHack2,
4776
5097
  {
4777
5098
  draggableId: item.id,
@@ -4791,8 +5112,8 @@ function ObjectSearchResultList({
4791
5112
 
4792
5113
  // src/components/ObjectSearch/QueryFilter.tsx
4793
5114
  import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input4, InputSelect as InputSelect4, VerticalRhythm as VerticalRhythm4 } from "@uniformdev/design-system";
4794
- import { useEffect as useEffect13, useState as useState14 } from "react";
4795
- import { jsx as jsx57, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5115
+ import { useEffect as useEffect16, useState as useState15 } from "react";
5116
+ import { jsx as jsx59, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
4796
5117
  var QueryFilter = ({
4797
5118
  requireContentType,
4798
5119
  queryFilterTitle = "Configure Query",
@@ -4820,7 +5141,7 @@ var QueryFilter = ({
4820
5141
  }) => {
4821
5142
  var _a, _b, _c, _d, _e, _f, _g;
4822
5143
  const { query, onSetQuery } = useObjectSearchContext();
4823
- const [queryState, setQueryState] = useState14({
5144
+ const [queryState, setQueryState] = useState15({
4824
5145
  contentType: (_a = query.contentType) != null ? _a : "",
4825
5146
  keyword: (_b = query.keyword) != null ? _b : "",
4826
5147
  count: (_c = query.count) != null ? _c : 5,
@@ -4831,13 +5152,13 @@ var QueryFilter = ({
4831
5152
  setQueryState((prev) => ({ ...prev, ...value }));
4832
5153
  onSetQuery({ ...query, ...value });
4833
5154
  };
4834
- useEffect13(() => {
5155
+ useEffect16(() => {
4835
5156
  onSetQuery(queryState);
4836
5157
  }, []);
4837
5158
  return /* @__PURE__ */ jsxs29("fieldset", { children: [
4838
- /* @__PURE__ */ jsx57("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
4839
- /* @__PURE__ */ jsx57("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs29(VerticalRhythm4, { children: [
4840
- /* @__PURE__ */ jsx57(
5159
+ /* @__PURE__ */ jsx59("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
5160
+ /* @__PURE__ */ jsx59("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs29(VerticalRhythm4, { children: [
5161
+ /* @__PURE__ */ jsx59(
4841
5162
  InputVariables,
4842
5163
  {
4843
5164
  label: searchInputLabel,
@@ -4845,7 +5166,7 @@ var QueryFilter = ({
4845
5166
  onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
4846
5167
  disableInlineMenu: true,
4847
5168
  id: "qf_searchText",
4848
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5169
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4849
5170
  DebouncedInputKeywordSearch2,
4850
5171
  {
4851
5172
  id: "qf_searchText",
@@ -4860,7 +5181,7 @@ var QueryFilter = ({
4860
5181
  }
4861
5182
  ),
4862
5183
  /* @__PURE__ */ jsxs29("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
4863
- /* @__PURE__ */ jsx57(
5184
+ /* @__PURE__ */ jsx59(
4864
5185
  InputVariables,
4865
5186
  {
4866
5187
  label: contentTypeLabel,
@@ -4868,7 +5189,7 @@ var QueryFilter = ({
4868
5189
  value: (_g = queryState.contentType) != null ? _g : "",
4869
5190
  onChange: (newType) => handleFilterChange({ contentType: newType }),
4870
5191
  disableInlineMenu: true,
4871
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5192
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4872
5193
  InputSelect4,
4873
5194
  {
4874
5195
  id: "qf_contentType",
@@ -4882,7 +5203,7 @@ var QueryFilter = ({
4882
5203
  )
4883
5204
  }
4884
5205
  ),
4885
- /* @__PURE__ */ jsx57(
5206
+ /* @__PURE__ */ jsx59(
4886
5207
  InputVariables,
4887
5208
  {
4888
5209
  label: countLabel,
@@ -4891,7 +5212,7 @@ var QueryFilter = ({
4891
5212
  onChange: (newCount) => handleFilterChange({ count: newCount }),
4892
5213
  disableInlineMenu: true,
4893
5214
  valueToResetTo: "5",
4894
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5215
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4895
5216
  Input4,
4896
5217
  {
4897
5218
  id: "qf_count",
@@ -4907,7 +5228,7 @@ var QueryFilter = ({
4907
5228
  )
4908
5229
  ] }),
4909
5230
  /* @__PURE__ */ jsxs29("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
4910
- /* @__PURE__ */ jsx57(
5231
+ /* @__PURE__ */ jsx59(
4911
5232
  InputVariables,
4912
5233
  {
4913
5234
  id: "qf_sortBy",
@@ -4915,7 +5236,7 @@ var QueryFilter = ({
4915
5236
  value: queryState.sortBy,
4916
5237
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
4917
5238
  disableInlineMenu: true,
4918
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5239
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4919
5240
  InputSelect4,
4920
5241
  {
4921
5242
  label: sortLabel,
@@ -4929,7 +5250,7 @@ var QueryFilter = ({
4929
5250
  )
4930
5251
  }
4931
5252
  ),
4932
- /* @__PURE__ */ jsx57(
5253
+ /* @__PURE__ */ jsx59(
4933
5254
  InputVariables,
4934
5255
  {
4935
5256
  label: sortOrderLabel,
@@ -4937,7 +5258,7 @@ var QueryFilter = ({
4937
5258
  value: queryState.sortOrder,
4938
5259
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
4939
5260
  disableInlineMenu: true,
4940
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5261
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4941
5262
  InputSelect4,
4942
5263
  {
4943
5264
  label: sortOrderLabel,
@@ -4957,8 +5278,8 @@ var QueryFilter = ({
4957
5278
  };
4958
5279
 
4959
5280
  // src/components/ParamTypeDynamicDataProvider.tsx
4960
- import { useEffect as useEffect14, useMemo as useMemo14, useRef as useRef8 } from "react";
4961
- import { jsx as jsx58 } from "@emotion/react/jsx-runtime";
5281
+ import { useEffect as useEffect17, useMemo as useMemo16, useRef as useRef9 } from "react";
5282
+ import { jsx as jsx60 } from "@emotion/react/jsx-runtime";
4962
5283
  function ParamTypeDynamicDataProvider(props) {
4963
5284
  const { children } = props;
4964
5285
  const {
@@ -4966,11 +5287,11 @@ function ParamTypeDynamicDataProvider(props) {
4966
5287
  } = useMeshLocation("paramType");
4967
5288
  const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
4968
5289
  const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
4969
- const variables = useMemo14(
5290
+ const variables = useMemo16(
4970
5291
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
4971
5292
  [dynamicInputsAsVariables, connectedDataAsVariables]
4972
5293
  );
4973
- return /* @__PURE__ */ jsx58(VariablesProvider, { value: variables, onChange: () => {
5294
+ return /* @__PURE__ */ jsx60(VariablesProvider, { value: variables, onChange: () => {
4974
5295
  }, editVariableComponent: JsonMeshVariableEditor, children });
4975
5296
  }
4976
5297
  var JsonMeshVariableEditor = ({
@@ -4979,9 +5300,9 @@ var JsonMeshVariableEditor = ({
4979
5300
  variable,
4980
5301
  context
4981
5302
  }) => {
4982
- const sillyRef = useRef8(false);
5303
+ const sillyRef = useRef9(false);
4983
5304
  const { editConnectedData } = useMeshLocation("paramType");
4984
- useEffect14(() => {
5305
+ useEffect17(() => {
4985
5306
  if (sillyRef.current) {
4986
5307
  return;
4987
5308
  }
@@ -5417,6 +5738,12 @@ var MULTI_SELECT_OPERATORS = [
5417
5738
  editorType: "multiChoice",
5418
5739
  expectedValueType: "array"
5419
5740
  },
5741
+ {
5742
+ label: "is all of...",
5743
+ value: "all",
5744
+ editorType: "multiChoice",
5745
+ expectedValueType: "array"
5746
+ },
5420
5747
  {
5421
5748
  label: "is empty",
5422
5749
  value: "ndef",
@@ -5445,9 +5772,9 @@ var MULTI_SELECT_OPERATORS = [
5445
5772
 
5446
5773
  // src/components/SearchAndFilter/editors/DateEditor.tsx
5447
5774
  import { Input as Input5 } from "@uniformdev/design-system";
5448
- import { useState as useState15 } from "react";
5775
+ import { useState as useState16 } from "react";
5449
5776
  import { useDebounce as useDebounce2 } from "react-use";
5450
- import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
5777
+ import { jsx as jsx61 } from "@emotion/react/jsx-runtime";
5451
5778
  var DateEditor = ({
5452
5779
  onChange,
5453
5780
  ariaLabel,
@@ -5456,9 +5783,9 @@ var DateEditor = ({
5456
5783
  readOnly,
5457
5784
  valueTestId
5458
5785
  }) => {
5459
- const [innerValue, setInnerValue] = useState15(value != null ? value : "");
5786
+ const [innerValue, setInnerValue] = useState16(value != null ? value : "");
5460
5787
  useDebounce2(() => onChange(innerValue), 500, [innerValue]);
5461
- return /* @__PURE__ */ jsx59(
5788
+ return /* @__PURE__ */ jsx61(
5462
5789
  Input5,
5463
5790
  {
5464
5791
  type: "date",
@@ -5475,21 +5802,21 @@ var DateEditor = ({
5475
5802
 
5476
5803
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5477
5804
  import { Input as Input6 } from "@uniformdev/design-system";
5478
- import { useEffect as useEffect15, useState as useState16 } from "react";
5805
+ import { useEffect as useEffect18, useState as useState17 } from "react";
5479
5806
  import { useDebounce as useDebounce3 } from "react-use";
5480
5807
 
5481
5808
  // src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
5482
5809
  import { FieldMessage } from "@uniformdev/design-system";
5483
- import { jsx as jsx60 } from "@emotion/react/jsx-runtime";
5810
+ import { jsx as jsx62 } from "@emotion/react/jsx-runtime";
5484
5811
  var ErrorContainer = ({ errorMessage }) => {
5485
- return /* @__PURE__ */ jsx60(
5812
+ return /* @__PURE__ */ jsx62(
5486
5813
  "div",
5487
5814
  {
5488
5815
  css: {
5489
5816
  gridColumn: "span 6",
5490
5817
  order: 6
5491
5818
  },
5492
- children: /* @__PURE__ */ jsx60(FieldMessage, { errorMessage })
5819
+ children: /* @__PURE__ */ jsx62(FieldMessage, { errorMessage })
5493
5820
  }
5494
5821
  );
5495
5822
  };
@@ -5502,7 +5829,7 @@ var twoColumnGrid = {
5502
5829
  };
5503
5830
 
5504
5831
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5505
- import { Fragment as Fragment11, jsx as jsx61, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5832
+ import { Fragment as Fragment12, jsx as jsx63, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5506
5833
  var DateRangeEditor = ({
5507
5834
  ariaLabel,
5508
5835
  onChange,
@@ -5511,9 +5838,9 @@ var DateRangeEditor = ({
5511
5838
  readOnly,
5512
5839
  valueTestId
5513
5840
  }) => {
5514
- const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
5515
- const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
5516
- const [error, setError] = useState16("");
5841
+ const [minDateValue, setMinDateValue] = useState17(value ? value[0] : "");
5842
+ const [maxDateValue, setMaxDateValue] = useState17(value ? value[1] : "");
5843
+ const [error, setError] = useState17("");
5517
5844
  useDebounce3(
5518
5845
  () => {
5519
5846
  if (minDateValue && maxDateValue && !error) {
@@ -5525,7 +5852,7 @@ var DateRangeEditor = ({
5525
5852
  500,
5526
5853
  [minDateValue, maxDateValue]
5527
5854
  );
5528
- useEffect15(() => {
5855
+ useEffect18(() => {
5529
5856
  if (!minDateValue || !maxDateValue) {
5530
5857
  return;
5531
5858
  }
@@ -5560,9 +5887,9 @@ var DateRangeEditor = ({
5560
5887
  setMaxDateValue("");
5561
5888
  }
5562
5889
  }, [minDateValue, maxDateValue, setError]);
5563
- return /* @__PURE__ */ jsxs30(Fragment11, { children: [
5890
+ return /* @__PURE__ */ jsxs30(Fragment12, { children: [
5564
5891
  /* @__PURE__ */ jsxs30("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5565
- /* @__PURE__ */ jsx61(
5892
+ /* @__PURE__ */ jsx63(
5566
5893
  Input6,
5567
5894
  {
5568
5895
  label: `${ariaLabel}-min-date`,
@@ -5576,7 +5903,7 @@ var DateRangeEditor = ({
5576
5903
  "data-testid": "value-low"
5577
5904
  }
5578
5905
  ),
5579
- /* @__PURE__ */ jsx61(
5906
+ /* @__PURE__ */ jsx63(
5580
5907
  Input6,
5581
5908
  {
5582
5909
  label: `${ariaLabel}-max-date`,
@@ -5591,7 +5918,7 @@ var DateRangeEditor = ({
5591
5918
  }
5592
5919
  )
5593
5920
  ] }),
5594
- /* @__PURE__ */ jsx61(ErrorContainer, { errorMessage: error })
5921
+ /* @__PURE__ */ jsx63(ErrorContainer, { errorMessage: error })
5595
5922
  ] });
5596
5923
  };
5597
5924
 
@@ -5601,7 +5928,7 @@ import {
5601
5928
  getComboBoxSelectedSelectableGroups,
5602
5929
  InputComboBox
5603
5930
  } from "@uniformdev/design-system";
5604
- import { useMemo as useMemo15 } from "react";
5931
+ import { useMemo as useMemo17 } from "react";
5605
5932
 
5606
5933
  // src/components/SearchAndFilter/editors/shared/readOnlyAttributes.tsx
5607
5934
  var readOnlyAttributes = {
@@ -5611,7 +5938,7 @@ var readOnlyAttributes = {
5611
5938
  };
5612
5939
 
5613
5940
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5614
- import { jsx as jsx62 } from "@emotion/react/jsx-runtime";
5941
+ import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
5615
5942
  var FilterMultiChoiceEditor = ({
5616
5943
  value,
5617
5944
  options,
@@ -5622,11 +5949,11 @@ var FilterMultiChoiceEditor = ({
5622
5949
  }) => {
5623
5950
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5624
5951
  const isClearable = !readOnly || !disabled;
5625
- const { groupedOptions, selectedOptions } = useMemo15(
5952
+ const { groupedOptions, selectedOptions } = useMemo17(
5626
5953
  () => convertComboBoxGroupsToSelectableGroups({ options: options != null ? options : [], selectedItems: new Set(value) }),
5627
5954
  [options, value]
5628
5955
  );
5629
- return /* @__PURE__ */ jsx62("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx62(
5956
+ return /* @__PURE__ */ jsx64("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx64(
5630
5957
  InputComboBox,
5631
5958
  {
5632
5959
  ...props,
@@ -5659,8 +5986,8 @@ import {
5659
5986
  convertComboBoxGroupsToSelectableGroups as convertComboBoxGroupsToSelectableGroups2,
5660
5987
  InputComboBox as InputComboBox2
5661
5988
  } from "@uniformdev/design-system";
5662
- import { useMemo as useMemo16 } from "react";
5663
- import { jsx as jsx63 } from "@emotion/react/jsx-runtime";
5989
+ import { useMemo as useMemo18 } from "react";
5990
+ import { jsx as jsx65 } from "@emotion/react/jsx-runtime";
5664
5991
  var FilterSingleChoiceEditor = ({
5665
5992
  options,
5666
5993
  value,
@@ -5670,7 +5997,7 @@ var FilterSingleChoiceEditor = ({
5670
5997
  valueTestId
5671
5998
  }) => {
5672
5999
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5673
- const { groupedOptions, selectedOptions } = useMemo16(
6000
+ const { groupedOptions, selectedOptions } = useMemo18(
5674
6001
  () => convertComboBoxGroupsToSelectableGroups2({
5675
6002
  options: options != null ? options : [],
5676
6003
  selectedItems: new Set(value ? [String(value)] : void 0),
@@ -5678,7 +6005,7 @@ var FilterSingleChoiceEditor = ({
5678
6005
  }),
5679
6006
  [options, value]
5680
6007
  );
5681
- return /* @__PURE__ */ jsx63("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx63(
6008
+ return /* @__PURE__ */ jsx65("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx65(
5682
6009
  InputComboBox2,
5683
6010
  {
5684
6011
  placeholder: "Type to search...",
@@ -5708,9 +6035,9 @@ var FilterSingleChoiceEditor = ({
5708
6035
 
5709
6036
  // src/components/SearchAndFilter/editors/NumberEditor.tsx
5710
6037
  import { Input as Input7 } from "@uniformdev/design-system";
5711
- import { useState as useState17 } from "react";
6038
+ import { useState as useState18 } from "react";
5712
6039
  import { useDebounce as useDebounce4 } from "react-use";
5713
- import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
6040
+ import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
5714
6041
  var NumberEditor = ({
5715
6042
  ariaLabel,
5716
6043
  onChange,
@@ -5719,9 +6046,9 @@ var NumberEditor = ({
5719
6046
  readOnly,
5720
6047
  valueTestId
5721
6048
  }) => {
5722
- const [innerValue, setInnerValue] = useState17(value != null ? value : "");
6049
+ const [innerValue, setInnerValue] = useState18(value != null ? value : "");
5723
6050
  useDebounce4(() => onChange(innerValue), 500, [innerValue]);
5724
- return /* @__PURE__ */ jsx64(
6051
+ return /* @__PURE__ */ jsx66(
5725
6052
  Input7,
5726
6053
  {
5727
6054
  label: ariaLabel,
@@ -5739,9 +6066,9 @@ var NumberEditor = ({
5739
6066
 
5740
6067
  // src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
5741
6068
  import { Input as Input8 } from "@uniformdev/design-system";
5742
- import { useEffect as useEffect16, useState as useState18 } from "react";
6069
+ import { useEffect as useEffect19, useState as useState19 } from "react";
5743
6070
  import { useDebounce as useDebounce5 } from "react-use";
5744
- import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
6071
+ import { Fragment as Fragment13, jsx as jsx67, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5745
6072
  var NumberRangeEditor = ({
5746
6073
  onChange,
5747
6074
  disabled,
@@ -5750,9 +6077,9 @@ var NumberRangeEditor = ({
5750
6077
  readOnly,
5751
6078
  valueTestId
5752
6079
  }) => {
5753
- const [minValue, setMinValue] = useState18("");
5754
- const [maxValue, setMaxValue] = useState18("");
5755
- const [error, setError] = useState18("");
6080
+ const [minValue, setMinValue] = useState19("");
6081
+ const [maxValue, setMaxValue] = useState19("");
6082
+ const [error, setError] = useState19("");
5756
6083
  useDebounce5(
5757
6084
  () => {
5758
6085
  if (minValue && maxValue && !error) {
@@ -5764,7 +6091,7 @@ var NumberRangeEditor = ({
5764
6091
  500,
5765
6092
  [minValue, maxValue]
5766
6093
  );
5767
- useEffect16(() => {
6094
+ useEffect19(() => {
5768
6095
  if (!maxValue && !minValue) {
5769
6096
  return;
5770
6097
  }
@@ -5786,9 +6113,9 @@ var NumberRangeEditor = ({
5786
6113
  setMaxValue(maxValue);
5787
6114
  }
5788
6115
  }, [maxValue, minValue, setError]);
5789
- return /* @__PURE__ */ jsxs31(Fragment12, { children: [
6116
+ return /* @__PURE__ */ jsxs31(Fragment13, { children: [
5790
6117
  /* @__PURE__ */ jsxs31("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5791
- /* @__PURE__ */ jsx65(
6118
+ /* @__PURE__ */ jsx67(
5792
6119
  Input8,
5793
6120
  {
5794
6121
  label: `${ariaLabel}-min`,
@@ -5804,7 +6131,7 @@ var NumberRangeEditor = ({
5804
6131
  "data-testid": "value-low"
5805
6132
  }
5806
6133
  ),
5807
- /* @__PURE__ */ jsx65(
6134
+ /* @__PURE__ */ jsx67(
5808
6135
  Input8,
5809
6136
  {
5810
6137
  type: "number",
@@ -5821,7 +6148,7 @@ var NumberRangeEditor = ({
5821
6148
  }
5822
6149
  )
5823
6150
  ] }),
5824
- /* @__PURE__ */ jsx65(ErrorContainer, { errorMessage: error })
6151
+ /* @__PURE__ */ jsx67(ErrorContainer, { errorMessage: error })
5825
6152
  ] });
5826
6153
  };
5827
6154
 
@@ -5831,13 +6158,13 @@ import {
5831
6158
  getComboBoxSelectedSelectableGroups as getComboBoxSelectedSelectableGroups2,
5832
6159
  InputComboBox as InputComboBox3
5833
6160
  } from "@uniformdev/design-system";
5834
- import { useMemo as useMemo17 } from "react";
6161
+ import { useMemo as useMemo19 } from "react";
5835
6162
 
5836
6163
  // src/components/SearchAndFilter/editors/shared/CustomOptions.tsx
5837
6164
  import { StatusBullet } from "@uniformdev/design-system";
5838
- import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
6165
+ import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
5839
6166
  var CustomOptions = ({ label, value }) => {
5840
- return /* @__PURE__ */ jsx66(
6167
+ return /* @__PURE__ */ jsx68(
5841
6168
  StatusBullet,
5842
6169
  {
5843
6170
  status: label,
@@ -5847,7 +6174,7 @@ var CustomOptions = ({ label, value }) => {
5847
6174
  };
5848
6175
 
5849
6176
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5850
- import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
6177
+ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
5851
6178
  var StatusMultiEditor = ({
5852
6179
  options,
5853
6180
  value,
@@ -5857,11 +6184,11 @@ var StatusMultiEditor = ({
5857
6184
  valueTestId
5858
6185
  }) => {
5859
6186
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5860
- const { groupedOptions, selectedOptions } = useMemo17(
6187
+ const { groupedOptions, selectedOptions } = useMemo19(
5861
6188
  () => convertComboBoxGroupsToSelectableGroups3({ options: options != null ? options : [], selectedItems: new Set(value) }),
5862
6189
  [options, value]
5863
6190
  );
5864
- return /* @__PURE__ */ jsx67("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx67(
6191
+ return /* @__PURE__ */ jsx69("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx69(
5865
6192
  InputComboBox3,
5866
6193
  {
5867
6194
  options: groupedOptions != null ? groupedOptions : [],
@@ -5892,8 +6219,8 @@ import {
5892
6219
  convertComboBoxGroupsToSelectableGroups as convertComboBoxGroupsToSelectableGroups4,
5893
6220
  InputComboBox as InputComboBox4
5894
6221
  } from "@uniformdev/design-system";
5895
- import { useMemo as useMemo18 } from "react";
5896
- import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
6222
+ import { useMemo as useMemo20 } from "react";
6223
+ import { jsx as jsx70 } from "@emotion/react/jsx-runtime";
5897
6224
  var StatusSingleEditor = ({
5898
6225
  options,
5899
6226
  value,
@@ -5903,7 +6230,7 @@ var StatusSingleEditor = ({
5903
6230
  valueTestId
5904
6231
  }) => {
5905
6232
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5906
- const { groupedOptions, selectedOptions } = useMemo18(
6233
+ const { groupedOptions, selectedOptions } = useMemo20(
5907
6234
  () => convertComboBoxGroupsToSelectableGroups4({
5908
6235
  options: options != null ? options : [],
5909
6236
  selectedItems: new Set(value ? [value] : void 0),
@@ -5911,7 +6238,7 @@ var StatusSingleEditor = ({
5911
6238
  }),
5912
6239
  [options, value]
5913
6240
  );
5914
- return /* @__PURE__ */ jsx68("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx68(
6241
+ return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
5915
6242
  InputComboBox4,
5916
6243
  {
5917
6244
  options: groupedOptions,
@@ -5940,9 +6267,9 @@ var StatusSingleEditor = ({
5940
6267
 
5941
6268
  // src/components/SearchAndFilter/editors/TextEditor.tsx
5942
6269
  import { Input as Input9 } from "@uniformdev/design-system";
5943
- import { useState as useState19 } from "react";
6270
+ import { useState as useState20 } from "react";
5944
6271
  import { useDebounce as useDebounce6 } from "react-use";
5945
- import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
6272
+ import { jsx as jsx71 } from "@emotion/react/jsx-runtime";
5946
6273
  var TextEditor = ({
5947
6274
  onChange,
5948
6275
  ariaLabel,
@@ -5950,9 +6277,9 @@ var TextEditor = ({
5950
6277
  readOnly,
5951
6278
  valueTestId
5952
6279
  }) => {
5953
- const [innerValue, setInnerValue] = useState19(value != null ? value : "");
6280
+ const [innerValue, setInnerValue] = useState20(value != null ? value : "");
5954
6281
  useDebounce6(() => onChange(innerValue), 500, [innerValue]);
5955
- return /* @__PURE__ */ jsx69(
6282
+ return /* @__PURE__ */ jsx71(
5956
6283
  Input9,
5957
6284
  {
5958
6285
  showLabel: false,
@@ -5972,8 +6299,8 @@ import {
5972
6299
  getComboBoxSelectedSelectableGroups as getComboBoxSelectedSelectableGroups3,
5973
6300
  InputCreatableComboBox
5974
6301
  } from "@uniformdev/design-system";
5975
- import { useMemo as useMemo19 } from "react";
5976
- import { jsx as jsx70 } from "@emotion/react/jsx-runtime";
6302
+ import { useMemo as useMemo21 } from "react";
6303
+ import { jsx as jsx72 } from "@emotion/react/jsx-runtime";
5977
6304
  var TextMultiChoiceEditor = ({
5978
6305
  value,
5979
6306
  disabled,
@@ -5983,13 +6310,13 @@ var TextMultiChoiceEditor = ({
5983
6310
  }) => {
5984
6311
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5985
6312
  const isClearable = !readOnly || !disabled;
5986
- const { groupedOptions, selectedOptions } = useMemo19(() => {
6313
+ const { groupedOptions, selectedOptions } = useMemo21(() => {
5987
6314
  var _a;
5988
6315
  const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
5989
6316
  const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
5990
6317
  return convertComboBoxGroupsToSelectableGroups5({ options, selectedItems: new Set(value) });
5991
6318
  }, [value]);
5992
- return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
6319
+ return /* @__PURE__ */ jsx72("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx72(
5993
6320
  InputCreatableComboBox,
5994
6321
  {
5995
6322
  ...props,
@@ -6022,21 +6349,21 @@ var TextMultiChoiceEditor = ({
6022
6349
  import { Counter as Counter2, customIcons, Icon as Icon2 } from "@uniformdev/design-system";
6023
6350
 
6024
6351
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
6025
- import { css as css21 } from "@emotion/react";
6352
+ import { css as css22 } from "@emotion/react";
6026
6353
  import { cq, fadeInLtr } from "@uniformdev/design-system";
6027
- var SearchAndFilterControlsWrapper = (gridColumns) => css21`
6354
+ var SearchAndFilterControlsWrapper = (gridColumns) => css22`
6028
6355
  align-items: stretch;
6029
6356
  display: grid;
6030
6357
  grid-template-columns: ${gridColumns};
6031
6358
  gap: var(--spacing-sm);
6032
6359
  `;
6033
- var SearchAndFilterOutterControlWrapper = (gridColumns) => css21`
6360
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => css22`
6034
6361
  align-items: stretch;
6035
6362
  display: grid;
6036
6363
  grid-template-columns: ${gridColumns};
6037
6364
  gap: var(--spacing-sm);
6038
6365
  `;
6039
- var ConditionalFilterRow = css21`
6366
+ var ConditionalFilterRow = css22`
6040
6367
  align-items: baseline;
6041
6368
  display: grid;
6042
6369
  grid-template-columns: 35px 1fr;
@@ -6072,7 +6399,7 @@ var ConditionalFilterRow = css21`
6072
6399
  animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6073
6400
  }
6074
6401
  `;
6075
- var ConditionalInputRow = css21`
6402
+ var ConditionalInputRow = css22`
6076
6403
  display: flex;
6077
6404
  gap: var(--spacing-sm);
6078
6405
  flex-wrap: wrap;
@@ -6096,18 +6423,20 @@ var ConditionalInputRow = css21`
6096
6423
  }
6097
6424
  }
6098
6425
  `;
6099
- var ConditionalInputRowEmpty = css21`
6426
+ var ConditionalInputRowEmpty = css22`
6100
6427
  flex-wrap: nowrap;
6101
6428
  `;
6102
- var SearchInput = css21`
6103
- max-height: 40px;
6104
- min-height: unset;
6429
+ var SearchInput = css22`
6430
+ && {
6431
+ max-height: 40px;
6432
+ min-height: unset;
6433
+ }
6105
6434
  `;
6106
- var BindableKeywordSearchInputStyles = css21`
6435
+ var BindableKeywordSearchInputStyles = css22`
6107
6436
  position: relative;
6108
6437
  width: 100%;
6109
6438
 
6110
- & [data-lexical-editor='true'] {
6439
+ && [data-lexical-editor='true'] {
6111
6440
  padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
6112
6441
  font-size: var(--fs-sm);
6113
6442
  border-radius: var(--rounded-full);
@@ -6118,19 +6447,19 @@ var BindableKeywordSearchInputStyles = css21`
6118
6447
  white-space: nowrap;
6119
6448
  }
6120
6449
  `;
6121
- var ClearSearchButtonContainer = css21`
6450
+ var ClearSearchButtonContainer = css22`
6122
6451
  align-items: center;
6123
6452
  display: flex;
6124
6453
  position: absolute;
6125
6454
  inset: 0 var(--spacing-lg) 0 auto;
6126
6455
  `;
6127
- var ClearSearchButtonStyles = css21`
6456
+ var ClearSearchButtonStyles = css22`
6128
6457
  background: none;
6129
6458
  border: none;
6130
6459
  padding: 0;
6131
6460
  pointer-events: all;
6132
6461
  `;
6133
- var FilterButton = css21`
6462
+ var FilterButton = css22`
6134
6463
  align-items: center;
6135
6464
  background: var(--white);
6136
6465
  border: 1px solid var(--gray-300);
@@ -6167,13 +6496,13 @@ var FilterButton = css21`
6167
6496
  opacity: var(--opacity-50);
6168
6497
  }
6169
6498
  `;
6170
- var FilterButtonText = css21`
6499
+ var FilterButtonText = css22`
6171
6500
  overflow: hidden;
6172
6501
  text-overflow: ellipsis;
6173
6502
  white-space: nowrap;
6174
6503
  max-width: 14ch;
6175
6504
  `;
6176
- var FilterButtonSelected = css21`
6505
+ var FilterButtonSelected = css22`
6177
6506
  background: var(--gray-100);
6178
6507
  border-color: var(--gray-300);
6179
6508
 
@@ -6181,7 +6510,7 @@ var FilterButtonSelected = css21`
6181
6510
  color: var(--accent-dark);
6182
6511
  }
6183
6512
  `;
6184
- var FilterButtonWithOptions = css21`
6513
+ var FilterButtonWithOptions = css22`
6185
6514
  :where([aria-expanded='true']) {
6186
6515
  background: var(--purple-rain-100);
6187
6516
  border-color: var(--accent-light);
@@ -6193,14 +6522,14 @@ var FilterButtonWithOptions = css21`
6193
6522
  }
6194
6523
  }
6195
6524
  `;
6196
- var SearchIcon = css21`
6525
+ var SearchIcon = css22`
6197
6526
  color: var(--icon-color);
6198
6527
  position: absolute;
6199
6528
  inset: 0 var(--spacing-base) 0 auto;
6200
6529
  margin: auto;
6201
6530
  transition: color var(--duration-fast) var(--timing-ease-out);
6202
6531
  `;
6203
- var AddConditionalBtn = css21`
6532
+ var AddConditionalBtn = css22`
6204
6533
  align-items: center;
6205
6534
  background: transparent;
6206
6535
  border: none;
@@ -6219,14 +6548,14 @@ var AddConditionalBtn = css21`
6219
6548
  color: var(--gray-400);
6220
6549
  }
6221
6550
  `;
6222
- var Title = css21`
6551
+ var Title = css22`
6223
6552
  color: var(--typography-light);
6224
6553
 
6225
6554
  &:focus {
6226
6555
  outline: none;
6227
6556
  }
6228
6557
  `;
6229
- var ResetConditionsBtn = css21`
6558
+ var ResetConditionsBtn = css22`
6230
6559
  background: transparent;
6231
6560
  border: none;
6232
6561
  color: var(--action-destructive-default);
@@ -6241,13 +6570,32 @@ var ResetConditionsBtn = css21`
6241
6570
  color: var(--gray-400);
6242
6571
  }
6243
6572
  `;
6244
- var IconBtn = css21`
6573
+ var CriteriaGroupOperatorTrigger = css22`
6574
+ && {
6575
+ padding: 0;
6576
+ border-radius: var(--rounded-sm);
6577
+ font-size: inherit;
6578
+ line-height: inherit;
6579
+ color: inherit;
6580
+
6581
+ > div {
6582
+ gap: 2px;
6583
+ }
6584
+
6585
+ svg {
6586
+ width: 10px;
6587
+ height: 10px;
6588
+ color: var(--gray-400);
6589
+ }
6590
+ }
6591
+ `;
6592
+ var IconBtn = css22`
6245
6593
  align-self: center;
6246
6594
  background: transparent;
6247
6595
  border: none;
6248
6596
  padding: var(--spacing-sm);
6249
6597
  `;
6250
- var SearchAndFilterOptionsContainer = css21`
6598
+ var SearchAndFilterOptionsContainer = css22`
6251
6599
  background: var(--gray-50);
6252
6600
  border: 1px solid var(--gray-300);
6253
6601
  border-radius: var(--rounded-base);
@@ -6258,17 +6606,17 @@ var SearchAndFilterOptionsContainer = css21`
6258
6606
  padding: var(--spacing-md) 0 var(--spacing-base);
6259
6607
  will-change: height;
6260
6608
  `;
6261
- var SearchAndFilterOptionsInnerContainer = css21`
6609
+ var SearchAndFilterOptionsInnerContainer = css22`
6262
6610
  display: flex;
6263
6611
  flex-direction: column;
6264
6612
  gap: var(--spacing-sm);
6265
6613
  padding-inline: var(--spacing-md);
6266
6614
  `;
6267
- var SearchAndFilterButtonGroup = css21`
6615
+ var SearchAndFilterButtonGroup = css22`
6268
6616
  margin-top: var(--spacing-xs);
6269
6617
  margin-left: calc(56px + var(--spacing-md));
6270
6618
  `;
6271
- var SearchAndFilterAdditionalContainer = css21`
6619
+ var SearchAndFilterAdditionalContainer = css22`
6272
6620
  align-items: center;
6273
6621
  border-top: 1px solid var(--gray-300);
6274
6622
  display: flex;
@@ -6278,7 +6626,7 @@ var SearchAndFilterAdditionalContainer = css21`
6278
6626
  `;
6279
6627
 
6280
6628
  // src/components/SearchAndFilter/FilterButton.tsx
6281
- import { jsx as jsx71, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6629
+ import { jsx as jsx73, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6282
6630
  var FilterButton2 = ({
6283
6631
  text = "Filters",
6284
6632
  icon = customIcons["filter-add"],
@@ -6300,10 +6648,10 @@ var FilterButton2 = ({
6300
6648
  ...props,
6301
6649
  "data-testid": dataTestId,
6302
6650
  children: [
6303
- /* @__PURE__ */ jsx71(Icon2, { icon, iconColor: "currentColor", size: "1rem" }),
6304
- /* @__PURE__ */ jsx71("span", { css: FilterButtonText, children: text }),
6305
- filterCount ? /* @__PURE__ */ jsx71(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
6306
- showDropdownIcon ? /* @__PURE__ */ jsx71(Icon2, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6651
+ /* @__PURE__ */ jsx73(Icon2, { icon, iconColor: "currentColor", size: "1rem" }),
6652
+ /* @__PURE__ */ jsx73("span", { css: FilterButtonText, children: text }),
6653
+ filterCount ? /* @__PURE__ */ jsx73(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
6654
+ showDropdownIcon ? /* @__PURE__ */ jsx73(Icon2, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6307
6655
  ]
6308
6656
  }
6309
6657
  );
@@ -6314,31 +6662,31 @@ import { CgClose } from "@react-icons/all-files/cg/CgClose";
6314
6662
  import { hasReferencedVariables as hasReferencedVariables2 } from "@uniformdev/canvas";
6315
6663
  import { Icon as Icon3, InputKeywordSearch } from "@uniformdev/design-system";
6316
6664
  import { CLEAR_EDITOR_COMMAND as CLEAR_EDITOR_COMMAND2 } from "lexical";
6317
- import { useEffect as useEffect18, useRef as useRef9, useState as useState21 } from "react";
6665
+ import { useEffect as useEffect21, useRef as useRef10, useState as useState22 } from "react";
6318
6666
  import { useDebounce as useDebounce7 } from "react-use";
6319
6667
  import { v4 as v42 } from "uuid";
6320
6668
 
6321
6669
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6322
6670
  import { VerticalRhythm as VerticalRhythm5 } from "@uniformdev/design-system";
6323
6671
  import {
6324
- createContext as createContext6,
6325
- useCallback as useCallback6,
6326
- useContext as useContext6,
6672
+ createContext as createContext8,
6673
+ useCallback as useCallback7,
6674
+ useContext as useContext8,
6327
6675
  useDeferredValue as useDeferredValue2,
6328
- useEffect as useEffect17,
6329
- useMemo as useMemo20,
6330
- useState as useState20
6676
+ useEffect as useEffect20,
6677
+ useMemo as useMemo22,
6678
+ useState as useState21
6331
6679
  } from "react";
6332
6680
 
6333
6681
  // src/components/SearchAndFilter/FilterEditor.tsx
6334
- import { jsx as jsx72 } from "@emotion/react/jsx-runtime";
6682
+ import { jsx as jsx74 } from "@emotion/react/jsx-runtime";
6335
6683
  var FilterEditorRenderer = ({ editorType, ...props }) => {
6336
6684
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
6337
6685
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
6338
6686
  if (!Editor || editorType === "empty") {
6339
- return /* @__PURE__ */ jsx72("span", {});
6687
+ return /* @__PURE__ */ jsx74("span", {});
6340
6688
  }
6341
- return /* @__PURE__ */ jsx72(Editor, { ...props });
6689
+ return /* @__PURE__ */ jsx74(Editor, { ...props });
6342
6690
  };
6343
6691
  var filterMapper = {
6344
6692
  multiChoice: FilterMultiChoiceEditor,
@@ -6356,9 +6704,9 @@ var filterMapper = {
6356
6704
  function withInputVariables(WrappedComponent, noSwapping = false) {
6357
6705
  const WithInputVariables = (props) => {
6358
6706
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
6359
- return /* @__PURE__ */ jsx72(WrappedComponent, { ...props });
6707
+ return /* @__PURE__ */ jsx74(WrappedComponent, { ...props });
6360
6708
  }
6361
- return /* @__PURE__ */ jsx72(
6709
+ return /* @__PURE__ */ jsx74(
6362
6710
  InputVariables,
6363
6711
  {
6364
6712
  "data-testid": "filter-value",
@@ -6367,7 +6715,7 @@ function withInputVariables(WrappedComponent, noSwapping = false) {
6367
6715
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
6368
6716
  value: props.value,
6369
6717
  disabled: props.disabled,
6370
- inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ jsx72(WrappedComponent, { ...props })
6718
+ inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ jsx74(WrappedComponent, { ...props })
6371
6719
  }
6372
6720
  );
6373
6721
  };
@@ -6377,9 +6725,9 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6377
6725
  const WithInputVariables = (props) => {
6378
6726
  var _a;
6379
6727
  if (!props.bindable || props.disabled || props.readOnly) {
6380
- return /* @__PURE__ */ jsx72(WrappedComponent, { ...props });
6728
+ return /* @__PURE__ */ jsx74(WrappedComponent, { ...props });
6381
6729
  }
6382
- return /* @__PURE__ */ jsx72(
6730
+ return /* @__PURE__ */ jsx74(
6383
6731
  InputVariables,
6384
6732
  {
6385
6733
  "data-testid": "filter-value",
@@ -6387,7 +6735,7 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6387
6735
  showMenuPosition: "inline-right",
6388
6736
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
6389
6737
  value: (_a = props.value) == null ? void 0 : _a[0],
6390
- inputWhenNoVariables: /* @__PURE__ */ jsx72(WrappedComponent, { ...props })
6738
+ inputWhenNoVariables: /* @__PURE__ */ jsx74(WrappedComponent, { ...props })
6391
6739
  }
6392
6740
  );
6393
6741
  };
@@ -6403,8 +6751,8 @@ var bindableFiltersMapper = {
6403
6751
  };
6404
6752
 
6405
6753
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6406
- import { jsx as jsx73 } from "@emotion/react/jsx-runtime";
6407
- var SearchAndFilterContext = createContext6({
6754
+ import { jsx as jsx75 } from "@emotion/react/jsx-runtime";
6755
+ var SearchAndFilterContext = createContext8({
6408
6756
  searchTerm: "",
6409
6757
  setSearchTerm: () => {
6410
6758
  },
@@ -6424,6 +6772,7 @@ var SearchAndFilterContext = createContext6({
6424
6772
  validFilterQuery: [],
6425
6773
  filterMapper: {},
6426
6774
  totalResults: 0,
6775
+ isLoading: false,
6427
6776
  allowBindingSearchTerm: false
6428
6777
  });
6429
6778
  var SearchAndFilterProvider = ({
@@ -6437,21 +6786,22 @@ var SearchAndFilterProvider = ({
6437
6786
  resetFilterValues = [{ field: "", operator: "", value: "" }],
6438
6787
  onResetFilterValues,
6439
6788
  totalResults,
6789
+ isLoading,
6440
6790
  filterMapper: filterMapper2 = filterMapper,
6441
6791
  children,
6442
6792
  allowBindingSearchTerm
6443
6793
  }) => {
6444
- const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
6794
+ const [searchTerm, setSearchTerm] = useState21(defaultSearchTerm);
6445
6795
  const deferredSearchTerm = useDeferredValue2(searchTerm);
6446
- const [filterVisibility, setFilterVisibility] = useState20(alwaysVisible || filterVisible);
6447
- const handleSearchTerm = useCallback6(
6796
+ const [filterVisibility, setFilterVisibility] = useState21(alwaysVisible || filterVisible);
6797
+ const handleSearchTerm = useCallback7(
6448
6798
  (term) => {
6449
6799
  setSearchTerm(term);
6450
6800
  onSearchChange == null ? void 0 : onSearchChange(term);
6451
6801
  },
6452
6802
  [setSearchTerm, onSearchChange]
6453
6803
  );
6454
- const handleToggleFilterVisibility = useCallback6(
6804
+ const handleToggleFilterVisibility = useCallback7(
6455
6805
  (visible) => {
6456
6806
  if (alwaysVisible) {
6457
6807
  return;
@@ -6460,30 +6810,31 @@ var SearchAndFilterProvider = ({
6460
6810
  },
6461
6811
  [alwaysVisible]
6462
6812
  );
6463
- const handleAddFilter = useCallback6(() => {
6813
+ const handleAddFilter = useCallback7(() => {
6464
6814
  onChange([...filters, { field: "", operator: "", value: "" }]);
6465
6815
  }, [filters, onChange]);
6466
- const handleResetFilters = useCallback6(() => {
6816
+ const handleResetFilters = useCallback7(() => {
6817
+ setSearchTerm("");
6467
6818
  if (onResetFilterValues) {
6468
6819
  return onResetFilterValues();
6469
6820
  }
6470
6821
  onSearchChange == null ? void 0 : onSearchChange("");
6471
6822
  onChange(resetFilterValues);
6472
6823
  }, [onChange, resetFilterValues, onSearchChange, onResetFilterValues]);
6473
- const handleDeleteFilter = useCallback6(
6824
+ const handleDeleteFilter = useCallback7(
6474
6825
  (index) => {
6475
6826
  const remainingFilters = filters.filter((_, i) => i !== index);
6476
6827
  onChange(remainingFilters);
6477
6828
  },
6478
6829
  [filters, onChange]
6479
6830
  );
6480
- const validFilterQuery = useMemo20(() => {
6831
+ const validFilterQuery = useMemo22(() => {
6481
6832
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
6482
6833
  if (hasValidFilters) {
6483
6834
  return filters;
6484
6835
  }
6485
6836
  }, [filters]);
6486
- useEffect17(() => {
6837
+ useEffect20(() => {
6487
6838
  if (filterVisibility) {
6488
6839
  const handleEscKeyFilterClose = (e) => {
6489
6840
  if (e.key === "Escape") {
@@ -6496,7 +6847,7 @@ var SearchAndFilterProvider = ({
6496
6847
  };
6497
6848
  }
6498
6849
  }, [filterVisibility, handleToggleFilterVisibility]);
6499
- return /* @__PURE__ */ jsx73(
6850
+ return /* @__PURE__ */ jsx75(
6500
6851
  SearchAndFilterContext.Provider,
6501
6852
  {
6502
6853
  value: {
@@ -6512,20 +6863,21 @@ var SearchAndFilterProvider = ({
6512
6863
  filterOptions,
6513
6864
  validFilterQuery,
6514
6865
  totalResults,
6866
+ isLoading,
6515
6867
  filterMapper: filterMapper2,
6516
6868
  allowBindingSearchTerm
6517
6869
  },
6518
- children: /* @__PURE__ */ jsx73(VerticalRhythm5, { children })
6870
+ children: /* @__PURE__ */ jsx75(VerticalRhythm5, { children })
6519
6871
  }
6520
6872
  );
6521
6873
  };
6522
6874
  var useSearchAndFilter = () => {
6523
- const value = useContext6(SearchAndFilterContext);
6875
+ const value = useContext8(SearchAndFilterContext);
6524
6876
  return { ...value };
6525
6877
  };
6526
6878
 
6527
6879
  // src/components/SearchAndFilter/FilterControls.tsx
6528
- import { Fragment as Fragment13, jsx as jsx74, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6880
+ import { Fragment as Fragment14, jsx as jsx76, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6529
6881
  var FilterControls = ({
6530
6882
  children,
6531
6883
  hideSearchInput
@@ -6538,25 +6890,27 @@ var FilterControls = ({
6538
6890
  searchTerm,
6539
6891
  allowBindingSearchTerm
6540
6892
  } = useSearchAndFilter();
6541
- const editorRef = useRef9(null);
6893
+ const editorRef = useRef10(null);
6542
6894
  const variableRefernceCountInSearchTerm = hasReferencedVariables2(searchTerm);
6543
- const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
6544
- const [localSearchTerm, setLocalSearchTerm] = useState21(searchTerm);
6895
+ const [idToResetInputVariables, setIdToResetInputVariables] = useState22("data-resource-search-term-input");
6896
+ const [localSearchTerm, setLocalSearchTerm] = useState22(searchTerm);
6545
6897
  useDebounce7(
6546
6898
  () => {
6547
- setSearchTerm(localSearchTerm);
6899
+ if (localSearchTerm !== searchTerm) {
6900
+ setSearchTerm(localSearchTerm);
6901
+ }
6548
6902
  },
6549
6903
  300,
6550
6904
  [localSearchTerm]
6551
6905
  );
6552
- useEffect18(() => {
6906
+ useEffect21(() => {
6553
6907
  if (searchTerm === "") {
6554
6908
  setLocalSearchTerm("");
6555
6909
  setIdToResetInputVariables(`data-resource-search-term-input-${v42()}`);
6556
6910
  }
6557
6911
  }, [searchTerm]);
6558
- return /* @__PURE__ */ jsxs33(Fragment13, { children: [
6559
- /* @__PURE__ */ jsx74(
6912
+ return /* @__PURE__ */ jsxs33(Fragment14, { children: [
6913
+ /* @__PURE__ */ jsx76(
6560
6914
  FilterButton2,
6561
6915
  {
6562
6916
  "aria-controls": "search-and-filter-options",
@@ -6570,7 +6924,7 @@ var FilterControls = ({
6570
6924
  }
6571
6925
  ),
6572
6926
  hideSearchInput ? null : /* @__PURE__ */ jsxs33("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6573
- /* @__PURE__ */ jsx74(
6927
+ /* @__PURE__ */ jsx76(
6574
6928
  InputVariables,
6575
6929
  {
6576
6930
  label: "",
@@ -6580,7 +6934,7 @@ var FilterControls = ({
6580
6934
  value: localSearchTerm,
6581
6935
  onChange: (value) => setLocalSearchTerm(value != null ? value : ""),
6582
6936
  disableVariables: !allowBindingSearchTerm,
6583
- inputWhenNoVariables: /* @__PURE__ */ jsx74(
6937
+ inputWhenNoVariables: /* @__PURE__ */ jsx76(
6584
6938
  InputKeywordSearch,
6585
6939
  {
6586
6940
  placeholder: "Search...",
@@ -6599,7 +6953,7 @@ var FilterControls = ({
6599
6953
  )
6600
6954
  }
6601
6955
  ),
6602
- variableRefernceCountInSearchTerm ? /* @__PURE__ */ jsx74("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ jsx74(
6956
+ variableRefernceCountInSearchTerm ? /* @__PURE__ */ jsx76("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ jsx76(
6603
6957
  "button",
6604
6958
  {
6605
6959
  css: ClearSearchButtonStyles,
@@ -6613,7 +6967,7 @@ var FilterControls = ({
6613
6967
  },
6614
6968
  type: "button",
6615
6969
  "data-testid": "keyword-search-clear-button",
6616
- children: /* @__PURE__ */ jsx74(Icon3, { icon: CgClose, iconColor: "red", size: "1rem" })
6970
+ children: /* @__PURE__ */ jsx76(Icon3, { icon: CgClose, iconColor: "red", size: "1rem" })
6617
6971
  }
6618
6972
  ) }) : null
6619
6973
  ] }),
@@ -6623,8 +6977,14 @@ var FilterControls = ({
6623
6977
 
6624
6978
  // src/components/SearchAndFilter/FilterItem.tsx
6625
6979
  import { CgTrash as CgTrash2 } from "@react-icons/all-files/cg/CgTrash";
6626
- import { Icon as Icon4, InputComboBox as InputComboBox5 } from "@uniformdev/design-system";
6627
- import { useMemo as useMemo21 } from "react";
6980
+ import {
6981
+ DropdownStyleMenuTrigger,
6982
+ Icon as Icon4,
6983
+ InputComboBox as InputComboBox5,
6984
+ Menu as Menu3,
6985
+ SelectableMenuItem
6986
+ } from "@uniformdev/design-system";
6987
+ import { useMemo as useMemo23 } from "react";
6628
6988
 
6629
6989
  // src/components/SearchAndFilter/util/isFilterBindable.ts
6630
6990
  function isFilterBindable(filter, operator) {
@@ -6633,7 +6993,7 @@ function isFilterBindable(filter, operator) {
6633
6993
  }
6634
6994
 
6635
6995
  // src/components/SearchAndFilter/FilterItem.tsx
6636
- import { jsx as jsx75, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6996
+ import { jsx as jsx77, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6637
6997
  var FilterItem = ({
6638
6998
  index,
6639
6999
  operatorOptions,
@@ -6643,7 +7003,8 @@ var FilterItem = ({
6643
7003
  onOperatorChange,
6644
7004
  onValueChange,
6645
7005
  initialCriteriaTitle = "Where",
6646
- criteriaGroupOperator = "and"
7006
+ criteriaGroupOperator = "and",
7007
+ onCriteriaGroupOperatorChange
6647
7008
  }) => {
6648
7009
  var _a, _b;
6649
7010
  const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
@@ -6651,7 +7012,7 @@ var FilterItem = ({
6651
7012
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
6652
7013
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
6653
7014
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
6654
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = useMemo21(() => {
7015
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = useMemo23(() => {
6655
7016
  var _a2;
6656
7017
  const currentSelectedFilterGroup = filterOptions.find((item) => {
6657
7018
  var _a3;
@@ -6681,10 +7042,47 @@ var FilterItem = ({
6681
7042
  } : {};
6682
7043
  const CustomLeftHandComponent = selectedFieldValue == null ? void 0 : selectedFieldValue.leftHandSideComponentWhenSelected;
6683
7044
  const isEmptyOperator = metaDataPossibleOptions === "empty";
7045
+ const joinLabel = index === 0 ? initialCriteriaTitle : index === 1 && onCriteriaGroupOperatorChange ? /* @__PURE__ */ jsxs34(
7046
+ Menu3,
7047
+ {
7048
+ menuTrigger: /* @__PURE__ */ jsx77(
7049
+ DropdownStyleMenuTrigger,
7050
+ {
7051
+ bgColor: "transparent",
7052
+ css: CriteriaGroupOperatorTrigger,
7053
+ "data-testid": "criteria-group-operator",
7054
+ "aria-label": "criteria group operator",
7055
+ children: criteriaGroupOperator
7056
+ }
7057
+ ),
7058
+ size: "small",
7059
+ placement: "bottom-start",
7060
+ children: [
7061
+ /* @__PURE__ */ jsx77(
7062
+ SelectableMenuItem,
7063
+ {
7064
+ selected: criteriaGroupOperator === "and",
7065
+ onClick: () => onCriteriaGroupOperatorChange("and"),
7066
+ "data-testid": "criteria-group-operator-and",
7067
+ children: "and"
7068
+ }
7069
+ ),
7070
+ /* @__PURE__ */ jsx77(
7071
+ SelectableMenuItem,
7072
+ {
7073
+ selected: criteriaGroupOperator === "or",
7074
+ onClick: () => onCriteriaGroupOperatorChange("or"),
7075
+ "data-testid": "criteria-group-operator-or",
7076
+ children: "or"
7077
+ }
7078
+ )
7079
+ ]
7080
+ }
7081
+ ) : criteriaGroupOperator;
6684
7082
  return /* @__PURE__ */ jsxs34("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
6685
- /* @__PURE__ */ jsx75("span", { children: index === 0 ? initialCriteriaTitle : criteriaGroupOperator }),
7083
+ /* @__PURE__ */ jsx77("span", { children: joinLabel }),
6686
7084
  /* @__PURE__ */ jsxs34("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
6687
- CustomLeftHandComponent ? /* @__PURE__ */ jsx75(
7085
+ CustomLeftHandComponent ? /* @__PURE__ */ jsx77(
6688
7086
  CustomLeftHandComponent,
6689
7087
  {
6690
7088
  filterOption: selectedFieldValue,
@@ -6694,7 +7092,7 @@ var FilterItem = ({
6694
7092
  onFilterOptionChange("");
6695
7093
  }
6696
7094
  }
6697
- ) : /* @__PURE__ */ jsx75(
7095
+ ) : /* @__PURE__ */ jsx77(
6698
7096
  InputComboBox5,
6699
7097
  {
6700
7098
  "aria-label": label,
@@ -6721,7 +7119,7 @@ var FilterItem = ({
6721
7119
  name: `filter-field-${index}`
6722
7120
  }
6723
7121
  ),
6724
- /* @__PURE__ */ jsx75(
7122
+ /* @__PURE__ */ jsx77(
6725
7123
  InputComboBox5,
6726
7124
  {
6727
7125
  "aria-label": operatorLabel,
@@ -6745,7 +7143,7 @@ var FilterItem = ({
6745
7143
  name: `filter-operator-${index}`
6746
7144
  }
6747
7145
  ),
6748
- /* @__PURE__ */ jsx75(
7146
+ /* @__PURE__ */ jsx77(
6749
7147
  FilterEditorRenderer,
6750
7148
  {
6751
7149
  "aria-label": metaDataLabel,
@@ -6760,7 +7158,7 @@ var FilterItem = ({
6760
7158
  filterFieldName: filters[index].field
6761
7159
  }
6762
7160
  ),
6763
- readOnly ? null : /* @__PURE__ */ jsx75(
7161
+ readOnly ? null : /* @__PURE__ */ jsx77(
6764
7162
  "button",
6765
7163
  {
6766
7164
  type: "button",
@@ -6769,7 +7167,7 @@ var FilterItem = ({
6769
7167
  css: IconBtn,
6770
7168
  "data-testid": "delete-filter",
6771
7169
  disabled: filters.length === 1,
6772
- children: /* @__PURE__ */ jsx75(Icon4, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
7170
+ children: /* @__PURE__ */ jsx77(Icon4, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
6773
7171
  }
6774
7172
  )
6775
7173
  ] })
@@ -6782,16 +7180,16 @@ import { Icon as Icon5 } from "@uniformdev/design-system";
6782
7180
 
6783
7181
  // src/components/SearchAndFilter/FilterMenu.tsx
6784
7182
  import { HorizontalRhythm as HorizontalRhythm8, VerticalRhythm as VerticalRhythm6 } from "@uniformdev/design-system";
6785
- import React6, { useEffect as useEffect19 } from "react";
6786
- import { jsx as jsx76, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
7183
+ import React8, { useEffect as useEffect22 } from "react";
7184
+ import { jsx as jsx78, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6787
7185
  var SearchAndFilterOptionsContainer2 = ({
6788
7186
  buttonRow,
6789
7187
  additionalFiltersContainer,
6790
7188
  children
6791
7189
  }) => {
6792
7190
  return /* @__PURE__ */ jsxs35("div", { css: SearchAndFilterOptionsContainer, children: [
6793
- /* @__PURE__ */ jsx76("div", { css: SearchAndFilterOptionsInnerContainer, children }),
6794
- buttonRow ? /* @__PURE__ */ jsx76(
7191
+ /* @__PURE__ */ jsx78("div", { css: SearchAndFilterOptionsInnerContainer, children }),
7192
+ buttonRow ? /* @__PURE__ */ jsx78(
6795
7193
  HorizontalRhythm8,
6796
7194
  {
6797
7195
  css: SearchAndFilterButtonGroup,
@@ -6801,7 +7199,7 @@ var SearchAndFilterOptionsContainer2 = ({
6801
7199
  children: buttonRow
6802
7200
  }
6803
7201
  ) : null,
6804
- additionalFiltersContainer ? /* @__PURE__ */ jsx76("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
7202
+ additionalFiltersContainer ? /* @__PURE__ */ jsx78("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
6805
7203
  ] });
6806
7204
  };
6807
7205
  var FilterMenu = ({
@@ -6814,22 +7212,22 @@ var FilterMenu = ({
6814
7212
  resetButtonText = "reset"
6815
7213
  }) => {
6816
7214
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6817
- const innerMenuRef = React6.useRef(null);
6818
- useEffect19(() => {
7215
+ const innerMenuRef = React8.useRef(null);
7216
+ useEffect22(() => {
6819
7217
  var _a;
6820
7218
  if (filterVisibility) {
6821
7219
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
6822
7220
  }
6823
7221
  }, [filterVisibility]);
6824
- return /* @__PURE__ */ jsx76(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ jsxs35(
7222
+ return /* @__PURE__ */ jsx78(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ jsxs35(
6825
7223
  SearchAndFilterOptionsContainer2,
6826
7224
  {
6827
7225
  buttonRow: menuControls,
6828
7226
  additionalFiltersContainer,
6829
7227
  children: [
6830
7228
  /* @__PURE__ */ jsxs35(HorizontalRhythm8, { gap: "sm", align: "center", justify: "space-between", children: [
6831
- filterTitle ? /* @__PURE__ */ jsx76("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
6832
- (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ jsx76(
7229
+ filterTitle ? /* @__PURE__ */ jsx78("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
7230
+ (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ jsx78(
6833
7231
  "button",
6834
7232
  {
6835
7233
  type: "button",
@@ -6940,14 +7338,15 @@ function hasBindings(currentValue) {
6940
7338
  }
6941
7339
 
6942
7340
  // src/components/SearchAndFilter/FilterItems.tsx
6943
- import { jsx as jsx77, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
7341
+ import { jsx as jsx79, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
6944
7342
  var FilterItems = ({
6945
7343
  addButtonText = "add condition",
6946
7344
  additionalFiltersContainer,
6947
7345
  filterTitle,
6948
7346
  resetButtonText,
6949
7347
  initialCriteriaTitle,
6950
- criteriaGroupOperator
7348
+ criteriaGroupOperator,
7349
+ onCriteriaGroupOperatorChange
6951
7350
  }) => {
6952
7351
  const { filterOptions, filters, setFilters, handleAddFilter } = useSearchAndFilter();
6953
7352
  const handleUpdateFilter = (index, prop, value) => {
@@ -6956,7 +7355,7 @@ var FilterItems = ({
6956
7355
  next[index] = { ...next[index], [prop]: value };
6957
7356
  if (prop === "operator") {
6958
7357
  const newOperatorId = value;
6959
- const currentFilter = next[index];
7358
+ const currentFilter = filters[index];
6960
7359
  if (!newOperatorId) {
6961
7360
  throw new Error("you bad");
6962
7361
  }
@@ -6977,7 +7376,7 @@ var FilterItems = ({
6977
7376
  }
6978
7377
  setFilters(next);
6979
7378
  };
6980
- return /* @__PURE__ */ jsx77(
7379
+ return /* @__PURE__ */ jsx79(
6981
7380
  FilterMenu,
6982
7381
  {
6983
7382
  id: "search-and-filter-options",
@@ -6990,7 +7389,7 @@ var FilterItems = ({
6990
7389
  onClick: handleAddFilter,
6991
7390
  "data-testid": "add-filter",
6992
7391
  children: [
6993
- /* @__PURE__ */ jsx77(Icon5, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7392
+ /* @__PURE__ */ jsx79(Icon5, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
6994
7393
  addButtonText
6995
7394
  ]
6996
7395
  }
@@ -7006,7 +7405,7 @@ var FilterItems = ({
7006
7405
  })) == null ? void 0 : _a.options) != null ? _b : [];
7007
7406
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
7008
7407
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
7009
- return /* @__PURE__ */ jsx77(
7408
+ return /* @__PURE__ */ jsx79(
7010
7409
  FilterItem,
7011
7410
  {
7012
7411
  index: i,
@@ -7017,7 +7416,8 @@ var FilterItems = ({
7017
7416
  onFilterDynamicChange: (e) => handleUpdateFilter(i, "dynamicField", e),
7018
7417
  valueOptions: possibleValueOptions,
7019
7418
  initialCriteriaTitle,
7020
- criteriaGroupOperator
7419
+ criteriaGroupOperator,
7420
+ onCriteriaGroupOperatorChange
7021
7421
  },
7022
7422
  i
7023
7423
  );
@@ -7030,8 +7430,8 @@ var FilterItems = ({
7030
7430
  import { VerticalRhythm as VerticalRhythm7 } from "@uniformdev/design-system";
7031
7431
 
7032
7432
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
7033
- import { Button as Button5, Callout as Callout4, HorizontalRhythm as HorizontalRhythm9, Paragraph } from "@uniformdev/design-system";
7034
- import { Fragment as Fragment14, jsx as jsx78, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
7433
+ import { Button as Button5, Callout as Callout5, HorizontalRhythm as HorizontalRhythm9, Paragraph } from "@uniformdev/design-system";
7434
+ import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
7035
7435
  var SearchAndFilterResultContainer = ({
7036
7436
  buttonText,
7037
7437
  clearButtonLabel = "clear",
@@ -7040,7 +7440,7 @@ var SearchAndFilterResultContainer = ({
7040
7440
  onHandleClear,
7041
7441
  hideClearButton
7042
7442
  }) => {
7043
- const { searchTerm, totalResults, filters, handleResetFilters, setSearchTerm } = useSearchAndFilter();
7443
+ const { searchTerm, totalResults, filters, handleResetFilters, setSearchTerm, isLoading } = useSearchAndFilter();
7044
7444
  const emptyFilters = filters.length === 0 || filters.every((filter) => !filter.value);
7045
7445
  const getTextValue = ({
7046
7446
  defaultPropText,
@@ -7071,7 +7471,7 @@ var SearchAndFilterResultContainer = ({
7071
7471
  filterText: "No results match the selected filters",
7072
7472
  fallbackText: "No matching results found"
7073
7473
  });
7074
- if (totalResults && totalResults > 0) {
7474
+ if (isLoading || totalResults === void 0 || totalResults > 0) {
7075
7475
  return null;
7076
7476
  }
7077
7477
  const handleClearSearch = () => {
@@ -7082,18 +7482,18 @@ var SearchAndFilterResultContainer = ({
7082
7482
  handleResetFilters();
7083
7483
  }
7084
7484
  };
7085
- return /* @__PURE__ */ jsxs37(Fragment14, { children: [
7485
+ return /* @__PURE__ */ jsxs37(Fragment15, { children: [
7086
7486
  /* @__PURE__ */ jsxs37(HorizontalRhythm9, { children: [
7087
7487
  /* @__PURE__ */ jsxs37("span", { children: [
7088
7488
  totalResults,
7089
7489
  " results ",
7090
7490
  searchTerm ? `for "${searchTerm}"` : null
7091
7491
  ] }),
7092
- !searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx78(Button5, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7492
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx80(Button5, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7093
7493
  ] }),
7094
- totalResults === 0 ? /* @__PURE__ */ jsxs37(Callout4, { title: automateCalloutTitle, type: "note", children: [
7095
- calloutText ? /* @__PURE__ */ jsx78(Paragraph, { children: calloutText }) : null,
7096
- hideClearButton ? null : /* @__PURE__ */ jsx78(
7494
+ totalResults === 0 ? /* @__PURE__ */ jsxs37(Callout5, { title: automateCalloutTitle, type: "note", children: [
7495
+ calloutText ? /* @__PURE__ */ jsx80(Paragraph, { children: calloutText }) : null,
7496
+ hideClearButton ? null : /* @__PURE__ */ jsx80(
7097
7497
  Button5,
7098
7498
  {
7099
7499
  buttonType: "tertiaryOutline",
@@ -7108,25 +7508,26 @@ var SearchAndFilterResultContainer = ({
7108
7508
  };
7109
7509
 
7110
7510
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7111
- import { jsx as jsx79, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
7511
+ import { jsx as jsx81, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
7112
7512
  var SearchAndFilter = ({
7113
7513
  filters,
7114
7514
  filterOptions,
7115
7515
  filterVisible,
7116
7516
  filterControls,
7117
7517
  viewSwitchControls,
7118
- resultsContainerView = /* @__PURE__ */ jsx79(SearchAndFilterResultContainer, {}),
7518
+ resultsContainerView = /* @__PURE__ */ jsx81(SearchAndFilterResultContainer, {}),
7119
7519
  filterMapper: filterMapper2 = filterMapper,
7120
7520
  additionalFiltersContainer,
7121
7521
  onChange,
7122
7522
  defaultSearchTerm,
7123
7523
  onSearchChange,
7124
7524
  totalResults,
7525
+ isLoading,
7125
7526
  allowBindingSearchTerm = false,
7126
7527
  resetFilterValues = [],
7127
7528
  onResetFilterValues
7128
7529
  }) => {
7129
- return /* @__PURE__ */ jsx79(
7530
+ return /* @__PURE__ */ jsx81(
7130
7531
  SearchAndFilterProvider,
7131
7532
  {
7132
7533
  filters,
@@ -7136,22 +7537,23 @@ var SearchAndFilter = ({
7136
7537
  defaultSearchTerm,
7137
7538
  onSearchChange,
7138
7539
  totalResults,
7540
+ isLoading,
7139
7541
  resetFilterValues,
7140
7542
  filterMapper: filterMapper2,
7141
7543
  allowBindingSearchTerm,
7142
7544
  onResetFilterValues,
7143
7545
  children: /* @__PURE__ */ jsxs38(VerticalRhythm7, { "data-testid": "search-and-filter", children: [
7144
7546
  /* @__PURE__ */ jsxs38("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7145
- /* @__PURE__ */ jsx79(
7547
+ /* @__PURE__ */ jsx81(
7146
7548
  "div",
7147
7549
  {
7148
7550
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
7149
- children: !filterControls ? /* @__PURE__ */ jsx79(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7551
+ children: !filterControls ? /* @__PURE__ */ jsx81(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7150
7552
  }
7151
7553
  ),
7152
7554
  viewSwitchControls
7153
7555
  ] }),
7154
- /* @__PURE__ */ jsx79(FilterItems, { additionalFiltersContainer }),
7556
+ /* @__PURE__ */ jsx81(FilterItems, { additionalFiltersContainer }),
7155
7557
  resultsContainerView
7156
7558
  ] })
7157
7559
  }
@@ -7160,17 +7562,17 @@ var SearchAndFilter = ({
7160
7562
 
7161
7563
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
7162
7564
  import { InputKeywordSearch as InputKeywordSearch2 } from "@uniformdev/design-system";
7163
- import { createContext as createContext7, useState as useState22 } from "react";
7565
+ import { createContext as createContext9, useState as useState23 } from "react";
7164
7566
  import { useDebounce as useDebounce8 } from "react-use";
7165
- import { jsx as jsx80 } from "@emotion/react/jsx-runtime";
7166
- var SearchOnlyContext = createContext7({
7567
+ import { jsx as jsx82 } from "@emotion/react/jsx-runtime";
7568
+ var SearchOnlyContext = createContext9({
7167
7569
  searchTerm: "",
7168
7570
  setSearchTerm: () => {
7169
7571
  }
7170
7572
  });
7171
7573
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7172
7574
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
7173
- const [localeSearchTerm, setLocaleSearchTerm] = useState22("");
7575
+ const [localeSearchTerm, setLocaleSearchTerm] = useState23("");
7174
7576
  useDebounce8(
7175
7577
  () => {
7176
7578
  setSearchTerm(localeSearchTerm);
@@ -7179,14 +7581,14 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7179
7581
  300,
7180
7582
  [localeSearchTerm]
7181
7583
  );
7182
- return /* @__PURE__ */ jsx80(
7584
+ return /* @__PURE__ */ jsx82(
7183
7585
  SearchOnlyContext.Provider,
7184
7586
  {
7185
7587
  value: {
7186
7588
  searchTerm,
7187
7589
  setSearchTerm: setLocaleSearchTerm
7188
7590
  },
7189
- children: /* @__PURE__ */ jsx80("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ jsx80(
7591
+ children: /* @__PURE__ */ jsx82("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ jsx82(
7190
7592
  InputKeywordSearch2,
7191
7593
  {
7192
7594
  placeholder: "Search...",
@@ -7204,9 +7606,9 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7204
7606
  import { InputComboBox as InputComboBox6, InputSelect as InputSelect5, SegmentedControl, VerticalRhythm as VerticalRhythm8 } from "@uniformdev/design-system";
7205
7607
 
7206
7608
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
7207
- import { css as css22 } from "@emotion/react";
7609
+ import { css as css23 } from "@emotion/react";
7208
7610
  import { cq as cq2, fadeInLtr as fadeInLtr2 } from "@uniformdev/design-system";
7209
- var ConditionalFilterRow2 = css22`
7611
+ var ConditionalFilterRow2 = css23`
7210
7612
  display: grid;
7211
7613
  grid-template-columns: 35px 1fr;
7212
7614
  gap: var(--spacing-sm);
@@ -7243,7 +7645,7 @@ var ConditionalFilterRow2 = css22`
7243
7645
  animation: ${fadeInLtr2} var(--duration-fast) var(--timing-ease-out);
7244
7646
  }
7245
7647
  `;
7246
- var ConditionalInputRow2 = css22`
7648
+ var ConditionalInputRow2 = css23`
7247
7649
  display: flex;
7248
7650
  gap: var(--spacing-sm);
7249
7651
  flex-wrap: wrap;
@@ -7266,11 +7668,13 @@ var ConditionalInputRow2 = css22`
7266
7668
  }
7267
7669
  }
7268
7670
  `;
7269
- var SearchInput2 = css22`
7270
- max-height: 40px;
7271
- min-height: unset;
7671
+ var SearchInput2 = css23`
7672
+ && {
7673
+ max-height: 40px;
7674
+ min-height: unset;
7675
+ }
7272
7676
  `;
7273
- var FilterButton3 = css22`
7677
+ var FilterButton3 = css23`
7274
7678
  align-items: center;
7275
7679
  background: var(--white);
7276
7680
  border: 1px solid var(--gray-300);
@@ -7307,13 +7711,13 @@ var FilterButton3 = css22`
7307
7711
  opacity: var(--opacity-50);
7308
7712
  }
7309
7713
  `;
7310
- var FilterButtonText2 = css22`
7714
+ var FilterButtonText2 = css23`
7311
7715
  overflow: hidden;
7312
7716
  text-overflow: ellipsis;
7313
7717
  white-space: nowrap;
7314
7718
  max-width: 14ch;
7315
7719
  `;
7316
- var FilterButtonSelected2 = css22`
7720
+ var FilterButtonSelected2 = css23`
7317
7721
  background: var(--gray-100);
7318
7722
  border-color: var(--gray-300);
7319
7723
 
@@ -7321,7 +7725,7 @@ var FilterButtonSelected2 = css22`
7321
7725
  color: var(--accent-dark);
7322
7726
  }
7323
7727
  `;
7324
- var FilterButtonWithOptions2 = css22`
7728
+ var FilterButtonWithOptions2 = css23`
7325
7729
  :where([aria-expanded='true']) {
7326
7730
  background: var(--purple-rain-100);
7327
7731
  border-color: var(--accent-light);
@@ -7333,14 +7737,14 @@ var FilterButtonWithOptions2 = css22`
7333
7737
  }
7334
7738
  }
7335
7739
  `;
7336
- var SearchIcon2 = css22`
7740
+ var SearchIcon2 = css23`
7337
7741
  color: var(--icon-color);
7338
7742
  position: absolute;
7339
7743
  inset: 0 var(--spacing-base) 0 auto;
7340
7744
  margin: auto;
7341
7745
  transition: color var(--duration-fast) var(--timing-ease-out);
7342
7746
  `;
7343
- var AddConditionalBtn2 = css22`
7747
+ var AddConditionalBtn2 = css23`
7344
7748
  align-items: center;
7345
7749
  background: transparent;
7346
7750
  border: none;
@@ -7359,14 +7763,14 @@ var AddConditionalBtn2 = css22`
7359
7763
  color: var(--gray-400);
7360
7764
  }
7361
7765
  `;
7362
- var Title2 = css22`
7766
+ var Title2 = css23`
7363
7767
  color: var(--typography-light);
7364
7768
 
7365
7769
  &:focus {
7366
7770
  outline: none;
7367
7771
  }
7368
7772
  `;
7369
- var ResetConditionsBtn2 = css22`
7773
+ var ResetConditionsBtn2 = css23`
7370
7774
  background: transparent;
7371
7775
  border: none;
7372
7776
  color: var(--action-destructive-default);
@@ -7378,12 +7782,12 @@ var ResetConditionsBtn2 = css22`
7378
7782
  color: var(--action-destructive-hover);
7379
7783
  }
7380
7784
  `;
7381
- var IconBtn2 = css22`
7785
+ var IconBtn2 = css23`
7382
7786
  background: transparent;
7383
7787
  border: none;
7384
7788
  padding: var(--spacing-sm);
7385
7789
  `;
7386
- var SearchAndFilterOptionsContainer3 = css22`
7790
+ var SearchAndFilterOptionsContainer3 = css23`
7387
7791
  background: var(--gray-50);
7388
7792
  border: 1px solid var(--gray-300);
7389
7793
  border-radius: var(--rounded-base);
@@ -7396,17 +7800,17 @@ var SearchAndFilterOptionsContainer3 = css22`
7396
7800
  position: relative;
7397
7801
  z-index: 1;
7398
7802
  `;
7399
- var SearchAndFilterOptionsInnerContainer2 = css22`
7803
+ var SearchAndFilterOptionsInnerContainer2 = css23`
7400
7804
  display: flex;
7401
7805
  flex-direction: column;
7402
7806
  gap: var(--spacing-sm);
7403
7807
  padding-inline: var(--spacing-md);
7404
7808
  `;
7405
- var SearchAndFilterButtonGroup2 = css22`
7809
+ var SearchAndFilterButtonGroup2 = css23`
7406
7810
  margin-top: var(--spacing-xs);
7407
7811
  margin-left: calc(56px + var(--spacing-md));
7408
7812
  `;
7409
- var SortFilterWrapper = (hiddenLocaleInput) => css22`
7813
+ var SortFilterWrapper = (hiddenLocaleInput) => css23`
7410
7814
  align-items: center;
7411
7815
  display: flex;
7412
7816
  gap: var(--spacing-base);
@@ -7417,13 +7821,13 @@ var SortFilterWrapper = (hiddenLocaleInput) => css22`
7417
7821
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
7418
7822
  }
7419
7823
  `;
7420
- var SortFilterInputRow = css22`
7824
+ var SortFilterInputRow = css23`
7421
7825
  align-items: center;
7422
7826
  display: grid;
7423
7827
  grid-template-columns: 1fr auto;
7424
7828
  gap: var(--spacing-base);
7425
7829
  `;
7426
- var InputVariableWrapper = css22`
7830
+ var InputVariableWrapper = css23`
7427
7831
  flex-grow: 1;
7428
7832
 
7429
7833
  // we need to override label styles nested within the input variable
@@ -7434,7 +7838,7 @@ var InputVariableWrapper = css22`
7434
7838
  `;
7435
7839
 
7436
7840
  // src/components/SearchAndFilter/SortItems.tsx
7437
- import { jsx as jsx81, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
7841
+ import { jsx as jsx83, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
7438
7842
  var SortItems = ({
7439
7843
  sortByLabel = "Sort by",
7440
7844
  localeLabel = "Show locale",
@@ -7458,9 +7862,9 @@ var SortItems = ({
7458
7862
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
7459
7863
  return /* @__PURE__ */ jsxs39("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7460
7864
  /* @__PURE__ */ jsxs39(VerticalRhythm8, { gap: "xs", children: [
7461
- /* @__PURE__ */ jsx81("span", { css: Title2, children: sortByLabel }),
7865
+ /* @__PURE__ */ jsx83("span", { css: Title2, children: sortByLabel }),
7462
7866
  /* @__PURE__ */ jsxs39("div", { css: SortFilterInputRow, children: [
7463
- /* @__PURE__ */ jsx81(
7867
+ /* @__PURE__ */ jsx83(
7464
7868
  InputVariables,
7465
7869
  {
7466
7870
  disableInlineMenu: disableSortBinding,
@@ -7468,7 +7872,7 @@ var SortItems = ({
7468
7872
  value: sortField,
7469
7873
  valueToResetTo: "created_at",
7470
7874
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
7471
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7875
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7472
7876
  InputComboBox6,
7473
7877
  {
7474
7878
  id: "sort-by-field",
@@ -7491,7 +7895,7 @@ var SortItems = ({
7491
7895
  )
7492
7896
  }
7493
7897
  ),
7494
- /* @__PURE__ */ jsx81(
7898
+ /* @__PURE__ */ jsx83(
7495
7899
  InputVariables,
7496
7900
  {
7497
7901
  disableInlineMenu: disableSortBinding,
@@ -7499,7 +7903,7 @@ var SortItems = ({
7499
7903
  valueToResetTo: "DESC",
7500
7904
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
7501
7905
  onChange: (e) => onSortChange(`${sortField}_${e}`),
7502
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7906
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7503
7907
  SegmentedControl,
7504
7908
  {
7505
7909
  noCheckmark: true,
@@ -7531,14 +7935,14 @@ var SortItems = ({
7531
7935
  )
7532
7936
  ] })
7533
7937
  ] }),
7534
- hideLocaleOptions ? null : /* @__PURE__ */ jsx81(VerticalRhythm8, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ jsx81(
7938
+ hideLocaleOptions ? null : /* @__PURE__ */ jsx83(VerticalRhythm8, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ jsx83(
7535
7939
  InputVariables,
7536
7940
  {
7537
7941
  label: localeLabelValue,
7538
7942
  value: localeValue,
7539
7943
  showMenuPosition: "inline-right",
7540
7944
  onChange: (e) => onLocaleChange(e != null ? e : ""),
7541
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7945
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7542
7946
  InputSelect5,
7543
7947
  {
7544
7948
  name: "localeReturned",
@@ -7569,7 +7973,7 @@ function createLocationValidator(setValue, validate) {
7569
7973
 
7570
7974
  // src/utils/useContentDataResourceLocaleInfo.ts
7571
7975
  import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
7572
- import { useEffect as useEffect20, useRef as useRef10 } from "react";
7976
+ import { useEffect as useEffect23, useRef as useRef11 } from "react";
7573
7977
  function useContentDataResourceLocaleInfo({
7574
7978
  locale,
7575
7979
  defaultLocale,
@@ -7577,12 +7981,12 @@ function useContentDataResourceLocaleInfo({
7577
7981
  dynamicInputs
7578
7982
  }) {
7579
7983
  var _a;
7580
- const setLocaleRef = useRef10(setLocale);
7984
+ const setLocaleRef = useRef11(setLocale);
7581
7985
  setLocaleRef.current = setLocale;
7582
7986
  const { flatVariables } = useVariables();
7583
7987
  const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : defaultLocale != null ? defaultLocale : "";
7584
7988
  const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7585
- useEffect20(() => {
7989
+ useEffect23(() => {
7586
7990
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7587
7991
  setLocaleRef.current(effectiveLocale);
7588
7992
  }
@@ -7594,7 +7998,7 @@ function useContentDataResourceLocaleInfo({
7594
7998
  import {
7595
7999
  AddListButton as AddListButton2,
7596
8000
  Button as Button6,
7597
- Callout as Callout5,
8001
+ Callout as Callout6,
7598
8002
  DrawerContent,
7599
8003
  Heading,
7600
8004
  Input as Input10,
@@ -7604,8 +8008,8 @@ import {
7604
8008
  InputToggle as InputToggle3,
7605
8009
  Label,
7606
8010
  LoadingIndicator as LoadingIndicator4,
7607
- LoadingOverlay,
7608
- Menu as Menu3,
8011
+ LoadingOverlay as LoadingOverlay2,
8012
+ Menu as Menu4,
7609
8013
  MenuItem as MenuItem2,
7610
8014
  ParameterGroup,
7611
8015
  ParameterImage,
@@ -7635,7 +8039,7 @@ export {
7635
8039
  AddListButton2 as AddListButton,
7636
8040
  Button6 as Button,
7637
8041
  CHECKBOX_OPERATORS,
7638
- Callout5 as Callout,
8042
+ Callout6 as Callout,
7639
8043
  ControlledValuePlugin,
7640
8044
  DATE_OPERATORS,
7641
8045
  DATE_TIME_OPERATORS,
@@ -7648,6 +8052,10 @@ export {
7648
8052
  DataTypeEditor,
7649
8053
  DateEditor,
7650
8054
  DateRangeEditor,
8055
+ DelegationContext,
8056
+ DelegationDisabledError,
8057
+ DelegationGate,
8058
+ DelegationProvider,
7651
8059
  DrawerContent,
7652
8060
  EDIT_VARIABLE_COMMAND,
7653
8061
  FilterButton2 as FilterButton,
@@ -7670,9 +8078,9 @@ export {
7670
8078
  Label,
7671
8079
  LinkButton,
7672
8080
  LoadingIndicator4 as LoadingIndicator,
7673
- LoadingOverlay,
8081
+ LoadingOverlay2 as LoadingOverlay,
7674
8082
  MULTI_SELECT_OPERATORS,
7675
- Menu3 as Menu,
8083
+ Menu4 as Menu,
7676
8084
  MenuItem2 as MenuItem,
7677
8085
  MeshApp,
7678
8086
  NUMBER_OPERATORS,
@@ -7749,8 +8157,10 @@ export {
7749
8157
  VariablesProvider,
7750
8158
  bindableFiltersMapper,
7751
8159
  convertConnectedDataToVariable,
8160
+ createDelegationFetch,
7752
8161
  createLocationValidator,
7753
8162
  filterMapper,
8163
+ isDelegationExpiredResponse,
7754
8164
  prettifyBindExpression,
7755
8165
  readOnlyAttributes,
7756
8166
  serializeVariablesEditorSerializedState,
@@ -7760,6 +8170,8 @@ export {
7760
8170
  urlEncodeRequestUrl,
7761
8171
  useConnectedDataAsVariables,
7762
8172
  useContentDataResourceLocaleInfo,
8173
+ useDelegation,
8174
+ useDelegationFetch,
7763
8175
  useDynamicInputsAsVariables,
7764
8176
  useMeshLocation,
7765
8177
  useObjectSearchContext,