@uniformdev/mesh-sdk-react 20.72.3-alpha.2 → 20.72.3-alpha.5

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.mjs CHANGED
@@ -267,6 +267,22 @@ function useConnectedDataAsVariables(connectedData) {
267
267
  );
268
268
  }
269
269
 
270
+ // src/hooks/useDelegation.ts
271
+ import { useContext } from "react";
272
+
273
+ // src/components/Delegation/DelegationContext.ts
274
+ import { createContext } from "react";
275
+ var DelegationContext = createContext(null);
276
+
277
+ // src/hooks/useDelegation.ts
278
+ function useDelegation() {
279
+ const ctx = useContext(DelegationContext);
280
+ if (!ctx) {
281
+ throw new Error("useDelegation must be used within a <DelegationProvider>");
282
+ }
283
+ return ctx;
284
+ }
285
+
270
286
  // src/hooks/useDynamicInputsAsVariables.tsx
271
287
  import { LOCALE_DYNAMIC_INPUT_NAME } from "@uniformdev/canvas";
272
288
  import { useMemo as useMemo2 } from "react";
@@ -310,15 +326,15 @@ Current preview value: ${input3.value || "not provided"}`
310
326
  import { useMemo as useMemo4, useRef } from "react";
311
327
 
312
328
  // src/components/UniformMeshLocationContext.tsx
313
- import { createContext as createContext2, useContext as useContext2, useMemo as useMemo3, useState } from "react";
329
+ import { createContext as createContext3, useContext as useContext3, useMemo as useMemo3, useState } from "react";
314
330
 
315
331
  // src/components/UniformMeshSdkContext.tsx
316
332
  import { Theme } from "@uniformdev/design-system";
317
- import { createContext, useContext } from "react";
333
+ import { createContext as createContext2, useContext as useContext2 } from "react";
318
334
  import { jsx as jsx16, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
319
- var UniformMeshSdkContext = createContext(void 0);
335
+ var UniformMeshSdkContext = createContext2(void 0);
320
336
  var useUniformMeshSdkContext = () => {
321
- const context = useContext(UniformMeshSdkContext);
337
+ const context = useContext2(UniformMeshSdkContext);
322
338
  if (!context) {
323
339
  throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");
324
340
  }
@@ -333,7 +349,7 @@ function useUniformMeshSdk() {
333
349
 
334
350
  // src/components/UniformMeshLocationContext.tsx
335
351
  import { jsx as jsx17 } from "@emotion/react/jsx-runtime";
336
- var UniformMeshLocationContext = createContext2(void 0);
352
+ var UniformMeshLocationContext = createContext3(void 0);
337
353
  var UniformMeshLocationContextProvider = ({
338
354
  children
339
355
  }) => {
@@ -356,7 +372,7 @@ var UniformMeshLocationContextProvider = ({
356
372
  return /* @__PURE__ */ jsx17(UniformMeshLocationContext.Provider, { value: { location }, children });
357
373
  };
358
374
  var useUniformMeshLocationContext = () => {
359
- const context = useContext2(UniformMeshLocationContext);
375
+ const context = useContext3(UniformMeshLocationContext);
360
376
  if (!context) {
361
377
  throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");
362
378
  }
@@ -722,7 +738,7 @@ var variablesTipText = css`
722
738
 
723
739
  // src/components/Variables/VariablesProvider.tsx
724
740
  import mitt from "mitt";
725
- import { createContext as createContext3, useContext as useContext3, useEffect as useEffect3, useMemo as useMemo5, useState as useState3 } from "react";
741
+ import { createContext as createContext4, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo5, useState as useState3 } from "react";
726
742
 
727
743
  // src/components/Variables/util/useVariableEditTransaction.ts
728
744
  import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
@@ -911,7 +927,7 @@ function VariableEditor({
911
927
 
912
928
  // src/components/Variables/VariablesProvider.tsx
913
929
  import { jsx as jsx20, jsxs as jsxs6 } from "@emotion/react/jsx-runtime";
914
- var VariablesContext = createContext3(null);
930
+ var VariablesContext = createContext4(null);
915
931
  function VariablesProvider({
916
932
  value,
917
933
  onChange,
@@ -1036,7 +1052,7 @@ function VariablesProvider({
1036
1052
  ] });
1037
1053
  }
1038
1054
  function useVariables(returnEmptyWithoutProvider = false) {
1039
- const context = useContext3(VariablesContext);
1055
+ const context = useContext4(VariablesContext);
1040
1056
  if (!context) {
1041
1057
  if (returnEmptyWithoutProvider) {
1042
1058
  return {
@@ -2392,7 +2408,7 @@ import {
2392
2408
  import { useEffect as useEffect10 } from "react";
2393
2409
  import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs11 } from "@emotion/react/jsx-runtime";
2394
2410
  function VariablesComposerInput({
2395
- css: css23,
2411
+ css: css24,
2396
2412
  placeholder,
2397
2413
  ...contentEditableProps
2398
2414
  }) {
@@ -3918,17 +3934,186 @@ function convertRequestDataToDataType(dataType, requestData) {
3918
3934
  };
3919
3935
  }
3920
3936
 
3937
+ // src/components/Delegation/DelegationGate.tsx
3938
+ import { Callout as Callout3, LoadingOverlay } from "@uniformdev/design-system";
3939
+ import { useEffect as useEffect12 } from "react";
3940
+
3941
+ // src/components/Delegation/styles/DelegationGate.style.ts
3942
+ import { css as css14 } from "@emotion/react";
3943
+ var delegationGateStyle = css14`
3944
+ min-height: 12rem;
3945
+ width: 100%;
3946
+ `;
3947
+
3948
+ // src/components/Delegation/DelegationGate.tsx
3949
+ import { Fragment as Fragment10, jsx as jsx46 } from "@emotion/react/jsx-runtime";
3950
+ function DefaultDelegationLoading() {
3951
+ return /* @__PURE__ */ jsx46("div", { css: delegationGateStyle, children: /* @__PURE__ */ jsx46(LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
3952
+ }
3953
+ function DefaultDelegationDisabled() {
3954
+ 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." });
3955
+ }
3956
+ function DefaultDelegationError({ error }) {
3957
+ useEffect12(() => {
3958
+ console.error("Delegation connection failed", error);
3959
+ }, [error]);
3960
+ 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." }) });
3961
+ }
3962
+ function DelegationGate({
3963
+ children,
3964
+ loadingComponent,
3965
+ disabledComponent,
3966
+ errorComponent
3967
+ }) {
3968
+ const { status, error } = useDelegation();
3969
+ if (status === "active") {
3970
+ return /* @__PURE__ */ jsx46(Fragment10, { children });
3971
+ }
3972
+ if (status === "idle" || status === "acquiring") {
3973
+ return /* @__PURE__ */ jsx46(Fragment10, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ jsx46(DefaultDelegationLoading, {}) });
3974
+ }
3975
+ if (status === "disabled") {
3976
+ return /* @__PURE__ */ jsx46(Fragment10, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ jsx46(DefaultDelegationDisabled, {}) });
3977
+ }
3978
+ if (status === "error") {
3979
+ const resolvedError = error != null ? error : new Error("Unknown delegation error");
3980
+ if (errorComponent !== void 0) {
3981
+ if (typeof errorComponent === "function") {
3982
+ return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent({ error: resolvedError }) });
3983
+ }
3984
+ return /* @__PURE__ */ jsx46(Fragment10, { children: errorComponent });
3985
+ }
3986
+ return /* @__PURE__ */ jsx46(DefaultDelegationError, { error: resolvedError });
3987
+ }
3988
+ return null;
3989
+ }
3990
+
3991
+ // src/components/Delegation/DelegationProvider.tsx
3992
+ import { useCallback as useCallback5, useEffect as useEffect13, useMemo as useMemo12, useRef as useRef7, useState as useState11 } from "react";
3993
+ import { jsx as jsx47 } from "@emotion/react/jsx-runtime";
3994
+ var DEFAULT_REVALIDATE_AFTER_MS = 5 * 60 * 1e3;
3995
+ function DelegationProvider({
3996
+ sdk,
3997
+ onSessionToken,
3998
+ checkActive,
3999
+ revalidateOnFocus = true,
4000
+ revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
4001
+ children
4002
+ }) {
4003
+ const [status, setStatus] = useState11("idle");
4004
+ const [error, setError] = useState11(null);
4005
+ const acquiringRef = useRef7(false);
4006
+ const mountedRef = useRef7(true);
4007
+ const statusRef = useRef7("idle");
4008
+ statusRef.current = status;
4009
+ const acquire = useCallback5(async () => {
4010
+ if (acquiringRef.current) {
4011
+ return;
4012
+ }
4013
+ acquiringRef.current = true;
4014
+ setStatus("acquiring");
4015
+ setError(null);
4016
+ try {
4017
+ const isActive = await checkActive();
4018
+ if (isActive) {
4019
+ if (mountedRef.current) {
4020
+ setStatus("active");
4021
+ }
4022
+ return;
4023
+ }
4024
+ if (!mountedRef.current) {
4025
+ return;
4026
+ }
4027
+ const sessionToken = await sdk.getSessionToken();
4028
+ if (!mountedRef.current) {
4029
+ return;
4030
+ }
4031
+ if (!sessionToken) {
4032
+ setStatus("disabled");
4033
+ return;
4034
+ }
4035
+ await onSessionToken(sessionToken);
4036
+ if (mountedRef.current) {
4037
+ setStatus("active");
4038
+ }
4039
+ } catch (err) {
4040
+ if (mountedRef.current) {
4041
+ setError(err instanceof Error ? err : new Error(String(err)));
4042
+ setStatus("error");
4043
+ }
4044
+ } finally {
4045
+ acquiringRef.current = false;
4046
+ }
4047
+ }, [sdk, onSessionToken, checkActive]);
4048
+ useEffect13(() => {
4049
+ mountedRef.current = true;
4050
+ void acquire();
4051
+ return () => {
4052
+ mountedRef.current = false;
4053
+ };
4054
+ }, [acquire]);
4055
+ const revalidate = useCallback5(async () => {
4056
+ if (acquiringRef.current) {
4057
+ return;
4058
+ }
4059
+ if (statusRef.current !== "active") {
4060
+ return;
4061
+ }
4062
+ try {
4063
+ const isActive = await checkActive();
4064
+ if (!mountedRef.current) {
4065
+ return;
4066
+ }
4067
+ if (!isActive) {
4068
+ void acquire();
4069
+ }
4070
+ } catch (e) {
4071
+ }
4072
+ }, [checkActive, acquire]);
4073
+ useEffect13(() => {
4074
+ if (!revalidateOnFocus) {
4075
+ return;
4076
+ }
4077
+ if (typeof document === "undefined") {
4078
+ return;
4079
+ }
4080
+ let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
4081
+ const handleVisibilityChange = () => {
4082
+ if (document.visibilityState === "hidden") {
4083
+ hiddenAt = Date.now();
4084
+ return;
4085
+ }
4086
+ if (document.visibilityState === "visible") {
4087
+ const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
4088
+ hiddenAt = null;
4089
+ if (elapsed >= revalidateAfterMs) {
4090
+ void revalidate();
4091
+ }
4092
+ }
4093
+ };
4094
+ document.addEventListener("visibilitychange", handleVisibilityChange);
4095
+ return () => {
4096
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
4097
+ };
4098
+ }, [revalidateOnFocus, revalidateAfterMs, revalidate]);
4099
+ const reacquire = useCallback5(() => {
4100
+ void acquire();
4101
+ }, [acquire]);
4102
+ const value = useMemo12(() => ({ status, error, reacquire }), [status, error, reacquire]);
4103
+ return /* @__PURE__ */ jsx47(DelegationContext.Provider, { value, children });
4104
+ }
4105
+
3921
4106
  // src/components/MeshApp.tsx
3922
4107
  import { IconsProvider, LoadingIndicator as LoadingIndicator2, Theme as Theme2 } from "@uniformdev/design-system";
3923
4108
 
3924
4109
  // src/hooks/useInitializeUniformMeshSdk.ts
3925
4110
  import { initializeUniformMeshSDK } from "@uniformdev/mesh-sdk";
3926
- import { useEffect as useEffect12, useRef as useRef7, useState as useState11 } from "react";
4111
+ import { useEffect as useEffect14, useRef as useRef8, useState as useState12 } from "react";
3927
4112
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3928
- const [error, setError] = useState11();
3929
- const [sdk, setSdk] = useState11();
3930
- const initializationInProgress = useRef7(false);
3931
- useEffect12(
4113
+ const [error, setError] = useState12();
4114
+ const [sdk, setSdk] = useState12();
4115
+ const initializationInProgress = useRef8(false);
4116
+ useEffect14(
3932
4117
  () => {
3933
4118
  if (typeof window === "undefined" || sdk) {
3934
4119
  return;
@@ -3961,7 +4146,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
3961
4146
  };
3962
4147
 
3963
4148
  // src/components/MeshApp.tsx
3964
- import { jsx as jsx46, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
4149
+ import { jsx as jsx48, jsxs as jsxs21 } from "@emotion/react/jsx-runtime";
3965
4150
  var MeshApp = ({
3966
4151
  children,
3967
4152
  loadingComponent,
@@ -3970,25 +4155,25 @@ var MeshApp = ({
3970
4155
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
3971
4156
  if (initializing || !sdk) {
3972
4157
  const LoadingComponent = loadingComponent;
3973
- return LoadingComponent ? /* @__PURE__ */ jsx46(LoadingComponent, {}) : /* @__PURE__ */ jsx46(LoadingIndicator2, {});
4158
+ return LoadingComponent ? /* @__PURE__ */ jsx48(LoadingComponent, {}) : /* @__PURE__ */ jsx48(LoadingIndicator2, {});
3974
4159
  }
3975
4160
  if (error) {
3976
4161
  const ErrorComponent = errorComponent;
3977
4162
  if (ErrorComponent) {
3978
- return /* @__PURE__ */ jsx46(ErrorComponent, { error });
4163
+ return /* @__PURE__ */ jsx48(ErrorComponent, { error });
3979
4164
  }
3980
4165
  throw error;
3981
4166
  }
3982
4167
  return /* @__PURE__ */ jsxs21(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
3983
- /* @__PURE__ */ jsx46(Theme2, {}),
3984
- /* @__PURE__ */ jsx46(IconsProvider, { children: /* @__PURE__ */ jsx46(UniformMeshLocationContextProvider, { children }) })
4168
+ /* @__PURE__ */ jsx48(Theme2, {}),
4169
+ /* @__PURE__ */ jsx48(IconsProvider, { children: /* @__PURE__ */ jsx48(UniformMeshLocationContextProvider, { children }) })
3985
4170
  ] });
3986
4171
  };
3987
4172
 
3988
4173
  // src/components/ObjectSearch/DataRefreshButton.tsx
3989
- import { css as css14 } from "@emotion/react";
4174
+ import { css as css15 } from "@emotion/react";
3990
4175
  import { Button as Button2, LoadingIndicator as LoadingIndicator3 } from "@uniformdev/design-system";
3991
- import { jsx as jsx47, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
4176
+ import { jsx as jsx49, jsxs as jsxs22 } from "@emotion/react/jsx-runtime";
3992
4177
  var DataRefreshButton = ({
3993
4178
  buttonText,
3994
4179
  isLoading,
@@ -3996,10 +4181,10 @@ var DataRefreshButton = ({
3996
4181
  ...props
3997
4182
  }) => {
3998
4183
  return /* @__PURE__ */ jsxs22(Button2, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
3999
- !isLoading ? null : /* @__PURE__ */ jsx47(
4184
+ !isLoading ? null : /* @__PURE__ */ jsx49(
4000
4185
  LoadingIndicator3,
4001
4186
  {
4002
- css: css14`
4187
+ css: css15`
4003
4188
  ${isLoading ? "opacity: 0.2;" : void 0}
4004
4189
  `
4005
4190
  }
@@ -4009,22 +4194,22 @@ var DataRefreshButton = ({
4009
4194
  };
4010
4195
 
4011
4196
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4012
- import { css as css16 } from "@emotion/react";
4197
+ import { css as css17 } from "@emotion/react";
4013
4198
  import { bindVariables } from "@uniformdev/canvas";
4014
- import { Callout as Callout3, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
4199
+ import { Callout as Callout4, Container, ScrollableList, VerticalRhythm as VerticalRhythm3 } from "@uniformdev/design-system";
4015
4200
 
4016
4201
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
4017
4202
  import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
4018
4203
  import {
4019
- createContext as createContext5,
4020
- useCallback as useCallback5,
4021
- useContext as useContext5,
4204
+ createContext as createContext6,
4205
+ useCallback as useCallback6,
4206
+ useContext as useContext6,
4022
4207
  useDeferredValue,
4023
- useMemo as useMemo12,
4024
- useState as useState12
4208
+ useMemo as useMemo13,
4209
+ useState as useState13
4025
4210
  } from "react";
4026
- import { jsx as jsx48 } from "@emotion/react/jsx-runtime";
4027
- var ObjectSearchContext = createContext5({
4211
+ import { jsx as jsx50 } from "@emotion/react/jsx-runtime";
4212
+ var ObjectSearchContext = createContext6({
4028
4213
  onSetQuery: () => {
4029
4214
  },
4030
4215
  onSelectItem: () => {
@@ -4045,16 +4230,16 @@ var ObjectSearchProvider = ({
4045
4230
  children,
4046
4231
  defaultQuery
4047
4232
  }) => {
4048
- const [query, setQuery] = useState12({
4233
+ const [query, setQuery] = useState13({
4049
4234
  contentType: "",
4050
4235
  keyword: "",
4051
4236
  ...defaultQuery
4052
4237
  });
4053
4238
  const { flatVariables } = useVariables(true);
4054
4239
  const querySearchDeferred = useDeferredValue(query);
4055
- const [selectedItems, setSelectedItems] = useState12(currentlySelectedItems != null ? currentlySelectedItems : []);
4056
- const [list, setList] = useState12({});
4057
- const onSetQuery = useCallback5(
4240
+ const [selectedItems, setSelectedItems] = useState13(currentlySelectedItems != null ? currentlySelectedItems : []);
4241
+ const [list, setList] = useState13({});
4242
+ const onSetQuery = useCallback6(
4058
4243
  (value2) => {
4059
4244
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
4060
4245
  return setQuery({
@@ -4066,7 +4251,7 @@ var ObjectSearchProvider = ({
4066
4251
  },
4067
4252
  [setQuery]
4068
4253
  );
4069
- const onSelectItem = useCallback5(
4254
+ const onSelectItem = useCallback6(
4070
4255
  (selectedResult) => {
4071
4256
  if (Array.isArray(selectedResult)) {
4072
4257
  setSelectedItems(selectedResult);
@@ -4080,17 +4265,17 @@ var ObjectSearchProvider = ({
4080
4265
  },
4081
4266
  [setSelectedItems, selectedItems]
4082
4267
  );
4083
- const onRemoveAllSelectedItems = useCallback5(() => {
4268
+ const onRemoveAllSelectedItems = useCallback6(() => {
4084
4269
  setSelectedItems([]);
4085
4270
  }, [setSelectedItems]);
4086
- const onSetList = useCallback5(
4271
+ const onSetList = useCallback6(
4087
4272
  (value2) => {
4088
4273
  setList(value2);
4089
4274
  },
4090
4275
  [setList]
4091
4276
  );
4092
- const boundQuery = useMemo12(() => bindQuery(query, flatVariables), [query, flatVariables]);
4093
- const value = useMemo12(
4277
+ const boundQuery = useMemo13(() => bindQuery(query, flatVariables), [query, flatVariables]);
4278
+ const value = useMemo13(
4094
4279
  () => ({
4095
4280
  boundQuery,
4096
4281
  onSetQuery,
@@ -4114,10 +4299,10 @@ var ObjectSearchProvider = ({
4114
4299
  onSetList
4115
4300
  ]
4116
4301
  );
4117
- return /* @__PURE__ */ jsx48(ObjectSearchContext.Provider, { value, children });
4302
+ return /* @__PURE__ */ jsx50(ObjectSearchContext.Provider, { value, children });
4118
4303
  };
4119
4304
  function useObjectSearchContext() {
4120
- return useContext5(ObjectSearchContext);
4305
+ return useContext6(ObjectSearchContext);
4121
4306
  }
4122
4307
  function bindQuery(query, inputs) {
4123
4308
  const { result, errors } = bindVariablesToObject2({
@@ -4135,9 +4320,9 @@ function bindQuery(query, inputs) {
4135
4320
  import { Chip, Popover } from "@uniformdev/design-system";
4136
4321
 
4137
4322
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
4138
- import { css as css15 } from "@emotion/react";
4323
+ import { css as css16 } from "@emotion/react";
4139
4324
  import { skeletonLoading } from "@uniformdev/design-system";
4140
- var ObjectListItemContainer = css15`
4325
+ var ObjectListItemContainer = css16`
4141
4326
  align-items: center;
4142
4327
  border: 1px solid var(--gray-300);
4143
4328
  border-radius: var(--rounded-base);
@@ -4146,11 +4331,11 @@ var ObjectListItemContainer = css15`
4146
4331
  grid-template-columns: 1fr auto;
4147
4332
  padding: var(--spacing-sm);
4148
4333
  `;
4149
- var ObjectListItemContainerDisabled = css15`
4334
+ var ObjectListItemContainerDisabled = css16`
4150
4335
  opacity: var(--opacity-50);
4151
4336
  pointer-events: none;
4152
4337
  `;
4153
- var ObjectListItemLoading = css15`
4338
+ var ObjectListItemLoading = css16`
4154
4339
  animation: ${skeletonLoading} 1s linear infinite alternate;
4155
4340
  border-color: transparent;
4156
4341
  min-height: 42px;
@@ -4174,43 +4359,43 @@ var ObjectListItemLoading = css15`
4174
4359
  width: 1rem;
4175
4360
  }
4176
4361
  `;
4177
- var ObjectListItemHeadingGroup = css15`
4362
+ var ObjectListItemHeadingGroup = css16`
4178
4363
  align-items: center;
4179
4364
  display: grid;
4180
4365
  `;
4181
- var ObjectListItemThumbnail = css15`
4366
+ var ObjectListItemThumbnail = css16`
4182
4367
  width: 30px;
4183
4368
  height: 30px;
4184
4369
  object-fit: cover;
4185
4370
  `;
4186
- var ObjectListItemTitle = css15`
4371
+ var ObjectListItemTitle = css16`
4187
4372
  color: var(--typography-base);
4188
4373
  display: block;
4189
4374
  font-size: var(--fs-sm);
4190
4375
  `;
4191
- var ObjectListItemSubtitle = css15`
4376
+ var ObjectListItemSubtitle = css16`
4192
4377
  color: var(--gray-500);
4193
4378
  display: block;
4194
4379
  font-size: var(--fs-xs);
4195
4380
  line-height: 1;
4196
4381
  `;
4197
- var ObjectListItemInfoContainer = css15`
4382
+ var ObjectListItemInfoContainer = css16`
4198
4383
  align-items: center;
4199
4384
  display: flex;
4200
4385
  gap: var(--spacing-sm);
4201
4386
  justify-content: center;
4202
4387
  `;
4203
- var ObjectListItemControlledContent = css15`
4388
+ var ObjectListItemControlledContent = css16`
4204
4389
  display: flex;
4205
4390
  gap: var(--spacing-sm);
4206
4391
  `;
4207
- var ObjectListItemUnControlledContent = css15`
4392
+ var ObjectListItemUnControlledContent = css16`
4208
4393
  margin-top: var(--spacing-sm);
4209
4394
  grid-column: 1 / -1;
4210
4395
  `;
4211
4396
 
4212
4397
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4213
- import { jsx as jsx49, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4398
+ import { jsx as jsx51, jsxs as jsxs23 } from "@emotion/react/jsx-runtime";
4214
4399
  var ObjectSearchListItem = ({
4215
4400
  id,
4216
4401
  title,
@@ -4251,7 +4436,7 @@ var ObjectSearchListItem = ({
4251
4436
  css: ObjectListItemControlledContent,
4252
4437
  "aria-disabled": disabled,
4253
4438
  children: [
4254
- imageUrl ? /* @__PURE__ */ jsx49(
4439
+ imageUrl ? /* @__PURE__ */ jsx51(
4255
4440
  "img",
4256
4441
  {
4257
4442
  src: imageUrl,
@@ -4261,27 +4446,27 @@ var ObjectSearchListItem = ({
4261
4446
  }
4262
4447
  ) : null,
4263
4448
  /* @__PURE__ */ jsxs23("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4264
- !contentType ? null : /* @__PURE__ */ jsx49("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4265
- /* @__PURE__ */ jsx49("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4449
+ !contentType ? null : /* @__PURE__ */ jsx51("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4450
+ /* @__PURE__ */ jsx51("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4266
4451
  ] })
4267
4452
  ]
4268
4453
  }
4269
4454
  ),
4270
4455
  /* @__PURE__ */ jsxs23("div", { css: ObjectListItemInfoContainer, children: [
4271
- selected ? /* @__PURE__ */ jsx49(Chip, { text: "selected", size: "xs" }) : null,
4272
- !popoverData ? null : /* @__PURE__ */ jsx49(Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4456
+ selected ? /* @__PURE__ */ jsx51(Chip, { text: "selected", size: "xs" }) : null,
4457
+ !popoverData ? null : /* @__PURE__ */ jsx51(Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4273
4458
  ] }),
4274
- !children ? null : /* @__PURE__ */ jsx49("div", { css: ObjectListItemUnControlledContent, children })
4459
+ !children ? null : /* @__PURE__ */ jsx51("div", { css: ObjectListItemUnControlledContent, children })
4275
4460
  ]
4276
4461
  }
4277
4462
  );
4278
4463
  };
4279
4464
  var ObjectSearchListItemLoadingSkeleton = () => {
4280
- return /* @__PURE__ */ jsx49("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4465
+ return /* @__PURE__ */ jsx51("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4281
4466
  };
4282
4467
 
4283
4468
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4284
- import { jsx as jsx50, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4469
+ import { jsx as jsx52, jsxs as jsxs24 } from "@emotion/react/jsx-runtime";
4285
4470
  var ObjectSearchContainer = ({
4286
4471
  label,
4287
4472
  enableDynamicInputToResultId,
@@ -4293,16 +4478,16 @@ var ObjectSearchContainer = ({
4293
4478
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
4294
4479
  const { flatVariables } = useVariables(true);
4295
4480
  const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
4296
- const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx50(
4481
+ const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx52(
4297
4482
  ScrollableList,
4298
4483
  {
4299
4484
  role: "list",
4300
- css: css16`
4485
+ css: css17`
4301
4486
  > div {
4302
4487
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
4303
4488
  }
4304
4489
  `,
4305
- children: /* @__PURE__ */ jsx50(DefaultResultList, {})
4490
+ children: /* @__PURE__ */ jsx52(DefaultResultList, {})
4306
4491
  }
4307
4492
  );
4308
4493
  const body = /* @__PURE__ */ jsxs24(VerticalRhythm3, { children: [
@@ -4337,7 +4522,7 @@ var ObjectSearchContainer = ({
4337
4522
  ]);
4338
4523
  };
4339
4524
  return /* @__PURE__ */ jsxs24(VerticalRhythm3, { children: [
4340
- /* @__PURE__ */ jsx50(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx50(
4525
+ /* @__PURE__ */ jsx52(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx52(
4341
4526
  InputVariables,
4342
4527
  {
4343
4528
  label,
@@ -4359,21 +4544,21 @@ var DefaultResultList = () => {
4359
4544
  var _a;
4360
4545
  const { list } = useObjectSearchContext();
4361
4546
  if (!list.items) {
4362
- return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx50(ObjectSearchListItemLoadingSkeleton, {}, i));
4547
+ return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx52(ObjectSearchListItemLoadingSkeleton, {}, i));
4363
4548
  }
4364
4549
  if (list.items.length === 0) {
4365
- return /* @__PURE__ */ jsx50(Callout3, { type: "info", children: "No results were found" });
4550
+ return /* @__PURE__ */ jsx52(Callout4, { type: "info", children: "No results were found" });
4366
4551
  }
4367
- return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx50(ObjectSearchListItem, { ...item }, item.id));
4552
+ return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx52(ObjectSearchListItem, { ...item }, item.id));
4368
4553
  };
4369
4554
 
4370
4555
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4371
4556
  import { DebouncedInputKeywordSearch, InputSelect as InputSelect3 } from "@uniformdev/design-system";
4372
- import { useMemo as useMemo13, useState as useState13 } from "react";
4557
+ import { useMemo as useMemo14, useState as useState14 } from "react";
4373
4558
 
4374
4559
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
4375
- import { css as css17 } from "@emotion/react";
4376
- var ObjectSearchFilterContainerLabel = css17`
4560
+ import { css as css18 } from "@emotion/react";
4561
+ var ObjectSearchFilterContainerLabel = css18`
4377
4562
  align-items: center;
4378
4563
  display: flex;
4379
4564
  font-size: var(--fs-sm);
@@ -4381,18 +4566,18 @@ var ObjectSearchFilterContainerLabel = css17`
4381
4566
  line-height: 1rem;
4382
4567
  margin-bottom: var(--spacing-sm);
4383
4568
  `;
4384
- var ObjectSearchFilterContainer = css17`
4569
+ var ObjectSearchFilterContainer = css18`
4385
4570
  display: grid;
4386
4571
  gap: var(--spacing-base);
4387
4572
  `;
4388
- var ObjectSearchFilterGrid = (gridColumns) => css17`
4573
+ var ObjectSearchFilterGrid = (gridColumns) => css18`
4389
4574
  display: grid;
4390
4575
  grid-template-columns: ${gridColumns};
4391
4576
  gap: var(--spacing-base);
4392
4577
  `;
4393
4578
 
4394
4579
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4395
- import { jsx as jsx51, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4580
+ import { jsx as jsx53, jsxs as jsxs25 } from "@emotion/react/jsx-runtime";
4396
4581
  var ObjectSearchFilter = ({
4397
4582
  requireContentType,
4398
4583
  typeSelectorAllTypesOptionText = "All content types",
@@ -4403,7 +4588,7 @@ var ObjectSearchFilter = ({
4403
4588
  }) => {
4404
4589
  var _a, _b;
4405
4590
  const { query, onSetQuery } = useObjectSearchContext();
4406
- const [searchState, setSearchState] = useState13({
4591
+ const [searchState, setSearchState] = useState14({
4407
4592
  contentType: (_a = query.contentType) != null ? _a : "",
4408
4593
  keyword: (_b = query.keyword) != null ? _b : ""
4409
4594
  });
@@ -4413,7 +4598,7 @@ var ObjectSearchFilter = ({
4413
4598
  });
4414
4599
  onSetQuery({ ...query, ...value });
4415
4600
  };
4416
- const memoizedSelectOptions = useMemo13(() => {
4601
+ const memoizedSelectOptions = useMemo14(() => {
4417
4602
  if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
4418
4603
  return [];
4419
4604
  }
@@ -4431,7 +4616,7 @@ var ObjectSearchFilter = ({
4431
4616
  ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
4432
4617
  ],
4433
4618
  children: [
4434
- memoizedSelectOptions.length ? /* @__PURE__ */ jsx51(
4619
+ memoizedSelectOptions.length ? /* @__PURE__ */ jsx53(
4435
4620
  InputSelect3,
4436
4621
  {
4437
4622
  label: selectLabel,
@@ -4441,7 +4626,7 @@ var ObjectSearchFilter = ({
4441
4626
  value: query.contentType
4442
4627
  }
4443
4628
  ) : null,
4444
- /* @__PURE__ */ jsx51(
4629
+ /* @__PURE__ */ jsx53(
4445
4630
  DebouncedInputKeywordSearch,
4446
4631
  {
4447
4632
  inputFieldName: searchInputName,
@@ -4458,9 +4643,9 @@ var ObjectSearchFilter = ({
4458
4643
  };
4459
4644
 
4460
4645
  // src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
4461
- import { jsx as jsx52 } from "@emotion/react/jsx-runtime";
4646
+ import { jsx as jsx54 } from "@emotion/react/jsx-runtime";
4462
4647
  var ObjectSearchFilterContainer2 = ({ children }) => {
4463
- return /* @__PURE__ */ jsx52("div", { children: /* @__PURE__ */ jsx52("div", { css: ObjectSearchFilterContainer, children }) });
4648
+ return /* @__PURE__ */ jsx54("div", { children: /* @__PURE__ */ jsx54("div", { css: ObjectSearchFilterContainer, children }) });
4464
4649
  };
4465
4650
 
4466
4651
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
@@ -4468,16 +4653,16 @@ import { Button as Button3, Chip as Chip2, Link, Popover as Popover2 } from "@un
4468
4653
  import { format as timeagoFormat } from "timeago.js";
4469
4654
 
4470
4655
  // src/components/Image/Image.tsx
4471
- import { jsx as jsx53 } from "@emotion/react/jsx-runtime";
4656
+ import { jsx as jsx55 } from "@emotion/react/jsx-runtime";
4472
4657
  function Image({ src, alt, className }) {
4473
4658
  const CompImage = src && typeof src !== "string" ? src : null;
4474
- return CompImage ? /* @__PURE__ */ jsx53(CompImage, { className }) : /* @__PURE__ */ jsx53("img", { src, alt, className });
4659
+ return CompImage ? /* @__PURE__ */ jsx55(CompImage, { className }) : /* @__PURE__ */ jsx55("img", { src, alt, className });
4475
4660
  }
4476
4661
 
4477
4662
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
4478
- import { css as css18 } from "@emotion/react";
4663
+ import { css as css19 } from "@emotion/react";
4479
4664
  import { button as button2 } from "@uniformdev/design-system";
4480
- var ButtonStyles = css18`
4665
+ var ButtonStyles = css19`
4481
4666
  ${button2}
4482
4667
  background: transparent;
4483
4668
  border: 1px solid var(--typography-base);
@@ -4505,20 +4690,20 @@ var ButtonStyles = css18`
4505
4690
  text-decoration: none;
4506
4691
  }
4507
4692
  `;
4508
- var ButtonIcon = css18`
4693
+ var ButtonIcon = css19`
4509
4694
  width: 1rem;
4510
4695
  height: 1rem;
4511
4696
  `;
4512
4697
 
4513
4698
  // src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
4514
- import { jsx as jsx54, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
4699
+ import { jsx as jsx56, jsxs as jsxs26 } from "@emotion/react/jsx-runtime";
4515
4700
  var ObjectSearchResultItemButton = ({
4516
4701
  text,
4517
4702
  icon,
4518
4703
  ...props
4519
4704
  }) => {
4520
4705
  return /* @__PURE__ */ jsxs26("button", { type: "button", css: ButtonStyles, ...props, children: [
4521
- !icon ? null : /* @__PURE__ */ jsx54(Image, { src: icon, css: ButtonIcon }),
4706
+ !icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
4522
4707
  text
4523
4708
  ] });
4524
4709
  };
@@ -4528,14 +4713,14 @@ var LinkButton = ({
4528
4713
  ...props
4529
4714
  }) => {
4530
4715
  return /* @__PURE__ */ jsxs26("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4531
- !icon ? null : /* @__PURE__ */ jsx54(Image, { src: icon, css: ButtonIcon }),
4716
+ !icon ? null : /* @__PURE__ */ jsx56(Image, { src: icon, css: ButtonIcon }),
4532
4717
  text
4533
4718
  ] });
4534
4719
  };
4535
4720
 
4536
4721
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
4537
- import { css as css19 } from "@emotion/react";
4538
- var ObjectSearchResultItemContainer = css19`
4722
+ import { css as css20 } from "@emotion/react";
4723
+ var ObjectSearchResultItemContainer = css20`
4539
4724
  align-items: center;
4540
4725
  border: 1px solid var(--gray-300);
4541
4726
  border-radius: var(--rounded-base);
@@ -4551,7 +4736,7 @@ var ObjectSearchResultItemContainer = css19`
4551
4736
  }
4552
4737
  }
4553
4738
  `;
4554
- var ObjectSearchDragHandle = css19`
4739
+ var ObjectSearchDragHandle = css20`
4555
4740
  border-left: 2px dotted var(--gray-300);
4556
4741
  border-right: 2px dotted var(--gray-300);
4557
4742
  position: absolute;
@@ -4560,47 +4745,47 @@ var ObjectSearchDragHandle = css19`
4560
4745
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4561
4746
  opacity: 0;
4562
4747
  `;
4563
- var ObjectSearchResultItemSubtitle = css19`
4748
+ var ObjectSearchResultItemSubtitle = css20`
4564
4749
  color: var(--gray-500);
4565
4750
  display: block;
4566
4751
  font-size: var(--fs-xs);
4567
4752
  line-height: 1;
4568
4753
  `;
4569
- var ObjectSearchResultItemTitle = css19`
4754
+ var ObjectSearchResultItemTitle = css20`
4570
4755
  align-items: center;
4571
4756
  color: var(--typography-base);
4572
4757
  display: flex;
4573
4758
  gap: var(--spacing-xs);
4574
4759
  `;
4575
- var ObjectSearchResultItemTimeStamp = css19`
4760
+ var ObjectSearchResultItemTimeStamp = css20`
4576
4761
  color: var(--gray-500);
4577
4762
  font-size: var(--fs-xs);
4578
4763
  `;
4579
- var ObjectSearchResultItemTitleLink = css19`
4764
+ var ObjectSearchResultItemTitleLink = css20`
4580
4765
  text-decoration: none;
4581
4766
  color: var(--primary-action-default);
4582
4767
  font-size: var(--fs-sm);
4583
4768
  `;
4584
- var ObjectSearchAuthorStateGroup = css19`
4769
+ var ObjectSearchAuthorStateGroup = css20`
4585
4770
  align-items: center;
4586
4771
  display: flex;
4587
4772
  gap: var(--spacing-sm);
4588
4773
  `;
4589
- var ObjectSearchUpdateGroup = css19`
4774
+ var ObjectSearchUpdateGroup = css20`
4590
4775
  display: grid;
4591
4776
  `;
4592
- var ObjectSearchContentContainer = css19`
4777
+ var ObjectSearchContentContainer = css20`
4593
4778
  display: flex;
4594
4779
  gap: var(--spacing-base);
4595
4780
  `;
4596
- var ObjectSearchImage = css19`
4781
+ var ObjectSearchImage = css20`
4597
4782
  width: 56px;
4598
4783
  height: 56px;
4599
4784
  object-fit: cover;
4600
4785
  `;
4601
4786
 
4602
4787
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4603
- import { jsx as jsx55, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
4788
+ import { jsx as jsx57, jsxs as jsxs27 } from "@emotion/react/jsx-runtime";
4604
4789
  var ObjectSearchResultItem = ({
4605
4790
  id,
4606
4791
  title,
@@ -4625,9 +4810,9 @@ var ObjectSearchResultItem = ({
4625
4810
  onRemove == null ? void 0 : onRemove();
4626
4811
  };
4627
4812
  return /* @__PURE__ */ jsxs27("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
4628
- disableDnD ? null : /* @__PURE__ */ jsx55("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4629
- /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsxs27("div", { css: ObjectSearchContentContainer, children: [
4630
- !imageUrl ? null : /* @__PURE__ */ jsx55(
4813
+ disableDnD ? null : /* @__PURE__ */ jsx57("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4814
+ /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsxs27("div", { css: ObjectSearchContentContainer, children: [
4815
+ !imageUrl ? null : /* @__PURE__ */ jsx57(
4631
4816
  "img",
4632
4817
  {
4633
4818
  src: imageUrl,
@@ -4637,9 +4822,9 @@ var ObjectSearchResultItem = ({
4637
4822
  }
4638
4823
  ),
4639
4824
  /* @__PURE__ */ jsxs27("div", { children: [
4640
- /* @__PURE__ */ jsx55("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4825
+ /* @__PURE__ */ jsx57("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4641
4826
  /* @__PURE__ */ jsxs27("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
4642
- onClick ? /* @__PURE__ */ jsx55(
4827
+ onClick ? /* @__PURE__ */ jsx57(
4643
4828
  Link,
4644
4829
  {
4645
4830
  onClick: (e) => {
@@ -4651,28 +4836,28 @@ var ObjectSearchResultItem = ({
4651
4836
  text: title != null ? title : name,
4652
4837
  css: ObjectSearchResultItemTitleLink
4653
4838
  }
4654
- ) : /* @__PURE__ */ jsx55("span", { children: title != null ? title : name }),
4655
- !popoverData ? null : /* @__PURE__ */ jsx55(Popover2, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4839
+ ) : /* @__PURE__ */ jsx57("span", { children: title != null ? title : name }),
4840
+ !popoverData ? null : /* @__PURE__ */ jsx57(Popover2, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4656
4841
  ] }),
4657
4842
  !createdAt && !publishStatus ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchAuthorStateGroup, children: [
4658
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx55(Chip2, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4843
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ jsx57(Chip2, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4659
4844
  !createdAt && !publishedAt ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchUpdateGroup, children: [
4660
4845
  !createdAt ? null : /* @__PURE__ */ jsxs27("small", { css: ObjectSearchResultItemTimeStamp, children: [
4661
- /* @__PURE__ */ jsx55("strong", { children: "Last updated: " }),
4846
+ /* @__PURE__ */ jsx57("strong", { children: "Last updated: " }),
4662
4847
  timeagoFormat(createdAt)
4663
4848
  ] }),
4664
4849
  !publishedAt ? null : /* @__PURE__ */ jsxs27("small", { css: ObjectSearchResultItemTimeStamp, children: [
4665
- /* @__PURE__ */ jsx55("strong", { children: "Last published: " }),
4850
+ /* @__PURE__ */ jsx57("strong", { children: "Last published: " }),
4666
4851
  timeagoFormat(publishedAt)
4667
4852
  ] })
4668
4853
  ] })
4669
4854
  ] }),
4670
- /* @__PURE__ */ jsx55("div", { children })
4855
+ /* @__PURE__ */ jsx57("div", { children })
4671
4856
  ] })
4672
4857
  ] }) }),
4673
4858
  !editLink && hideRemoveButton ? null : /* @__PURE__ */ jsxs27("div", { css: ObjectSearchAuthorStateGroup, children: [
4674
- !editLink ? null : /* @__PURE__ */ jsx55(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4675
- hideRemoveButton ? null : /* @__PURE__ */ jsx55(Button3, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4859
+ !editLink ? null : /* @__PURE__ */ jsx57(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4860
+ hideRemoveButton ? null : /* @__PURE__ */ jsx57(Button3, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4676
4861
  ] })
4677
4862
  ] });
4678
4863
  };
@@ -4699,32 +4884,32 @@ import {
4699
4884
  import { Button as Button4, Counter } from "@uniformdev/design-system";
4700
4885
 
4701
4886
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4702
- import { css as css20 } from "@emotion/react";
4703
- var ObjectSearchResultListContainer = css20`
4887
+ import { css as css21 } from "@emotion/react";
4888
+ var ObjectSearchResultListContainer = css21`
4704
4889
  align-items: center;
4705
4890
  display: flex;
4706
4891
  gap: var(--spacing-sm);
4707
4892
  justify-content: space-between;
4708
4893
  `;
4709
- var ObjectSearchDragContainer = css20`
4894
+ var ObjectSearchDragContainer = css21`
4710
4895
  margin: 0 0 var(--spacing-sm);
4711
4896
  `;
4712
- var ObjectSearchContainerDragging = css20`
4897
+ var ObjectSearchContainerDragging = css21`
4713
4898
  box-shadow: var(--shadow-base);
4714
4899
  opacity: var(--opacity-50);
4715
4900
  `;
4716
- var ObjectSearchResultListCounterContainer = css20`
4901
+ var ObjectSearchResultListCounterContainer = css21`
4717
4902
  align-items: center;
4718
4903
  display: flex;
4719
4904
  gap: var(--spacing-sm);
4720
4905
  `;
4721
- var ObjectSearchResultListTitle = css20`
4906
+ var ObjectSearchResultListTitle = css21`
4722
4907
  font-weight: var(--fw-bold);
4723
4908
  line-height: 1;
4724
4909
  `;
4725
4910
 
4726
4911
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4727
- import { Fragment as Fragment10, jsx as jsx56, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
4912
+ import { Fragment as Fragment11, jsx as jsx58, jsxs as jsxs28 } from "@emotion/react/jsx-runtime";
4728
4913
  var DroppableHack2 = Droppable2;
4729
4914
  var DraggableHack2 = Draggable2;
4730
4915
  function ObjectSearchResultList({
@@ -4734,7 +4919,7 @@ function ObjectSearchResultList({
4734
4919
  hideRemoveButton = false,
4735
4920
  resultLabelOverride,
4736
4921
  additionalButtons,
4737
- renderResultComponent = (value) => /* @__PURE__ */ jsx56(ObjectSearchResultItem, { ...value }),
4922
+ renderResultComponent = (value) => /* @__PURE__ */ jsx58(ObjectSearchResultItem, { ...value }),
4738
4923
  multiSelectId,
4739
4924
  disableDnD = false,
4740
4925
  getContainerForDnDReparenting,
@@ -4761,7 +4946,7 @@ function ObjectSearchResultList({
4761
4946
  ...item,
4762
4947
  disableDnD: selectedListItems.length === 1 || disableDnD
4763
4948
  });
4764
- return /* @__PURE__ */ jsx56(
4949
+ return /* @__PURE__ */ jsx58(
4765
4950
  "div",
4766
4951
  {
4767
4952
  css: [
@@ -4776,16 +4961,16 @@ function ObjectSearchResultList({
4776
4961
  }
4777
4962
  );
4778
4963
  };
4779
- return /* @__PURE__ */ jsxs28(Fragment10, { children: [
4964
+ return /* @__PURE__ */ jsxs28(Fragment11, { children: [
4780
4965
  /* @__PURE__ */ jsxs28("div", { role: "group", css: ObjectSearchResultListContainer, children: [
4781
4966
  !resultLabelOverride ? /* @__PURE__ */ jsxs28("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
4782
- /* @__PURE__ */ jsx56("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
4967
+ /* @__PURE__ */ jsx58("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
4783
4968
  " ",
4784
- !selectedListItems.length ? null : /* @__PURE__ */ jsx56(Counter, { count: selectedListItems.length })
4969
+ !selectedListItems.length ? null : /* @__PURE__ */ jsx58(Counter, { count: selectedListItems.length })
4785
4970
  ] }) : resultLabelOverride,
4786
4971
  /* @__PURE__ */ jsxs28("div", { css: ObjectSearchResultListCounterContainer, children: [
4787
4972
  additionalButtons,
4788
- hideRemoveButton ? null : /* @__PURE__ */ jsx56(
4973
+ hideRemoveButton ? null : /* @__PURE__ */ jsx58(
4789
4974
  Button4,
4790
4975
  {
4791
4976
  buttonType: "ghostDestructive",
@@ -4797,7 +4982,7 @@ function ObjectSearchResultList({
4797
4982
  )
4798
4983
  ] })
4799
4984
  ] }),
4800
- !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx56(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx56(
4985
+ !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ jsx58(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ jsx58(
4801
4986
  DroppableHack2,
4802
4987
  {
4803
4988
  droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
@@ -4805,7 +4990,7 @@ function ObjectSearchResultList({
4805
4990
  getContainerForClone: getContainerForDnDReparenting,
4806
4991
  children: (provided) => /* @__PURE__ */ jsxs28("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4807
4992
  selectedListItems.map((item, i) => {
4808
- return /* @__PURE__ */ jsx56(
4993
+ return /* @__PURE__ */ jsx58(
4809
4994
  DraggableHack2,
4810
4995
  {
4811
4996
  draggableId: item.id,
@@ -4825,8 +5010,8 @@ function ObjectSearchResultList({
4825
5010
 
4826
5011
  // src/components/ObjectSearch/QueryFilter.tsx
4827
5012
  import { DebouncedInputKeywordSearch as DebouncedInputKeywordSearch2, Input as Input4, InputSelect as InputSelect4, VerticalRhythm as VerticalRhythm4 } from "@uniformdev/design-system";
4828
- import { useEffect as useEffect13, useState as useState14 } from "react";
4829
- import { jsx as jsx57, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5013
+ import { useEffect as useEffect15, useState as useState15 } from "react";
5014
+ import { jsx as jsx59, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
4830
5015
  var QueryFilter = ({
4831
5016
  requireContentType,
4832
5017
  queryFilterTitle = "Configure Query",
@@ -4854,7 +5039,7 @@ var QueryFilter = ({
4854
5039
  }) => {
4855
5040
  var _a, _b, _c, _d, _e, _f, _g;
4856
5041
  const { query, onSetQuery } = useObjectSearchContext();
4857
- const [queryState, setQueryState] = useState14({
5042
+ const [queryState, setQueryState] = useState15({
4858
5043
  contentType: (_a = query.contentType) != null ? _a : "",
4859
5044
  keyword: (_b = query.keyword) != null ? _b : "",
4860
5045
  count: (_c = query.count) != null ? _c : 5,
@@ -4865,13 +5050,13 @@ var QueryFilter = ({
4865
5050
  setQueryState((prev) => ({ ...prev, ...value }));
4866
5051
  onSetQuery({ ...query, ...value });
4867
5052
  };
4868
- useEffect13(() => {
5053
+ useEffect15(() => {
4869
5054
  onSetQuery(queryState);
4870
5055
  }, []);
4871
5056
  return /* @__PURE__ */ jsxs29("fieldset", { children: [
4872
- /* @__PURE__ */ jsx57("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
4873
- /* @__PURE__ */ jsx57("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs29(VerticalRhythm4, { children: [
4874
- /* @__PURE__ */ jsx57(
5057
+ /* @__PURE__ */ jsx59("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
5058
+ /* @__PURE__ */ jsx59("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ jsxs29(VerticalRhythm4, { children: [
5059
+ /* @__PURE__ */ jsx59(
4875
5060
  InputVariables,
4876
5061
  {
4877
5062
  label: searchInputLabel,
@@ -4879,7 +5064,7 @@ var QueryFilter = ({
4879
5064
  onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
4880
5065
  disableInlineMenu: true,
4881
5066
  id: "qf_searchText",
4882
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5067
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4883
5068
  DebouncedInputKeywordSearch2,
4884
5069
  {
4885
5070
  id: "qf_searchText",
@@ -4894,7 +5079,7 @@ var QueryFilter = ({
4894
5079
  }
4895
5080
  ),
4896
5081
  /* @__PURE__ */ jsxs29("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
4897
- /* @__PURE__ */ jsx57(
5082
+ /* @__PURE__ */ jsx59(
4898
5083
  InputVariables,
4899
5084
  {
4900
5085
  label: contentTypeLabel,
@@ -4902,7 +5087,7 @@ var QueryFilter = ({
4902
5087
  value: (_g = queryState.contentType) != null ? _g : "",
4903
5088
  onChange: (newType) => handleFilterChange({ contentType: newType }),
4904
5089
  disableInlineMenu: true,
4905
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5090
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4906
5091
  InputSelect4,
4907
5092
  {
4908
5093
  id: "qf_contentType",
@@ -4916,7 +5101,7 @@ var QueryFilter = ({
4916
5101
  )
4917
5102
  }
4918
5103
  ),
4919
- /* @__PURE__ */ jsx57(
5104
+ /* @__PURE__ */ jsx59(
4920
5105
  InputVariables,
4921
5106
  {
4922
5107
  label: countLabel,
@@ -4925,7 +5110,7 @@ var QueryFilter = ({
4925
5110
  onChange: (newCount) => handleFilterChange({ count: newCount }),
4926
5111
  disableInlineMenu: true,
4927
5112
  valueToResetTo: "5",
4928
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5113
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4929
5114
  Input4,
4930
5115
  {
4931
5116
  id: "qf_count",
@@ -4941,7 +5126,7 @@ var QueryFilter = ({
4941
5126
  )
4942
5127
  ] }),
4943
5128
  /* @__PURE__ */ jsxs29("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
4944
- /* @__PURE__ */ jsx57(
5129
+ /* @__PURE__ */ jsx59(
4945
5130
  InputVariables,
4946
5131
  {
4947
5132
  id: "qf_sortBy",
@@ -4949,7 +5134,7 @@ var QueryFilter = ({
4949
5134
  value: queryState.sortBy,
4950
5135
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
4951
5136
  disableInlineMenu: true,
4952
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5137
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4953
5138
  InputSelect4,
4954
5139
  {
4955
5140
  label: sortLabel,
@@ -4963,7 +5148,7 @@ var QueryFilter = ({
4963
5148
  )
4964
5149
  }
4965
5150
  ),
4966
- /* @__PURE__ */ jsx57(
5151
+ /* @__PURE__ */ jsx59(
4967
5152
  InputVariables,
4968
5153
  {
4969
5154
  label: sortOrderLabel,
@@ -4971,7 +5156,7 @@ var QueryFilter = ({
4971
5156
  value: queryState.sortOrder,
4972
5157
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
4973
5158
  disableInlineMenu: true,
4974
- inputWhenNoVariables: /* @__PURE__ */ jsx57(
5159
+ inputWhenNoVariables: /* @__PURE__ */ jsx59(
4975
5160
  InputSelect4,
4976
5161
  {
4977
5162
  label: sortOrderLabel,
@@ -4991,8 +5176,8 @@ var QueryFilter = ({
4991
5176
  };
4992
5177
 
4993
5178
  // src/components/ParamTypeDynamicDataProvider.tsx
4994
- import { useEffect as useEffect14, useMemo as useMemo14, useRef as useRef8 } from "react";
4995
- import { jsx as jsx58 } from "@emotion/react/jsx-runtime";
5179
+ import { useEffect as useEffect16, useMemo as useMemo15, useRef as useRef9 } from "react";
5180
+ import { jsx as jsx60 } from "@emotion/react/jsx-runtime";
4996
5181
  function ParamTypeDynamicDataProvider(props) {
4997
5182
  const { children } = props;
4998
5183
  const {
@@ -5000,11 +5185,11 @@ function ParamTypeDynamicDataProvider(props) {
5000
5185
  } = useMeshLocation("paramType");
5001
5186
  const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
5002
5187
  const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
5003
- const variables = useMemo14(
5188
+ const variables = useMemo15(
5004
5189
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
5005
5190
  [dynamicInputsAsVariables, connectedDataAsVariables]
5006
5191
  );
5007
- return /* @__PURE__ */ jsx58(VariablesProvider, { value: variables, onChange: () => {
5192
+ return /* @__PURE__ */ jsx60(VariablesProvider, { value: variables, onChange: () => {
5008
5193
  }, editVariableComponent: JsonMeshVariableEditor, children });
5009
5194
  }
5010
5195
  var JsonMeshVariableEditor = ({
@@ -5013,9 +5198,9 @@ var JsonMeshVariableEditor = ({
5013
5198
  variable,
5014
5199
  context
5015
5200
  }) => {
5016
- const sillyRef = useRef8(false);
5201
+ const sillyRef = useRef9(false);
5017
5202
  const { editConnectedData } = useMeshLocation("paramType");
5018
- useEffect14(() => {
5203
+ useEffect16(() => {
5019
5204
  if (sillyRef.current) {
5020
5205
  return;
5021
5206
  }
@@ -5485,9 +5670,9 @@ var MULTI_SELECT_OPERATORS = [
5485
5670
 
5486
5671
  // src/components/SearchAndFilter/editors/DateEditor.tsx
5487
5672
  import { Input as Input5 } from "@uniformdev/design-system";
5488
- import { useState as useState15 } from "react";
5673
+ import { useState as useState16 } from "react";
5489
5674
  import { useDebounce as useDebounce2 } from "react-use";
5490
- import { jsx as jsx59 } from "@emotion/react/jsx-runtime";
5675
+ import { jsx as jsx61 } from "@emotion/react/jsx-runtime";
5491
5676
  var DateEditor = ({
5492
5677
  onChange,
5493
5678
  ariaLabel,
@@ -5496,9 +5681,9 @@ var DateEditor = ({
5496
5681
  readOnly,
5497
5682
  valueTestId
5498
5683
  }) => {
5499
- const [innerValue, setInnerValue] = useState15(value != null ? value : "");
5684
+ const [innerValue, setInnerValue] = useState16(value != null ? value : "");
5500
5685
  useDebounce2(() => onChange(innerValue), 500, [innerValue]);
5501
- return /* @__PURE__ */ jsx59(
5686
+ return /* @__PURE__ */ jsx61(
5502
5687
  Input5,
5503
5688
  {
5504
5689
  type: "date",
@@ -5515,21 +5700,21 @@ var DateEditor = ({
5515
5700
 
5516
5701
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5517
5702
  import { Input as Input6 } from "@uniformdev/design-system";
5518
- import { useEffect as useEffect15, useState as useState16 } from "react";
5703
+ import { useEffect as useEffect17, useState as useState17 } from "react";
5519
5704
  import { useDebounce as useDebounce3 } from "react-use";
5520
5705
 
5521
5706
  // src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
5522
5707
  import { FieldMessage } from "@uniformdev/design-system";
5523
- import { jsx as jsx60 } from "@emotion/react/jsx-runtime";
5708
+ import { jsx as jsx62 } from "@emotion/react/jsx-runtime";
5524
5709
  var ErrorContainer = ({ errorMessage }) => {
5525
- return /* @__PURE__ */ jsx60(
5710
+ return /* @__PURE__ */ jsx62(
5526
5711
  "div",
5527
5712
  {
5528
5713
  css: {
5529
5714
  gridColumn: "span 6",
5530
5715
  order: 6
5531
5716
  },
5532
- children: /* @__PURE__ */ jsx60(FieldMessage, { errorMessage })
5717
+ children: /* @__PURE__ */ jsx62(FieldMessage, { errorMessage })
5533
5718
  }
5534
5719
  );
5535
5720
  };
@@ -5542,7 +5727,7 @@ var twoColumnGrid = {
5542
5727
  };
5543
5728
 
5544
5729
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5545
- import { Fragment as Fragment11, jsx as jsx61, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5730
+ import { Fragment as Fragment12, jsx as jsx63, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5546
5731
  var DateRangeEditor = ({
5547
5732
  ariaLabel,
5548
5733
  onChange,
@@ -5551,9 +5736,9 @@ var DateRangeEditor = ({
5551
5736
  readOnly,
5552
5737
  valueTestId
5553
5738
  }) => {
5554
- const [minDateValue, setMinDateValue] = useState16(value ? value[0] : "");
5555
- const [maxDateValue, setMaxDateValue] = useState16(value ? value[1] : "");
5556
- const [error, setError] = useState16("");
5739
+ const [minDateValue, setMinDateValue] = useState17(value ? value[0] : "");
5740
+ const [maxDateValue, setMaxDateValue] = useState17(value ? value[1] : "");
5741
+ const [error, setError] = useState17("");
5557
5742
  useDebounce3(
5558
5743
  () => {
5559
5744
  if (minDateValue && maxDateValue && !error) {
@@ -5565,7 +5750,7 @@ var DateRangeEditor = ({
5565
5750
  500,
5566
5751
  [minDateValue, maxDateValue]
5567
5752
  );
5568
- useEffect15(() => {
5753
+ useEffect17(() => {
5569
5754
  if (!minDateValue || !maxDateValue) {
5570
5755
  return;
5571
5756
  }
@@ -5600,9 +5785,9 @@ var DateRangeEditor = ({
5600
5785
  setMaxDateValue("");
5601
5786
  }
5602
5787
  }, [minDateValue, maxDateValue, setError]);
5603
- return /* @__PURE__ */ jsxs30(Fragment11, { children: [
5788
+ return /* @__PURE__ */ jsxs30(Fragment12, { children: [
5604
5789
  /* @__PURE__ */ jsxs30("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5605
- /* @__PURE__ */ jsx61(
5790
+ /* @__PURE__ */ jsx63(
5606
5791
  Input6,
5607
5792
  {
5608
5793
  label: `${ariaLabel}-min-date`,
@@ -5616,7 +5801,7 @@ var DateRangeEditor = ({
5616
5801
  "data-testid": "value-low"
5617
5802
  }
5618
5803
  ),
5619
- /* @__PURE__ */ jsx61(
5804
+ /* @__PURE__ */ jsx63(
5620
5805
  Input6,
5621
5806
  {
5622
5807
  label: `${ariaLabel}-max-date`,
@@ -5631,7 +5816,7 @@ var DateRangeEditor = ({
5631
5816
  }
5632
5817
  )
5633
5818
  ] }),
5634
- /* @__PURE__ */ jsx61(ErrorContainer, { errorMessage: error })
5819
+ /* @__PURE__ */ jsx63(ErrorContainer, { errorMessage: error })
5635
5820
  ] });
5636
5821
  };
5637
5822
 
@@ -5641,7 +5826,7 @@ import {
5641
5826
  getComboBoxSelectedSelectableGroups,
5642
5827
  InputComboBox
5643
5828
  } from "@uniformdev/design-system";
5644
- import { useMemo as useMemo15 } from "react";
5829
+ import { useMemo as useMemo16 } from "react";
5645
5830
 
5646
5831
  // src/components/SearchAndFilter/editors/shared/readOnlyAttributes.tsx
5647
5832
  var readOnlyAttributes = {
@@ -5651,7 +5836,7 @@ var readOnlyAttributes = {
5651
5836
  };
5652
5837
 
5653
5838
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5654
- import { jsx as jsx62 } from "@emotion/react/jsx-runtime";
5839
+ import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
5655
5840
  var FilterMultiChoiceEditor = ({
5656
5841
  value,
5657
5842
  options,
@@ -5662,11 +5847,11 @@ var FilterMultiChoiceEditor = ({
5662
5847
  }) => {
5663
5848
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5664
5849
  const isClearable = !readOnly || !disabled;
5665
- const { groupedOptions, selectedOptions } = useMemo15(
5850
+ const { groupedOptions, selectedOptions } = useMemo16(
5666
5851
  () => convertComboBoxGroupsToSelectableGroups({ options: options != null ? options : [], selectedItems: new Set(value) }),
5667
5852
  [options, value]
5668
5853
  );
5669
- return /* @__PURE__ */ jsx62("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx62(
5854
+ return /* @__PURE__ */ jsx64("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx64(
5670
5855
  InputComboBox,
5671
5856
  {
5672
5857
  ...props,
@@ -5699,8 +5884,8 @@ import {
5699
5884
  convertComboBoxGroupsToSelectableGroups as convertComboBoxGroupsToSelectableGroups2,
5700
5885
  InputComboBox as InputComboBox2
5701
5886
  } from "@uniformdev/design-system";
5702
- import { useMemo as useMemo16 } from "react";
5703
- import { jsx as jsx63 } from "@emotion/react/jsx-runtime";
5887
+ import { useMemo as useMemo17 } from "react";
5888
+ import { jsx as jsx65 } from "@emotion/react/jsx-runtime";
5704
5889
  var FilterSingleChoiceEditor = ({
5705
5890
  options,
5706
5891
  value,
@@ -5710,7 +5895,7 @@ var FilterSingleChoiceEditor = ({
5710
5895
  valueTestId
5711
5896
  }) => {
5712
5897
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5713
- const { groupedOptions, selectedOptions } = useMemo16(
5898
+ const { groupedOptions, selectedOptions } = useMemo17(
5714
5899
  () => convertComboBoxGroupsToSelectableGroups2({
5715
5900
  options: options != null ? options : [],
5716
5901
  selectedItems: new Set(value ? [String(value)] : void 0),
@@ -5718,7 +5903,7 @@ var FilterSingleChoiceEditor = ({
5718
5903
  }),
5719
5904
  [options, value]
5720
5905
  );
5721
- return /* @__PURE__ */ jsx63("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx63(
5906
+ return /* @__PURE__ */ jsx65("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx65(
5722
5907
  InputComboBox2,
5723
5908
  {
5724
5909
  placeholder: "Type to search...",
@@ -5748,9 +5933,9 @@ var FilterSingleChoiceEditor = ({
5748
5933
 
5749
5934
  // src/components/SearchAndFilter/editors/NumberEditor.tsx
5750
5935
  import { Input as Input7 } from "@uniformdev/design-system";
5751
- import { useState as useState17 } from "react";
5936
+ import { useState as useState18 } from "react";
5752
5937
  import { useDebounce as useDebounce4 } from "react-use";
5753
- import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
5938
+ import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
5754
5939
  var NumberEditor = ({
5755
5940
  ariaLabel,
5756
5941
  onChange,
@@ -5759,9 +5944,9 @@ var NumberEditor = ({
5759
5944
  readOnly,
5760
5945
  valueTestId
5761
5946
  }) => {
5762
- const [innerValue, setInnerValue] = useState17(value != null ? value : "");
5947
+ const [innerValue, setInnerValue] = useState18(value != null ? value : "");
5763
5948
  useDebounce4(() => onChange(innerValue), 500, [innerValue]);
5764
- return /* @__PURE__ */ jsx64(
5949
+ return /* @__PURE__ */ jsx66(
5765
5950
  Input7,
5766
5951
  {
5767
5952
  label: ariaLabel,
@@ -5779,9 +5964,9 @@ var NumberEditor = ({
5779
5964
 
5780
5965
  // src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
5781
5966
  import { Input as Input8 } from "@uniformdev/design-system";
5782
- import { useEffect as useEffect16, useState as useState18 } from "react";
5967
+ import { useEffect as useEffect18, useState as useState19 } from "react";
5783
5968
  import { useDebounce as useDebounce5 } from "react-use";
5784
- import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5969
+ import { Fragment as Fragment13, jsx as jsx67, jsxs as jsxs31 } from "@emotion/react/jsx-runtime";
5785
5970
  var NumberRangeEditor = ({
5786
5971
  onChange,
5787
5972
  disabled,
@@ -5790,9 +5975,9 @@ var NumberRangeEditor = ({
5790
5975
  readOnly,
5791
5976
  valueTestId
5792
5977
  }) => {
5793
- const [minValue, setMinValue] = useState18("");
5794
- const [maxValue, setMaxValue] = useState18("");
5795
- const [error, setError] = useState18("");
5978
+ const [minValue, setMinValue] = useState19("");
5979
+ const [maxValue, setMaxValue] = useState19("");
5980
+ const [error, setError] = useState19("");
5796
5981
  useDebounce5(
5797
5982
  () => {
5798
5983
  if (minValue && maxValue && !error) {
@@ -5804,7 +5989,7 @@ var NumberRangeEditor = ({
5804
5989
  500,
5805
5990
  [minValue, maxValue]
5806
5991
  );
5807
- useEffect16(() => {
5992
+ useEffect18(() => {
5808
5993
  if (!maxValue && !minValue) {
5809
5994
  return;
5810
5995
  }
@@ -5826,9 +6011,9 @@ var NumberRangeEditor = ({
5826
6011
  setMaxValue(maxValue);
5827
6012
  }
5828
6013
  }, [maxValue, minValue, setError]);
5829
- return /* @__PURE__ */ jsxs31(Fragment12, { children: [
6014
+ return /* @__PURE__ */ jsxs31(Fragment13, { children: [
5830
6015
  /* @__PURE__ */ jsxs31("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5831
- /* @__PURE__ */ jsx65(
6016
+ /* @__PURE__ */ jsx67(
5832
6017
  Input8,
5833
6018
  {
5834
6019
  label: `${ariaLabel}-min`,
@@ -5844,7 +6029,7 @@ var NumberRangeEditor = ({
5844
6029
  "data-testid": "value-low"
5845
6030
  }
5846
6031
  ),
5847
- /* @__PURE__ */ jsx65(
6032
+ /* @__PURE__ */ jsx67(
5848
6033
  Input8,
5849
6034
  {
5850
6035
  type: "number",
@@ -5861,7 +6046,7 @@ var NumberRangeEditor = ({
5861
6046
  }
5862
6047
  )
5863
6048
  ] }),
5864
- /* @__PURE__ */ jsx65(ErrorContainer, { errorMessage: error })
6049
+ /* @__PURE__ */ jsx67(ErrorContainer, { errorMessage: error })
5865
6050
  ] });
5866
6051
  };
5867
6052
 
@@ -5871,13 +6056,13 @@ import {
5871
6056
  getComboBoxSelectedSelectableGroups as getComboBoxSelectedSelectableGroups2,
5872
6057
  InputComboBox as InputComboBox3
5873
6058
  } from "@uniformdev/design-system";
5874
- import { useMemo as useMemo17 } from "react";
6059
+ import { useMemo as useMemo18 } from "react";
5875
6060
 
5876
6061
  // src/components/SearchAndFilter/editors/shared/CustomOptions.tsx
5877
6062
  import { StatusBullet } from "@uniformdev/design-system";
5878
- import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
6063
+ import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
5879
6064
  var CustomOptions = ({ label, value }) => {
5880
- return /* @__PURE__ */ jsx66(
6065
+ return /* @__PURE__ */ jsx68(
5881
6066
  StatusBullet,
5882
6067
  {
5883
6068
  status: label,
@@ -5887,7 +6072,7 @@ var CustomOptions = ({ label, value }) => {
5887
6072
  };
5888
6073
 
5889
6074
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5890
- import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
6075
+ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
5891
6076
  var StatusMultiEditor = ({
5892
6077
  options,
5893
6078
  value,
@@ -5897,11 +6082,11 @@ var StatusMultiEditor = ({
5897
6082
  valueTestId
5898
6083
  }) => {
5899
6084
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5900
- const { groupedOptions, selectedOptions } = useMemo17(
6085
+ const { groupedOptions, selectedOptions } = useMemo18(
5901
6086
  () => convertComboBoxGroupsToSelectableGroups3({ options: options != null ? options : [], selectedItems: new Set(value) }),
5902
6087
  [options, value]
5903
6088
  );
5904
- return /* @__PURE__ */ jsx67("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx67(
6089
+ return /* @__PURE__ */ jsx69("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx69(
5905
6090
  InputComboBox3,
5906
6091
  {
5907
6092
  options: groupedOptions != null ? groupedOptions : [],
@@ -5932,8 +6117,8 @@ import {
5932
6117
  convertComboBoxGroupsToSelectableGroups as convertComboBoxGroupsToSelectableGroups4,
5933
6118
  InputComboBox as InputComboBox4
5934
6119
  } from "@uniformdev/design-system";
5935
- import { useMemo as useMemo18 } from "react";
5936
- import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
6120
+ import { useMemo as useMemo19 } from "react";
6121
+ import { jsx as jsx70 } from "@emotion/react/jsx-runtime";
5937
6122
  var StatusSingleEditor = ({
5938
6123
  options,
5939
6124
  value,
@@ -5943,7 +6128,7 @@ var StatusSingleEditor = ({
5943
6128
  valueTestId
5944
6129
  }) => {
5945
6130
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5946
- const { groupedOptions, selectedOptions } = useMemo18(
6131
+ const { groupedOptions, selectedOptions } = useMemo19(
5947
6132
  () => convertComboBoxGroupsToSelectableGroups4({
5948
6133
  options: options != null ? options : [],
5949
6134
  selectedItems: new Set(value ? [value] : void 0),
@@ -5951,7 +6136,7 @@ var StatusSingleEditor = ({
5951
6136
  }),
5952
6137
  [options, value]
5953
6138
  );
5954
- return /* @__PURE__ */ jsx68("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx68(
6139
+ return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
5955
6140
  InputComboBox4,
5956
6141
  {
5957
6142
  options: groupedOptions,
@@ -5980,9 +6165,9 @@ var StatusSingleEditor = ({
5980
6165
 
5981
6166
  // src/components/SearchAndFilter/editors/TextEditor.tsx
5982
6167
  import { Input as Input9 } from "@uniformdev/design-system";
5983
- import { useState as useState19 } from "react";
6168
+ import { useState as useState20 } from "react";
5984
6169
  import { useDebounce as useDebounce6 } from "react-use";
5985
- import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
6170
+ import { jsx as jsx71 } from "@emotion/react/jsx-runtime";
5986
6171
  var TextEditor = ({
5987
6172
  onChange,
5988
6173
  ariaLabel,
@@ -5990,9 +6175,9 @@ var TextEditor = ({
5990
6175
  readOnly,
5991
6176
  valueTestId
5992
6177
  }) => {
5993
- const [innerValue, setInnerValue] = useState19(value != null ? value : "");
6178
+ const [innerValue, setInnerValue] = useState20(value != null ? value : "");
5994
6179
  useDebounce6(() => onChange(innerValue), 500, [innerValue]);
5995
- return /* @__PURE__ */ jsx69(
6180
+ return /* @__PURE__ */ jsx71(
5996
6181
  Input9,
5997
6182
  {
5998
6183
  showLabel: false,
@@ -6012,8 +6197,8 @@ import {
6012
6197
  getComboBoxSelectedSelectableGroups as getComboBoxSelectedSelectableGroups3,
6013
6198
  InputCreatableComboBox
6014
6199
  } from "@uniformdev/design-system";
6015
- import { useMemo as useMemo19 } from "react";
6016
- import { jsx as jsx70 } from "@emotion/react/jsx-runtime";
6200
+ import { useMemo as useMemo20 } from "react";
6201
+ import { jsx as jsx72 } from "@emotion/react/jsx-runtime";
6017
6202
  var TextMultiChoiceEditor = ({
6018
6203
  value,
6019
6204
  disabled,
@@ -6023,13 +6208,13 @@ var TextMultiChoiceEditor = ({
6023
6208
  }) => {
6024
6209
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
6025
6210
  const isClearable = !readOnly || !disabled;
6026
- const { groupedOptions, selectedOptions } = useMemo19(() => {
6211
+ const { groupedOptions, selectedOptions } = useMemo20(() => {
6027
6212
  var _a;
6028
6213
  const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
6029
6214
  const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
6030
6215
  return convertComboBoxGroupsToSelectableGroups5({ options, selectedItems: new Set(value) });
6031
6216
  }, [value]);
6032
- return /* @__PURE__ */ jsx70("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx70(
6217
+ return /* @__PURE__ */ jsx72("div", { "data-testid": valueTestId, children: /* @__PURE__ */ jsx72(
6033
6218
  InputCreatableComboBox,
6034
6219
  {
6035
6220
  ...props,
@@ -6062,21 +6247,21 @@ var TextMultiChoiceEditor = ({
6062
6247
  import { Counter as Counter2, customIcons, Icon as Icon2 } from "@uniformdev/design-system";
6063
6248
 
6064
6249
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
6065
- import { css as css21 } from "@emotion/react";
6250
+ import { css as css22 } from "@emotion/react";
6066
6251
  import { cq, fadeInLtr } from "@uniformdev/design-system";
6067
- var SearchAndFilterControlsWrapper = (gridColumns) => css21`
6252
+ var SearchAndFilterControlsWrapper = (gridColumns) => css22`
6068
6253
  align-items: stretch;
6069
6254
  display: grid;
6070
6255
  grid-template-columns: ${gridColumns};
6071
6256
  gap: var(--spacing-sm);
6072
6257
  `;
6073
- var SearchAndFilterOutterControlWrapper = (gridColumns) => css21`
6258
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => css22`
6074
6259
  align-items: stretch;
6075
6260
  display: grid;
6076
6261
  grid-template-columns: ${gridColumns};
6077
6262
  gap: var(--spacing-sm);
6078
6263
  `;
6079
- var ConditionalFilterRow = css21`
6264
+ var ConditionalFilterRow = css22`
6080
6265
  align-items: baseline;
6081
6266
  display: grid;
6082
6267
  grid-template-columns: 35px 1fr;
@@ -6112,7 +6297,7 @@ var ConditionalFilterRow = css21`
6112
6297
  animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6113
6298
  }
6114
6299
  `;
6115
- var ConditionalInputRow = css21`
6300
+ var ConditionalInputRow = css22`
6116
6301
  display: flex;
6117
6302
  gap: var(--spacing-sm);
6118
6303
  flex-wrap: wrap;
@@ -6136,16 +6321,16 @@ var ConditionalInputRow = css21`
6136
6321
  }
6137
6322
  }
6138
6323
  `;
6139
- var ConditionalInputRowEmpty = css21`
6324
+ var ConditionalInputRowEmpty = css22`
6140
6325
  flex-wrap: nowrap;
6141
6326
  `;
6142
- var SearchInput = css21`
6327
+ var SearchInput = css22`
6143
6328
  && {
6144
6329
  max-height: 40px;
6145
6330
  min-height: unset;
6146
6331
  }
6147
6332
  `;
6148
- var BindableKeywordSearchInputStyles = css21`
6333
+ var BindableKeywordSearchInputStyles = css22`
6149
6334
  position: relative;
6150
6335
  width: 100%;
6151
6336
 
@@ -6160,19 +6345,19 @@ var BindableKeywordSearchInputStyles = css21`
6160
6345
  white-space: nowrap;
6161
6346
  }
6162
6347
  `;
6163
- var ClearSearchButtonContainer = css21`
6348
+ var ClearSearchButtonContainer = css22`
6164
6349
  align-items: center;
6165
6350
  display: flex;
6166
6351
  position: absolute;
6167
6352
  inset: 0 var(--spacing-lg) 0 auto;
6168
6353
  `;
6169
- var ClearSearchButtonStyles = css21`
6354
+ var ClearSearchButtonStyles = css22`
6170
6355
  background: none;
6171
6356
  border: none;
6172
6357
  padding: 0;
6173
6358
  pointer-events: all;
6174
6359
  `;
6175
- var FilterButton = css21`
6360
+ var FilterButton = css22`
6176
6361
  align-items: center;
6177
6362
  background: var(--white);
6178
6363
  border: 1px solid var(--gray-300);
@@ -6209,13 +6394,13 @@ var FilterButton = css21`
6209
6394
  opacity: var(--opacity-50);
6210
6395
  }
6211
6396
  `;
6212
- var FilterButtonText = css21`
6397
+ var FilterButtonText = css22`
6213
6398
  overflow: hidden;
6214
6399
  text-overflow: ellipsis;
6215
6400
  white-space: nowrap;
6216
6401
  max-width: 14ch;
6217
6402
  `;
6218
- var FilterButtonSelected = css21`
6403
+ var FilterButtonSelected = css22`
6219
6404
  background: var(--gray-100);
6220
6405
  border-color: var(--gray-300);
6221
6406
 
@@ -6223,7 +6408,7 @@ var FilterButtonSelected = css21`
6223
6408
  color: var(--accent-dark);
6224
6409
  }
6225
6410
  `;
6226
- var FilterButtonWithOptions = css21`
6411
+ var FilterButtonWithOptions = css22`
6227
6412
  :where([aria-expanded='true']) {
6228
6413
  background: var(--purple-rain-100);
6229
6414
  border-color: var(--accent-light);
@@ -6235,14 +6420,14 @@ var FilterButtonWithOptions = css21`
6235
6420
  }
6236
6421
  }
6237
6422
  `;
6238
- var SearchIcon = css21`
6423
+ var SearchIcon = css22`
6239
6424
  color: var(--icon-color);
6240
6425
  position: absolute;
6241
6426
  inset: 0 var(--spacing-base) 0 auto;
6242
6427
  margin: auto;
6243
6428
  transition: color var(--duration-fast) var(--timing-ease-out);
6244
6429
  `;
6245
- var AddConditionalBtn = css21`
6430
+ var AddConditionalBtn = css22`
6246
6431
  align-items: center;
6247
6432
  background: transparent;
6248
6433
  border: none;
@@ -6261,14 +6446,14 @@ var AddConditionalBtn = css21`
6261
6446
  color: var(--gray-400);
6262
6447
  }
6263
6448
  `;
6264
- var Title = css21`
6449
+ var Title = css22`
6265
6450
  color: var(--typography-light);
6266
6451
 
6267
6452
  &:focus {
6268
6453
  outline: none;
6269
6454
  }
6270
6455
  `;
6271
- var ResetConditionsBtn = css21`
6456
+ var ResetConditionsBtn = css22`
6272
6457
  background: transparent;
6273
6458
  border: none;
6274
6459
  color: var(--action-destructive-default);
@@ -6283,7 +6468,7 @@ var ResetConditionsBtn = css21`
6283
6468
  color: var(--gray-400);
6284
6469
  }
6285
6470
  `;
6286
- var CriteriaGroupOperatorTrigger = css21`
6471
+ var CriteriaGroupOperatorTrigger = css22`
6287
6472
  && {
6288
6473
  padding: 0;
6289
6474
  border-radius: var(--rounded-sm);
@@ -6302,13 +6487,13 @@ var CriteriaGroupOperatorTrigger = css21`
6302
6487
  }
6303
6488
  }
6304
6489
  `;
6305
- var IconBtn = css21`
6490
+ var IconBtn = css22`
6306
6491
  align-self: center;
6307
6492
  background: transparent;
6308
6493
  border: none;
6309
6494
  padding: var(--spacing-sm);
6310
6495
  `;
6311
- var SearchAndFilterOptionsContainer = css21`
6496
+ var SearchAndFilterOptionsContainer = css22`
6312
6497
  background: var(--gray-50);
6313
6498
  border: 1px solid var(--gray-300);
6314
6499
  border-radius: var(--rounded-base);
@@ -6319,17 +6504,17 @@ var SearchAndFilterOptionsContainer = css21`
6319
6504
  padding: var(--spacing-md) 0 var(--spacing-base);
6320
6505
  will-change: height;
6321
6506
  `;
6322
- var SearchAndFilterOptionsInnerContainer = css21`
6507
+ var SearchAndFilterOptionsInnerContainer = css22`
6323
6508
  display: flex;
6324
6509
  flex-direction: column;
6325
6510
  gap: var(--spacing-sm);
6326
6511
  padding-inline: var(--spacing-md);
6327
6512
  `;
6328
- var SearchAndFilterButtonGroup = css21`
6513
+ var SearchAndFilterButtonGroup = css22`
6329
6514
  margin-top: var(--spacing-xs);
6330
6515
  margin-left: calc(56px + var(--spacing-md));
6331
6516
  `;
6332
- var SearchAndFilterAdditionalContainer = css21`
6517
+ var SearchAndFilterAdditionalContainer = css22`
6333
6518
  align-items: center;
6334
6519
  border-top: 1px solid var(--gray-300);
6335
6520
  display: flex;
@@ -6339,7 +6524,7 @@ var SearchAndFilterAdditionalContainer = css21`
6339
6524
  `;
6340
6525
 
6341
6526
  // src/components/SearchAndFilter/FilterButton.tsx
6342
- import { jsx as jsx71, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6527
+ import { jsx as jsx73, jsxs as jsxs32 } from "@emotion/react/jsx-runtime";
6343
6528
  var FilterButton2 = ({
6344
6529
  text = "Filters",
6345
6530
  icon = customIcons["filter-add"],
@@ -6361,10 +6546,10 @@ var FilterButton2 = ({
6361
6546
  ...props,
6362
6547
  "data-testid": dataTestId,
6363
6548
  children: [
6364
- /* @__PURE__ */ jsx71(Icon2, { icon, iconColor: "currentColor", size: "1rem" }),
6365
- /* @__PURE__ */ jsx71("span", { css: FilterButtonText, children: text }),
6366
- filterCount ? /* @__PURE__ */ jsx71(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
6367
- showDropdownIcon ? /* @__PURE__ */ jsx71(Icon2, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6549
+ /* @__PURE__ */ jsx73(Icon2, { icon, iconColor: "currentColor", size: "1rem" }),
6550
+ /* @__PURE__ */ jsx73("span", { css: FilterButtonText, children: text }),
6551
+ filterCount ? /* @__PURE__ */ jsx73(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
6552
+ showDropdownIcon ? /* @__PURE__ */ jsx73(Icon2, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6368
6553
  ]
6369
6554
  }
6370
6555
  );
@@ -6375,31 +6560,31 @@ import { CgClose } from "@react-icons/all-files/cg/CgClose";
6375
6560
  import { hasReferencedVariables as hasReferencedVariables2 } from "@uniformdev/canvas";
6376
6561
  import { Icon as Icon3, InputKeywordSearch } from "@uniformdev/design-system";
6377
6562
  import { CLEAR_EDITOR_COMMAND as CLEAR_EDITOR_COMMAND2 } from "lexical";
6378
- import { useEffect as useEffect18, useRef as useRef9, useState as useState21 } from "react";
6563
+ import { useEffect as useEffect20, useRef as useRef10, useState as useState22 } from "react";
6379
6564
  import { useDebounce as useDebounce7 } from "react-use";
6380
6565
  import { v4 as v42 } from "uuid";
6381
6566
 
6382
6567
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6383
6568
  import { VerticalRhythm as VerticalRhythm5 } from "@uniformdev/design-system";
6384
6569
  import {
6385
- createContext as createContext6,
6386
- useCallback as useCallback6,
6387
- useContext as useContext6,
6570
+ createContext as createContext7,
6571
+ useCallback as useCallback7,
6572
+ useContext as useContext7,
6388
6573
  useDeferredValue as useDeferredValue2,
6389
- useEffect as useEffect17,
6390
- useMemo as useMemo20,
6391
- useState as useState20
6574
+ useEffect as useEffect19,
6575
+ useMemo as useMemo21,
6576
+ useState as useState21
6392
6577
  } from "react";
6393
6578
 
6394
6579
  // src/components/SearchAndFilter/FilterEditor.tsx
6395
- import { jsx as jsx72 } from "@emotion/react/jsx-runtime";
6580
+ import { jsx as jsx74 } from "@emotion/react/jsx-runtime";
6396
6581
  var FilterEditorRenderer = ({ editorType, ...props }) => {
6397
6582
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
6398
6583
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
6399
6584
  if (!Editor || editorType === "empty") {
6400
- return /* @__PURE__ */ jsx72("span", {});
6585
+ return /* @__PURE__ */ jsx74("span", {});
6401
6586
  }
6402
- return /* @__PURE__ */ jsx72(Editor, { ...props });
6587
+ return /* @__PURE__ */ jsx74(Editor, { ...props });
6403
6588
  };
6404
6589
  var filterMapper = {
6405
6590
  multiChoice: FilterMultiChoiceEditor,
@@ -6417,9 +6602,9 @@ var filterMapper = {
6417
6602
  function withInputVariables(WrappedComponent, noSwapping = false) {
6418
6603
  const WithInputVariables = (props) => {
6419
6604
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
6420
- return /* @__PURE__ */ jsx72(WrappedComponent, { ...props });
6605
+ return /* @__PURE__ */ jsx74(WrappedComponent, { ...props });
6421
6606
  }
6422
- return /* @__PURE__ */ jsx72(
6607
+ return /* @__PURE__ */ jsx74(
6423
6608
  InputVariables,
6424
6609
  {
6425
6610
  "data-testid": "filter-value",
@@ -6428,7 +6613,7 @@ function withInputVariables(WrappedComponent, noSwapping = false) {
6428
6613
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
6429
6614
  value: props.value,
6430
6615
  disabled: props.disabled,
6431
- inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ jsx72(WrappedComponent, { ...props })
6616
+ inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ jsx74(WrappedComponent, { ...props })
6432
6617
  }
6433
6618
  );
6434
6619
  };
@@ -6438,9 +6623,9 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6438
6623
  const WithInputVariables = (props) => {
6439
6624
  var _a;
6440
6625
  if (!props.bindable || props.disabled || props.readOnly) {
6441
- return /* @__PURE__ */ jsx72(WrappedComponent, { ...props });
6626
+ return /* @__PURE__ */ jsx74(WrappedComponent, { ...props });
6442
6627
  }
6443
- return /* @__PURE__ */ jsx72(
6628
+ return /* @__PURE__ */ jsx74(
6444
6629
  InputVariables,
6445
6630
  {
6446
6631
  "data-testid": "filter-value",
@@ -6448,7 +6633,7 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6448
6633
  showMenuPosition: "inline-right",
6449
6634
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
6450
6635
  value: (_a = props.value) == null ? void 0 : _a[0],
6451
- inputWhenNoVariables: /* @__PURE__ */ jsx72(WrappedComponent, { ...props })
6636
+ inputWhenNoVariables: /* @__PURE__ */ jsx74(WrappedComponent, { ...props })
6452
6637
  }
6453
6638
  );
6454
6639
  };
@@ -6464,8 +6649,8 @@ var bindableFiltersMapper = {
6464
6649
  };
6465
6650
 
6466
6651
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6467
- import { jsx as jsx73 } from "@emotion/react/jsx-runtime";
6468
- var SearchAndFilterContext = createContext6({
6652
+ import { jsx as jsx75 } from "@emotion/react/jsx-runtime";
6653
+ var SearchAndFilterContext = createContext7({
6469
6654
  searchTerm: "",
6470
6655
  setSearchTerm: () => {
6471
6656
  },
@@ -6504,17 +6689,17 @@ var SearchAndFilterProvider = ({
6504
6689
  children,
6505
6690
  allowBindingSearchTerm
6506
6691
  }) => {
6507
- const [searchTerm, setSearchTerm] = useState20(defaultSearchTerm);
6692
+ const [searchTerm, setSearchTerm] = useState21(defaultSearchTerm);
6508
6693
  const deferredSearchTerm = useDeferredValue2(searchTerm);
6509
- const [filterVisibility, setFilterVisibility] = useState20(alwaysVisible || filterVisible);
6510
- const handleSearchTerm = useCallback6(
6694
+ const [filterVisibility, setFilterVisibility] = useState21(alwaysVisible || filterVisible);
6695
+ const handleSearchTerm = useCallback7(
6511
6696
  (term) => {
6512
6697
  setSearchTerm(term);
6513
6698
  onSearchChange == null ? void 0 : onSearchChange(term);
6514
6699
  },
6515
6700
  [setSearchTerm, onSearchChange]
6516
6701
  );
6517
- const handleToggleFilterVisibility = useCallback6(
6702
+ const handleToggleFilterVisibility = useCallback7(
6518
6703
  (visible) => {
6519
6704
  if (alwaysVisible) {
6520
6705
  return;
@@ -6523,10 +6708,10 @@ var SearchAndFilterProvider = ({
6523
6708
  },
6524
6709
  [alwaysVisible]
6525
6710
  );
6526
- const handleAddFilter = useCallback6(() => {
6711
+ const handleAddFilter = useCallback7(() => {
6527
6712
  onChange([...filters, { field: "", operator: "", value: "" }]);
6528
6713
  }, [filters, onChange]);
6529
- const handleResetFilters = useCallback6(() => {
6714
+ const handleResetFilters = useCallback7(() => {
6530
6715
  setSearchTerm("");
6531
6716
  if (onResetFilterValues) {
6532
6717
  return onResetFilterValues();
@@ -6534,20 +6719,20 @@ var SearchAndFilterProvider = ({
6534
6719
  onSearchChange == null ? void 0 : onSearchChange("");
6535
6720
  onChange(resetFilterValues);
6536
6721
  }, [onChange, resetFilterValues, onSearchChange, onResetFilterValues]);
6537
- const handleDeleteFilter = useCallback6(
6722
+ const handleDeleteFilter = useCallback7(
6538
6723
  (index) => {
6539
6724
  const remainingFilters = filters.filter((_, i) => i !== index);
6540
6725
  onChange(remainingFilters);
6541
6726
  },
6542
6727
  [filters, onChange]
6543
6728
  );
6544
- const validFilterQuery = useMemo20(() => {
6729
+ const validFilterQuery = useMemo21(() => {
6545
6730
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
6546
6731
  if (hasValidFilters) {
6547
6732
  return filters;
6548
6733
  }
6549
6734
  }, [filters]);
6550
- useEffect17(() => {
6735
+ useEffect19(() => {
6551
6736
  if (filterVisibility) {
6552
6737
  const handleEscKeyFilterClose = (e) => {
6553
6738
  if (e.key === "Escape") {
@@ -6560,7 +6745,7 @@ var SearchAndFilterProvider = ({
6560
6745
  };
6561
6746
  }
6562
6747
  }, [filterVisibility, handleToggleFilterVisibility]);
6563
- return /* @__PURE__ */ jsx73(
6748
+ return /* @__PURE__ */ jsx75(
6564
6749
  SearchAndFilterContext.Provider,
6565
6750
  {
6566
6751
  value: {
@@ -6580,17 +6765,17 @@ var SearchAndFilterProvider = ({
6580
6765
  filterMapper: filterMapper2,
6581
6766
  allowBindingSearchTerm
6582
6767
  },
6583
- children: /* @__PURE__ */ jsx73(VerticalRhythm5, { children })
6768
+ children: /* @__PURE__ */ jsx75(VerticalRhythm5, { children })
6584
6769
  }
6585
6770
  );
6586
6771
  };
6587
6772
  var useSearchAndFilter = () => {
6588
- const value = useContext6(SearchAndFilterContext);
6773
+ const value = useContext7(SearchAndFilterContext);
6589
6774
  return { ...value };
6590
6775
  };
6591
6776
 
6592
6777
  // src/components/SearchAndFilter/FilterControls.tsx
6593
- import { Fragment as Fragment13, jsx as jsx74, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6778
+ import { Fragment as Fragment14, jsx as jsx76, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
6594
6779
  var FilterControls = ({
6595
6780
  children,
6596
6781
  hideSearchInput
@@ -6603,10 +6788,10 @@ var FilterControls = ({
6603
6788
  searchTerm,
6604
6789
  allowBindingSearchTerm
6605
6790
  } = useSearchAndFilter();
6606
- const editorRef = useRef9(null);
6791
+ const editorRef = useRef10(null);
6607
6792
  const variableRefernceCountInSearchTerm = hasReferencedVariables2(searchTerm);
6608
- const [idToResetInputVariables, setIdToResetInputVariables] = useState21("data-resource-search-term-input");
6609
- const [localSearchTerm, setLocalSearchTerm] = useState21(searchTerm);
6793
+ const [idToResetInputVariables, setIdToResetInputVariables] = useState22("data-resource-search-term-input");
6794
+ const [localSearchTerm, setLocalSearchTerm] = useState22(searchTerm);
6610
6795
  useDebounce7(
6611
6796
  () => {
6612
6797
  if (localSearchTerm !== searchTerm) {
@@ -6616,14 +6801,14 @@ var FilterControls = ({
6616
6801
  300,
6617
6802
  [localSearchTerm]
6618
6803
  );
6619
- useEffect18(() => {
6804
+ useEffect20(() => {
6620
6805
  if (searchTerm === "") {
6621
6806
  setLocalSearchTerm("");
6622
6807
  setIdToResetInputVariables(`data-resource-search-term-input-${v42()}`);
6623
6808
  }
6624
6809
  }, [searchTerm]);
6625
- return /* @__PURE__ */ jsxs33(Fragment13, { children: [
6626
- /* @__PURE__ */ jsx74(
6810
+ return /* @__PURE__ */ jsxs33(Fragment14, { children: [
6811
+ /* @__PURE__ */ jsx76(
6627
6812
  FilterButton2,
6628
6813
  {
6629
6814
  "aria-controls": "search-and-filter-options",
@@ -6637,7 +6822,7 @@ var FilterControls = ({
6637
6822
  }
6638
6823
  ),
6639
6824
  hideSearchInput ? null : /* @__PURE__ */ jsxs33("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6640
- /* @__PURE__ */ jsx74(
6825
+ /* @__PURE__ */ jsx76(
6641
6826
  InputVariables,
6642
6827
  {
6643
6828
  label: "",
@@ -6647,7 +6832,7 @@ var FilterControls = ({
6647
6832
  value: localSearchTerm,
6648
6833
  onChange: (value) => setLocalSearchTerm(value != null ? value : ""),
6649
6834
  disableVariables: !allowBindingSearchTerm,
6650
- inputWhenNoVariables: /* @__PURE__ */ jsx74(
6835
+ inputWhenNoVariables: /* @__PURE__ */ jsx76(
6651
6836
  InputKeywordSearch,
6652
6837
  {
6653
6838
  placeholder: "Search...",
@@ -6666,7 +6851,7 @@ var FilterControls = ({
6666
6851
  )
6667
6852
  }
6668
6853
  ),
6669
- variableRefernceCountInSearchTerm ? /* @__PURE__ */ jsx74("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ jsx74(
6854
+ variableRefernceCountInSearchTerm ? /* @__PURE__ */ jsx76("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ jsx76(
6670
6855
  "button",
6671
6856
  {
6672
6857
  css: ClearSearchButtonStyles,
@@ -6680,7 +6865,7 @@ var FilterControls = ({
6680
6865
  },
6681
6866
  type: "button",
6682
6867
  "data-testid": "keyword-search-clear-button",
6683
- children: /* @__PURE__ */ jsx74(Icon3, { icon: CgClose, iconColor: "red", size: "1rem" })
6868
+ children: /* @__PURE__ */ jsx76(Icon3, { icon: CgClose, iconColor: "red", size: "1rem" })
6684
6869
  }
6685
6870
  ) }) : null
6686
6871
  ] }),
@@ -6697,7 +6882,7 @@ import {
6697
6882
  Menu as Menu3,
6698
6883
  SelectableMenuItem
6699
6884
  } from "@uniformdev/design-system";
6700
- import { useMemo as useMemo21 } from "react";
6885
+ import { useMemo as useMemo22 } from "react";
6701
6886
 
6702
6887
  // src/components/SearchAndFilter/util/isFilterBindable.ts
6703
6888
  function isFilterBindable(filter, operator) {
@@ -6706,7 +6891,7 @@ function isFilterBindable(filter, operator) {
6706
6891
  }
6707
6892
 
6708
6893
  // src/components/SearchAndFilter/FilterItem.tsx
6709
- import { jsx as jsx75, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6894
+ import { jsx as jsx77, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
6710
6895
  var FilterItem = ({
6711
6896
  index,
6712
6897
  operatorOptions,
@@ -6725,7 +6910,7 @@ var FilterItem = ({
6725
6910
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
6726
6911
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
6727
6912
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
6728
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = useMemo21(() => {
6913
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = useMemo22(() => {
6729
6914
  var _a2;
6730
6915
  const currentSelectedFilterGroup = filterOptions.find((item) => {
6731
6916
  var _a3;
@@ -6758,7 +6943,7 @@ var FilterItem = ({
6758
6943
  const joinLabel = index === 0 ? initialCriteriaTitle : index === 1 && onCriteriaGroupOperatorChange ? /* @__PURE__ */ jsxs34(
6759
6944
  Menu3,
6760
6945
  {
6761
- menuTrigger: /* @__PURE__ */ jsx75(
6946
+ menuTrigger: /* @__PURE__ */ jsx77(
6762
6947
  DropdownStyleMenuTrigger,
6763
6948
  {
6764
6949
  bgColor: "transparent",
@@ -6771,7 +6956,7 @@ var FilterItem = ({
6771
6956
  size: "small",
6772
6957
  placement: "bottom-start",
6773
6958
  children: [
6774
- /* @__PURE__ */ jsx75(
6959
+ /* @__PURE__ */ jsx77(
6775
6960
  SelectableMenuItem,
6776
6961
  {
6777
6962
  selected: criteriaGroupOperator === "and",
@@ -6780,7 +6965,7 @@ var FilterItem = ({
6780
6965
  children: "and"
6781
6966
  }
6782
6967
  ),
6783
- /* @__PURE__ */ jsx75(
6968
+ /* @__PURE__ */ jsx77(
6784
6969
  SelectableMenuItem,
6785
6970
  {
6786
6971
  selected: criteriaGroupOperator === "or",
@@ -6793,9 +6978,9 @@ var FilterItem = ({
6793
6978
  }
6794
6979
  ) : criteriaGroupOperator;
6795
6980
  return /* @__PURE__ */ jsxs34("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
6796
- /* @__PURE__ */ jsx75("span", { children: joinLabel }),
6981
+ /* @__PURE__ */ jsx77("span", { children: joinLabel }),
6797
6982
  /* @__PURE__ */ jsxs34("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
6798
- CustomLeftHandComponent ? /* @__PURE__ */ jsx75(
6983
+ CustomLeftHandComponent ? /* @__PURE__ */ jsx77(
6799
6984
  CustomLeftHandComponent,
6800
6985
  {
6801
6986
  filterOption: selectedFieldValue,
@@ -6805,7 +6990,7 @@ var FilterItem = ({
6805
6990
  onFilterOptionChange("");
6806
6991
  }
6807
6992
  }
6808
- ) : /* @__PURE__ */ jsx75(
6993
+ ) : /* @__PURE__ */ jsx77(
6809
6994
  InputComboBox5,
6810
6995
  {
6811
6996
  "aria-label": label,
@@ -6832,7 +7017,7 @@ var FilterItem = ({
6832
7017
  name: `filter-field-${index}`
6833
7018
  }
6834
7019
  ),
6835
- /* @__PURE__ */ jsx75(
7020
+ /* @__PURE__ */ jsx77(
6836
7021
  InputComboBox5,
6837
7022
  {
6838
7023
  "aria-label": operatorLabel,
@@ -6856,7 +7041,7 @@ var FilterItem = ({
6856
7041
  name: `filter-operator-${index}`
6857
7042
  }
6858
7043
  ),
6859
- /* @__PURE__ */ jsx75(
7044
+ /* @__PURE__ */ jsx77(
6860
7045
  FilterEditorRenderer,
6861
7046
  {
6862
7047
  "aria-label": metaDataLabel,
@@ -6871,7 +7056,7 @@ var FilterItem = ({
6871
7056
  filterFieldName: filters[index].field
6872
7057
  }
6873
7058
  ),
6874
- readOnly ? null : /* @__PURE__ */ jsx75(
7059
+ readOnly ? null : /* @__PURE__ */ jsx77(
6875
7060
  "button",
6876
7061
  {
6877
7062
  type: "button",
@@ -6880,7 +7065,7 @@ var FilterItem = ({
6880
7065
  css: IconBtn,
6881
7066
  "data-testid": "delete-filter",
6882
7067
  disabled: filters.length === 1,
6883
- children: /* @__PURE__ */ jsx75(Icon4, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
7068
+ children: /* @__PURE__ */ jsx77(Icon4, { icon: CgTrash2, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
6884
7069
  }
6885
7070
  )
6886
7071
  ] })
@@ -6893,16 +7078,16 @@ import { Icon as Icon5 } from "@uniformdev/design-system";
6893
7078
 
6894
7079
  // src/components/SearchAndFilter/FilterMenu.tsx
6895
7080
  import { HorizontalRhythm as HorizontalRhythm8, VerticalRhythm as VerticalRhythm6 } from "@uniformdev/design-system";
6896
- import React6, { useEffect as useEffect19 } from "react";
6897
- import { jsx as jsx76, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
7081
+ import React8, { useEffect as useEffect21 } from "react";
7082
+ import { jsx as jsx78, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
6898
7083
  var SearchAndFilterOptionsContainer2 = ({
6899
7084
  buttonRow,
6900
7085
  additionalFiltersContainer,
6901
7086
  children
6902
7087
  }) => {
6903
7088
  return /* @__PURE__ */ jsxs35("div", { css: SearchAndFilterOptionsContainer, children: [
6904
- /* @__PURE__ */ jsx76("div", { css: SearchAndFilterOptionsInnerContainer, children }),
6905
- buttonRow ? /* @__PURE__ */ jsx76(
7089
+ /* @__PURE__ */ jsx78("div", { css: SearchAndFilterOptionsInnerContainer, children }),
7090
+ buttonRow ? /* @__PURE__ */ jsx78(
6906
7091
  HorizontalRhythm8,
6907
7092
  {
6908
7093
  css: SearchAndFilterButtonGroup,
@@ -6912,7 +7097,7 @@ var SearchAndFilterOptionsContainer2 = ({
6912
7097
  children: buttonRow
6913
7098
  }
6914
7099
  ) : null,
6915
- additionalFiltersContainer ? /* @__PURE__ */ jsx76("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
7100
+ additionalFiltersContainer ? /* @__PURE__ */ jsx78("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
6916
7101
  ] });
6917
7102
  };
6918
7103
  var FilterMenu = ({
@@ -6925,22 +7110,22 @@ var FilterMenu = ({
6925
7110
  resetButtonText = "reset"
6926
7111
  }) => {
6927
7112
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6928
- const innerMenuRef = React6.useRef(null);
6929
- useEffect19(() => {
7113
+ const innerMenuRef = React8.useRef(null);
7114
+ useEffect21(() => {
6930
7115
  var _a;
6931
7116
  if (filterVisibility) {
6932
7117
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
6933
7118
  }
6934
7119
  }, [filterVisibility]);
6935
- return /* @__PURE__ */ jsx76(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ jsxs35(
7120
+ return /* @__PURE__ */ jsx78(VerticalRhythm6, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ jsxs35(
6936
7121
  SearchAndFilterOptionsContainer2,
6937
7122
  {
6938
7123
  buttonRow: menuControls,
6939
7124
  additionalFiltersContainer,
6940
7125
  children: [
6941
7126
  /* @__PURE__ */ jsxs35(HorizontalRhythm8, { gap: "sm", align: "center", justify: "space-between", children: [
6942
- filterTitle ? /* @__PURE__ */ jsx76("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
6943
- (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ jsx76(
7127
+ filterTitle ? /* @__PURE__ */ jsx78("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
7128
+ (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ jsx78(
6944
7129
  "button",
6945
7130
  {
6946
7131
  type: "button",
@@ -7051,7 +7236,7 @@ function hasBindings(currentValue) {
7051
7236
  }
7052
7237
 
7053
7238
  // src/components/SearchAndFilter/FilterItems.tsx
7054
- import { jsx as jsx77, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
7239
+ import { jsx as jsx79, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
7055
7240
  var FilterItems = ({
7056
7241
  addButtonText = "add condition",
7057
7242
  additionalFiltersContainer,
@@ -7089,7 +7274,7 @@ var FilterItems = ({
7089
7274
  }
7090
7275
  setFilters(next);
7091
7276
  };
7092
- return /* @__PURE__ */ jsx77(
7277
+ return /* @__PURE__ */ jsx79(
7093
7278
  FilterMenu,
7094
7279
  {
7095
7280
  id: "search-and-filter-options",
@@ -7102,7 +7287,7 @@ var FilterItems = ({
7102
7287
  onClick: handleAddFilter,
7103
7288
  "data-testid": "add-filter",
7104
7289
  children: [
7105
- /* @__PURE__ */ jsx77(Icon5, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7290
+ /* @__PURE__ */ jsx79(Icon5, { icon: CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7106
7291
  addButtonText
7107
7292
  ]
7108
7293
  }
@@ -7118,7 +7303,7 @@ var FilterItems = ({
7118
7303
  })) == null ? void 0 : _a.options) != null ? _b : [];
7119
7304
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
7120
7305
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
7121
- return /* @__PURE__ */ jsx77(
7306
+ return /* @__PURE__ */ jsx79(
7122
7307
  FilterItem,
7123
7308
  {
7124
7309
  index: i,
@@ -7143,8 +7328,8 @@ var FilterItems = ({
7143
7328
  import { VerticalRhythm as VerticalRhythm7 } from "@uniformdev/design-system";
7144
7329
 
7145
7330
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
7146
- import { Button as Button5, Callout as Callout4, HorizontalRhythm as HorizontalRhythm9, Paragraph } from "@uniformdev/design-system";
7147
- import { Fragment as Fragment14, jsx as jsx78, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
7331
+ import { Button as Button5, Callout as Callout5, HorizontalRhythm as HorizontalRhythm9, Paragraph } from "@uniformdev/design-system";
7332
+ import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
7148
7333
  var SearchAndFilterResultContainer = ({
7149
7334
  buttonText,
7150
7335
  clearButtonLabel = "clear",
@@ -7195,18 +7380,18 @@ var SearchAndFilterResultContainer = ({
7195
7380
  handleResetFilters();
7196
7381
  }
7197
7382
  };
7198
- return /* @__PURE__ */ jsxs37(Fragment14, { children: [
7383
+ return /* @__PURE__ */ jsxs37(Fragment15, { children: [
7199
7384
  /* @__PURE__ */ jsxs37(HorizontalRhythm9, { children: [
7200
7385
  /* @__PURE__ */ jsxs37("span", { children: [
7201
7386
  totalResults,
7202
7387
  " results ",
7203
7388
  searchTerm ? `for "${searchTerm}"` : null
7204
7389
  ] }),
7205
- !searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx78(Button5, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7390
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ jsx80(Button5, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7206
7391
  ] }),
7207
- totalResults === 0 ? /* @__PURE__ */ jsxs37(Callout4, { title: automateCalloutTitle, type: "note", children: [
7208
- calloutText ? /* @__PURE__ */ jsx78(Paragraph, { children: calloutText }) : null,
7209
- hideClearButton ? null : /* @__PURE__ */ jsx78(
7392
+ totalResults === 0 ? /* @__PURE__ */ jsxs37(Callout5, { title: automateCalloutTitle, type: "note", children: [
7393
+ calloutText ? /* @__PURE__ */ jsx80(Paragraph, { children: calloutText }) : null,
7394
+ hideClearButton ? null : /* @__PURE__ */ jsx80(
7210
7395
  Button5,
7211
7396
  {
7212
7397
  buttonType: "tertiaryOutline",
@@ -7221,14 +7406,14 @@ var SearchAndFilterResultContainer = ({
7221
7406
  };
7222
7407
 
7223
7408
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7224
- import { jsx as jsx79, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
7409
+ import { jsx as jsx81, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
7225
7410
  var SearchAndFilter = ({
7226
7411
  filters,
7227
7412
  filterOptions,
7228
7413
  filterVisible,
7229
7414
  filterControls,
7230
7415
  viewSwitchControls,
7231
- resultsContainerView = /* @__PURE__ */ jsx79(SearchAndFilterResultContainer, {}),
7416
+ resultsContainerView = /* @__PURE__ */ jsx81(SearchAndFilterResultContainer, {}),
7232
7417
  filterMapper: filterMapper2 = filterMapper,
7233
7418
  additionalFiltersContainer,
7234
7419
  onChange,
@@ -7240,7 +7425,7 @@ var SearchAndFilter = ({
7240
7425
  resetFilterValues = [],
7241
7426
  onResetFilterValues
7242
7427
  }) => {
7243
- return /* @__PURE__ */ jsx79(
7428
+ return /* @__PURE__ */ jsx81(
7244
7429
  SearchAndFilterProvider,
7245
7430
  {
7246
7431
  filters,
@@ -7257,16 +7442,16 @@ var SearchAndFilter = ({
7257
7442
  onResetFilterValues,
7258
7443
  children: /* @__PURE__ */ jsxs38(VerticalRhythm7, { "data-testid": "search-and-filter", children: [
7259
7444
  /* @__PURE__ */ jsxs38("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7260
- /* @__PURE__ */ jsx79(
7445
+ /* @__PURE__ */ jsx81(
7261
7446
  "div",
7262
7447
  {
7263
7448
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
7264
- children: !filterControls ? /* @__PURE__ */ jsx79(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7449
+ children: !filterControls ? /* @__PURE__ */ jsx81(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7265
7450
  }
7266
7451
  ),
7267
7452
  viewSwitchControls
7268
7453
  ] }),
7269
- /* @__PURE__ */ jsx79(FilterItems, { additionalFiltersContainer }),
7454
+ /* @__PURE__ */ jsx81(FilterItems, { additionalFiltersContainer }),
7270
7455
  resultsContainerView
7271
7456
  ] })
7272
7457
  }
@@ -7275,17 +7460,17 @@ var SearchAndFilter = ({
7275
7460
 
7276
7461
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
7277
7462
  import { InputKeywordSearch as InputKeywordSearch2 } from "@uniformdev/design-system";
7278
- import { createContext as createContext7, useState as useState22 } from "react";
7463
+ import { createContext as createContext8, useState as useState23 } from "react";
7279
7464
  import { useDebounce as useDebounce8 } from "react-use";
7280
- import { jsx as jsx80 } from "@emotion/react/jsx-runtime";
7281
- var SearchOnlyContext = createContext7({
7465
+ import { jsx as jsx82 } from "@emotion/react/jsx-runtime";
7466
+ var SearchOnlyContext = createContext8({
7282
7467
  searchTerm: "",
7283
7468
  setSearchTerm: () => {
7284
7469
  }
7285
7470
  });
7286
7471
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7287
7472
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
7288
- const [localeSearchTerm, setLocaleSearchTerm] = useState22("");
7473
+ const [localeSearchTerm, setLocaleSearchTerm] = useState23("");
7289
7474
  useDebounce8(
7290
7475
  () => {
7291
7476
  setSearchTerm(localeSearchTerm);
@@ -7294,14 +7479,14 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7294
7479
  300,
7295
7480
  [localeSearchTerm]
7296
7481
  );
7297
- return /* @__PURE__ */ jsx80(
7482
+ return /* @__PURE__ */ jsx82(
7298
7483
  SearchOnlyContext.Provider,
7299
7484
  {
7300
7485
  value: {
7301
7486
  searchTerm,
7302
7487
  setSearchTerm: setLocaleSearchTerm
7303
7488
  },
7304
- children: /* @__PURE__ */ jsx80("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ jsx80(
7489
+ children: /* @__PURE__ */ jsx82("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ jsx82(
7305
7490
  InputKeywordSearch2,
7306
7491
  {
7307
7492
  placeholder: "Search...",
@@ -7319,9 +7504,9 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7319
7504
  import { InputComboBox as InputComboBox6, InputSelect as InputSelect5, SegmentedControl, VerticalRhythm as VerticalRhythm8 } from "@uniformdev/design-system";
7320
7505
 
7321
7506
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
7322
- import { css as css22 } from "@emotion/react";
7507
+ import { css as css23 } from "@emotion/react";
7323
7508
  import { cq as cq2, fadeInLtr as fadeInLtr2 } from "@uniformdev/design-system";
7324
- var ConditionalFilterRow2 = css22`
7509
+ var ConditionalFilterRow2 = css23`
7325
7510
  display: grid;
7326
7511
  grid-template-columns: 35px 1fr;
7327
7512
  gap: var(--spacing-sm);
@@ -7358,7 +7543,7 @@ var ConditionalFilterRow2 = css22`
7358
7543
  animation: ${fadeInLtr2} var(--duration-fast) var(--timing-ease-out);
7359
7544
  }
7360
7545
  `;
7361
- var ConditionalInputRow2 = css22`
7546
+ var ConditionalInputRow2 = css23`
7362
7547
  display: flex;
7363
7548
  gap: var(--spacing-sm);
7364
7549
  flex-wrap: wrap;
@@ -7381,13 +7566,13 @@ var ConditionalInputRow2 = css22`
7381
7566
  }
7382
7567
  }
7383
7568
  `;
7384
- var SearchInput2 = css22`
7569
+ var SearchInput2 = css23`
7385
7570
  && {
7386
7571
  max-height: 40px;
7387
7572
  min-height: unset;
7388
7573
  }
7389
7574
  `;
7390
- var FilterButton3 = css22`
7575
+ var FilterButton3 = css23`
7391
7576
  align-items: center;
7392
7577
  background: var(--white);
7393
7578
  border: 1px solid var(--gray-300);
@@ -7424,13 +7609,13 @@ var FilterButton3 = css22`
7424
7609
  opacity: var(--opacity-50);
7425
7610
  }
7426
7611
  `;
7427
- var FilterButtonText2 = css22`
7612
+ var FilterButtonText2 = css23`
7428
7613
  overflow: hidden;
7429
7614
  text-overflow: ellipsis;
7430
7615
  white-space: nowrap;
7431
7616
  max-width: 14ch;
7432
7617
  `;
7433
- var FilterButtonSelected2 = css22`
7618
+ var FilterButtonSelected2 = css23`
7434
7619
  background: var(--gray-100);
7435
7620
  border-color: var(--gray-300);
7436
7621
 
@@ -7438,7 +7623,7 @@ var FilterButtonSelected2 = css22`
7438
7623
  color: var(--accent-dark);
7439
7624
  }
7440
7625
  `;
7441
- var FilterButtonWithOptions2 = css22`
7626
+ var FilterButtonWithOptions2 = css23`
7442
7627
  :where([aria-expanded='true']) {
7443
7628
  background: var(--purple-rain-100);
7444
7629
  border-color: var(--accent-light);
@@ -7450,14 +7635,14 @@ var FilterButtonWithOptions2 = css22`
7450
7635
  }
7451
7636
  }
7452
7637
  `;
7453
- var SearchIcon2 = css22`
7638
+ var SearchIcon2 = css23`
7454
7639
  color: var(--icon-color);
7455
7640
  position: absolute;
7456
7641
  inset: 0 var(--spacing-base) 0 auto;
7457
7642
  margin: auto;
7458
7643
  transition: color var(--duration-fast) var(--timing-ease-out);
7459
7644
  `;
7460
- var AddConditionalBtn2 = css22`
7645
+ var AddConditionalBtn2 = css23`
7461
7646
  align-items: center;
7462
7647
  background: transparent;
7463
7648
  border: none;
@@ -7476,14 +7661,14 @@ var AddConditionalBtn2 = css22`
7476
7661
  color: var(--gray-400);
7477
7662
  }
7478
7663
  `;
7479
- var Title2 = css22`
7664
+ var Title2 = css23`
7480
7665
  color: var(--typography-light);
7481
7666
 
7482
7667
  &:focus {
7483
7668
  outline: none;
7484
7669
  }
7485
7670
  `;
7486
- var ResetConditionsBtn2 = css22`
7671
+ var ResetConditionsBtn2 = css23`
7487
7672
  background: transparent;
7488
7673
  border: none;
7489
7674
  color: var(--action-destructive-default);
@@ -7495,12 +7680,12 @@ var ResetConditionsBtn2 = css22`
7495
7680
  color: var(--action-destructive-hover);
7496
7681
  }
7497
7682
  `;
7498
- var IconBtn2 = css22`
7683
+ var IconBtn2 = css23`
7499
7684
  background: transparent;
7500
7685
  border: none;
7501
7686
  padding: var(--spacing-sm);
7502
7687
  `;
7503
- var SearchAndFilterOptionsContainer3 = css22`
7688
+ var SearchAndFilterOptionsContainer3 = css23`
7504
7689
  background: var(--gray-50);
7505
7690
  border: 1px solid var(--gray-300);
7506
7691
  border-radius: var(--rounded-base);
@@ -7513,17 +7698,17 @@ var SearchAndFilterOptionsContainer3 = css22`
7513
7698
  position: relative;
7514
7699
  z-index: 1;
7515
7700
  `;
7516
- var SearchAndFilterOptionsInnerContainer2 = css22`
7701
+ var SearchAndFilterOptionsInnerContainer2 = css23`
7517
7702
  display: flex;
7518
7703
  flex-direction: column;
7519
7704
  gap: var(--spacing-sm);
7520
7705
  padding-inline: var(--spacing-md);
7521
7706
  `;
7522
- var SearchAndFilterButtonGroup2 = css22`
7707
+ var SearchAndFilterButtonGroup2 = css23`
7523
7708
  margin-top: var(--spacing-xs);
7524
7709
  margin-left: calc(56px + var(--spacing-md));
7525
7710
  `;
7526
- var SortFilterWrapper = (hiddenLocaleInput) => css22`
7711
+ var SortFilterWrapper = (hiddenLocaleInput) => css23`
7527
7712
  align-items: center;
7528
7713
  display: flex;
7529
7714
  gap: var(--spacing-base);
@@ -7534,13 +7719,13 @@ var SortFilterWrapper = (hiddenLocaleInput) => css22`
7534
7719
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
7535
7720
  }
7536
7721
  `;
7537
- var SortFilterInputRow = css22`
7722
+ var SortFilterInputRow = css23`
7538
7723
  align-items: center;
7539
7724
  display: grid;
7540
7725
  grid-template-columns: 1fr auto;
7541
7726
  gap: var(--spacing-base);
7542
7727
  `;
7543
- var InputVariableWrapper = css22`
7728
+ var InputVariableWrapper = css23`
7544
7729
  flex-grow: 1;
7545
7730
 
7546
7731
  // we need to override label styles nested within the input variable
@@ -7551,7 +7736,7 @@ var InputVariableWrapper = css22`
7551
7736
  `;
7552
7737
 
7553
7738
  // src/components/SearchAndFilter/SortItems.tsx
7554
- import { jsx as jsx81, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
7739
+ import { jsx as jsx83, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
7555
7740
  var SortItems = ({
7556
7741
  sortByLabel = "Sort by",
7557
7742
  localeLabel = "Show locale",
@@ -7575,9 +7760,9 @@ var SortItems = ({
7575
7760
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
7576
7761
  return /* @__PURE__ */ jsxs39("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7577
7762
  /* @__PURE__ */ jsxs39(VerticalRhythm8, { gap: "xs", children: [
7578
- /* @__PURE__ */ jsx81("span", { css: Title2, children: sortByLabel }),
7763
+ /* @__PURE__ */ jsx83("span", { css: Title2, children: sortByLabel }),
7579
7764
  /* @__PURE__ */ jsxs39("div", { css: SortFilterInputRow, children: [
7580
- /* @__PURE__ */ jsx81(
7765
+ /* @__PURE__ */ jsx83(
7581
7766
  InputVariables,
7582
7767
  {
7583
7768
  disableInlineMenu: disableSortBinding,
@@ -7585,7 +7770,7 @@ var SortItems = ({
7585
7770
  value: sortField,
7586
7771
  valueToResetTo: "created_at",
7587
7772
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
7588
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7773
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7589
7774
  InputComboBox6,
7590
7775
  {
7591
7776
  id: "sort-by-field",
@@ -7608,7 +7793,7 @@ var SortItems = ({
7608
7793
  )
7609
7794
  }
7610
7795
  ),
7611
- /* @__PURE__ */ jsx81(
7796
+ /* @__PURE__ */ jsx83(
7612
7797
  InputVariables,
7613
7798
  {
7614
7799
  disableInlineMenu: disableSortBinding,
@@ -7616,7 +7801,7 @@ var SortItems = ({
7616
7801
  valueToResetTo: "DESC",
7617
7802
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
7618
7803
  onChange: (e) => onSortChange(`${sortField}_${e}`),
7619
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7804
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7620
7805
  SegmentedControl,
7621
7806
  {
7622
7807
  noCheckmark: true,
@@ -7648,14 +7833,14 @@ var SortItems = ({
7648
7833
  )
7649
7834
  ] })
7650
7835
  ] }),
7651
- hideLocaleOptions ? null : /* @__PURE__ */ jsx81(VerticalRhythm8, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ jsx81(
7836
+ hideLocaleOptions ? null : /* @__PURE__ */ jsx83(VerticalRhythm8, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ jsx83(
7652
7837
  InputVariables,
7653
7838
  {
7654
7839
  label: localeLabelValue,
7655
7840
  value: localeValue,
7656
7841
  showMenuPosition: "inline-right",
7657
7842
  onChange: (e) => onLocaleChange(e != null ? e : ""),
7658
- inputWhenNoVariables: /* @__PURE__ */ jsx81(
7843
+ inputWhenNoVariables: /* @__PURE__ */ jsx83(
7659
7844
  InputSelect5,
7660
7845
  {
7661
7846
  name: "localeReturned",
@@ -7686,7 +7871,7 @@ function createLocationValidator(setValue, validate) {
7686
7871
 
7687
7872
  // src/utils/useContentDataResourceLocaleInfo.ts
7688
7873
  import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
7689
- import { useEffect as useEffect20, useRef as useRef10 } from "react";
7874
+ import { useEffect as useEffect22, useRef as useRef11 } from "react";
7690
7875
  function useContentDataResourceLocaleInfo({
7691
7876
  locale,
7692
7877
  defaultLocale,
@@ -7694,12 +7879,12 @@ function useContentDataResourceLocaleInfo({
7694
7879
  dynamicInputs
7695
7880
  }) {
7696
7881
  var _a;
7697
- const setLocaleRef = useRef10(setLocale);
7882
+ const setLocaleRef = useRef11(setLocale);
7698
7883
  setLocaleRef.current = setLocale;
7699
7884
  const { flatVariables } = useVariables();
7700
7885
  const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : defaultLocale != null ? defaultLocale : "";
7701
7886
  const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7702
- useEffect20(() => {
7887
+ useEffect22(() => {
7703
7888
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7704
7889
  setLocaleRef.current(effectiveLocale);
7705
7890
  }
@@ -7711,7 +7896,7 @@ function useContentDataResourceLocaleInfo({
7711
7896
  import {
7712
7897
  AddListButton as AddListButton2,
7713
7898
  Button as Button6,
7714
- Callout as Callout5,
7899
+ Callout as Callout6,
7715
7900
  DrawerContent,
7716
7901
  Heading,
7717
7902
  Input as Input10,
@@ -7721,7 +7906,7 @@ import {
7721
7906
  InputToggle as InputToggle3,
7722
7907
  Label,
7723
7908
  LoadingIndicator as LoadingIndicator4,
7724
- LoadingOverlay,
7909
+ LoadingOverlay as LoadingOverlay2,
7725
7910
  Menu as Menu4,
7726
7911
  MenuItem as MenuItem2,
7727
7912
  ParameterGroup,
@@ -7752,7 +7937,7 @@ export {
7752
7937
  AddListButton2 as AddListButton,
7753
7938
  Button6 as Button,
7754
7939
  CHECKBOX_OPERATORS,
7755
- Callout5 as Callout,
7940
+ Callout6 as Callout,
7756
7941
  ControlledValuePlugin,
7757
7942
  DATE_OPERATORS,
7758
7943
  DATE_TIME_OPERATORS,
@@ -7765,6 +7950,9 @@ export {
7765
7950
  DataTypeEditor,
7766
7951
  DateEditor,
7767
7952
  DateRangeEditor,
7953
+ DelegationContext,
7954
+ DelegationGate,
7955
+ DelegationProvider,
7768
7956
  DrawerContent,
7769
7957
  EDIT_VARIABLE_COMMAND,
7770
7958
  FilterButton2 as FilterButton,
@@ -7787,7 +7975,7 @@ export {
7787
7975
  Label,
7788
7976
  LinkButton,
7789
7977
  LoadingIndicator4 as LoadingIndicator,
7790
- LoadingOverlay,
7978
+ LoadingOverlay2 as LoadingOverlay,
7791
7979
  MULTI_SELECT_OPERATORS,
7792
7980
  Menu4 as Menu,
7793
7981
  MenuItem2 as MenuItem,
@@ -7877,6 +8065,7 @@ export {
7877
8065
  urlEncodeRequestUrl,
7878
8066
  useConnectedDataAsVariables,
7879
8067
  useContentDataResourceLocaleInfo,
8068
+ useDelegation,
7880
8069
  useDynamicInputsAsVariables,
7881
8070
  useMeshLocation,
7882
8071
  useObjectSearchContext,