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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -34,10 +34,10 @@ var index_exports = {};
34
34
  __export(index_exports, {
35
35
  $createVariableNode: () => $createVariableNode,
36
36
  $isVariableNode: () => $isVariableNode,
37
- AddListButton: () => import_design_system53.AddListButton,
38
- Button: () => import_design_system53.Button,
37
+ AddListButton: () => import_design_system54.AddListButton,
38
+ Button: () => import_design_system54.Button,
39
39
  CHECKBOX_OPERATORS: () => CHECKBOX_OPERATORS,
40
- Callout: () => import_design_system53.Callout,
40
+ Callout: () => import_design_system54.Callout,
41
41
  ControlledValuePlugin: () => ControlledValuePlugin,
42
42
  DATE_OPERATORS: () => DATE_OPERATORS,
43
43
  DATE_TIME_OPERATORS: () => DATE_TIME_OPERATORS,
@@ -50,7 +50,11 @@ __export(index_exports, {
50
50
  DataTypeEditor: () => DataTypeEditor,
51
51
  DateEditor: () => DateEditor,
52
52
  DateRangeEditor: () => DateRangeEditor,
53
- DrawerContent: () => import_design_system53.DrawerContent,
53
+ DelegationContext: () => DelegationContext,
54
+ DelegationDisabledError: () => DelegationDisabledError,
55
+ DelegationGate: () => DelegationGate,
56
+ DelegationProvider: () => DelegationProvider,
57
+ DrawerContent: () => import_design_system54.DrawerContent,
54
58
  EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
55
59
  FilterButton: () => FilterButton2,
56
60
  FilterControls: () => FilterControls,
@@ -60,22 +64,22 @@ __export(index_exports, {
60
64
  FilterMenu: () => FilterMenu,
61
65
  FilterMultiChoiceEditor: () => FilterMultiChoiceEditor,
62
66
  FilterSingleChoiceEditor: () => FilterSingleChoiceEditor,
63
- Heading: () => import_design_system53.Heading,
67
+ Heading: () => import_design_system54.Heading,
64
68
  INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
65
69
  Icons: () => icons_exports,
66
- Input: () => import_design_system53.Input,
67
- InputComboBox: () => import_design_system53.InputComboBox,
68
- InputKeywordSearch: () => import_design_system53.InputKeywordSearch,
69
- InputSelect: () => import_design_system53.InputSelect,
70
- InputToggle: () => import_design_system53.InputToggle,
70
+ Input: () => import_design_system54.Input,
71
+ InputComboBox: () => import_design_system54.InputComboBox,
72
+ InputKeywordSearch: () => import_design_system54.InputKeywordSearch,
73
+ InputSelect: () => import_design_system54.InputSelect,
74
+ InputToggle: () => import_design_system54.InputToggle,
71
75
  InputVariables: () => InputVariables,
72
- Label: () => import_design_system53.Label,
76
+ Label: () => import_design_system54.Label,
73
77
  LinkButton: () => LinkButton,
74
- LoadingIndicator: () => import_design_system53.LoadingIndicator,
75
- LoadingOverlay: () => import_design_system53.LoadingOverlay,
78
+ LoadingIndicator: () => import_design_system54.LoadingIndicator,
79
+ LoadingOverlay: () => import_design_system54.LoadingOverlay,
76
80
  MULTI_SELECT_OPERATORS: () => MULTI_SELECT_OPERATORS,
77
- Menu: () => import_design_system53.Menu,
78
- MenuItem: () => import_design_system53.MenuItem,
81
+ Menu: () => import_design_system54.Menu,
82
+ MenuItem: () => import_design_system54.MenuItem,
79
83
  MeshApp: () => MeshApp,
80
84
  NUMBER_OPERATORS: () => NUMBER_OPERATORS,
81
85
  NumberEditor: () => NumberEditor,
@@ -94,22 +98,22 @@ __export(index_exports, {
94
98
  PUBLISH_STATUS_FIELD_OPERATORS: () => PUBLISH_STATUS_FIELD_OPERATORS,
95
99
  ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
96
100
  ParameterConnectionIndicator: () => ParameterConnectionIndicator,
97
- ParameterGroup: () => import_design_system53.ParameterGroup,
98
- ParameterImage: () => import_design_system53.ParameterImage,
99
- ParameterImageInner: () => import_design_system53.ParameterImageInner,
100
- ParameterInput: () => import_design_system53.ParameterInput,
101
- ParameterInputInner: () => import_design_system53.ParameterInputInner,
102
- ParameterLabel: () => import_design_system53.ParameterLabel,
103
- ParameterMenuButton: () => import_design_system53.ParameterMenuButton,
101
+ ParameterGroup: () => import_design_system54.ParameterGroup,
102
+ ParameterImage: () => import_design_system54.ParameterImage,
103
+ ParameterImageInner: () => import_design_system54.ParameterImageInner,
104
+ ParameterInput: () => import_design_system54.ParameterInput,
105
+ ParameterInputInner: () => import_design_system54.ParameterInputInner,
106
+ ParameterLabel: () => import_design_system54.ParameterLabel,
107
+ ParameterMenuButton: () => import_design_system54.ParameterMenuButton,
104
108
  ParameterOrSingleVariable: () => ParameterOrSingleVariable,
105
- ParameterSelect: () => import_design_system53.ParameterSelect,
106
- ParameterSelectInner: () => import_design_system53.ParameterSelectInner,
107
- ParameterShell: () => import_design_system53.ParameterShell,
109
+ ParameterSelect: () => import_design_system54.ParameterSelect,
110
+ ParameterSelectInner: () => import_design_system54.ParameterSelectInner,
111
+ ParameterShell: () => import_design_system54.ParameterShell,
108
112
  ParameterShellContext: () => import_design_system2.ParameterShellContext,
109
- ParameterTextarea: () => import_design_system53.ParameterTextarea,
110
- ParameterTextareaInner: () => import_design_system53.ParameterTextareaInner,
111
- ParameterToggle: () => import_design_system53.ParameterToggle,
112
- ParameterToggleInner: () => import_design_system53.ParameterToggleInner,
113
+ ParameterTextarea: () => import_design_system54.ParameterTextarea,
114
+ ParameterTextareaInner: () => import_design_system54.ParameterTextareaInner,
115
+ ParameterToggle: () => import_design_system54.ParameterToggle,
116
+ ParameterToggleInner: () => import_design_system54.ParameterToggleInner,
113
117
  ParameterVariables: () => ParameterVariables,
114
118
  QueryFilter: () => QueryFilter,
115
119
  RICHTEXT_OPERATORS: () => RICHTEXT_OPERATORS,
@@ -123,8 +127,8 @@ __export(index_exports, {
123
127
  RequestUrlInput: () => RequestUrlInput,
124
128
  SELECT_OPERATORS: () => SELECT_OPERATORS,
125
129
  SYSTEM_FIELD_OPERATORS: () => SYSTEM_FIELD_OPERATORS,
126
- ScrollableList: () => import_design_system53.ScrollableList,
127
- ScrollableListItem: () => import_design_system53.ScrollableListItem,
130
+ ScrollableList: () => import_design_system54.ScrollableList,
131
+ ScrollableListItem: () => import_design_system54.ScrollableListItem,
128
132
  SearchAndFilter: () => SearchAndFilter,
129
133
  SearchAndFilterContext: () => SearchAndFilterContext,
130
134
  SearchAndFilterOptionsContainer: () => SearchAndFilterOptionsContainer2,
@@ -135,13 +139,13 @@ __export(index_exports, {
135
139
  SortItems: () => SortItems,
136
140
  StatusMultiEditor: () => StatusMultiEditor,
137
141
  StatusSingleEditor: () => StatusSingleEditor,
138
- Switch: () => import_design_system53.Switch,
142
+ Switch: () => import_design_system54.Switch,
139
143
  TEXTBOX_OPERATORS: () => TEXTBOX_OPERATORS,
140
144
  TextEditor: () => TextEditor,
141
145
  TextMultiChoiceEditor: () => TextMultiChoiceEditor,
142
146
  TextVariableRenderer: () => TextVariableRenderer,
143
- Textarea: () => import_design_system53.Textarea,
144
- Theme: () => import_design_system53.Theme,
147
+ Textarea: () => import_design_system54.Textarea,
148
+ Theme: () => import_design_system54.Theme,
145
149
  USER_OPERATORS: () => USER_OPERATORS,
146
150
  VariableChip: () => VariableChip,
147
151
  VariableEditor: () => VariableEditor,
@@ -151,8 +155,10 @@ __export(index_exports, {
151
155
  VariablesProvider: () => VariablesProvider,
152
156
  bindableFiltersMapper: () => bindableFiltersMapper,
153
157
  convertConnectedDataToVariable: () => convertConnectedDataToVariable,
158
+ createDelegationFetch: () => createDelegationFetch,
154
159
  createLocationValidator: () => createLocationValidator,
155
160
  filterMapper: () => filterMapper,
161
+ isDelegationExpiredResponse: () => isDelegationExpiredResponse,
156
162
  prettifyBindExpression: () => prettifyBindExpression,
157
163
  readOnlyAttributes: () => readOnlyAttributes,
158
164
  serializeVariablesEditorSerializedState: () => serializeVariablesEditorSerializedState,
@@ -162,6 +168,8 @@ __export(index_exports, {
162
168
  urlEncodeRequestUrl: () => urlEncodeRequestUrl,
163
169
  useConnectedDataAsVariables: () => useConnectedDataAsVariables,
164
170
  useContentDataResourceLocaleInfo: () => useContentDataResourceLocaleInfo,
171
+ useDelegation: () => useDelegation,
172
+ useDelegationFetch: () => useDelegationFetch,
165
173
  useDynamicInputsAsVariables: () => useDynamicInputsAsVariables,
166
174
  useMeshLocation: () => useMeshLocation,
167
175
  useObjectSearchContext: () => useObjectSearchContext,
@@ -174,7 +182,7 @@ __export(index_exports, {
174
182
  useVariableEditor: () => useVariableEditor,
175
183
  useVariables: () => useVariables,
176
184
  useVariablesMenu: () => useVariablesMenu,
177
- utilityColors: () => import_design_system53.utilityColors,
185
+ utilityColors: () => import_design_system54.utilityColors,
178
186
  variableDefaultTextValue: () => variableDefaultTextValue,
179
187
  variablePrefix: () => variablePrefix,
180
188
  variableSuffix: () => variableSuffix,
@@ -427,6 +435,40 @@ var SvgPlus = (props) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
427
435
  );
428
436
  var Plus_default = SvgPlus;
429
437
 
438
+ // src/hooks/createDelegationFetch.ts
439
+ var import_mesh_sdk = require("@uniformdev/mesh-sdk");
440
+ async function isDelegationExpiredResponse(response) {
441
+ if (response.status !== 401) {
442
+ return false;
443
+ }
444
+ try {
445
+ const body = await response.clone().json();
446
+ return typeof body.code === "string" && body.code === import_mesh_sdk.DELEGATION_EXPIRED_CODE;
447
+ } catch (e) {
448
+ return false;
449
+ }
450
+ }
451
+ function createDelegationFetch(options) {
452
+ var _a, _b;
453
+ const fetchFn = (_a = options.fetch) != null ? _a : fetch;
454
+ const isExpired = (_b = options.isDelegationExpired) != null ? _b : isDelegationExpiredResponse;
455
+ return async (input3, init) => {
456
+ const headers = new Headers(init == null ? void 0 : init.headers);
457
+ headers.set(import_mesh_sdk.CSRF_HEADER_NAME, import_mesh_sdk.CSRF_HEADER_VALUE);
458
+ const initWithCsrf = { ...init, headers };
459
+ const response = await fetchFn(input3, initWithCsrf);
460
+ if (!await isExpired(response)) {
461
+ return response;
462
+ }
463
+ try {
464
+ await options.reacquire();
465
+ } catch (e) {
466
+ return response;
467
+ }
468
+ return fetchFn(input3, initWithCsrf);
469
+ };
470
+ }
471
+
430
472
  // src/hooks/useConnectedDataAsVariables.tsx
431
473
  var import_react2 = require("react");
432
474
  function useConnectedDataAsVariables(connectedData) {
@@ -445,12 +487,44 @@ function useConnectedDataAsVariables(connectedData) {
445
487
  );
446
488
  }
447
489
 
490
+ // src/hooks/useDelegation.ts
491
+ var import_react4 = require("react");
492
+
493
+ // src/components/Delegation/DelegationContext.ts
494
+ var import_react3 = require("react");
495
+ var DelegationContext = (0, import_react3.createContext)(null);
496
+
497
+ // src/hooks/useDelegation.ts
498
+ function useDelegation() {
499
+ const ctx = (0, import_react4.useContext)(DelegationContext);
500
+ if (!ctx) {
501
+ throw new Error("useDelegation must be used within a <DelegationProvider>");
502
+ }
503
+ return ctx;
504
+ }
505
+
506
+ // src/hooks/useDelegationFetch.ts
507
+ var import_react5 = require("react");
508
+ function useDelegationFetch(options) {
509
+ const { reacquire } = useDelegation();
510
+ const fetchImpl = options == null ? void 0 : options.fetch;
511
+ const isDelegationExpired = options == null ? void 0 : options.isDelegationExpired;
512
+ return (0, import_react5.useMemo)(
513
+ () => createDelegationFetch({
514
+ reacquire,
515
+ fetch: fetchImpl,
516
+ isDelegationExpired
517
+ }),
518
+ [reacquire, fetchImpl, isDelegationExpired]
519
+ );
520
+ }
521
+
448
522
  // src/hooks/useDynamicInputsAsVariables.tsx
449
523
  var import_canvas = require("@uniformdev/canvas");
450
- var import_react3 = require("react");
524
+ var import_react6 = require("react");
451
525
  var import_jsx_runtime14 = require("@emotion/react/jsx-runtime");
452
526
  function useDynamicInputsAsVariables(dynamicInputs) {
453
- return (0, import_react3.useMemo)(() => {
527
+ return (0, import_react6.useMemo)(() => {
454
528
  const result = Object.entries(dynamicInputs).reduce(
455
529
  (acc, [name2, input3]) => {
456
530
  const source = `from ${name2 === import_canvas.LOCALE_DYNAMIC_INPUT_NAME ? "current locale" : input3.type === "path" ? "URL path" : "query string"}`;
@@ -485,18 +559,18 @@ Current preview value: ${input3.value || "not provided"}`
485
559
  }
486
560
 
487
561
  // src/hooks/useMeshLocation.ts
488
- var import_react6 = require("react");
562
+ var import_react9 = require("react");
489
563
 
490
564
  // src/components/UniformMeshLocationContext.tsx
491
- var import_react5 = require("react");
565
+ var import_react8 = require("react");
492
566
 
493
567
  // src/components/UniformMeshSdkContext.tsx
494
568
  var import_design_system = require("@uniformdev/design-system");
495
- var import_react4 = require("react");
569
+ var import_react7 = require("react");
496
570
  var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
497
- var UniformMeshSdkContext = (0, import_react4.createContext)(void 0);
571
+ var UniformMeshSdkContext = (0, import_react7.createContext)(void 0);
498
572
  var useUniformMeshSdkContext = () => {
499
- const context = (0, import_react4.useContext)(UniformMeshSdkContext);
573
+ const context = (0, import_react7.useContext)(UniformMeshSdkContext);
500
574
  if (!context) {
501
575
  throw new Error("useUniformMeshSdkContext must be used within <MeshApp /> or <UniformMeshSdkContext />");
502
576
  }
@@ -511,13 +585,13 @@ function useUniformMeshSdk() {
511
585
 
512
586
  // src/components/UniformMeshLocationContext.tsx
513
587
  var import_jsx_runtime16 = require("@emotion/react/jsx-runtime");
514
- var UniformMeshLocationContext = (0, import_react5.createContext)(void 0);
588
+ var UniformMeshLocationContext = (0, import_react8.createContext)(void 0);
515
589
  var UniformMeshLocationContextProvider = ({
516
590
  children
517
591
  }) => {
518
592
  const sdk = useUniformMeshSdk();
519
- const [location, setLocation] = (0, import_react5.useState)(sdk.getCurrentLocation());
520
- (0, import_react5.useMemo)(() => {
593
+ const [location, setLocation] = (0, import_react8.useState)(sdk.getCurrentLocation());
594
+ (0, import_react8.useMemo)(() => {
521
595
  const valueChangeListener = (event) => {
522
596
  setLocation((old) => ({ ...old, value: event.newValue }));
523
597
  };
@@ -534,7 +608,7 @@ var UniformMeshLocationContextProvider = ({
534
608
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(UniformMeshLocationContext.Provider, { value: { location }, children });
535
609
  };
536
610
  var useUniformMeshLocationContext = () => {
537
- const context = (0, import_react5.useContext)(UniformMeshLocationContext);
611
+ const context = (0, import_react8.useContext)(UniformMeshLocationContext);
538
612
  if (!context) {
539
613
  throw new Error("useUniformMeshLocationContext must be used within a UniformMeshLocationContextProvider");
540
614
  }
@@ -547,9 +621,9 @@ function useMeshLocation(expectedLocation) {
547
621
  if (expectedLocation && location.type !== expectedLocation) {
548
622
  throw new Error(`Expected location type ${expectedLocation} but got ${location.type}`);
549
623
  }
550
- const backdoorLocation = (0, import_react6.useRef)(location);
624
+ const backdoorLocation = (0, import_react9.useRef)(location);
551
625
  backdoorLocation.current = location;
552
- const stabilizedSetValueProxy = (0, import_react6.useMemo)(
626
+ const stabilizedSetValueProxy = (0, import_react9.useMemo)(
553
627
  () => (dispatch) => {
554
628
  const { newValue, options } = dispatch(backdoorLocation.current.value);
555
629
  backdoorLocation.current.setValue(newValue, options);
@@ -568,7 +642,7 @@ var import_design_system2 = require("@uniformdev/design-system");
568
642
 
569
643
  // src/components/Variables/composer/ControlledValuePlugin.tsx
570
644
  var import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
571
- var import_react7 = require("react");
645
+ var import_react10 = require("react");
572
646
 
573
647
  // src/components/Variables/util/serializeVariablesEditorState.ts
574
648
  var import_canvas2 = require("@uniformdev/canvas");
@@ -712,7 +786,7 @@ function ControlledValuePlugin({
712
786
  extraDependencies
713
787
  }) {
714
788
  const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
715
- (0, import_react7.useEffect)(() => {
789
+ (0, import_react10.useEffect)(() => {
716
790
  var _a, _b;
717
791
  if (!enabled) {
718
792
  return;
@@ -733,7 +807,7 @@ function ControlledValuePlugin({
733
807
 
734
808
  // src/components/Variables/composer/VariableChip.tsx
735
809
  var import_design_system3 = require("@uniformdev/design-system");
736
- var import_react8 = require("react");
810
+ var import_react11 = require("react");
737
811
  var import_jsx_runtime17 = require("@emotion/react/jsx-runtime");
738
812
  function VariableChip({
739
813
  displayName,
@@ -749,7 +823,7 @@ function VariableChip({
749
823
  }) {
750
824
  const hasClickEvent = !!onClick;
751
825
  const referenceIsValidFr = isFresh ? true : referenceIsValid;
752
- const Wrapper = referenceIsValidFr === "warning" ? WarningVariableReference : referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? import_react8.Fragment : UndefinedVariableReference;
826
+ const Wrapper = referenceIsValidFr === "warning" ? WarningVariableReference : referenceIsValidFr === "info" ? InfoVariableReference : referenceIsValidFr ? import_react11.Fragment : UndefinedVariableReference;
753
827
  const extraTitle = !referenceIsValidFr ? errorMessage : hasClickEvent && clickToEdit ? "Click to edit" : void 0;
754
828
  const chippy = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system3.MultilineChip, { onClick, "aria-selected": selected ? true : void 0, "aria-disabled": disabled, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Wrapper, { children: displayName || reference }) });
755
829
  if (tooltip) {
@@ -815,7 +889,7 @@ var import_utils2 = require("@lexical/utils");
815
889
  var import_canvas5 = require("@uniformdev/canvas");
816
890
  var import_design_system6 = require("@uniformdev/design-system");
817
891
  var import_lexical5 = require("lexical");
818
- var import_react16 = require("react");
892
+ var import_react19 = require("react");
819
893
 
820
894
  // src/components/Variables/util/prettifyBindExpression.tsx
821
895
  function prettifyBindExpression(bindExpression) {
@@ -824,7 +898,7 @@ function prettifyBindExpression(bindExpression) {
824
898
  }
825
899
 
826
900
  // src/components/Variables/composer/VariablesPlugin.tsx
827
- var import_react14 = require("@emotion/react");
901
+ var import_react17 = require("@emotion/react");
828
902
  var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
829
903
  var import_LexicalTypeaheadMenuPlugin = require("@lexical/react/LexicalTypeaheadMenuPlugin");
830
904
  var import_utils = require("@lexical/utils");
@@ -833,12 +907,12 @@ var import_canvas4 = require("@uniformdev/canvas");
833
907
  var import_design_system5 = require("@uniformdev/design-system");
834
908
  var import_lite = require("dequal/lite");
835
909
  var import_lexical4 = require("lexical");
836
- var import_react15 = require("react");
910
+ var import_react18 = require("react");
837
911
  var import_react_dom = require("react-dom");
838
912
 
839
913
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
840
- var import_react9 = require("@emotion/react");
841
- var menuBtn = import_react9.css`
914
+ var import_react12 = require("@emotion/react");
915
+ var menuBtn = import_react12.css`
842
916
  background: none;
843
917
  border: none;
844
918
  color: var(--gray-500);
@@ -848,18 +922,18 @@ var menuBtn = import_react9.css`
848
922
  outline: none;
849
923
  }
850
924
  `;
851
- var menuItemTextGroup = import_react9.css`
925
+ var menuItemTextGroup = import_react12.css`
852
926
  align-items: flex-start;
853
927
  display: flex;
854
928
  flex-direction: column;
855
929
  gap: 0;
856
930
  line-height: 1em;
857
931
  `;
858
- var smallText = import_react9.css`
932
+ var smallText = import_react12.css`
859
933
  font-size: var(--fs-xs);
860
934
  color: var(--gray-500);
861
935
  `;
862
- var variablesTipText = import_react9.css`
936
+ var variablesTipText = import_react12.css`
863
937
  ${smallText}
864
938
  color: var(--gray-500);
865
939
  padding: 0 var(--spacing-sm);
@@ -867,18 +941,18 @@ var variablesTipText = import_react9.css`
867
941
 
868
942
  // src/components/Variables/VariablesProvider.tsx
869
943
  var import_mitt = __toESM(require("mitt"));
870
- var import_react13 = require("react");
944
+ var import_react16 = require("react");
871
945
 
872
946
  // src/components/Variables/util/useVariableEditTransaction.ts
873
- var import_react10 = require("react");
947
+ var import_react13 = require("react");
874
948
  function useVariableEditTransaction({
875
949
  events,
876
950
  dispatch,
877
951
  isEditing,
878
952
  variables
879
953
  }) {
880
- const [isEditingBinding, setIsEditingBinding] = (0, import_react10.useState)();
881
- (0, import_react10.useEffect)(() => {
954
+ const [isEditingBinding, setIsEditingBinding] = (0, import_react13.useState)();
955
+ (0, import_react13.useEffect)(() => {
882
956
  if (!isEditingBinding) {
883
957
  return;
884
958
  }
@@ -889,7 +963,7 @@ function useVariableEditTransaction({
889
963
  events.on("editCompleted", fn);
890
964
  return () => events.off("editCompleted", fn);
891
965
  }, [events, isEditingBinding, variables]);
892
- (0, import_react10.useEffect)(() => {
966
+ (0, import_react13.useEffect)(() => {
893
967
  if (!isEditing) {
894
968
  if (isEditingBinding) {
895
969
  isEditingBinding.resolve({ canceled: true });
@@ -897,7 +971,7 @@ function useVariableEditTransaction({
897
971
  setIsEditingBinding(void 0);
898
972
  }
899
973
  }, [isEditing, isEditingBinding]);
900
- return (0, import_react10.useCallback)(
974
+ return (0, import_react13.useCallback)(
901
975
  async function editVariableTxn(variable, context) {
902
976
  if (isEditingBinding) {
903
977
  dispatch({ type: "cancelEdit" });
@@ -919,13 +993,13 @@ function useVariableEditTransaction({
919
993
  // src/components/Variables/VariableEditor.tsx
920
994
  var import_standard_schema = require("@hookform/resolvers/standard-schema");
921
995
  var import_design_system4 = require("@uniformdev/design-system");
922
- var import_react12 = require("react");
996
+ var import_react15 = require("react");
923
997
  var import_react_hook_form = require("react-hook-form");
924
998
  var z = __toESM(require("zod"));
925
999
 
926
1000
  // src/components/Variables/styles/VariableEditor.styles.ts
927
- var import_react11 = require("@emotion/react");
928
- var variablesFormContainer = import_react11.css`
1001
+ var import_react14 = require("@emotion/react");
1002
+ var variablesFormContainer = import_react14.css`
929
1003
  > * {
930
1004
  margin: var(--spacing-base) 0 0;
931
1005
  }
@@ -978,9 +1052,9 @@ function VariableEditor({
978
1052
  },
979
1053
  activeWhenEditing: true
980
1054
  });
981
- const nameRef = (0, import_react12.useRef)(null);
1055
+ const nameRef = (0, import_react15.useRef)(null);
982
1056
  const { ref, ...nameRegister } = register("name");
983
- (0, import_react12.useLayoutEffect)(() => {
1057
+ (0, import_react15.useLayoutEffect)(() => {
984
1058
  if (nameRef.current && !nameRef.current.value) {
985
1059
  nameRef.current.focus();
986
1060
  }
@@ -1056,7 +1130,7 @@ function VariableEditor({
1056
1130
 
1057
1131
  // src/components/Variables/VariablesProvider.tsx
1058
1132
  var import_jsx_runtime19 = require("@emotion/react/jsx-runtime");
1059
- var VariablesContext = (0, import_react13.createContext)(null);
1133
+ var VariablesContext = (0, import_react16.createContext)(null);
1060
1134
  function VariablesProvider({
1061
1135
  value,
1062
1136
  onChange,
@@ -1067,9 +1141,9 @@ function VariablesProvider({
1067
1141
  knownUndefinedValues = {},
1068
1142
  onChangeKnownUndefinedValue
1069
1143
  }) {
1070
- const [editing, setEditing] = (0, import_react13.useState)();
1071
- const [editingContext, setEditingContext] = (0, import_react13.useState)();
1072
- const events = (0, import_react13.useMemo)(
1144
+ const [editing, setEditing] = (0, import_react16.useState)();
1145
+ const [editingContext, setEditingContext] = (0, import_react16.useState)();
1146
+ const events = (0, import_react16.useMemo)(
1073
1147
  () => (0, import_mitt.default)(),
1074
1148
  []
1075
1149
  );
@@ -1077,7 +1151,7 @@ function VariablesProvider({
1077
1151
  throw new Error("onChange must be provided when readOnly is false");
1078
1152
  }
1079
1153
  const Editor = editVariableComponent != null ? editVariableComponent : VariableEditor;
1080
- const valueBasedContextValue = (0, import_react13.useMemo)(
1154
+ const valueBasedContextValue = (0, import_react16.useMemo)(
1081
1155
  () => ({
1082
1156
  flatVariables: flattenVariables(value),
1083
1157
  dispatch: (event) => {
@@ -1121,7 +1195,7 @@ function VariablesProvider({
1121
1195
  isEditing: typeof editing !== "undefined",
1122
1196
  variables: value
1123
1197
  });
1124
- const contextValue = (0, import_react13.useMemo)(() => {
1198
+ const contextValue = (0, import_react16.useMemo)(() => {
1125
1199
  return {
1126
1200
  ...valueBasedContextValue,
1127
1201
  editVariableTxn,
@@ -1132,7 +1206,7 @@ function VariablesProvider({
1132
1206
  isLoading: !!isLoading
1133
1207
  };
1134
1208
  }, [valueBasedContextValue, editVariableTxn, editing, events, knownUndefinedValues, isLoading]);
1135
- (0, import_react13.useEffect)(() => {
1209
+ (0, import_react16.useEffect)(() => {
1136
1210
  if (editing === void 0) {
1137
1211
  return;
1138
1212
  }
@@ -1181,7 +1255,7 @@ function VariablesProvider({
1181
1255
  ] });
1182
1256
  }
1183
1257
  function useVariables(returnEmptyWithoutProvider = false) {
1184
- const context = (0, import_react13.useContext)(VariablesContext);
1258
+ const context = (0, import_react16.useContext)(VariablesContext);
1185
1259
  if (!context) {
1186
1260
  if (returnEmptyWithoutProvider) {
1187
1261
  return {
@@ -1321,7 +1395,7 @@ function useVariablesMenu({
1321
1395
  getEditorContext
1322
1396
  }) {
1323
1397
  const { variables, canDispatch, readOnly } = useVariables(true);
1324
- const canEditVariable = (0, import_react15.useCallback)(
1398
+ const canEditVariable = (0, import_react18.useCallback)(
1325
1399
  (name2, variable) => (
1326
1400
  // name === '' means new var. Add var perms computed by menu options.
1327
1401
  name2 === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -1329,7 +1403,7 @@ function useVariablesMenu({
1329
1403
  [canDispatch, enableEditingVariables, readOnly]
1330
1404
  );
1331
1405
  const canAddVariable = canDispatch && showAddVariableMenuOption && !readOnly;
1332
- const { groupedVariables, menuOptions } = (0, import_react15.useMemo)(() => {
1406
+ const { groupedVariables, menuOptions } = (0, import_react18.useMemo)(() => {
1333
1407
  const groupedVariables2 = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
1334
1408
  if (canAddVariable) {
1335
1409
  groupedVariables2.unshift({
@@ -1351,7 +1425,7 @@ function useVariablesMenu({
1351
1425
  );
1352
1426
  return { menuOptions: menuOptions2, groupedVariables: groupedVariables2 };
1353
1427
  }, [variables, filterVariable, getEditorContext, canAddVariable, showAddVariableMenuOption]);
1354
- const onSelect = (0, import_react15.useCallback)(
1428
+ const onSelect = (0, import_react18.useCallback)(
1355
1429
  ({ queryString, value, nodeToReplace, editor, overwriteExistingValue }) => {
1356
1430
  if (value === ADD_VARIABLE_OPTION) {
1357
1431
  editor.update(() => {
@@ -1400,9 +1474,9 @@ function VariablesPlugin({
1400
1474
  }) {
1401
1475
  const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
1402
1476
  const { variables, dispatch, isEditing, canDispatch, readOnly, knownUndefinedValues, isLoading } = useVariables(true);
1403
- const variablesRef = (0, import_react15.useRef)({ variables, knownUndefinedValues, isLoading });
1477
+ const variablesRef = (0, import_react18.useRef)({ variables, knownUndefinedValues, isLoading });
1404
1478
  variablesRef.current = { variables, knownUndefinedValues, isLoading };
1405
- const canEditVariable = (0, import_react15.useCallback)(
1479
+ const canEditVariable = (0, import_react18.useCallback)(
1406
1480
  (name2, variable) => (
1407
1481
  // name === '' means new var. Add var perms computed by menu options.
1408
1482
  name2 === "" || canDispatch && enableEditingVariables && !readOnly && !(variable == null ? void 0 : variable.readOnly)
@@ -1410,13 +1484,13 @@ function VariablesPlugin({
1410
1484
  [canDispatch, enableEditingVariables, readOnly]
1411
1485
  );
1412
1486
  const { editVariable } = useVariableEditor();
1413
- const [queryString, setQueryString] = (0, import_react15.useState)(null);
1487
+ const [queryString, setQueryString] = (0, import_react18.useState)(null);
1414
1488
  const { groupedVariables, menuOptions, onSelect } = useVariablesMenu({
1415
1489
  showAddVariableMenuOption,
1416
1490
  filterVariable,
1417
1491
  getEditorContext
1418
1492
  });
1419
- const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react15.useMemo)(() => {
1493
+ const { filteredGroupedVariables, filteredMenuOptions } = (0, import_react18.useMemo)(() => {
1420
1494
  if (!queryString) {
1421
1495
  return {
1422
1496
  filteredGroupedVariables: groupedVariables,
@@ -1439,7 +1513,7 @@ function VariablesPlugin({
1439
1513
  )
1440
1514
  };
1441
1515
  }, [queryString, groupedVariables, menuOptions]);
1442
- const onSelectOption = (0, import_react15.useCallback)(
1516
+ const onSelectOption = (0, import_react18.useCallback)(
1443
1517
  (selectedOption, nodeToReplace, closeMenu) => {
1444
1518
  onSelect({
1445
1519
  queryString: queryString != null ? queryString : void 0,
@@ -1452,7 +1526,7 @@ function VariablesPlugin({
1452
1526
  },
1453
1527
  [editor, onSelect, queryString, replaceValueOnVariableInsert]
1454
1528
  );
1455
- (0, import_react15.useEffect)(() => {
1529
+ (0, import_react18.useEffect)(() => {
1456
1530
  return (0, import_utils.mergeRegister)(
1457
1531
  editor.registerCommand(
1458
1532
  EDIT_VARIABLE_COMMAND,
@@ -1592,7 +1666,7 @@ function VariablesPlugin({
1592
1666
  replaceValueOnVariableInsert,
1593
1667
  disableVariableDisplayNames
1594
1668
  ]);
1595
- const computeUpdatedVariableNodeState = (0, import_react15.useCallback)(
1669
+ const computeUpdatedVariableNodeState = (0, import_react18.useCallback)(
1596
1670
  (variableNode) => {
1597
1671
  var _a, _b, _c, _d;
1598
1672
  const targetVar = variablesRef.current.variables[variableNode.reference];
@@ -1617,7 +1691,7 @@ function VariablesPlugin({
1617
1691
  },
1618
1692
  [canEditVariable, disableVariableDisplayNames]
1619
1693
  );
1620
- const updateExistingNodeIfChanged = (0, import_react15.useCallback)(
1694
+ const updateExistingNodeIfChanged = (0, import_react18.useCallback)(
1621
1695
  (variableNode) => {
1622
1696
  const newState = computeUpdatedVariableNodeState(variableNode);
1623
1697
  if (newState) {
@@ -1626,7 +1700,7 @@ function VariablesPlugin({
1626
1700
  },
1627
1701
  [computeUpdatedVariableNodeState]
1628
1702
  );
1629
- (0, import_react15.useEffect)(() => {
1703
+ (0, import_react18.useEffect)(() => {
1630
1704
  const pendingUpdates = [];
1631
1705
  editor.read(() => {
1632
1706
  (0, import_utils.$dfs)().forEach(({ node }) => {
@@ -1657,7 +1731,7 @@ function VariablesPlugin({
1657
1731
  }
1658
1732
  });
1659
1733
  }, [editor, variables, knownUndefinedValues, computeUpdatedVariableNodeState]);
1660
- (0, import_react15.useEffect)(() => {
1734
+ (0, import_react18.useEffect)(() => {
1661
1735
  return editor.registerNodeTransform(VariableNode, (variableNode) => {
1662
1736
  updateExistingNodeIfChanged(variableNode);
1663
1737
  });
@@ -1682,7 +1756,7 @@ function VariablesPlugin({
1682
1756
  "div",
1683
1757
  {
1684
1758
  "data-auto-resize-opt-in": true,
1685
- css: import_react14.css`
1759
+ css: import_react17.css`
1686
1760
  box-shadow: var(--shadow-base);
1687
1761
  border-radius: var(--rounded-base);
1688
1762
  background: var(--gray-50);
@@ -1846,7 +1920,7 @@ function VariableNodeComponent({
1846
1920
  const [editor] = (0, import_LexicalComposerContext3.useLexicalComposerContext)();
1847
1921
  const [isSelected, setSelected, clearSelection] = (0, import_useLexicalNodeSelection.useLexicalNodeSelection)(nodeKey);
1848
1922
  const readOnly = !editor.isEditable();
1849
- const onDelete = (0, import_react16.useCallback)(
1923
+ const onDelete = (0, import_react19.useCallback)(
1850
1924
  (event) => {
1851
1925
  if (isSelected && (0, import_lexical5.$isNodeSelection)((0, import_lexical5.$getSelection)())) {
1852
1926
  event.preventDefault();
@@ -1859,7 +1933,7 @@ function VariableNodeComponent({
1859
1933
  },
1860
1934
  [isSelected, nodeKey]
1861
1935
  );
1862
- (0, import_react16.useEffect)(() => {
1936
+ (0, import_react19.useEffect)(() => {
1863
1937
  return (0, import_utils2.mergeRegister)(
1864
1938
  editor.registerCommand(import_lexical5.KEY_DELETE_COMMAND, onDelete, import_lexical5.COMMAND_PRIORITY_LOW),
1865
1939
  editor.registerCommand(import_lexical5.KEY_BACKSPACE_COMMAND, onDelete, import_lexical5.COMMAND_PRIORITY_LOW),
@@ -1947,9 +2021,9 @@ function $isTargetWithinDecorator(target) {
1947
2021
  }
1948
2022
 
1949
2023
  // src/components/Variables/InputVariables.tsx
1950
- var import_react27 = require("@emotion/react");
2024
+ var import_react31 = require("@emotion/react");
1951
2025
  var import_design_system9 = require("@uniformdev/design-system");
1952
- var import_react28 = require("react");
2026
+ var import_react32 = require("react");
1953
2027
  var import_uuid = require("uuid");
1954
2028
 
1955
2029
  // src/components/Variables/composer/EditorRefPlugin.tsx
@@ -1970,10 +2044,10 @@ function EditorRefPlugin({
1970
2044
  var import_LexicalComposerContext5 = require("@lexical/react/LexicalComposerContext");
1971
2045
  var import_utils3 = require("@lexical/utils");
1972
2046
  var import_lexical6 = require("lexical");
1973
- var import_react17 = require("react");
2047
+ var import_react20 = require("react");
1974
2048
  function PasteTransformerPlugin({ transformPaste }) {
1975
2049
  const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
1976
- (0, import_react17.useEffect)(() => {
2050
+ (0, import_react20.useEffect)(() => {
1977
2051
  return (0, import_utils3.mergeRegister)(
1978
2052
  editor.registerCommand(
1979
2053
  import_lexical6.PASTE_COMMAND,
@@ -1998,17 +2072,17 @@ function PasteTransformerPlugin({ transformPaste }) {
1998
2072
  }
1999
2073
 
2000
2074
  // src/components/Variables/styles/InputVariables.styles.ts
2001
- var import_react18 = require("@emotion/react");
2002
- var menuContainer = import_react18.css`
2075
+ var import_react21 = require("@emotion/react");
2076
+ var menuContainer = import_react21.css`
2003
2077
  position: relative;
2004
2078
  `;
2005
- var menuBtn2 = import_react18.css`
2079
+ var menuBtn2 = import_react21.css`
2006
2080
  position: absolute;
2007
2081
  top: 50%;
2008
2082
  right: var(--spacing-sm);
2009
2083
  transform: translateY(-50%);
2010
2084
  `;
2011
- var input = import_react18.css`
2085
+ var input = import_react21.css`
2012
2086
  --input-padding: 12px var(--spacing-lg) 12px var(--spacing-sm);
2013
2087
  appearance: none;
2014
2088
  background-color: var(--white);
@@ -2053,7 +2127,7 @@ var input = import_react18.css`
2053
2127
  margin: 0;
2054
2128
  }
2055
2129
  `;
2056
- var inputCompact = import_react18.css`
2130
+ var inputCompact = import_react21.css`
2057
2131
  border: 1px solid var(--white);
2058
2132
  padding-block: var(--spacing-sm);
2059
2133
  font-size: var(--fs-sm);
@@ -2062,11 +2136,11 @@ var inputCompact = import_react18.css`
2062
2136
  min-height: 39px;
2063
2137
  }
2064
2138
  `;
2065
- var inputDisabled = import_react18.css`
2139
+ var inputDisabled = import_react21.css`
2066
2140
  cursor: not-allowed;
2067
2141
  opacity: var(--opacity-50);
2068
2142
  `;
2069
- var placeholderCaption = import_react18.css`
2143
+ var placeholderCaption = import_react21.css`
2070
2144
  position: absolute;
2071
2145
  color: var(--gray-400);
2072
2146
  inset: 12px var(--spacing-base) 12px var(--spacing-sm);
@@ -2075,14 +2149,14 @@ var placeholderCaption = import_react18.css`
2075
2149
  white-space: nowrap;
2076
2150
  pointer-events: none;
2077
2151
  `;
2078
- var placeholderCompact = import_react18.css`
2152
+ var placeholderCompact = import_react21.css`
2079
2153
  inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);
2080
2154
  `;
2081
2155
 
2082
2156
  // src/components/Variables/styles/ParameterVariables.styles.ts
2083
- var import_react19 = require("@emotion/react");
2157
+ var import_react22 = require("@emotion/react");
2084
2158
  var import_design_system7 = require("@uniformdev/design-system");
2085
- var variableBindButton = import_react19.css`
2159
+ var variableBindButton = import_react22.css`
2086
2160
  --hover-color: var(--accent-dark-hover);
2087
2161
  --active-color: var(--accent-dark-active);
2088
2162
  border: 1px solid transparent;
@@ -2125,7 +2199,7 @@ var variableBindButton = import_react19.css`
2125
2199
  max-height: unset;
2126
2200
  }
2127
2201
  `;
2128
- var input2 = import_react19.css`
2202
+ var input2 = import_react22.css`
2129
2203
  display: block;
2130
2204
  appearance: none;
2131
2205
  box-sizing: border-box;
@@ -2179,7 +2253,7 @@ var input2 = import_react19.css`
2179
2253
  margin: 0;
2180
2254
  }
2181
2255
  `;
2182
- var inputMultiLine = (lines) => import_react19.css`
2256
+ var inputMultiLine = (lines) => import_react22.css`
2183
2257
  ${import_design_system7.scrollbarStyles}
2184
2258
  // 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
2185
2259
  // as the text looked to close to the bottom of the input
@@ -2190,7 +2264,7 @@ var inputMultiLine = (lines) => import_react19.css`
2190
2264
 
2191
2265
  // src/components/Variables/toolbox/InputVariablesProvider.tsx
2192
2266
  var import_canvas6 = require("@uniformdev/canvas");
2193
- var import_react20 = require("react");
2267
+ var import_react23 = require("react");
2194
2268
  function useInputVariablesState({
2195
2269
  value,
2196
2270
  onChange,
@@ -2206,14 +2280,14 @@ function useInputVariablesState({
2206
2280
  }) {
2207
2281
  const { variables } = useVariables(true);
2208
2282
  const variableReferenceCountInValue = (0, import_canvas6.hasReferencedVariables)(value != null ? value : "");
2209
- const [lastKnownId, setLastKnownId] = (0, import_react20.useState)(id);
2210
- const [hadVariablesInValue, setHadVariablesInValue] = (0, import_react20.useState)(variableReferenceCountInValue > 0);
2211
- (0, import_react20.useEffect)(() => {
2283
+ const [lastKnownId, setLastKnownId] = (0, import_react23.useState)(id);
2284
+ const [hadVariablesInValue, setHadVariablesInValue] = (0, import_react23.useState)(variableReferenceCountInValue > 0);
2285
+ (0, import_react23.useEffect)(() => {
2212
2286
  if (variableReferenceCountInValue) {
2213
2287
  setHadVariablesInValue(true);
2214
2288
  }
2215
2289
  }, [variableReferenceCountInValue]);
2216
- (0, import_react20.useEffect)(() => {
2290
+ (0, import_react23.useEffect)(() => {
2217
2291
  if (id !== lastKnownId) {
2218
2292
  setLastKnownId(id);
2219
2293
  setHadVariablesInValue(variableReferenceCountInValue > 0);
@@ -2222,7 +2296,7 @@ function useInputVariablesState({
2222
2296
  const hadVariablesInValueForReals = inputWhenNoVariables ? hadVariablesInValue : variableReferenceCountInValue > 0;
2223
2297
  const disableVariablesForReals = disableVariables || Object.keys(variables).length === 0 && !showAddVariableMenuOption;
2224
2298
  const disableResetForReals = !inputWhenNoVariables || !hadVariablesInValueForReals;
2225
- const sharedMenuProps = (0, import_react20.useMemo)(
2299
+ const sharedMenuProps = (0, import_react23.useMemo)(
2226
2300
  () => ({
2227
2301
  menuTooltip,
2228
2302
  showAddVariableMenuOption,
@@ -2255,8 +2329,8 @@ function useInputVariablesState({
2255
2329
  }
2256
2330
 
2257
2331
  // src/components/Variables/toolbox/VariableField.styles.ts
2258
- var import_react21 = require("@emotion/react");
2259
- var labelText = import_react21.css`
2332
+ var import_react24 = require("@emotion/react");
2333
+ var labelText = import_react24.css`
2260
2334
  align-items: center;
2261
2335
  display: flex;
2262
2336
  gap: var(--spacing-xs);
@@ -2272,7 +2346,7 @@ var import_lexical7 = require("lexical");
2272
2346
  var import_BsFillPlusCircleFill = require("@react-icons/all-files/bs/BsFillPlusCircleFill");
2273
2347
  var import_CgUsbC = require("@react-icons/all-files/cg/CgUsbC");
2274
2348
  var import_design_system8 = require("@uniformdev/design-system");
2275
- var import_react22 = require("react");
2349
+ var import_react25 = require("react");
2276
2350
  var import_jsx_runtime22 = require("@emotion/react/jsx-runtime");
2277
2351
  function SelectVariableMenu({
2278
2352
  onSelectVariable,
@@ -2287,7 +2361,7 @@ function SelectVariableMenu({
2287
2361
  filterVariable
2288
2362
  }) {
2289
2363
  const { variables, canDispatch, readOnly } = useVariables(true);
2290
- const btnRef = (0, import_react22.useRef)(null);
2364
+ const btnRef = (0, import_react25.useRef)(null);
2291
2365
  const { editVariable } = useVariableEditor();
2292
2366
  const variablesGroups = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
2293
2367
  const showAddVariableMenuOptionForReals = showAddVariableMenuOption && canDispatch && !readOnly;
@@ -2420,14 +2494,14 @@ var import_LexicalAutoFocusPlugin = require("@lexical/react/LexicalAutoFocusPlug
2420
2494
  var import_LexicalClearEditorPlugin = require("@lexical/react/LexicalClearEditorPlugin");
2421
2495
  var import_LexicalComposer = require("@lexical/react/LexicalComposer");
2422
2496
  var import_LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
2423
- var import_react25 = require("react");
2497
+ var import_react29 = require("react");
2424
2498
 
2425
2499
  // src/components/Variables/composer/DisablePlugin.tsx
2426
2500
  var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
2427
- var import_react23 = require("react");
2501
+ var import_react26 = require("react");
2428
2502
  function DisablePlugin({ disabled }) {
2429
2503
  const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
2430
- (0, import_react23.useEffect)(() => {
2504
+ (0, import_react26.useEffect)(() => {
2431
2505
  editor.setEditable(!disabled);
2432
2506
  }, [editor, disabled]);
2433
2507
  return null;
@@ -2436,10 +2510,10 @@ function DisablePlugin({ disabled }) {
2436
2510
  // src/components/Variables/composer/SingleLineTextPlugin.tsx
2437
2511
  var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
2438
2512
  var import_lexical8 = require("lexical");
2439
- var import_react24 = require("react");
2513
+ var import_react27 = require("react");
2440
2514
  function SingleLineTextPlugin() {
2441
2515
  const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
2442
- (0, import_react24.useEffect)(() => {
2516
+ (0, import_react27.useEffect)(() => {
2443
2517
  editor.registerNodeTransform(import_lexical8.LineBreakNode, (node) => {
2444
2518
  node.remove();
2445
2519
  });
@@ -2447,6 +2521,13 @@ function SingleLineTextPlugin() {
2447
2521
  return null;
2448
2522
  }
2449
2523
 
2524
+ // src/components/Variables/toolbox/useVariablesComposerFlushPending.ts
2525
+ var import_react28 = require("react");
2526
+ var VariablesComposerFlushPendingContext = (0, import_react28.createContext)(false);
2527
+ function useVariablesComposerFlushPending() {
2528
+ return (0, import_react28.useContext)(VariablesComposerFlushPendingContext);
2529
+ }
2530
+
2450
2531
  // src/components/Variables/toolbox/VariablesComposer.tsx
2451
2532
  var import_jsx_runtime25 = require("@emotion/react/jsx-runtime");
2452
2533
  function VariablesComposer(props) {
@@ -2460,8 +2541,9 @@ function VariablesComposer(props) {
2460
2541
  autoFocus,
2461
2542
  ...variablesPluginProps
2462
2543
  } = props;
2463
- const [lastEmittedValue, setLastEmittedValue] = (0, import_react25.useState)(value);
2464
- const editorConfig = (0, import_react25.useMemo)(
2544
+ const [lastEmittedValue, setLastEmittedValue] = (0, import_react29.useState)(value);
2545
+ const [flushPending, setFlushPending] = (0, import_react29.useState)(false);
2546
+ const editorConfig = (0, import_react29.useMemo)(
2465
2547
  () => ({
2466
2548
  namespace: "uniform",
2467
2549
  onError(error) {
@@ -2473,8 +2555,26 @@ function VariablesComposer(props) {
2473
2555
  // oxlint-disable-next-line react/exhaustive-deps
2474
2556
  []
2475
2557
  );
2476
- const editorState = (0, import_react25.useRef)(void 0);
2477
- const updateTimeout = (0, import_react25.useRef)(void 0);
2558
+ const editorState = (0, import_react29.useRef)(void 0);
2559
+ const updateTimeout = (0, import_react29.useRef)(void 0);
2560
+ const flushDepsRef = (0, import_react29.useRef)({ onChange, lastEmittedValue });
2561
+ flushDepsRef.current = { onChange, lastEmittedValue };
2562
+ (0, import_react29.useEffect)(
2563
+ () => () => {
2564
+ if (!updateTimeout.current) {
2565
+ return;
2566
+ }
2567
+ clearTimeout(updateTimeout.current);
2568
+ const { onChange: emit, lastEmittedValue: lastEmitted } = flushDepsRef.current;
2569
+ const valueToEmit = editorState.current ? serializeVariablesEditorState(editorState.current) : void 0;
2570
+ const shouldEmit = editorState.current != null && valueToEmit !== lastEmitted;
2571
+ if (!shouldEmit) {
2572
+ return;
2573
+ }
2574
+ queueMicrotask(() => emit(valueToEmit));
2575
+ },
2576
+ []
2577
+ );
2478
2578
  if (typeof document === "undefined") return null;
2479
2579
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
2480
2580
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
@@ -2486,6 +2586,7 @@ function VariablesComposer(props) {
2486
2586
  if (updateTimeout.current) {
2487
2587
  clearTimeout(updateTimeout.current);
2488
2588
  }
2589
+ setFlushPending(true);
2489
2590
  updateTimeout.current = window.setTimeout(() => {
2490
2591
  if (editorState.current) {
2491
2592
  const valueToEmit = serializeVariablesEditorState(editorState.current);
@@ -2494,6 +2595,8 @@ function VariablesComposer(props) {
2494
2595
  onChange(valueToEmit);
2495
2596
  }
2496
2597
  }
2598
+ setFlushPending(false);
2599
+ updateTimeout.current = void 0;
2497
2600
  }, 400);
2498
2601
  }
2499
2602
  }
@@ -2503,7 +2606,7 @@ function VariablesComposer(props) {
2503
2606
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariablesPlugin, { ...variablesPluginProps }),
2504
2607
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DisablePlugin, { disabled }),
2505
2608
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: autoFocus ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}) : null }),
2506
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children })
2609
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(VariablesComposerFlushPendingContext.Provider, { value: flushPending, children })
2507
2610
  ] });
2508
2611
  }
2509
2612
 
@@ -2516,18 +2619,27 @@ var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin")
2516
2619
  var import_LexicalPlainTextPlugin = require("@lexical/react/LexicalPlainTextPlugin");
2517
2620
  var import_utils4 = require("@lexical/utils");
2518
2621
  var import_lexical9 = require("lexical");
2519
- var import_react26 = require("react");
2622
+ var import_react30 = require("react");
2520
2623
  var import_jsx_runtime26 = require("@emotion/react/jsx-runtime");
2521
2624
  function VariablesComposerInput({
2522
- css: css23,
2625
+ css: css24,
2523
2626
  placeholder,
2524
2627
  ...contentEditableProps
2525
2628
  }) {
2629
+ const flushPending = useVariablesComposerFlushPending();
2526
2630
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
2527
2631
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2528
2632
  import_LexicalPlainTextPlugin.PlainTextPlugin,
2529
2633
  {
2530
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_LexicalContentEditable.ContentEditable, { ...contentEditableProps, placeholder: null, "aria-placeholder": void 0 }),
2634
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2635
+ import_LexicalContentEditable.ContentEditable,
2636
+ {
2637
+ ...contentEditableProps,
2638
+ "data-flush-pending": flushPending,
2639
+ placeholder: null,
2640
+ "aria-placeholder": void 0
2641
+ }
2642
+ ),
2531
2643
  placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: placeholder }) : null,
2532
2644
  ErrorBoundary: import_LexicalErrorBoundary.LexicalErrorBoundary
2533
2645
  }
@@ -2538,7 +2650,7 @@ function VariablesComposerInput({
2538
2650
  }
2539
2651
  function RichishCopyAndPastePlugin() {
2540
2652
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
2541
- (0, import_react26.useEffect)(() => {
2653
+ (0, import_react30.useEffect)(() => {
2542
2654
  return (0, import_utils4.mergeRegister)(
2543
2655
  editor.registerCommand(
2544
2656
  import_lexical9.COPY_COMMAND,
@@ -2645,7 +2757,7 @@ function InputVariables(props) {
2645
2757
  singleTokenMode,
2646
2758
  disableVariableDisplayNames
2647
2759
  } = props;
2648
- const [finalId] = (0, import_react28.useState)(id != null ? id : (() => (0, import_uuid.v4)()));
2760
+ const [finalId] = (0, import_react32.useState)(id != null ? id : (() => (0, import_uuid.v4)()));
2649
2761
  const { dispatch, canDispatch, isEditing } = useVariables(true);
2650
2762
  const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
2651
2763
  const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
@@ -2664,7 +2776,7 @@ function InputVariables(props) {
2664
2776
  {
2665
2777
  align: "center",
2666
2778
  gap: "xs",
2667
- css: import_react27.css`
2779
+ css: import_react31.css`
2668
2780
  position: relative;
2669
2781
  & > div:first-of-type {
2670
2782
  flex-grow: 1;
@@ -2793,7 +2905,7 @@ function InputVariablesOverlayMenu({
2793
2905
  var import_CgUsbC2 = require("@react-icons/all-files/cg/CgUsbC");
2794
2906
  var import_canvas7 = require("@uniformdev/canvas");
2795
2907
  var import_design_system10 = require("@uniformdev/design-system");
2796
- var import_react29 = require("react");
2908
+ var import_react33 = require("react");
2797
2909
  var import_jsx_runtime28 = require("@emotion/react/jsx-runtime");
2798
2910
  function ParameterConnectionIndicator({
2799
2911
  children,
@@ -2804,7 +2916,7 @@ function ParameterConnectionIndicator({
2804
2916
  overrideMenuButtonParentMargin,
2805
2917
  renderMenuInPortal = false
2806
2918
  }) {
2807
- const hasVariablesInValue = (0, import_react29.useMemo)(() => {
2919
+ const hasVariablesInValue = (0, import_react33.useMemo)(() => {
2808
2920
  let result = false;
2809
2921
  (0, import_canvas7.bindVariablesToObject)({
2810
2922
  value,
@@ -2849,21 +2961,21 @@ function ParameterConnectionIndicator({
2849
2961
 
2850
2962
  // src/components/Variables/ParameterOrSingleVariable.tsx
2851
2963
  var import_design_system11 = require("@uniformdev/design-system");
2852
- var import_react31 = require("react");
2964
+ var import_react35 = require("react");
2853
2965
 
2854
2966
  // src/components/Variables/composer/OnDisconnectPlugin.tsx
2855
2967
  var import_LexicalComposerContext10 = require("@lexical/react/LexicalComposerContext");
2856
2968
  var import_utils5 = require("@lexical/utils");
2857
2969
  var import_lexical10 = require("lexical");
2858
- var import_react30 = require("react");
2970
+ var import_react34 = require("react");
2859
2971
  function OnDisconnectPlugin({
2860
2972
  onDisconnect
2861
2973
  }) {
2862
2974
  const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
2863
2975
  const { variables } = useVariables(true);
2864
- const variablesRef = (0, import_react30.useRef)(variables);
2976
+ const variablesRef = (0, import_react34.useRef)(variables);
2865
2977
  variablesRef.current = variables;
2866
- (0, import_react30.useEffect)(() => {
2978
+ (0, import_react34.useEffect)(() => {
2867
2979
  return (0, import_utils5.mergeRegister)(
2868
2980
  editor.registerCommand(
2869
2981
  DISCONNECT_VARIABLE_COMMAND,
@@ -2908,7 +3020,7 @@ function ParameterOrSingleVariable(props) {
2908
3020
  hasVariablesInValue,
2909
3021
  setHadVariablesInValue
2910
3022
  } = useInputVariablesState(props);
2911
- const handleDisconnect = (0, import_react31.useCallback)(
3023
+ const handleDisconnect = (0, import_react35.useCallback)(
2912
3024
  (variable) => {
2913
3025
  setHadVariablesInValue(false);
2914
3026
  if (onDisconnect) {
@@ -2961,7 +3073,7 @@ function ParameterOrSingleVariable(props) {
2961
3073
  }
2962
3074
 
2963
3075
  // src/components/Variables/ParameterVariables.tsx
2964
- var import_react32 = require("@emotion/react");
3076
+ var import_react36 = require("@emotion/react");
2965
3077
  var import_design_system12 = require("@uniformdev/design-system");
2966
3078
  var import_jsx_runtime30 = require("@emotion/react/jsx-runtime");
2967
3079
  function ParameterVariables(props) {
@@ -3018,8 +3130,8 @@ function ParameterVariables(props) {
3018
3130
  "data-text-value": value,
3019
3131
  css: [
3020
3132
  input2,
3021
- typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : import_react32.css``,
3022
- inputCss != null ? inputCss : import_react32.css``
3133
+ typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : import_react36.css``,
3134
+ inputCss != null ? inputCss : import_react36.css``
3023
3135
  ]
3024
3136
  }
3025
3137
  )
@@ -3055,18 +3167,18 @@ ${prettifyBindExpression(bindExpression)}`
3055
3167
  }
3056
3168
 
3057
3169
  // src/components/Variables/VariablesList.tsx
3058
- var import_react35 = require("@emotion/react");
3170
+ var import_react39 = require("@emotion/react");
3059
3171
  var import_dnd2 = require("@hello-pangea/dnd");
3060
3172
  var import_CgTrash = require("@react-icons/all-files/cg/CgTrash");
3061
3173
  var import_design_system13 = require("@uniformdev/design-system");
3062
3174
 
3063
3175
  // src/components/DragDropContext.tsx
3064
3176
  var import_dnd = require("@hello-pangea/dnd");
3065
- var import_react33 = require("react");
3177
+ var import_react37 = require("react");
3066
3178
  var import_react_use = require("react-use");
3067
3179
  var import_jsx_runtime31 = require("@emotion/react/jsx-runtime");
3068
3180
  function DragDropContext({ children, ...props }) {
3069
- const [isReady, setIsReady] = (0, import_react33.useState)(false);
3181
+ const [isReady, setIsReady] = (0, import_react37.useState)(false);
3070
3182
  (0, import_react_use.useDebounce)(
3071
3183
  () => {
3072
3184
  setIsReady(true);
@@ -3078,8 +3190,8 @@ function DragDropContext({ children, ...props }) {
3078
3190
  }
3079
3191
 
3080
3192
  // src/components/Variables/styles/VariablesList.styles.ts
3081
- var import_react34 = require("@emotion/react");
3082
- var tableRow = (isDragging) => import_react34.css`
3193
+ var import_react38 = require("@emotion/react");
3194
+ var tableRow = (isDragging) => import_react38.css`
3083
3195
  position: relative;
3084
3196
  ${isDragging ? `
3085
3197
  display: table;
@@ -3087,7 +3199,7 @@ var tableRow = (isDragging) => import_react34.css`
3087
3199
  top: auto !important;
3088
3200
  ` : void 0}
3089
3201
  `;
3090
- var tableCellDragIcon = import_react34.css`
3202
+ var tableCellDragIcon = import_react38.css`
3091
3203
  &::after {
3092
3204
  content: '';
3093
3205
  display: block;
@@ -3105,7 +3217,7 @@ var tableCellDragIcon = import_react34.css`
3105
3217
  opacity: 1;
3106
3218
  }
3107
3219
  `;
3108
- var variableName = import_react34.css`
3220
+ var variableName = import_react38.css`
3109
3221
  border: none;
3110
3222
  font-weight: var(--fw-medium);
3111
3223
  padding: 0;
@@ -3115,7 +3227,7 @@ var variableName = import_react34.css`
3115
3227
  white-space: nowrap;
3116
3228
  max-width: 20ch;
3117
3229
  `;
3118
- var variableValue = import_react34.css`
3230
+ var variableValue = import_react38.css`
3119
3231
  overflow: hidden;
3120
3232
  text-overflow: ellipsis;
3121
3233
  white-space: nowrap;
@@ -3194,7 +3306,7 @@ function VariablesList() {
3194
3306
  title: `delete ${text}`,
3195
3307
  css: [
3196
3308
  import_design_system13.button,
3197
- import_react35.css`
3309
+ import_react39.css`
3198
3310
  background: transparent;
3199
3311
  `
3200
3312
  ],
@@ -3324,9 +3436,9 @@ function TextVariableRenderer({ definition, value, setValue }) {
3324
3436
  }
3325
3437
 
3326
3438
  // src/components/Request/RequestBody.tsx
3327
- var import_react37 = require("@emotion/react");
3439
+ var import_react41 = require("@emotion/react");
3328
3440
  var import_design_system15 = require("@uniformdev/design-system");
3329
- var import_react38 = require("react");
3441
+ var import_react42 = require("react");
3330
3442
 
3331
3443
  // src/components/Request/RequestProvider.tsx
3332
3444
  var React4 = __toESM(require("react"));
@@ -3414,11 +3526,11 @@ function useRequest() {
3414
3526
  }
3415
3527
 
3416
3528
  // src/components/Request/styles/Request.styles.ts
3417
- var import_react36 = require("@emotion/react");
3418
- var innerContentStyles = import_react36.css`
3529
+ var import_react40 = require("@emotion/react");
3530
+ var innerContentStyles = import_react40.css`
3419
3531
  background: var(--white);
3420
3532
  `;
3421
- var requestTypeContainer = (bgColor) => import_react36.css`
3533
+ var requestTypeContainer = (bgColor) => import_react40.css`
3422
3534
  align-items: start;
3423
3535
  background: ${bgColor};
3424
3536
  display: grid;
@@ -3456,11 +3568,11 @@ var LANGUAGE_TO_CONTENT_TYPE = {
3456
3568
  };
3457
3569
  function RequestBody() {
3458
3570
  const { request, dispatch } = useRequest();
3459
- const [language, setLanguage] = (0, import_react38.useState)("json");
3571
+ const [language, setLanguage] = (0, import_react42.useState)("json");
3460
3572
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
3461
3573
  "div",
3462
3574
  {
3463
- css: import_react37.css`
3575
+ css: import_react41.css`
3464
3576
  background: var(--white);
3465
3577
  `,
3466
3578
  children: [
@@ -3468,7 +3580,7 @@ function RequestBody() {
3468
3580
  RequestTypeContainer,
3469
3581
  {
3470
3582
  bgColor: "var(--gray-100)",
3471
- css: import_react37.css`
3583
+ css: import_react41.css`
3472
3584
  padding: var(--spacing-sm) var(--spacing-base);
3473
3585
  `,
3474
3586
  children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
@@ -3745,8 +3857,8 @@ function RequestParameters({
3745
3857
  }
3746
3858
 
3747
3859
  // src/components/Request/RequestUrl.tsx
3748
- var import_react39 = require("@emotion/react");
3749
- var import_react40 = require("react");
3860
+ var import_react43 = require("@emotion/react");
3861
+ var import_react44 = require("react");
3750
3862
 
3751
3863
  // src/components/Request/urlEncodeRequestParameter.ts
3752
3864
  function urlEncodeRequestUrl(url, varValues) {
@@ -3772,7 +3884,7 @@ function RequestUrl() {
3772
3884
  var _a, _b;
3773
3885
  const { variables } = useVariables();
3774
3886
  const { request } = useRequest();
3775
- const mergedParameters = (0, import_react40.useMemo)(() => {
3887
+ const mergedParameters = (0, import_react44.useMemo)(() => {
3776
3888
  var _a2;
3777
3889
  if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
3778
3890
  return request.parameters;
@@ -3782,7 +3894,7 @@ function RequestUrl() {
3782
3894
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3783
3895
  "small",
3784
3896
  {
3785
- css: import_react39.css`
3897
+ css: import_react43.css`
3786
3898
  display: inline-block;
3787
3899
  margin-bottom: var(--spacing-xs);
3788
3900
  word-break: break-word;
@@ -4015,24 +4127,207 @@ function convertRequestDataToDataType(dataType, requestData) {
4015
4127
  };
4016
4128
  }
4017
4129
 
4018
- // src/components/MeshApp.tsx
4130
+ // src/components/Delegation/DelegationGate.tsx
4019
4131
  var import_design_system19 = require("@uniformdev/design-system");
4132
+ var import_react46 = require("react");
4133
+
4134
+ // src/components/Delegation/styles/DelegationGate.style.ts
4135
+ var import_react45 = require("@emotion/react");
4136
+ var delegationGateStyle = import_react45.css`
4137
+ min-height: 12rem;
4138
+ width: 100%;
4139
+ `;
4140
+
4141
+ // src/components/Delegation/DelegationGate.tsx
4142
+ var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
4143
+ function DefaultDelegationLoading() {
4144
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { css: delegationGateStyle, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.LoadingOverlay, { isActive: true, statusMessage: "Connecting to Uniform..." }) });
4145
+ }
4146
+ function DefaultDelegationDisabled() {
4147
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Callout, { type: "caution", title: "Feature unavailable", children: "This app requires permissions that are not currently enabled. Please contact your Uniform administrator to enable identity delegation for this integration." });
4148
+ }
4149
+ function DefaultDelegationError({ error }) {
4150
+ (0, import_react46.useEffect)(() => {
4151
+ console.error("Delegation connection failed", error);
4152
+ }, [error]);
4153
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Callout, { type: "error", title: "Connection error", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { children: "Failed to connect to Uniform. Try again, or contact your administrator if the problem persists." }) });
4154
+ }
4155
+ function DelegationGate({
4156
+ children,
4157
+ loadingComponent,
4158
+ disabledComponent,
4159
+ errorComponent
4160
+ }) {
4161
+ const { status, error } = useDelegation();
4162
+ if (status === "active") {
4163
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
4164
+ }
4165
+ if (status === "idle" || status === "acquiring") {
4166
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent !== void 0 ? loadingComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationLoading, {}) });
4167
+ }
4168
+ if (status === "disabled") {
4169
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: disabledComponent !== void 0 ? disabledComponent : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationDisabled, {}) });
4170
+ }
4171
+ if (status === "error") {
4172
+ const resolvedError = error != null ? error : new Error("Unknown delegation error");
4173
+ if (errorComponent !== void 0) {
4174
+ if (typeof errorComponent === "function") {
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent({ error: resolvedError }) });
4176
+ }
4177
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent });
4178
+ }
4179
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DefaultDelegationError, { error: resolvedError });
4180
+ }
4181
+ return null;
4182
+ }
4183
+
4184
+ // src/components/Delegation/DelegationProvider.tsx
4185
+ var import_react47 = require("react");
4186
+ var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
4187
+ var DelegationDisabledError = class extends Error {
4188
+ constructor() {
4189
+ super("Identity delegation is not enabled for this integration.");
4190
+ this.name = "DelegationDisabledError";
4191
+ }
4192
+ };
4193
+ var DEFAULT_REVALIDATE_AFTER_MS = 30 * 1e3;
4194
+ function DelegationProvider({
4195
+ sdk,
4196
+ onSessionToken,
4197
+ checkActive,
4198
+ revalidateOnFocus = true,
4199
+ revalidateAfterMs = DEFAULT_REVALIDATE_AFTER_MS,
4200
+ children
4201
+ }) {
4202
+ const [status, setStatus] = (0, import_react47.useState)("idle");
4203
+ const [error, setError] = (0, import_react47.useState)(null);
4204
+ const mountedRef = (0, import_react47.useRef)(true);
4205
+ const statusRef = (0, import_react47.useRef)("idle");
4206
+ statusRef.current = status;
4207
+ const acquirePromiseRef = (0, import_react47.useRef)(null);
4208
+ const acquire = (0, import_react47.useCallback)(() => {
4209
+ if (acquirePromiseRef.current) {
4210
+ return acquirePromiseRef.current;
4211
+ }
4212
+ const run = (async () => {
4213
+ if (statusRef.current !== "active") {
4214
+ setStatus("acquiring");
4215
+ }
4216
+ setError(null);
4217
+ try {
4218
+ const isActive = await checkActive();
4219
+ if (isActive) {
4220
+ if (mountedRef.current) {
4221
+ setStatus("active");
4222
+ }
4223
+ return;
4224
+ }
4225
+ if (!mountedRef.current) {
4226
+ return;
4227
+ }
4228
+ const sessionToken = await sdk.getSessionToken();
4229
+ if (!mountedRef.current) {
4230
+ return;
4231
+ }
4232
+ if (!sessionToken) {
4233
+ if (mountedRef.current) {
4234
+ setStatus("disabled");
4235
+ }
4236
+ throw new DelegationDisabledError();
4237
+ }
4238
+ await onSessionToken(sessionToken);
4239
+ if (mountedRef.current) {
4240
+ setStatus("active");
4241
+ }
4242
+ } catch (err) {
4243
+ const error2 = err instanceof Error ? err : new Error(String(err));
4244
+ if (mountedRef.current && !(err instanceof DelegationDisabledError)) {
4245
+ setError(error2);
4246
+ setStatus("error");
4247
+ }
4248
+ throw error2;
4249
+ }
4250
+ })();
4251
+ acquirePromiseRef.current = run.finally(() => {
4252
+ acquirePromiseRef.current = null;
4253
+ });
4254
+ return acquirePromiseRef.current;
4255
+ }, [sdk, onSessionToken, checkActive]);
4256
+ (0, import_react47.useEffect)(() => {
4257
+ mountedRef.current = true;
4258
+ void acquire().catch(() => {
4259
+ });
4260
+ return () => {
4261
+ mountedRef.current = false;
4262
+ };
4263
+ }, [acquire]);
4264
+ const revalidate = (0, import_react47.useCallback)(async () => {
4265
+ if (acquirePromiseRef.current) {
4266
+ return;
4267
+ }
4268
+ if (statusRef.current !== "active") {
4269
+ return;
4270
+ }
4271
+ try {
4272
+ const isActive = await checkActive();
4273
+ if (!mountedRef.current) {
4274
+ return;
4275
+ }
4276
+ if (!isActive) {
4277
+ void acquire().catch(() => {
4278
+ });
4279
+ }
4280
+ } catch (e) {
4281
+ }
4282
+ }, [checkActive, acquire]);
4283
+ (0, import_react47.useEffect)(() => {
4284
+ if (!revalidateOnFocus) {
4285
+ return;
4286
+ }
4287
+ if (typeof document === "undefined") {
4288
+ return;
4289
+ }
4290
+ let hiddenAt = document.visibilityState === "hidden" ? Date.now() : null;
4291
+ const handleVisibilityChange = () => {
4292
+ if (document.visibilityState === "hidden") {
4293
+ hiddenAt = Date.now();
4294
+ return;
4295
+ }
4296
+ if (document.visibilityState === "visible") {
4297
+ const elapsed = hiddenAt === null ? 0 : Date.now() - hiddenAt;
4298
+ hiddenAt = null;
4299
+ if (elapsed >= revalidateAfterMs) {
4300
+ void revalidate();
4301
+ }
4302
+ }
4303
+ };
4304
+ document.addEventListener("visibilitychange", handleVisibilityChange);
4305
+ return () => {
4306
+ document.removeEventListener("visibilitychange", handleVisibilityChange);
4307
+ };
4308
+ }, [revalidateOnFocus, revalidateAfterMs, revalidate]);
4309
+ const value = (0, import_react47.useMemo)(() => ({ status, error, reacquire: acquire }), [status, error, acquire]);
4310
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DelegationContext.Provider, { value, children });
4311
+ }
4312
+
4313
+ // src/components/MeshApp.tsx
4314
+ var import_design_system20 = require("@uniformdev/design-system");
4020
4315
 
4021
4316
  // src/hooks/useInitializeUniformMeshSdk.ts
4022
- var import_mesh_sdk = require("@uniformdev/mesh-sdk");
4023
- var import_react41 = require("react");
4317
+ var import_mesh_sdk2 = require("@uniformdev/mesh-sdk");
4318
+ var import_react48 = require("react");
4024
4319
  var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4025
- const [error, setError] = (0, import_react41.useState)();
4026
- const [sdk, setSdk] = (0, import_react41.useState)();
4027
- const initializationInProgress = (0, import_react41.useRef)(false);
4028
- (0, import_react41.useEffect)(
4320
+ const [error, setError] = (0, import_react48.useState)();
4321
+ const [sdk, setSdk] = (0, import_react48.useState)();
4322
+ const initializationInProgress = (0, import_react48.useRef)(false);
4323
+ (0, import_react48.useEffect)(
4029
4324
  () => {
4030
4325
  if (typeof window === "undefined" || sdk) {
4031
4326
  return;
4032
4327
  }
4033
4328
  if (typeof window.UniformMeshSDK === "undefined" && !initializationInProgress.current) {
4034
4329
  initializationInProgress.current = true;
4035
- (0, import_mesh_sdk.initializeUniformMeshSDK)({ autoResizingDisabled }).then((sdk2) => {
4330
+ (0, import_mesh_sdk2.initializeUniformMeshSDK)({ autoResizingDisabled }).then((sdk2) => {
4036
4331
  setSdk(sdk2);
4037
4332
  }).catch((err) => {
4038
4333
  setError(err);
@@ -4058,7 +4353,7 @@ var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
4058
4353
  };
4059
4354
 
4060
4355
  // src/components/MeshApp.tsx
4061
- var import_jsx_runtime45 = require("@emotion/react/jsx-runtime");
4356
+ var import_jsx_runtime47 = require("@emotion/react/jsx-runtime");
4062
4357
  var MeshApp = ({
4063
4358
  children,
4064
4359
  loadingComponent,
@@ -4067,36 +4362,36 @@ var MeshApp = ({
4067
4362
  const { initializing, error, sdk } = useInitializeUniformMeshSdk();
4068
4363
  if (initializing || !sdk) {
4069
4364
  const LoadingComponent = loadingComponent;
4070
- return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.LoadingIndicator, {});
4365
+ return LoadingComponent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LoadingComponent, {}) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.LoadingIndicator, {});
4071
4366
  }
4072
4367
  if (error) {
4073
4368
  const ErrorComponent = errorComponent;
4074
4369
  if (ErrorComponent) {
4075
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ErrorComponent, { error });
4370
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorComponent, { error });
4076
4371
  }
4077
4372
  throw error;
4078
4373
  }
4079
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
4080
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.Theme, {}),
4081
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_design_system19.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(UniformMeshLocationContextProvider, { children }) })
4374
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(UniformMeshSdkContext.Provider, { value: { sdk }, children: [
4375
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.Theme, {}),
4376
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_design_system20.IconsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(UniformMeshLocationContextProvider, { children }) })
4082
4377
  ] });
4083
4378
  };
4084
4379
 
4085
4380
  // src/components/ObjectSearch/DataRefreshButton.tsx
4086
- var import_react42 = require("@emotion/react");
4087
- var import_design_system20 = require("@uniformdev/design-system");
4088
- var import_jsx_runtime46 = require("@emotion/react/jsx-runtime");
4381
+ var import_react49 = require("@emotion/react");
4382
+ var import_design_system21 = require("@uniformdev/design-system");
4383
+ var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
4089
4384
  var DataRefreshButton = ({
4090
4385
  buttonText,
4091
4386
  isLoading,
4092
4387
  onRefreshData,
4093
4388
  ...props
4094
4389
  }) => {
4095
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_design_system20.Button, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
4096
- !isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4097
- import_design_system20.LoadingIndicator,
4390
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_design_system21.Button, { buttonType: "ghost", onClick: onRefreshData, disabled: isLoading, ...props, children: [
4391
+ !isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4392
+ import_design_system21.LoadingIndicator,
4098
4393
  {
4099
- css: import_react42.css`
4394
+ css: import_react49.css`
4100
4395
  ${isLoading ? "opacity: 0.2;" : void 0}
4101
4396
  `
4102
4397
  }
@@ -4106,15 +4401,15 @@ var DataRefreshButton = ({
4106
4401
  };
4107
4402
 
4108
4403
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4109
- var import_react45 = require("@emotion/react");
4404
+ var import_react52 = require("@emotion/react");
4110
4405
  var import_canvas9 = require("@uniformdev/canvas");
4111
- var import_design_system23 = require("@uniformdev/design-system");
4406
+ var import_design_system24 = require("@uniformdev/design-system");
4112
4407
 
4113
4408
  // src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
4114
4409
  var import_canvas8 = require("@uniformdev/canvas");
4115
- var import_react43 = require("react");
4116
- var import_jsx_runtime47 = require("@emotion/react/jsx-runtime");
4117
- var ObjectSearchContext = (0, import_react43.createContext)({
4410
+ var import_react50 = require("react");
4411
+ var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
4412
+ var ObjectSearchContext = (0, import_react50.createContext)({
4118
4413
  onSetQuery: () => {
4119
4414
  },
4120
4415
  onSelectItem: () => {
@@ -4135,16 +4430,16 @@ var ObjectSearchProvider = ({
4135
4430
  children,
4136
4431
  defaultQuery
4137
4432
  }) => {
4138
- const [query, setQuery] = (0, import_react43.useState)({
4433
+ const [query, setQuery] = (0, import_react50.useState)({
4139
4434
  contentType: "",
4140
4435
  keyword: "",
4141
4436
  ...defaultQuery
4142
4437
  });
4143
4438
  const { flatVariables } = useVariables(true);
4144
- const querySearchDeferred = (0, import_react43.useDeferredValue)(query);
4145
- const [selectedItems, setSelectedItems] = (0, import_react43.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4146
- const [list, setList] = (0, import_react43.useState)({});
4147
- const onSetQuery = (0, import_react43.useCallback)(
4439
+ const querySearchDeferred = (0, import_react50.useDeferredValue)(query);
4440
+ const [selectedItems, setSelectedItems] = (0, import_react50.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
4441
+ const [list, setList] = (0, import_react50.useState)({});
4442
+ const onSetQuery = (0, import_react50.useCallback)(
4148
4443
  (value2) => {
4149
4444
  if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
4150
4445
  return setQuery({
@@ -4156,7 +4451,7 @@ var ObjectSearchProvider = ({
4156
4451
  },
4157
4452
  [setQuery]
4158
4453
  );
4159
- const onSelectItem = (0, import_react43.useCallback)(
4454
+ const onSelectItem = (0, import_react50.useCallback)(
4160
4455
  (selectedResult) => {
4161
4456
  if (Array.isArray(selectedResult)) {
4162
4457
  setSelectedItems(selectedResult);
@@ -4170,17 +4465,17 @@ var ObjectSearchProvider = ({
4170
4465
  },
4171
4466
  [setSelectedItems, selectedItems]
4172
4467
  );
4173
- const onRemoveAllSelectedItems = (0, import_react43.useCallback)(() => {
4468
+ const onRemoveAllSelectedItems = (0, import_react50.useCallback)(() => {
4174
4469
  setSelectedItems([]);
4175
4470
  }, [setSelectedItems]);
4176
- const onSetList = (0, import_react43.useCallback)(
4471
+ const onSetList = (0, import_react50.useCallback)(
4177
4472
  (value2) => {
4178
4473
  setList(value2);
4179
4474
  },
4180
4475
  [setList]
4181
4476
  );
4182
- const boundQuery = (0, import_react43.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
4183
- const value = (0, import_react43.useMemo)(
4477
+ const boundQuery = (0, import_react50.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
4478
+ const value = (0, import_react50.useMemo)(
4184
4479
  () => ({
4185
4480
  boundQuery,
4186
4481
  onSetQuery,
@@ -4204,10 +4499,10 @@ var ObjectSearchProvider = ({
4204
4499
  onSetList
4205
4500
  ]
4206
4501
  );
4207
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ObjectSearchContext.Provider, { value, children });
4502
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchContext.Provider, { value, children });
4208
4503
  };
4209
4504
  function useObjectSearchContext() {
4210
- return (0, import_react43.useContext)(ObjectSearchContext);
4505
+ return (0, import_react50.useContext)(ObjectSearchContext);
4211
4506
  }
4212
4507
  function bindQuery(query, inputs) {
4213
4508
  const { result, errors } = (0, import_canvas8.bindVariablesToObject)({
@@ -4222,12 +4517,12 @@ function bindQuery(query, inputs) {
4222
4517
  }
4223
4518
 
4224
4519
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4225
- var import_design_system22 = require("@uniformdev/design-system");
4520
+ var import_design_system23 = require("@uniformdev/design-system");
4226
4521
 
4227
4522
  // src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
4228
- var import_react44 = require("@emotion/react");
4229
- var import_design_system21 = require("@uniformdev/design-system");
4230
- var ObjectListItemContainer = import_react44.css`
4523
+ var import_react51 = require("@emotion/react");
4524
+ var import_design_system22 = require("@uniformdev/design-system");
4525
+ var ObjectListItemContainer = import_react51.css`
4231
4526
  align-items: center;
4232
4527
  border: 1px solid var(--gray-300);
4233
4528
  border-radius: var(--rounded-base);
@@ -4236,12 +4531,12 @@ var ObjectListItemContainer = import_react44.css`
4236
4531
  grid-template-columns: 1fr auto;
4237
4532
  padding: var(--spacing-sm);
4238
4533
  `;
4239
- var ObjectListItemContainerDisabled = import_react44.css`
4534
+ var ObjectListItemContainerDisabled = import_react51.css`
4240
4535
  opacity: var(--opacity-50);
4241
4536
  pointer-events: none;
4242
4537
  `;
4243
- var ObjectListItemLoading = import_react44.css`
4244
- animation: ${import_design_system21.skeletonLoading} 1s linear infinite alternate;
4538
+ var ObjectListItemLoading = import_react51.css`
4539
+ animation: ${import_design_system22.skeletonLoading} 1s linear infinite alternate;
4245
4540
  border-color: transparent;
4246
4541
  min-height: 42px;
4247
4542
  position: relative;
@@ -4264,43 +4559,43 @@ var ObjectListItemLoading = import_react44.css`
4264
4559
  width: 1rem;
4265
4560
  }
4266
4561
  `;
4267
- var ObjectListItemHeadingGroup = import_react44.css`
4562
+ var ObjectListItemHeadingGroup = import_react51.css`
4268
4563
  align-items: center;
4269
4564
  display: grid;
4270
4565
  `;
4271
- var ObjectListItemThumbnail = import_react44.css`
4566
+ var ObjectListItemThumbnail = import_react51.css`
4272
4567
  width: 30px;
4273
4568
  height: 30px;
4274
4569
  object-fit: cover;
4275
4570
  `;
4276
- var ObjectListItemTitle = import_react44.css`
4571
+ var ObjectListItemTitle = import_react51.css`
4277
4572
  color: var(--typography-base);
4278
4573
  display: block;
4279
4574
  font-size: var(--fs-sm);
4280
4575
  `;
4281
- var ObjectListItemSubtitle = import_react44.css`
4576
+ var ObjectListItemSubtitle = import_react51.css`
4282
4577
  color: var(--gray-500);
4283
4578
  display: block;
4284
4579
  font-size: var(--fs-xs);
4285
4580
  line-height: 1;
4286
4581
  `;
4287
- var ObjectListItemInfoContainer = import_react44.css`
4582
+ var ObjectListItemInfoContainer = import_react51.css`
4288
4583
  align-items: center;
4289
4584
  display: flex;
4290
4585
  gap: var(--spacing-sm);
4291
4586
  justify-content: center;
4292
4587
  `;
4293
- var ObjectListItemControlledContent = import_react44.css`
4588
+ var ObjectListItemControlledContent = import_react51.css`
4294
4589
  display: flex;
4295
4590
  gap: var(--spacing-sm);
4296
4591
  `;
4297
- var ObjectListItemUnControlledContent = import_react44.css`
4592
+ var ObjectListItemUnControlledContent = import_react51.css`
4298
4593
  margin-top: var(--spacing-sm);
4299
4594
  grid-column: 1 / -1;
4300
4595
  `;
4301
4596
 
4302
4597
  // src/components/ObjectSearch/ObjectSearchListItem.tsx
4303
- var import_jsx_runtime48 = require("@emotion/react/jsx-runtime");
4598
+ var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
4304
4599
  var ObjectSearchListItem = ({
4305
4600
  id,
4306
4601
  title,
@@ -4325,7 +4620,7 @@ var ObjectSearchListItem = ({
4325
4620
  return onSelectItem([selectedItem]);
4326
4621
  };
4327
4622
  const selected = selectedListItems.some((item) => item.id === id);
4328
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4623
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4329
4624
  "div",
4330
4625
  {
4331
4626
  role: "listitem",
@@ -4333,7 +4628,7 @@ var ObjectSearchListItem = ({
4333
4628
  "data-testid": "list-item",
4334
4629
  ...props,
4335
4630
  children: [
4336
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4631
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4337
4632
  "div",
4338
4633
  {
4339
4634
  role: "button",
@@ -4341,7 +4636,7 @@ var ObjectSearchListItem = ({
4341
4636
  css: ObjectListItemControlledContent,
4342
4637
  "aria-disabled": disabled,
4343
4638
  children: [
4344
- imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4639
+ imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4345
4640
  "img",
4346
4641
  {
4347
4642
  src: imageUrl,
@@ -4350,28 +4645,28 @@ var ObjectSearchListItem = ({
4350
4645
  loading: "lazy"
4351
4646
  }
4352
4647
  ) : null,
4353
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4354
- !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4355
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4648
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
4649
+ !contentType ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
4650
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
4356
4651
  ] })
4357
4652
  ]
4358
4653
  }
4359
4654
  ),
4360
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
4361
- selected ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_design_system22.Chip, { text: "selected", size: "xs" }) : null,
4362
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_design_system22.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4655
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { css: ObjectListItemInfoContainer, children: [
4656
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Chip, { text: "selected", size: "xs" }) : null,
4657
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_design_system23.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4363
4658
  ] }),
4364
- !children ? null : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { css: ObjectListItemUnControlledContent, children })
4659
+ !children ? null : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { css: ObjectListItemUnControlledContent, children })
4365
4660
  ]
4366
4661
  }
4367
4662
  );
4368
4663
  };
4369
4664
  var ObjectSearchListItemLoadingSkeleton = () => {
4370
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4665
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
4371
4666
  };
4372
4667
 
4373
4668
  // src/components/ObjectSearch/ObjectSearchContainer.tsx
4374
- var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
4669
+ var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
4375
4670
  var ObjectSearchContainer = ({
4376
4671
  label,
4377
4672
  enableDynamicInputToResultId,
@@ -4383,19 +4678,19 @@ var ObjectSearchContainer = ({
4383
4678
  const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
4384
4679
  const { flatVariables } = useVariables(true);
4385
4680
  const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
4386
- const listItems = resultList != null ? resultList : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4387
- import_design_system23.ScrollableList,
4681
+ const listItems = resultList != null ? resultList : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4682
+ import_design_system24.ScrollableList,
4388
4683
  {
4389
4684
  role: "list",
4390
- css: import_react45.css`
4685
+ css: import_react52.css`
4391
4686
  > div {
4392
4687
  max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
4393
4688
  }
4394
4689
  `,
4395
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DefaultResultList, {})
4690
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DefaultResultList, {})
4396
4691
  }
4397
4692
  );
4398
- const body = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system23.VerticalRhythm, { children: [
4693
+ const body = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
4399
4694
  searchFilters,
4400
4695
  listItems
4401
4696
  ] });
@@ -4426,8 +4721,8 @@ var ObjectSearchContainer = ({
4426
4721
  }
4427
4722
  ]);
4428
4723
  };
4429
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system23.VerticalRhythm, { children: [
4430
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system23.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4724
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system24.VerticalRhythm, { children: [
4725
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4431
4726
  InputVariables,
4432
4727
  {
4433
4728
  label,
@@ -4449,21 +4744,21 @@ var DefaultResultList = () => {
4449
4744
  var _a;
4450
4745
  const { list } = useObjectSearchContext();
4451
4746
  if (!list.items) {
4452
- return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i));
4747
+ return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItemLoadingSkeleton, {}, i));
4453
4748
  }
4454
4749
  if (list.items.length === 0) {
4455
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system23.Callout, { type: "info", children: "No results were found" });
4750
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system24.Callout, { type: "info", children: "No results were found" });
4456
4751
  }
4457
- return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ObjectSearchListItem, { ...item }, item.id));
4752
+ return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ObjectSearchListItem, { ...item }, item.id));
4458
4753
  };
4459
4754
 
4460
4755
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4461
- var import_design_system24 = require("@uniformdev/design-system");
4462
- var import_react47 = require("react");
4756
+ var import_design_system25 = require("@uniformdev/design-system");
4757
+ var import_react54 = require("react");
4463
4758
 
4464
4759
  // src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
4465
- var import_react46 = require("@emotion/react");
4466
- var ObjectSearchFilterContainerLabel = import_react46.css`
4760
+ var import_react53 = require("@emotion/react");
4761
+ var ObjectSearchFilterContainerLabel = import_react53.css`
4467
4762
  align-items: center;
4468
4763
  display: flex;
4469
4764
  font-size: var(--fs-sm);
@@ -4471,18 +4766,18 @@ var ObjectSearchFilterContainerLabel = import_react46.css`
4471
4766
  line-height: 1rem;
4472
4767
  margin-bottom: var(--spacing-sm);
4473
4768
  `;
4474
- var ObjectSearchFilterContainer = import_react46.css`
4769
+ var ObjectSearchFilterContainer = import_react53.css`
4475
4770
  display: grid;
4476
4771
  gap: var(--spacing-base);
4477
4772
  `;
4478
- var ObjectSearchFilterGrid = (gridColumns) => import_react46.css`
4773
+ var ObjectSearchFilterGrid = (gridColumns) => import_react53.css`
4479
4774
  display: grid;
4480
4775
  grid-template-columns: ${gridColumns};
4481
4776
  gap: var(--spacing-base);
4482
4777
  `;
4483
4778
 
4484
4779
  // src/components/ObjectSearch/ObjectSearchFilter.tsx
4485
- var import_jsx_runtime50 = require("@emotion/react/jsx-runtime");
4780
+ var import_jsx_runtime52 = require("@emotion/react/jsx-runtime");
4486
4781
  var ObjectSearchFilter = ({
4487
4782
  requireContentType,
4488
4783
  typeSelectorAllTypesOptionText = "All content types",
@@ -4493,7 +4788,7 @@ var ObjectSearchFilter = ({
4493
4788
  }) => {
4494
4789
  var _a, _b;
4495
4790
  const { query, onSetQuery } = useObjectSearchContext();
4496
- const [searchState, setSearchState] = (0, import_react47.useState)({
4791
+ const [searchState, setSearchState] = (0, import_react54.useState)({
4497
4792
  contentType: (_a = query.contentType) != null ? _a : "",
4498
4793
  keyword: (_b = query.keyword) != null ? _b : ""
4499
4794
  });
@@ -4503,7 +4798,7 @@ var ObjectSearchFilter = ({
4503
4798
  });
4504
4799
  onSetQuery({ ...query, ...value });
4505
4800
  };
4506
- const memoizedSelectOptions = (0, import_react47.useMemo)(() => {
4801
+ const memoizedSelectOptions = (0, import_react54.useMemo)(() => {
4507
4802
  if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
4508
4803
  return [];
4509
4804
  }
@@ -4513,7 +4808,7 @@ var ObjectSearchFilter = ({
4513
4808
  ];
4514
4809
  }, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
4515
4810
  const shouldRenderSelect = memoizedSelectOptions.length > 0;
4516
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4811
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4517
4812
  "fieldset",
4518
4813
  {
4519
4814
  css: [
@@ -4521,8 +4816,8 @@ var ObjectSearchFilter = ({
4521
4816
  ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
4522
4817
  ],
4523
4818
  children: [
4524
- memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4525
- import_design_system24.InputSelect,
4819
+ memoizedSelectOptions.length ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4820
+ import_design_system25.InputSelect,
4526
4821
  {
4527
4822
  label: selectLabel,
4528
4823
  showLabel: false,
@@ -4531,8 +4826,8 @@ var ObjectSearchFilter = ({
4531
4826
  value: query.contentType
4532
4827
  }
4533
4828
  ) : null,
4534
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4535
- import_design_system24.DebouncedInputKeywordSearch,
4829
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4830
+ import_design_system25.DebouncedInputKeywordSearch,
4536
4831
  {
4537
4832
  inputFieldName: searchInputName,
4538
4833
  placeholder: searchInputPlaceholderText,
@@ -4548,27 +4843,27 @@ var ObjectSearchFilter = ({
4548
4843
  };
4549
4844
 
4550
4845
  // src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
4551
- var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
4846
+ var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
4552
4847
  var ObjectSearchFilterContainer2 = ({ children }) => {
4553
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { css: ObjectSearchFilterContainer, children }) });
4848
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { css: ObjectSearchFilterContainer, children }) });
4554
4849
  };
4555
4850
 
4556
4851
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4557
- var import_design_system26 = require("@uniformdev/design-system");
4852
+ var import_design_system27 = require("@uniformdev/design-system");
4558
4853
  var import_timeago = require("timeago.js");
4559
4854
 
4560
4855
  // src/components/Image/Image.tsx
4561
- var import_jsx_runtime52 = require("@emotion/react/jsx-runtime");
4856
+ var import_jsx_runtime54 = require("@emotion/react/jsx-runtime");
4562
4857
  function Image({ src, alt, className }) {
4563
4858
  const CompImage = src && typeof src !== "string" ? src : null;
4564
- return CompImage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CompImage, { className }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src, alt, className });
4859
+ return CompImage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CompImage, { className }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src, alt, className });
4565
4860
  }
4566
4861
 
4567
4862
  // src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
4568
- var import_react48 = require("@emotion/react");
4569
- var import_design_system25 = require("@uniformdev/design-system");
4570
- var ButtonStyles = import_react48.css`
4571
- ${import_design_system25.button}
4863
+ var import_react55 = require("@emotion/react");
4864
+ var import_design_system26 = require("@uniformdev/design-system");
4865
+ var ButtonStyles = import_react55.css`
4866
+ ${import_design_system26.button}
4572
4867
  background: transparent;
4573
4868
  border: 1px solid var(--typography-base);
4574
4869
  color: var(--typography-base);
@@ -4595,20 +4890,20 @@ var ButtonStyles = import_react48.css`
4595
4890
  text-decoration: none;
4596
4891
  }
4597
4892
  `;
4598
- var ButtonIcon = import_react48.css`
4893
+ var ButtonIcon = import_react55.css`
4599
4894
  width: 1rem;
4600
4895
  height: 1rem;
4601
4896
  `;
4602
4897
 
4603
4898
  // src/components/ObjectSearch/ObjectSearchResultItemButton.tsx
4604
- var import_jsx_runtime53 = require("@emotion/react/jsx-runtime");
4899
+ var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
4605
4900
  var ObjectSearchResultItemButton = ({
4606
4901
  text,
4607
4902
  icon,
4608
4903
  ...props
4609
4904
  }) => {
4610
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("button", { type: "button", css: ButtonStyles, ...props, children: [
4611
- !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Image, { src: icon, css: ButtonIcon }),
4905
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { type: "button", css: ButtonStyles, ...props, children: [
4906
+ !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Image, { src: icon, css: ButtonIcon }),
4612
4907
  text
4613
4908
  ] });
4614
4909
  };
@@ -4617,15 +4912,15 @@ var LinkButton = ({
4617
4912
  icon,
4618
4913
  ...props
4619
4914
  }) => {
4620
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4621
- !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Image, { src: icon, css: ButtonIcon }),
4915
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("a", { ...props, css: ButtonStyles, target: "_blank", rel: "noopener noreferrer", children: [
4916
+ !icon ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Image, { src: icon, css: ButtonIcon }),
4622
4917
  text
4623
4918
  ] });
4624
4919
  };
4625
4920
 
4626
4921
  // src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
4627
- var import_react49 = require("@emotion/react");
4628
- var ObjectSearchResultItemContainer = import_react49.css`
4922
+ var import_react56 = require("@emotion/react");
4923
+ var ObjectSearchResultItemContainer = import_react56.css`
4629
4924
  align-items: center;
4630
4925
  border: 1px solid var(--gray-300);
4631
4926
  border-radius: var(--rounded-base);
@@ -4641,7 +4936,7 @@ var ObjectSearchResultItemContainer = import_react49.css`
4641
4936
  }
4642
4937
  }
4643
4938
  `;
4644
- var ObjectSearchDragHandle = import_react49.css`
4939
+ var ObjectSearchDragHandle = import_react56.css`
4645
4940
  border-left: 2px dotted var(--gray-300);
4646
4941
  border-right: 2px dotted var(--gray-300);
4647
4942
  position: absolute;
@@ -4650,47 +4945,47 @@ var ObjectSearchDragHandle = import_react49.css`
4650
4945
  transition: opacity var(--duration-fast) var(--timing-ease-out);
4651
4946
  opacity: 0;
4652
4947
  `;
4653
- var ObjectSearchResultItemSubtitle = import_react49.css`
4948
+ var ObjectSearchResultItemSubtitle = import_react56.css`
4654
4949
  color: var(--gray-500);
4655
4950
  display: block;
4656
4951
  font-size: var(--fs-xs);
4657
4952
  line-height: 1;
4658
4953
  `;
4659
- var ObjectSearchResultItemTitle = import_react49.css`
4954
+ var ObjectSearchResultItemTitle = import_react56.css`
4660
4955
  align-items: center;
4661
4956
  color: var(--typography-base);
4662
4957
  display: flex;
4663
4958
  gap: var(--spacing-xs);
4664
4959
  `;
4665
- var ObjectSearchResultItemTimeStamp = import_react49.css`
4960
+ var ObjectSearchResultItemTimeStamp = import_react56.css`
4666
4961
  color: var(--gray-500);
4667
4962
  font-size: var(--fs-xs);
4668
4963
  `;
4669
- var ObjectSearchResultItemTitleLink = import_react49.css`
4964
+ var ObjectSearchResultItemTitleLink = import_react56.css`
4670
4965
  text-decoration: none;
4671
4966
  color: var(--primary-action-default);
4672
4967
  font-size: var(--fs-sm);
4673
4968
  `;
4674
- var ObjectSearchAuthorStateGroup = import_react49.css`
4969
+ var ObjectSearchAuthorStateGroup = import_react56.css`
4675
4970
  align-items: center;
4676
4971
  display: flex;
4677
4972
  gap: var(--spacing-sm);
4678
4973
  `;
4679
- var ObjectSearchUpdateGroup = import_react49.css`
4974
+ var ObjectSearchUpdateGroup = import_react56.css`
4680
4975
  display: grid;
4681
4976
  `;
4682
- var ObjectSearchContentContainer = import_react49.css`
4977
+ var ObjectSearchContentContainer = import_react56.css`
4683
4978
  display: flex;
4684
4979
  gap: var(--spacing-base);
4685
4980
  `;
4686
- var ObjectSearchImage = import_react49.css`
4981
+ var ObjectSearchImage = import_react56.css`
4687
4982
  width: 56px;
4688
4983
  height: 56px;
4689
4984
  object-fit: cover;
4690
4985
  `;
4691
4986
 
4692
4987
  // src/components/ObjectSearch/ObjectSearchResultItem.tsx
4693
- var import_jsx_runtime54 = require("@emotion/react/jsx-runtime");
4988
+ var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
4694
4989
  var ObjectSearchResultItem = ({
4695
4990
  id,
4696
4991
  title,
@@ -4714,10 +5009,10 @@ var ObjectSearchResultItem = ({
4714
5009
  onSelectItem({ id, title: id });
4715
5010
  onRemove == null ? void 0 : onRemove();
4716
5011
  };
4717
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
4718
- disableDnD ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
4719
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchContentContainer, children: [
4720
- !imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5012
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchResultItemContainer, "data-testid": "search-result-item", children: [
5013
+ disableDnD ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { role: "presentation", className: "drag-handle", css: ObjectSearchDragHandle }),
5014
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchContentContainer, children: [
5015
+ !imageUrl ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4721
5016
  "img",
4722
5017
  {
4723
5018
  src: imageUrl,
@@ -4726,11 +5021,11 @@ var ObjectSearchResultItem = ({
4726
5021
  loading: "lazy"
4727
5022
  }
4728
5023
  ),
4729
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
4730
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
4731
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
4732
- onClick ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4733
- import_design_system26.Link,
5024
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
5025
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectSearchResultItemSubtitle, "data-testid": "sub-title", children: formatedContentType }),
5026
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { role: "heading", css: ObjectSearchResultItemTitle, "data-testid": "title", children: [
5027
+ onClick ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5028
+ import_design_system27.Link,
4734
5029
  {
4735
5030
  onClick: (e) => {
4736
5031
  e.preventDefault();
@@ -4741,28 +5036,28 @@ var ObjectSearchResultItem = ({
4741
5036
  text: title != null ? title : name,
4742
5037
  css: ObjectSearchResultItemTitleLink
4743
5038
  }
4744
- ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: title != null ? title : name }),
4745
- !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
5039
+ ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: title != null ? title : name }),
5040
+ !popoverData ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Popover, { ariaLabel: title, buttonText: `See ${title} details`, children: popoverData })
4746
5041
  ] }),
4747
- !createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
4748
- !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Chip, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
4749
- !createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
4750
- !createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
4751
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: "Last updated: " }),
5042
+ !createdAt && !publishStatus ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
5043
+ !(publishStatus == null ? void 0 : publishStatus.text) ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Chip, { theme: legacyThemeMapper(publishStatus.theme), text: publishStatus.text, size: "xs" }),
5044
+ !createdAt && !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchUpdateGroup, children: [
5045
+ !createdAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
5046
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("strong", { children: "Last updated: " }),
4752
5047
  (0, import_timeago.format)(createdAt)
4753
5048
  ] }),
4754
- !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
4755
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: "Last published: " }),
5049
+ !publishedAt ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("small", { css: ObjectSearchResultItemTimeStamp, children: [
5050
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("strong", { children: "Last published: " }),
4756
5051
  (0, import_timeago.format)(publishedAt)
4757
5052
  ] })
4758
5053
  ] })
4759
5054
  ] }),
4760
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children })
5055
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children })
4761
5056
  ] })
4762
5057
  ] }) }),
4763
- !editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
4764
- !editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
4765
- hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_design_system26.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
5058
+ !editLink && hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchAuthorStateGroup, children: [
5059
+ !editLink ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(LinkButton, { text: "Edit", href: editLink, icon: editLinkIcon }),
5060
+ hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_design_system27.Button, { buttonType: "ghostDestructive", onClick: onRemoveItem, children: "Remove" })
4766
5061
  ] })
4767
5062
  ] });
4768
5063
  };
@@ -4783,35 +5078,35 @@ function legacyThemeMapper(theme) {
4783
5078
 
4784
5079
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4785
5080
  var import_dnd3 = require("@hello-pangea/dnd");
4786
- var import_design_system27 = require("@uniformdev/design-system");
5081
+ var import_design_system28 = require("@uniformdev/design-system");
4787
5082
 
4788
5083
  // src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
4789
- var import_react50 = require("@emotion/react");
4790
- var ObjectSearchResultListContainer = import_react50.css`
5084
+ var import_react57 = require("@emotion/react");
5085
+ var ObjectSearchResultListContainer = import_react57.css`
4791
5086
  align-items: center;
4792
5087
  display: flex;
4793
5088
  gap: var(--spacing-sm);
4794
5089
  justify-content: space-between;
4795
5090
  `;
4796
- var ObjectSearchDragContainer = import_react50.css`
5091
+ var ObjectSearchDragContainer = import_react57.css`
4797
5092
  margin: 0 0 var(--spacing-sm);
4798
5093
  `;
4799
- var ObjectSearchContainerDragging = import_react50.css`
5094
+ var ObjectSearchContainerDragging = import_react57.css`
4800
5095
  box-shadow: var(--shadow-base);
4801
5096
  opacity: var(--opacity-50);
4802
5097
  `;
4803
- var ObjectSearchResultListCounterContainer = import_react50.css`
5098
+ var ObjectSearchResultListCounterContainer = import_react57.css`
4804
5099
  align-items: center;
4805
5100
  display: flex;
4806
5101
  gap: var(--spacing-sm);
4807
5102
  `;
4808
- var ObjectSearchResultListTitle = import_react50.css`
5103
+ var ObjectSearchResultListTitle = import_react57.css`
4809
5104
  font-weight: var(--fw-bold);
4810
5105
  line-height: 1;
4811
5106
  `;
4812
5107
 
4813
5108
  // src/components/ObjectSearch/ObjectSearchResultList.tsx
4814
- var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
5109
+ var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
4815
5110
  var DroppableHack2 = import_dnd3.Droppable;
4816
5111
  var DraggableHack2 = import_dnd3.Draggable;
4817
5112
  function ObjectSearchResultList({
@@ -4821,7 +5116,7 @@ function ObjectSearchResultList({
4821
5116
  hideRemoveButton = false,
4822
5117
  resultLabelOverride,
4823
5118
  additionalButtons,
4824
- renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ObjectSearchResultItem, { ...value }),
5119
+ renderResultComponent = (value) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ObjectSearchResultItem, { ...value }),
4825
5120
  multiSelectId,
4826
5121
  disableDnD = false,
4827
5122
  getContainerForDnDReparenting,
@@ -4848,7 +5143,7 @@ function ObjectSearchResultList({
4848
5143
  ...item,
4849
5144
  disableDnD: selectedListItems.length === 1 || disableDnD
4850
5145
  });
4851
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5146
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4852
5147
  "div",
4853
5148
  {
4854
5149
  css: [
@@ -4863,17 +5158,17 @@ function ObjectSearchResultList({
4863
5158
  }
4864
5159
  );
4865
5160
  };
4866
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4867
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { role: "group", css: ObjectSearchResultListContainer, children: [
4868
- !resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
4869
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
5161
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
5162
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { role: "group", css: ObjectSearchResultListContainer, children: [
5163
+ !resultLabelOverride ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { role: "note", css: ObjectSearchResultListCounterContainer, children: [
5164
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { css: ObjectSearchResultListTitle, children: resultLabelText }),
4870
5165
  " ",
4871
- !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_design_system27.Counter, { count: selectedListItems.length })
5166
+ !selectedListItems.length ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_design_system28.Counter, { count: selectedListItems.length })
4872
5167
  ] }) : resultLabelOverride,
4873
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
5168
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { css: ObjectSearchResultListCounterContainer, children: [
4874
5169
  additionalButtons,
4875
- hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4876
- import_design_system27.Button,
5170
+ hideRemoveButton ? null : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5171
+ import_design_system28.Button,
4877
5172
  {
4878
5173
  buttonType: "ghostDestructive",
4879
5174
  size: "xs",
@@ -4884,15 +5179,15 @@ function ObjectSearchResultList({
4884
5179
  )
4885
5180
  ] })
4886
5181
  ] }),
4887
- !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5182
+ !selectedListItems.length ? whenNothingSelected : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DragDropContext, { onDragEnd: (res) => onDragEnd(res), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4888
5183
  DroppableHack2,
4889
5184
  {
4890
5185
  droppableId: multiSelectId != null ? multiSelectId : "canvas-multi-select",
4891
5186
  renderClone: getContainerForDnDReparenting ? getDraggableItem : void 0,
4892
5187
  getContainerForClone: getContainerForDnDReparenting,
4893
- children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
5188
+ children: (provided) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ...provided.droppableProps, ref: provided.innerRef, children: [
4894
5189
  selectedListItems.map((item, i) => {
4895
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5190
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4896
5191
  DraggableHack2,
4897
5192
  {
4898
5193
  draggableId: item.id,
@@ -4911,9 +5206,9 @@ function ObjectSearchResultList({
4911
5206
  }
4912
5207
 
4913
5208
  // src/components/ObjectSearch/QueryFilter.tsx
4914
- var import_design_system28 = require("@uniformdev/design-system");
4915
- var import_react51 = require("react");
4916
- var import_jsx_runtime56 = require("@emotion/react/jsx-runtime");
5209
+ var import_design_system29 = require("@uniformdev/design-system");
5210
+ var import_react58 = require("react");
5211
+ var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
4917
5212
  var QueryFilter = ({
4918
5213
  requireContentType,
4919
5214
  queryFilterTitle = "Configure Query",
@@ -4941,7 +5236,7 @@ var QueryFilter = ({
4941
5236
  }) => {
4942
5237
  var _a, _b, _c, _d, _e, _f, _g;
4943
5238
  const { query, onSetQuery } = useObjectSearchContext();
4944
- const [queryState, setQueryState] = (0, import_react51.useState)({
5239
+ const [queryState, setQueryState] = (0, import_react58.useState)({
4945
5240
  contentType: (_a = query.contentType) != null ? _a : "",
4946
5241
  keyword: (_b = query.keyword) != null ? _b : "",
4947
5242
  count: (_c = query.count) != null ? _c : 5,
@@ -4952,13 +5247,13 @@ var QueryFilter = ({
4952
5247
  setQueryState((prev) => ({ ...prev, ...value }));
4953
5248
  onSetQuery({ ...query, ...value });
4954
5249
  };
4955
- (0, import_react51.useEffect)(() => {
5250
+ (0, import_react58.useEffect)(() => {
4956
5251
  onSetQuery(queryState);
4957
5252
  }, []);
4958
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("fieldset", { children: [
4959
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
4960
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_design_system28.VerticalRhythm, { children: [
4961
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5253
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("fieldset", { children: [
5254
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { css: ObjectSearchFilterContainerLabel, children: queryFilterTitle }),
5255
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { css: ObjectSearchFilterContainer, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_design_system29.VerticalRhythm, { children: [
5256
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4962
5257
  InputVariables,
4963
5258
  {
4964
5259
  label: searchInputLabel,
@@ -4966,8 +5261,8 @@ var QueryFilter = ({
4966
5261
  onChange: (newQuery) => handleFilterChange({ keyword: newQuery }),
4967
5262
  disableInlineMenu: true,
4968
5263
  id: "qf_searchText",
4969
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4970
- import_design_system28.DebouncedInputKeywordSearch,
5264
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5265
+ import_design_system29.DebouncedInputKeywordSearch,
4971
5266
  {
4972
5267
  id: "qf_searchText",
4973
5268
  inputFieldName: searchInputName,
@@ -4980,8 +5275,8 @@ var QueryFilter = ({
4980
5275
  )
4981
5276
  }
4982
5277
  ),
4983
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
4984
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5278
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { css: ObjectSearchFilterGrid("1fr 100px"), children: [
5279
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4985
5280
  InputVariables,
4986
5281
  {
4987
5282
  label: contentTypeLabel,
@@ -4989,8 +5284,8 @@ var QueryFilter = ({
4989
5284
  value: (_g = queryState.contentType) != null ? _g : "",
4990
5285
  onChange: (newType) => handleFilterChange({ contentType: newType }),
4991
5286
  disableInlineMenu: true,
4992
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4993
- import_design_system28.InputSelect,
5287
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5288
+ import_design_system29.InputSelect,
4994
5289
  {
4995
5290
  id: "qf_contentType",
4996
5291
  label: contentTypeLabel,
@@ -5003,7 +5298,7 @@ var QueryFilter = ({
5003
5298
  )
5004
5299
  }
5005
5300
  ),
5006
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5301
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5007
5302
  InputVariables,
5008
5303
  {
5009
5304
  label: countLabel,
@@ -5012,8 +5307,8 @@ var QueryFilter = ({
5012
5307
  onChange: (newCount) => handleFilterChange({ count: newCount }),
5013
5308
  disableInlineMenu: true,
5014
5309
  valueToResetTo: "5",
5015
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5016
- import_design_system28.Input,
5310
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5311
+ import_design_system29.Input,
5017
5312
  {
5018
5313
  id: "qf_count",
5019
5314
  label: countLabel,
@@ -5027,8 +5322,8 @@ var QueryFilter = ({
5027
5322
  }
5028
5323
  )
5029
5324
  ] }),
5030
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
5031
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5325
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { css: ObjectSearchFilterGrid("2fr 1fr"), children: [
5326
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5032
5327
  InputVariables,
5033
5328
  {
5034
5329
  id: "qf_sortBy",
@@ -5036,8 +5331,8 @@ var QueryFilter = ({
5036
5331
  value: queryState.sortBy,
5037
5332
  onChange: (newSortBy) => handleFilterChange({ sortBy: newSortBy }),
5038
5333
  disableInlineMenu: true,
5039
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5040
- import_design_system28.InputSelect,
5334
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5335
+ import_design_system29.InputSelect,
5041
5336
  {
5042
5337
  label: sortLabel,
5043
5338
  id: "qf_sortBy",
@@ -5050,7 +5345,7 @@ var QueryFilter = ({
5050
5345
  )
5051
5346
  }
5052
5347
  ),
5053
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5348
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5054
5349
  InputVariables,
5055
5350
  {
5056
5351
  label: sortOrderLabel,
@@ -5058,8 +5353,8 @@ var QueryFilter = ({
5058
5353
  value: queryState.sortOrder,
5059
5354
  onChange: (newSort) => handleFilterChange({ sortOrder: newSort }),
5060
5355
  disableInlineMenu: true,
5061
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5062
- import_design_system28.InputSelect,
5356
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5357
+ import_design_system29.InputSelect,
5063
5358
  {
5064
5359
  label: sortOrderLabel,
5065
5360
  id: "qf_sortOrder",
@@ -5078,8 +5373,8 @@ var QueryFilter = ({
5078
5373
  };
5079
5374
 
5080
5375
  // src/components/ParamTypeDynamicDataProvider.tsx
5081
- var import_react52 = require("react");
5082
- var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
5376
+ var import_react59 = require("react");
5377
+ var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
5083
5378
  function ParamTypeDynamicDataProvider(props) {
5084
5379
  const { children } = props;
5085
5380
  const {
@@ -5087,11 +5382,11 @@ function ParamTypeDynamicDataProvider(props) {
5087
5382
  } = useMeshLocation("paramType");
5088
5383
  const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
5089
5384
  const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
5090
- const variables = (0, import_react52.useMemo)(
5385
+ const variables = (0, import_react59.useMemo)(
5091
5386
  () => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
5092
5387
  [dynamicInputsAsVariables, connectedDataAsVariables]
5093
5388
  );
5094
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VariablesProvider, { value: variables, onChange: () => {
5389
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(VariablesProvider, { value: variables, onChange: () => {
5095
5390
  }, editVariableComponent: JsonMeshVariableEditor, children });
5096
5391
  }
5097
5392
  var JsonMeshVariableEditor = ({
@@ -5100,9 +5395,9 @@ var JsonMeshVariableEditor = ({
5100
5395
  variable,
5101
5396
  context
5102
5397
  }) => {
5103
- const sillyRef = (0, import_react52.useRef)(false);
5398
+ const sillyRef = (0, import_react59.useRef)(false);
5104
5399
  const { editConnectedData } = useMeshLocation("paramType");
5105
- (0, import_react52.useEffect)(() => {
5400
+ (0, import_react59.useEffect)(() => {
5106
5401
  if (sillyRef.current) {
5107
5402
  return;
5108
5403
  }
@@ -5571,10 +5866,10 @@ var MULTI_SELECT_OPERATORS = [
5571
5866
  ];
5572
5867
 
5573
5868
  // src/components/SearchAndFilter/editors/DateEditor.tsx
5574
- var import_design_system29 = require("@uniformdev/design-system");
5575
- var import_react53 = require("react");
5869
+ var import_design_system30 = require("@uniformdev/design-system");
5870
+ var import_react60 = require("react");
5576
5871
  var import_react_use2 = require("react-use");
5577
- var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
5872
+ var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
5578
5873
  var DateEditor = ({
5579
5874
  onChange,
5580
5875
  ariaLabel,
@@ -5583,10 +5878,10 @@ var DateEditor = ({
5583
5878
  readOnly,
5584
5879
  valueTestId
5585
5880
  }) => {
5586
- const [innerValue, setInnerValue] = (0, import_react53.useState)(value != null ? value : "");
5881
+ const [innerValue, setInnerValue] = (0, import_react60.useState)(value != null ? value : "");
5587
5882
  (0, import_react_use2.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
5588
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5589
- import_design_system29.Input,
5883
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5884
+ import_design_system30.Input,
5590
5885
  {
5591
5886
  type: "date",
5592
5887
  label: ariaLabel,
@@ -5601,22 +5896,22 @@ var DateEditor = ({
5601
5896
  };
5602
5897
 
5603
5898
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5604
- var import_design_system31 = require("@uniformdev/design-system");
5605
- var import_react54 = require("react");
5899
+ var import_design_system32 = require("@uniformdev/design-system");
5900
+ var import_react61 = require("react");
5606
5901
  var import_react_use3 = require("react-use");
5607
5902
 
5608
5903
  // src/components/SearchAndFilter/editors/shared/ErrorContainer.tsx
5609
- var import_design_system30 = require("@uniformdev/design-system");
5610
- var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
5904
+ var import_design_system31 = require("@uniformdev/design-system");
5905
+ var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
5611
5906
  var ErrorContainer = ({ errorMessage }) => {
5612
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5907
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5613
5908
  "div",
5614
5909
  {
5615
5910
  css: {
5616
5911
  gridColumn: "span 6",
5617
5912
  order: 6
5618
5913
  },
5619
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system30.FieldMessage, { errorMessage })
5914
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_design_system31.FieldMessage, { errorMessage })
5620
5915
  }
5621
5916
  );
5622
5917
  };
@@ -5629,7 +5924,7 @@ var twoColumnGrid = {
5629
5924
  };
5630
5925
 
5631
5926
  // src/components/SearchAndFilter/editors/DateRangeEditor.tsx
5632
- var import_jsx_runtime60 = require("@emotion/react/jsx-runtime");
5927
+ var import_jsx_runtime62 = require("@emotion/react/jsx-runtime");
5633
5928
  var DateRangeEditor = ({
5634
5929
  ariaLabel,
5635
5930
  onChange,
@@ -5638,9 +5933,9 @@ var DateRangeEditor = ({
5638
5933
  readOnly,
5639
5934
  valueTestId
5640
5935
  }) => {
5641
- const [minDateValue, setMinDateValue] = (0, import_react54.useState)(value ? value[0] : "");
5642
- const [maxDateValue, setMaxDateValue] = (0, import_react54.useState)(value ? value[1] : "");
5643
- const [error, setError] = (0, import_react54.useState)("");
5936
+ const [minDateValue, setMinDateValue] = (0, import_react61.useState)(value ? value[0] : "");
5937
+ const [maxDateValue, setMaxDateValue] = (0, import_react61.useState)(value ? value[1] : "");
5938
+ const [error, setError] = (0, import_react61.useState)("");
5644
5939
  (0, import_react_use3.useDebounce)(
5645
5940
  () => {
5646
5941
  if (minDateValue && maxDateValue && !error) {
@@ -5652,7 +5947,7 @@ var DateRangeEditor = ({
5652
5947
  500,
5653
5948
  [minDateValue, maxDateValue]
5654
5949
  );
5655
- (0, import_react54.useEffect)(() => {
5950
+ (0, import_react61.useEffect)(() => {
5656
5951
  if (!minDateValue || !maxDateValue) {
5657
5952
  return;
5658
5953
  }
@@ -5687,10 +5982,10 @@ var DateRangeEditor = ({
5687
5982
  setMaxDateValue("");
5688
5983
  }
5689
5984
  }, [minDateValue, maxDateValue, setError]);
5690
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
5691
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5692
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5693
- import_design_system31.Input,
5985
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
5986
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5987
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5988
+ import_design_system32.Input,
5694
5989
  {
5695
5990
  label: `${ariaLabel}-min-date`,
5696
5991
  type: "date",
@@ -5703,8 +5998,8 @@ var DateRangeEditor = ({
5703
5998
  "data-testid": "value-low"
5704
5999
  }
5705
6000
  ),
5706
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5707
- import_design_system31.Input,
6001
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
6002
+ import_design_system32.Input,
5708
6003
  {
5709
6004
  label: `${ariaLabel}-max-date`,
5710
6005
  type: "date",
@@ -5718,13 +6013,13 @@ var DateRangeEditor = ({
5718
6013
  }
5719
6014
  )
5720
6015
  ] }),
5721
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorContainer, { errorMessage: error })
6016
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ErrorContainer, { errorMessage: error })
5722
6017
  ] });
5723
6018
  };
5724
6019
 
5725
6020
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5726
- var import_design_system32 = require("@uniformdev/design-system");
5727
- var import_react55 = require("react");
6021
+ var import_design_system33 = require("@uniformdev/design-system");
6022
+ var import_react62 = require("react");
5728
6023
 
5729
6024
  // src/components/SearchAndFilter/editors/shared/readOnlyAttributes.tsx
5730
6025
  var readOnlyAttributes = {
@@ -5734,7 +6029,7 @@ var readOnlyAttributes = {
5734
6029
  };
5735
6030
 
5736
6031
  // src/components/SearchAndFilter/editors/FilterMultiChoiceEditor.tsx
5737
- var import_jsx_runtime61 = require("@emotion/react/jsx-runtime");
6032
+ var import_jsx_runtime63 = require("@emotion/react/jsx-runtime");
5738
6033
  var FilterMultiChoiceEditor = ({
5739
6034
  value,
5740
6035
  options,
@@ -5745,12 +6040,12 @@ var FilterMultiChoiceEditor = ({
5745
6040
  }) => {
5746
6041
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5747
6042
  const isClearable = !readOnly || !disabled;
5748
- const { groupedOptions, selectedOptions } = (0, import_react55.useMemo)(
5749
- () => (0, import_design_system32.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
6043
+ const { groupedOptions, selectedOptions } = (0, import_react62.useMemo)(
6044
+ () => (0, import_design_system33.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
5750
6045
  [options, value]
5751
6046
  );
5752
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5753
- import_design_system32.InputComboBox,
6047
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6048
+ import_design_system33.InputComboBox,
5754
6049
  {
5755
6050
  ...props,
5756
6051
  placeholder: "Type to search...",
@@ -5759,7 +6054,7 @@ var FilterMultiChoiceEditor = ({
5759
6054
  isClearable,
5760
6055
  isDisabled: disabled,
5761
6056
  onChange: (e) => {
5762
- const selectedValues = (0, import_design_system32.getComboBoxSelectedSelectableGroups)(e);
6057
+ const selectedValues = (0, import_design_system33.getComboBoxSelectedSelectableGroups)(e);
5763
6058
  return props.onChange([...selectedValues]);
5764
6059
  },
5765
6060
  value: selectedOptions,
@@ -5778,9 +6073,9 @@ var FilterMultiChoiceEditor = ({
5778
6073
  };
5779
6074
 
5780
6075
  // src/components/SearchAndFilter/editors/FilterSingleChoiceEditor.tsx
5781
- var import_design_system33 = require("@uniformdev/design-system");
5782
- var import_react56 = require("react");
5783
- var import_jsx_runtime62 = require("@emotion/react/jsx-runtime");
6076
+ var import_design_system34 = require("@uniformdev/design-system");
6077
+ var import_react63 = require("react");
6078
+ var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
5784
6079
  var FilterSingleChoiceEditor = ({
5785
6080
  options,
5786
6081
  value,
@@ -5790,16 +6085,16 @@ var FilterSingleChoiceEditor = ({
5790
6085
  valueTestId
5791
6086
  }) => {
5792
6087
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5793
- const { groupedOptions, selectedOptions } = (0, import_react56.useMemo)(
5794
- () => (0, import_design_system33.convertComboBoxGroupsToSelectableGroups)({
6088
+ const { groupedOptions, selectedOptions } = (0, import_react63.useMemo)(
6089
+ () => (0, import_design_system34.convertComboBoxGroupsToSelectableGroups)({
5795
6090
  options: options != null ? options : [],
5796
6091
  selectedItems: new Set(value ? [String(value)] : void 0),
5797
6092
  selectionMode: "single"
5798
6093
  }),
5799
6094
  [options, value]
5800
6095
  );
5801
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5802
- import_design_system33.InputComboBox,
6096
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
6097
+ import_design_system34.InputComboBox,
5803
6098
  {
5804
6099
  placeholder: "Type to search...",
5805
6100
  options: groupedOptions,
@@ -5827,10 +6122,10 @@ var FilterSingleChoiceEditor = ({
5827
6122
  };
5828
6123
 
5829
6124
  // src/components/SearchAndFilter/editors/NumberEditor.tsx
5830
- var import_design_system34 = require("@uniformdev/design-system");
5831
- var import_react57 = require("react");
6125
+ var import_design_system35 = require("@uniformdev/design-system");
6126
+ var import_react64 = require("react");
5832
6127
  var import_react_use4 = require("react-use");
5833
- var import_jsx_runtime63 = require("@emotion/react/jsx-runtime");
6128
+ var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
5834
6129
  var NumberEditor = ({
5835
6130
  ariaLabel,
5836
6131
  onChange,
@@ -5839,10 +6134,10 @@ var NumberEditor = ({
5839
6134
  readOnly,
5840
6135
  valueTestId
5841
6136
  }) => {
5842
- const [innerValue, setInnerValue] = (0, import_react57.useState)(value != null ? value : "");
6137
+ const [innerValue, setInnerValue] = (0, import_react64.useState)(value != null ? value : "");
5843
6138
  (0, import_react_use4.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
5844
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5845
- import_design_system34.Input,
6139
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
6140
+ import_design_system35.Input,
5846
6141
  {
5847
6142
  label: ariaLabel,
5848
6143
  type: "number",
@@ -5858,10 +6153,10 @@ var NumberEditor = ({
5858
6153
  };
5859
6154
 
5860
6155
  // src/components/SearchAndFilter/editors/NumberRangeEditor.tsx
5861
- var import_design_system35 = require("@uniformdev/design-system");
5862
- var import_react58 = require("react");
6156
+ var import_design_system36 = require("@uniformdev/design-system");
6157
+ var import_react65 = require("react");
5863
6158
  var import_react_use5 = require("react-use");
5864
- var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
6159
+ var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
5865
6160
  var NumberRangeEditor = ({
5866
6161
  onChange,
5867
6162
  disabled,
@@ -5870,9 +6165,9 @@ var NumberRangeEditor = ({
5870
6165
  readOnly,
5871
6166
  valueTestId
5872
6167
  }) => {
5873
- const [minValue, setMinValue] = (0, import_react58.useState)("");
5874
- const [maxValue, setMaxValue] = (0, import_react58.useState)("");
5875
- const [error, setError] = (0, import_react58.useState)("");
6168
+ const [minValue, setMinValue] = (0, import_react65.useState)("");
6169
+ const [maxValue, setMaxValue] = (0, import_react65.useState)("");
6170
+ const [error, setError] = (0, import_react65.useState)("");
5876
6171
  (0, import_react_use5.useDebounce)(
5877
6172
  () => {
5878
6173
  if (minValue && maxValue && !error) {
@@ -5884,7 +6179,7 @@ var NumberRangeEditor = ({
5884
6179
  500,
5885
6180
  [minValue, maxValue]
5886
6181
  );
5887
- (0, import_react58.useEffect)(() => {
6182
+ (0, import_react65.useEffect)(() => {
5888
6183
  if (!maxValue && !minValue) {
5889
6184
  return;
5890
6185
  }
@@ -5906,10 +6201,10 @@ var NumberRangeEditor = ({
5906
6201
  setMaxValue(maxValue);
5907
6202
  }
5908
6203
  }, [maxValue, minValue, setError]);
5909
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
5910
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
5911
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5912
- import_design_system35.Input,
6204
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
6205
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { css: twoColumnGrid, "data-testid": valueTestId, children: [
6206
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6207
+ import_design_system36.Input,
5913
6208
  {
5914
6209
  label: `${ariaLabel}-min`,
5915
6210
  type: "number",
@@ -5924,8 +6219,8 @@ var NumberRangeEditor = ({
5924
6219
  "data-testid": "value-low"
5925
6220
  }
5926
6221
  ),
5927
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5928
- import_design_system35.Input,
6222
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6223
+ import_design_system36.Input,
5929
6224
  {
5930
6225
  type: "number",
5931
6226
  label: `${ariaLabel}-max`,
@@ -5941,20 +6236,20 @@ var NumberRangeEditor = ({
5941
6236
  }
5942
6237
  )
5943
6238
  ] }),
5944
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ErrorContainer, { errorMessage: error })
6239
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorContainer, { errorMessage: error })
5945
6240
  ] });
5946
6241
  };
5947
6242
 
5948
6243
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5949
- var import_design_system37 = require("@uniformdev/design-system");
5950
- var import_react59 = require("react");
6244
+ var import_design_system38 = require("@uniformdev/design-system");
6245
+ var import_react66 = require("react");
5951
6246
 
5952
6247
  // src/components/SearchAndFilter/editors/shared/CustomOptions.tsx
5953
- var import_design_system36 = require("@uniformdev/design-system");
5954
- var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
6248
+ var import_design_system37 = require("@uniformdev/design-system");
6249
+ var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
5955
6250
  var CustomOptions = ({ label, value }) => {
5956
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5957
- import_design_system36.StatusBullet,
6251
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6252
+ import_design_system37.StatusBullet,
5958
6253
  {
5959
6254
  status: label,
5960
6255
  message: Array.isArray(value) ? value.join(",") : value
@@ -5963,7 +6258,7 @@ var CustomOptions = ({ label, value }) => {
5963
6258
  };
5964
6259
 
5965
6260
  // src/components/SearchAndFilter/editors/StatusMultiEditor.tsx
5966
- var import_jsx_runtime66 = require("@emotion/react/jsx-runtime");
6261
+ var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
5967
6262
  var StatusMultiEditor = ({
5968
6263
  options,
5969
6264
  value,
@@ -5973,17 +6268,17 @@ var StatusMultiEditor = ({
5973
6268
  valueTestId
5974
6269
  }) => {
5975
6270
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
5976
- const { groupedOptions, selectedOptions } = (0, import_react59.useMemo)(
5977
- () => (0, import_design_system37.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
6271
+ const { groupedOptions, selectedOptions } = (0, import_react66.useMemo)(
6272
+ () => (0, import_design_system38.convertComboBoxGroupsToSelectableGroups)({ options: options != null ? options : [], selectedItems: new Set(value) }),
5978
6273
  [options, value]
5979
6274
  );
5980
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5981
- import_design_system37.InputComboBox,
6275
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6276
+ import_design_system38.InputComboBox,
5982
6277
  {
5983
6278
  options: groupedOptions != null ? groupedOptions : [],
5984
6279
  isMulti: true,
5985
6280
  onChange: (e) => {
5986
- const selectedValues = (0, import_design_system37.getComboBoxSelectedSelectableGroups)(e);
6281
+ const selectedValues = (0, import_design_system38.getComboBoxSelectedSelectableGroups)(e);
5987
6282
  return onChange([...selectedValues]);
5988
6283
  },
5989
6284
  formatOptionLabel: CustomOptions,
@@ -6004,9 +6299,9 @@ var StatusMultiEditor = ({
6004
6299
  };
6005
6300
 
6006
6301
  // src/components/SearchAndFilter/editors/StatusSingleEditor.tsx
6007
- var import_design_system38 = require("@uniformdev/design-system");
6008
- var import_react60 = require("react");
6009
- var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
6302
+ var import_design_system39 = require("@uniformdev/design-system");
6303
+ var import_react67 = require("react");
6304
+ var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
6010
6305
  var StatusSingleEditor = ({
6011
6306
  options,
6012
6307
  value,
@@ -6016,16 +6311,16 @@ var StatusSingleEditor = ({
6016
6311
  valueTestId
6017
6312
  }) => {
6018
6313
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
6019
- const { groupedOptions, selectedOptions } = (0, import_react60.useMemo)(
6020
- () => (0, import_design_system38.convertComboBoxGroupsToSelectableGroups)({
6314
+ const { groupedOptions, selectedOptions } = (0, import_react67.useMemo)(
6315
+ () => (0, import_design_system39.convertComboBoxGroupsToSelectableGroups)({
6021
6316
  options: options != null ? options : [],
6022
6317
  selectedItems: new Set(value ? [value] : void 0),
6023
6318
  selectionMode: "single"
6024
6319
  }),
6025
6320
  [options, value]
6026
6321
  );
6027
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6028
- import_design_system38.InputComboBox,
6322
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6323
+ import_design_system39.InputComboBox,
6029
6324
  {
6030
6325
  options: groupedOptions,
6031
6326
  onChange: (e) => {
@@ -6052,10 +6347,10 @@ var StatusSingleEditor = ({
6052
6347
  };
6053
6348
 
6054
6349
  // src/components/SearchAndFilter/editors/TextEditor.tsx
6055
- var import_design_system39 = require("@uniformdev/design-system");
6056
- var import_react61 = require("react");
6350
+ var import_design_system40 = require("@uniformdev/design-system");
6351
+ var import_react68 = require("react");
6057
6352
  var import_react_use6 = require("react-use");
6058
- var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
6353
+ var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
6059
6354
  var TextEditor = ({
6060
6355
  onChange,
6061
6356
  ariaLabel,
@@ -6063,10 +6358,10 @@ var TextEditor = ({
6063
6358
  readOnly,
6064
6359
  valueTestId
6065
6360
  }) => {
6066
- const [innerValue, setInnerValue] = (0, import_react61.useState)(value != null ? value : "");
6361
+ const [innerValue, setInnerValue] = (0, import_react68.useState)(value != null ? value : "");
6067
6362
  (0, import_react_use6.useDebounce)(() => onChange(innerValue), 500, [innerValue]);
6068
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6069
- import_design_system39.Input,
6363
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
6364
+ import_design_system40.Input,
6070
6365
  {
6071
6366
  showLabel: false,
6072
6367
  label: ariaLabel,
@@ -6080,9 +6375,9 @@ var TextEditor = ({
6080
6375
  };
6081
6376
 
6082
6377
  // src/components/SearchAndFilter/editors/TextMultiChoiceEditor.tsx
6083
- var import_design_system40 = require("@uniformdev/design-system");
6084
- var import_react62 = require("react");
6085
- var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
6378
+ var import_design_system41 = require("@uniformdev/design-system");
6379
+ var import_react69 = require("react");
6380
+ var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
6086
6381
  var TextMultiChoiceEditor = ({
6087
6382
  value,
6088
6383
  disabled,
@@ -6092,14 +6387,14 @@ var TextMultiChoiceEditor = ({
6092
6387
  }) => {
6093
6388
  const readOnlyProps = readOnly ? readOnlyAttributes : {};
6094
6389
  const isClearable = !readOnly || !disabled;
6095
- const { groupedOptions, selectedOptions } = (0, import_react62.useMemo)(() => {
6390
+ const { groupedOptions, selectedOptions } = (0, import_react69.useMemo)(() => {
6096
6391
  var _a;
6097
6392
  const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
6098
6393
  const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
6099
- return (0, import_design_system40.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
6394
+ return (0, import_design_system41.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
6100
6395
  }, [value]);
6101
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6102
- import_design_system40.InputCreatableComboBox,
6396
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6397
+ import_design_system41.InputCreatableComboBox,
6103
6398
  {
6104
6399
  ...props,
6105
6400
  placeholder: "Type a value\u2026",
@@ -6109,7 +6404,7 @@ var TextMultiChoiceEditor = ({
6109
6404
  isClearable,
6110
6405
  isDisabled: disabled,
6111
6406
  onChange: (e) => {
6112
- const selectedValues = (0, import_design_system40.getComboBoxSelectedSelectableGroups)(e);
6407
+ const selectedValues = (0, import_design_system41.getComboBoxSelectedSelectableGroups)(e);
6113
6408
  return props.onChange([...selectedValues]);
6114
6409
  },
6115
6410
  value: selectedOptions,
@@ -6128,31 +6423,31 @@ var TextMultiChoiceEditor = ({
6128
6423
  };
6129
6424
 
6130
6425
  // src/components/SearchAndFilter/FilterButton.tsx
6131
- var import_design_system42 = require("@uniformdev/design-system");
6426
+ var import_design_system43 = require("@uniformdev/design-system");
6132
6427
 
6133
6428
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
6134
- var import_react63 = require("@emotion/react");
6135
- var import_design_system41 = require("@uniformdev/design-system");
6136
- var SearchAndFilterControlsWrapper = (gridColumns) => import_react63.css`
6429
+ var import_react70 = require("@emotion/react");
6430
+ var import_design_system42 = require("@uniformdev/design-system");
6431
+ var SearchAndFilterControlsWrapper = (gridColumns) => import_react70.css`
6137
6432
  align-items: stretch;
6138
6433
  display: grid;
6139
6434
  grid-template-columns: ${gridColumns};
6140
6435
  gap: var(--spacing-sm);
6141
6436
  `;
6142
- var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react63.css`
6437
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react70.css`
6143
6438
  align-items: stretch;
6144
6439
  display: grid;
6145
6440
  grid-template-columns: ${gridColumns};
6146
6441
  gap: var(--spacing-sm);
6147
6442
  `;
6148
- var ConditionalFilterRow = import_react63.css`
6443
+ var ConditionalFilterRow = import_react70.css`
6149
6444
  align-items: baseline;
6150
6445
  display: grid;
6151
6446
  grid-template-columns: 35px 1fr;
6152
6447
  gap: var(--spacing-sm);
6153
6448
  margin-left: var(--spacing-base);
6154
6449
 
6155
- ${(0, import_design_system41.cq)("380px")} {
6450
+ ${(0, import_design_system42.cq)("380px")} {
6156
6451
  &:after {
6157
6452
  content: '';
6158
6453
  display: block;
@@ -6171,22 +6466,22 @@ var ConditionalFilterRow = import_react63.css`
6171
6466
  grid-template-columns: 50px 1fr;
6172
6467
  }
6173
6468
 
6174
- ${(0, import_design_system41.cq)("580px")} {
6469
+ ${(0, import_design_system42.cq)("580px")} {
6175
6470
  &:after {
6176
6471
  display: none;
6177
6472
  }
6178
6473
  }
6179
6474
 
6180
6475
  @media (prefers-reduced-motion: no-preference) {
6181
- animation: ${import_design_system41.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6476
+ animation: ${import_design_system42.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
6182
6477
  }
6183
6478
  `;
6184
- var ConditionalInputRow = import_react63.css`
6479
+ var ConditionalInputRow = import_react70.css`
6185
6480
  display: flex;
6186
6481
  gap: var(--spacing-sm);
6187
6482
  flex-wrap: wrap;
6188
6483
 
6189
- ${(0, import_design_system41.cq)("380px")} {
6484
+ ${(0, import_design_system42.cq)("380px")} {
6190
6485
  & > div:nth-child(-n + 2) {
6191
6486
  width: calc(50% - var(--spacing-sm));
6192
6487
  }
@@ -6195,7 +6490,7 @@ var ConditionalInputRow = import_react63.css`
6195
6490
  width: calc(100% - 48px);
6196
6491
  }
6197
6492
  }
6198
- ${(0, import_design_system41.cq)("764px")} {
6493
+ ${(0, import_design_system42.cq)("764px")} {
6199
6494
  align-items: flex-start;
6200
6495
  display: grid;
6201
6496
  grid-template-columns: 250px 160px 1fr 32px;
@@ -6205,16 +6500,16 @@ var ConditionalInputRow = import_react63.css`
6205
6500
  }
6206
6501
  }
6207
6502
  `;
6208
- var ConditionalInputRowEmpty = import_react63.css`
6503
+ var ConditionalInputRowEmpty = import_react70.css`
6209
6504
  flex-wrap: nowrap;
6210
6505
  `;
6211
- var SearchInput = import_react63.css`
6506
+ var SearchInput = import_react70.css`
6212
6507
  && {
6213
6508
  max-height: 40px;
6214
6509
  min-height: unset;
6215
6510
  }
6216
6511
  `;
6217
- var BindableKeywordSearchInputStyles = import_react63.css`
6512
+ var BindableKeywordSearchInputStyles = import_react70.css`
6218
6513
  position: relative;
6219
6514
  width: 100%;
6220
6515
 
@@ -6229,19 +6524,19 @@ var BindableKeywordSearchInputStyles = import_react63.css`
6229
6524
  white-space: nowrap;
6230
6525
  }
6231
6526
  `;
6232
- var ClearSearchButtonContainer = import_react63.css`
6527
+ var ClearSearchButtonContainer = import_react70.css`
6233
6528
  align-items: center;
6234
6529
  display: flex;
6235
6530
  position: absolute;
6236
6531
  inset: 0 var(--spacing-lg) 0 auto;
6237
6532
  `;
6238
- var ClearSearchButtonStyles = import_react63.css`
6533
+ var ClearSearchButtonStyles = import_react70.css`
6239
6534
  background: none;
6240
6535
  border: none;
6241
6536
  padding: 0;
6242
6537
  pointer-events: all;
6243
6538
  `;
6244
- var FilterButton = import_react63.css`
6539
+ var FilterButton = import_react70.css`
6245
6540
  align-items: center;
6246
6541
  background: var(--white);
6247
6542
  border: 1px solid var(--gray-300);
@@ -6278,13 +6573,13 @@ var FilterButton = import_react63.css`
6278
6573
  opacity: var(--opacity-50);
6279
6574
  }
6280
6575
  `;
6281
- var FilterButtonText = import_react63.css`
6576
+ var FilterButtonText = import_react70.css`
6282
6577
  overflow: hidden;
6283
6578
  text-overflow: ellipsis;
6284
6579
  white-space: nowrap;
6285
6580
  max-width: 14ch;
6286
6581
  `;
6287
- var FilterButtonSelected = import_react63.css`
6582
+ var FilterButtonSelected = import_react70.css`
6288
6583
  background: var(--gray-100);
6289
6584
  border-color: var(--gray-300);
6290
6585
 
@@ -6292,7 +6587,7 @@ var FilterButtonSelected = import_react63.css`
6292
6587
  color: var(--accent-dark);
6293
6588
  }
6294
6589
  `;
6295
- var FilterButtonWithOptions = import_react63.css`
6590
+ var FilterButtonWithOptions = import_react70.css`
6296
6591
  :where([aria-expanded='true']) {
6297
6592
  background: var(--purple-rain-100);
6298
6593
  border-color: var(--accent-light);
@@ -6304,14 +6599,14 @@ var FilterButtonWithOptions = import_react63.css`
6304
6599
  }
6305
6600
  }
6306
6601
  `;
6307
- var SearchIcon = import_react63.css`
6602
+ var SearchIcon = import_react70.css`
6308
6603
  color: var(--icon-color);
6309
6604
  position: absolute;
6310
6605
  inset: 0 var(--spacing-base) 0 auto;
6311
6606
  margin: auto;
6312
6607
  transition: color var(--duration-fast) var(--timing-ease-out);
6313
6608
  `;
6314
- var AddConditionalBtn = import_react63.css`
6609
+ var AddConditionalBtn = import_react70.css`
6315
6610
  align-items: center;
6316
6611
  background: transparent;
6317
6612
  border: none;
@@ -6330,14 +6625,14 @@ var AddConditionalBtn = import_react63.css`
6330
6625
  color: var(--gray-400);
6331
6626
  }
6332
6627
  `;
6333
- var Title = import_react63.css`
6628
+ var Title = import_react70.css`
6334
6629
  color: var(--typography-light);
6335
6630
 
6336
6631
  &:focus {
6337
6632
  outline: none;
6338
6633
  }
6339
6634
  `;
6340
- var ResetConditionsBtn = import_react63.css`
6635
+ var ResetConditionsBtn = import_react70.css`
6341
6636
  background: transparent;
6342
6637
  border: none;
6343
6638
  color: var(--action-destructive-default);
@@ -6352,7 +6647,7 @@ var ResetConditionsBtn = import_react63.css`
6352
6647
  color: var(--gray-400);
6353
6648
  }
6354
6649
  `;
6355
- var CriteriaGroupOperatorTrigger = import_react63.css`
6650
+ var CriteriaGroupOperatorTrigger = import_react70.css`
6356
6651
  && {
6357
6652
  padding: 0;
6358
6653
  border-radius: var(--rounded-sm);
@@ -6371,13 +6666,13 @@ var CriteriaGroupOperatorTrigger = import_react63.css`
6371
6666
  }
6372
6667
  }
6373
6668
  `;
6374
- var IconBtn = import_react63.css`
6669
+ var IconBtn = import_react70.css`
6375
6670
  align-self: center;
6376
6671
  background: transparent;
6377
6672
  border: none;
6378
6673
  padding: var(--spacing-sm);
6379
6674
  `;
6380
- var SearchAndFilterOptionsContainer = import_react63.css`
6675
+ var SearchAndFilterOptionsContainer = import_react70.css`
6381
6676
  background: var(--gray-50);
6382
6677
  border: 1px solid var(--gray-300);
6383
6678
  border-radius: var(--rounded-base);
@@ -6388,17 +6683,17 @@ var SearchAndFilterOptionsContainer = import_react63.css`
6388
6683
  padding: var(--spacing-md) 0 var(--spacing-base);
6389
6684
  will-change: height;
6390
6685
  `;
6391
- var SearchAndFilterOptionsInnerContainer = import_react63.css`
6686
+ var SearchAndFilterOptionsInnerContainer = import_react70.css`
6392
6687
  display: flex;
6393
6688
  flex-direction: column;
6394
6689
  gap: var(--spacing-sm);
6395
6690
  padding-inline: var(--spacing-md);
6396
6691
  `;
6397
- var SearchAndFilterButtonGroup = import_react63.css`
6692
+ var SearchAndFilterButtonGroup = import_react70.css`
6398
6693
  margin-top: var(--spacing-xs);
6399
6694
  margin-left: calc(56px + var(--spacing-md));
6400
6695
  `;
6401
- var SearchAndFilterAdditionalContainer = import_react63.css`
6696
+ var SearchAndFilterAdditionalContainer = import_react70.css`
6402
6697
  align-items: center;
6403
6698
  border-top: 1px solid var(--gray-300);
6404
6699
  display: flex;
@@ -6408,17 +6703,17 @@ var SearchAndFilterAdditionalContainer = import_react63.css`
6408
6703
  `;
6409
6704
 
6410
6705
  // src/components/SearchAndFilter/FilterButton.tsx
6411
- var import_jsx_runtime70 = require("@emotion/react/jsx-runtime");
6706
+ var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
6412
6707
  var FilterButton2 = ({
6413
6708
  text = "Filters",
6414
- icon = import_design_system42.customIcons["filter-add"],
6709
+ icon = import_design_system43.customIcons["filter-add"],
6415
6710
  filterCount,
6416
6711
  hasSelectedValue,
6417
6712
  dataTestId,
6418
6713
  showDropdownIcon,
6419
6714
  ...props
6420
6715
  }) => {
6421
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
6716
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
6422
6717
  "button",
6423
6718
  {
6424
6719
  type: "button",
@@ -6430,10 +6725,10 @@ var FilterButton2 = ({
6430
6725
  ...props,
6431
6726
  "data-testid": dataTestId,
6432
6727
  children: [
6433
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
6434
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { css: FilterButtonText, children: text }),
6435
- filterCount ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
6436
- showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_design_system42.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6728
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
6729
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { css: FilterButtonText, children: text }),
6730
+ filterCount ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
6731
+ showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
6437
6732
  ]
6438
6733
  }
6439
6734
  );
@@ -6442,25 +6737,25 @@ var FilterButton2 = ({
6442
6737
  // src/components/SearchAndFilter/FilterControls.tsx
6443
6738
  var import_CgClose = require("@react-icons/all-files/cg/CgClose");
6444
6739
  var import_canvas10 = require("@uniformdev/canvas");
6445
- var import_design_system44 = require("@uniformdev/design-system");
6740
+ var import_design_system45 = require("@uniformdev/design-system");
6446
6741
  var import_lexical11 = require("lexical");
6447
- var import_react65 = require("react");
6742
+ var import_react72 = require("react");
6448
6743
  var import_react_use7 = require("react-use");
6449
6744
  var import_uuid2 = require("uuid");
6450
6745
 
6451
6746
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6452
- var import_design_system43 = require("@uniformdev/design-system");
6453
- var import_react64 = require("react");
6747
+ var import_design_system44 = require("@uniformdev/design-system");
6748
+ var import_react71 = require("react");
6454
6749
 
6455
6750
  // src/components/SearchAndFilter/FilterEditor.tsx
6456
- var import_jsx_runtime71 = require("@emotion/react/jsx-runtime");
6751
+ var import_jsx_runtime73 = require("@emotion/react/jsx-runtime");
6457
6752
  var FilterEditorRenderer = ({ editorType, ...props }) => {
6458
6753
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
6459
6754
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
6460
6755
  if (!Editor || editorType === "empty") {
6461
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", {});
6756
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", {});
6462
6757
  }
6463
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Editor, { ...props });
6758
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Editor, { ...props });
6464
6759
  };
6465
6760
  var filterMapper = {
6466
6761
  multiChoice: FilterMultiChoiceEditor,
@@ -6478,9 +6773,9 @@ var filterMapper = {
6478
6773
  function withInputVariables(WrappedComponent, noSwapping = false) {
6479
6774
  const WithInputVariables = (props) => {
6480
6775
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
6481
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props });
6776
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props });
6482
6777
  }
6483
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6778
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6484
6779
  InputVariables,
6485
6780
  {
6486
6781
  "data-testid": "filter-value",
@@ -6489,7 +6784,7 @@ function withInputVariables(WrappedComponent, noSwapping = false) {
6489
6784
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
6490
6785
  value: props.value,
6491
6786
  disabled: props.disabled,
6492
- inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props })
6787
+ inputWhenNoVariables: noSwapping ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props })
6493
6788
  }
6494
6789
  );
6495
6790
  };
@@ -6499,9 +6794,9 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6499
6794
  const WithInputVariables = (props) => {
6500
6795
  var _a;
6501
6796
  if (!props.bindable || props.disabled || props.readOnly) {
6502
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props });
6797
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props });
6503
6798
  }
6504
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
6799
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6505
6800
  InputVariables,
6506
6801
  {
6507
6802
  "data-testid": "filter-value",
@@ -6509,7 +6804,7 @@ function withInputVariablesForMultiValue(WrappedComponent) {
6509
6804
  showMenuPosition: "inline-right",
6510
6805
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
6511
6806
  value: (_a = props.value) == null ? void 0 : _a[0],
6512
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(WrappedComponent, { ...props })
6807
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WrappedComponent, { ...props })
6513
6808
  }
6514
6809
  );
6515
6810
  };
@@ -6525,8 +6820,8 @@ var bindableFiltersMapper = {
6525
6820
  };
6526
6821
 
6527
6822
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
6528
- var import_jsx_runtime72 = require("@emotion/react/jsx-runtime");
6529
- var SearchAndFilterContext = (0, import_react64.createContext)({
6823
+ var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
6824
+ var SearchAndFilterContext = (0, import_react71.createContext)({
6530
6825
  searchTerm: "",
6531
6826
  setSearchTerm: () => {
6532
6827
  },
@@ -6565,17 +6860,17 @@ var SearchAndFilterProvider = ({
6565
6860
  children,
6566
6861
  allowBindingSearchTerm
6567
6862
  }) => {
6568
- const [searchTerm, setSearchTerm] = (0, import_react64.useState)(defaultSearchTerm);
6569
- const deferredSearchTerm = (0, import_react64.useDeferredValue)(searchTerm);
6570
- const [filterVisibility, setFilterVisibility] = (0, import_react64.useState)(alwaysVisible || filterVisible);
6571
- const handleSearchTerm = (0, import_react64.useCallback)(
6863
+ const [searchTerm, setSearchTerm] = (0, import_react71.useState)(defaultSearchTerm);
6864
+ const deferredSearchTerm = (0, import_react71.useDeferredValue)(searchTerm);
6865
+ const [filterVisibility, setFilterVisibility] = (0, import_react71.useState)(alwaysVisible || filterVisible);
6866
+ const handleSearchTerm = (0, import_react71.useCallback)(
6572
6867
  (term) => {
6573
6868
  setSearchTerm(term);
6574
6869
  onSearchChange == null ? void 0 : onSearchChange(term);
6575
6870
  },
6576
6871
  [setSearchTerm, onSearchChange]
6577
6872
  );
6578
- const handleToggleFilterVisibility = (0, import_react64.useCallback)(
6873
+ const handleToggleFilterVisibility = (0, import_react71.useCallback)(
6579
6874
  (visible) => {
6580
6875
  if (alwaysVisible) {
6581
6876
  return;
@@ -6584,10 +6879,10 @@ var SearchAndFilterProvider = ({
6584
6879
  },
6585
6880
  [alwaysVisible]
6586
6881
  );
6587
- const handleAddFilter = (0, import_react64.useCallback)(() => {
6882
+ const handleAddFilter = (0, import_react71.useCallback)(() => {
6588
6883
  onChange([...filters, { field: "", operator: "", value: "" }]);
6589
6884
  }, [filters, onChange]);
6590
- const handleResetFilters = (0, import_react64.useCallback)(() => {
6885
+ const handleResetFilters = (0, import_react71.useCallback)(() => {
6591
6886
  setSearchTerm("");
6592
6887
  if (onResetFilterValues) {
6593
6888
  return onResetFilterValues();
@@ -6595,20 +6890,20 @@ var SearchAndFilterProvider = ({
6595
6890
  onSearchChange == null ? void 0 : onSearchChange("");
6596
6891
  onChange(resetFilterValues);
6597
6892
  }, [onChange, resetFilterValues, onSearchChange, onResetFilterValues]);
6598
- const handleDeleteFilter = (0, import_react64.useCallback)(
6893
+ const handleDeleteFilter = (0, import_react71.useCallback)(
6599
6894
  (index) => {
6600
6895
  const remainingFilters = filters.filter((_, i) => i !== index);
6601
6896
  onChange(remainingFilters);
6602
6897
  },
6603
6898
  [filters, onChange]
6604
6899
  );
6605
- const validFilterQuery = (0, import_react64.useMemo)(() => {
6900
+ const validFilterQuery = (0, import_react71.useMemo)(() => {
6606
6901
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
6607
6902
  if (hasValidFilters) {
6608
6903
  return filters;
6609
6904
  }
6610
6905
  }, [filters]);
6611
- (0, import_react64.useEffect)(() => {
6906
+ (0, import_react71.useEffect)(() => {
6612
6907
  if (filterVisibility) {
6613
6908
  const handleEscKeyFilterClose = (e) => {
6614
6909
  if (e.key === "Escape") {
@@ -6621,7 +6916,7 @@ var SearchAndFilterProvider = ({
6621
6916
  };
6622
6917
  }
6623
6918
  }, [filterVisibility, handleToggleFilterVisibility]);
6624
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
6919
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6625
6920
  SearchAndFilterContext.Provider,
6626
6921
  {
6627
6922
  value: {
@@ -6641,17 +6936,17 @@ var SearchAndFilterProvider = ({
6641
6936
  filterMapper: filterMapper2,
6642
6937
  allowBindingSearchTerm
6643
6938
  },
6644
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_design_system43.VerticalRhythm, { children })
6939
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_design_system44.VerticalRhythm, { children })
6645
6940
  }
6646
6941
  );
6647
6942
  };
6648
6943
  var useSearchAndFilter = () => {
6649
- const value = (0, import_react64.useContext)(SearchAndFilterContext);
6944
+ const value = (0, import_react71.useContext)(SearchAndFilterContext);
6650
6945
  return { ...value };
6651
6946
  };
6652
6947
 
6653
6948
  // src/components/SearchAndFilter/FilterControls.tsx
6654
- var import_jsx_runtime73 = require("@emotion/react/jsx-runtime");
6949
+ var import_jsx_runtime75 = require("@emotion/react/jsx-runtime");
6655
6950
  var FilterControls = ({
6656
6951
  children,
6657
6952
  hideSearchInput
@@ -6664,10 +6959,10 @@ var FilterControls = ({
6664
6959
  searchTerm,
6665
6960
  allowBindingSearchTerm
6666
6961
  } = useSearchAndFilter();
6667
- const editorRef = (0, import_react65.useRef)(null);
6962
+ const editorRef = (0, import_react72.useRef)(null);
6668
6963
  const variableRefernceCountInSearchTerm = (0, import_canvas10.hasReferencedVariables)(searchTerm);
6669
- const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react65.useState)("data-resource-search-term-input");
6670
- const [localSearchTerm, setLocalSearchTerm] = (0, import_react65.useState)(searchTerm);
6964
+ const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react72.useState)("data-resource-search-term-input");
6965
+ const [localSearchTerm, setLocalSearchTerm] = (0, import_react72.useState)(searchTerm);
6671
6966
  (0, import_react_use7.useDebounce)(
6672
6967
  () => {
6673
6968
  if (localSearchTerm !== searchTerm) {
@@ -6677,14 +6972,14 @@ var FilterControls = ({
6677
6972
  300,
6678
6973
  [localSearchTerm]
6679
6974
  );
6680
- (0, import_react65.useEffect)(() => {
6975
+ (0, import_react72.useEffect)(() => {
6681
6976
  if (searchTerm === "") {
6682
6977
  setLocalSearchTerm("");
6683
6978
  setIdToResetInputVariables(`data-resource-search-term-input-${(0, import_uuid2.v4)()}`);
6684
6979
  }
6685
6980
  }, [searchTerm]);
6686
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
6687
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6981
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx_runtime75.Fragment, { children: [
6982
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6688
6983
  FilterButton2,
6689
6984
  {
6690
6985
  "aria-controls": "search-and-filter-options",
@@ -6697,8 +6992,8 @@ var FilterControls = ({
6697
6992
  dataTestId: "filters-button"
6698
6993
  }
6699
6994
  ),
6700
- hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6701
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6995
+ hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { css: BindableKeywordSearchInputStyles, "data-testid": "search-container", children: [
6996
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6702
6997
  InputVariables,
6703
6998
  {
6704
6999
  label: "",
@@ -6708,8 +7003,8 @@ var FilterControls = ({
6708
7003
  value: localSearchTerm,
6709
7004
  onChange: (value) => setLocalSearchTerm(value != null ? value : ""),
6710
7005
  disableVariables: !allowBindingSearchTerm,
6711
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6712
- import_design_system44.InputKeywordSearch,
7006
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7007
+ import_design_system45.InputKeywordSearch,
6713
7008
  {
6714
7009
  placeholder: "Search...",
6715
7010
  onSearchTextChanged: (e) => setLocalSearchTerm(e),
@@ -6727,7 +7022,7 @@ var FilterControls = ({
6727
7022
  )
6728
7023
  }
6729
7024
  ),
6730
- variableRefernceCountInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
7025
+ variableRefernceCountInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6731
7026
  "button",
6732
7027
  {
6733
7028
  css: ClearSearchButtonStyles,
@@ -6741,7 +7036,7 @@ var FilterControls = ({
6741
7036
  },
6742
7037
  type: "button",
6743
7038
  "data-testid": "keyword-search-clear-button",
6744
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_design_system44.Icon, { icon: import_CgClose.CgClose, iconColor: "red", size: "1rem" })
7039
+ children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_design_system45.Icon, { icon: import_CgClose.CgClose, iconColor: "red", size: "1rem" })
6745
7040
  }
6746
7041
  ) }) : null
6747
7042
  ] }),
@@ -6751,8 +7046,8 @@ var FilterControls = ({
6751
7046
 
6752
7047
  // src/components/SearchAndFilter/FilterItem.tsx
6753
7048
  var import_CgTrash2 = require("@react-icons/all-files/cg/CgTrash");
6754
- var import_design_system45 = require("@uniformdev/design-system");
6755
- var import_react66 = require("react");
7049
+ var import_design_system46 = require("@uniformdev/design-system");
7050
+ var import_react73 = require("react");
6756
7051
 
6757
7052
  // src/components/SearchAndFilter/util/isFilterBindable.ts
6758
7053
  function isFilterBindable(filter, operator) {
@@ -6761,7 +7056,7 @@ function isFilterBindable(filter, operator) {
6761
7056
  }
6762
7057
 
6763
7058
  // src/components/SearchAndFilter/FilterItem.tsx
6764
- var import_jsx_runtime74 = require("@emotion/react/jsx-runtime");
7059
+ var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
6765
7060
  var FilterItem = ({
6766
7061
  index,
6767
7062
  operatorOptions,
@@ -6780,7 +7075,7 @@ var FilterItem = ({
6780
7075
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
6781
7076
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
6782
7077
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
6783
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react66.useMemo)(() => {
7078
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react73.useMemo)(() => {
6784
7079
  var _a2;
6785
7080
  const currentSelectedFilterGroup = filterOptions.find((item) => {
6786
7081
  var _a3;
@@ -6810,11 +7105,11 @@ var FilterItem = ({
6810
7105
  } : {};
6811
7106
  const CustomLeftHandComponent = selectedFieldValue == null ? void 0 : selectedFieldValue.leftHandSideComponentWhenSelected;
6812
7107
  const isEmptyOperator = metaDataPossibleOptions === "empty";
6813
- const joinLabel = index === 0 ? initialCriteriaTitle : index === 1 && onCriteriaGroupOperatorChange ? /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
6814
- import_design_system45.Menu,
7108
+ const joinLabel = index === 0 ? initialCriteriaTitle : index === 1 && onCriteriaGroupOperatorChange ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7109
+ import_design_system46.Menu,
6815
7110
  {
6816
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6817
- import_design_system45.DropdownStyleMenuTrigger,
7111
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7112
+ import_design_system46.DropdownStyleMenuTrigger,
6818
7113
  {
6819
7114
  bgColor: "transparent",
6820
7115
  css: CriteriaGroupOperatorTrigger,
@@ -6826,8 +7121,8 @@ var FilterItem = ({
6826
7121
  size: "small",
6827
7122
  placement: "bottom-start",
6828
7123
  children: [
6829
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6830
- import_design_system45.SelectableMenuItem,
7124
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7125
+ import_design_system46.SelectableMenuItem,
6831
7126
  {
6832
7127
  selected: criteriaGroupOperator === "and",
6833
7128
  onClick: () => onCriteriaGroupOperatorChange("and"),
@@ -6835,8 +7130,8 @@ var FilterItem = ({
6835
7130
  children: "and"
6836
7131
  }
6837
7132
  ),
6838
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6839
- import_design_system45.SelectableMenuItem,
7133
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7134
+ import_design_system46.SelectableMenuItem,
6840
7135
  {
6841
7136
  selected: criteriaGroupOperator === "or",
6842
7137
  onClick: () => onCriteriaGroupOperatorChange("or"),
@@ -6847,10 +7142,10 @@ var FilterItem = ({
6847
7142
  ]
6848
7143
  }
6849
7144
  ) : criteriaGroupOperator;
6850
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
6851
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: joinLabel }),
6852
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
6853
- CustomLeftHandComponent ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7145
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
7146
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { children: joinLabel }),
7147
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { css: [ConditionalInputRow, isEmptyOperator ? ConditionalInputRowEmpty : null], children: [
7148
+ CustomLeftHandComponent ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6854
7149
  CustomLeftHandComponent,
6855
7150
  {
6856
7151
  filterOption: selectedFieldValue,
@@ -6860,8 +7155,8 @@ var FilterItem = ({
6860
7155
  onFilterOptionChange("");
6861
7156
  }
6862
7157
  }
6863
- ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6864
- import_design_system45.InputComboBox,
7158
+ ) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7159
+ import_design_system46.InputComboBox,
6865
7160
  {
6866
7161
  "aria-label": label,
6867
7162
  options: filterOptions,
@@ -6887,8 +7182,8 @@ var FilterItem = ({
6887
7182
  name: `filter-field-${index}`
6888
7183
  }
6889
7184
  ),
6890
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6891
- import_design_system45.InputComboBox,
7185
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7186
+ import_design_system46.InputComboBox,
6892
7187
  {
6893
7188
  "aria-label": operatorLabel,
6894
7189
  options: operatorOptions,
@@ -6911,7 +7206,7 @@ var FilterItem = ({
6911
7206
  name: `filter-operator-${index}`
6912
7207
  }
6913
7208
  ),
6914
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7209
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6915
7210
  FilterEditorRenderer,
6916
7211
  {
6917
7212
  "aria-label": metaDataLabel,
@@ -6926,7 +7221,7 @@ var FilterItem = ({
6926
7221
  filterFieldName: filters[index].field
6927
7222
  }
6928
7223
  ),
6929
- readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
7224
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6930
7225
  "button",
6931
7226
  {
6932
7227
  type: "button",
@@ -6935,7 +7230,7 @@ var FilterItem = ({
6935
7230
  css: IconBtn,
6936
7231
  "data-testid": "delete-filter",
6937
7232
  disabled: filters.length === 1,
6938
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_design_system45.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
7233
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_design_system46.Icon, { icon: import_CgTrash2.CgTrash, iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
6939
7234
  }
6940
7235
  )
6941
7236
  ] })
@@ -6944,21 +7239,21 @@ var FilterItem = ({
6944
7239
 
6945
7240
  // src/components/SearchAndFilter/FilterItems.tsx
6946
7241
  var import_CgMathPlus = require("@react-icons/all-files/cg/CgMathPlus");
6947
- var import_design_system47 = require("@uniformdev/design-system");
7242
+ var import_design_system48 = require("@uniformdev/design-system");
6948
7243
 
6949
7244
  // src/components/SearchAndFilter/FilterMenu.tsx
6950
- var import_design_system46 = require("@uniformdev/design-system");
6951
- var import_react67 = __toESM(require("react"));
6952
- var import_jsx_runtime75 = require("@emotion/react/jsx-runtime");
7245
+ var import_design_system47 = require("@uniformdev/design-system");
7246
+ var import_react74 = __toESM(require("react"));
7247
+ var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
6953
7248
  var SearchAndFilterOptionsContainer2 = ({
6954
7249
  buttonRow,
6955
7250
  additionalFiltersContainer,
6956
7251
  children
6957
7252
  }) => {
6958
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
6959
- /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
6960
- buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6961
- import_design_system46.HorizontalRhythm,
7253
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
7254
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
7255
+ buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7256
+ import_design_system47.HorizontalRhythm,
6962
7257
  {
6963
7258
  css: SearchAndFilterButtonGroup,
6964
7259
  gap: "sm",
@@ -6967,7 +7262,7 @@ var SearchAndFilterOptionsContainer2 = ({
6967
7262
  children: buttonRow
6968
7263
  }
6969
7264
  ) : null,
6970
- additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
7265
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
6971
7266
  ] });
6972
7267
  };
6973
7268
  var FilterMenu = ({
@@ -6980,22 +7275,22 @@ var FilterMenu = ({
6980
7275
  resetButtonText = "reset"
6981
7276
  }) => {
6982
7277
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
6983
- const innerMenuRef = import_react67.default.useRef(null);
6984
- (0, import_react67.useEffect)(() => {
7278
+ const innerMenuRef = import_react74.default.useRef(null);
7279
+ (0, import_react74.useEffect)(() => {
6985
7280
  var _a;
6986
7281
  if (filterVisibility) {
6987
7282
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
6988
7283
  }
6989
7284
  }, [filterVisibility]);
6990
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_design_system46.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
7285
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system47.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
6991
7286
  SearchAndFilterOptionsContainer2,
6992
7287
  {
6993
7288
  buttonRow: menuControls,
6994
7289
  additionalFiltersContainer,
6995
7290
  children: [
6996
- /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_design_system46.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
6997
- filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
6998
- (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
7291
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system47.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
7292
+ filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
7293
+ (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
6999
7294
  "button",
7000
7295
  {
7001
7296
  type: "button",
@@ -7106,7 +7401,7 @@ function hasBindings(currentValue) {
7106
7401
  }
7107
7402
 
7108
7403
  // src/components/SearchAndFilter/FilterItems.tsx
7109
- var import_jsx_runtime76 = require("@emotion/react/jsx-runtime");
7404
+ var import_jsx_runtime78 = require("@emotion/react/jsx-runtime");
7110
7405
  var FilterItems = ({
7111
7406
  addButtonText = "add condition",
7112
7407
  additionalFiltersContainer,
@@ -7144,12 +7439,12 @@ var FilterItems = ({
7144
7439
  }
7145
7440
  setFilters(next);
7146
7441
  };
7147
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7442
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7148
7443
  FilterMenu,
7149
7444
  {
7150
7445
  id: "search-and-filter-options",
7151
7446
  dataTestId: "search-and-filter-options",
7152
- menuControls: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
7447
+ menuControls: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
7153
7448
  "button",
7154
7449
  {
7155
7450
  type: "button",
@@ -7157,7 +7452,7 @@ var FilterItems = ({
7157
7452
  onClick: handleAddFilter,
7158
7453
  "data-testid": "add-filter",
7159
7454
  children: [
7160
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_design_system47.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7455
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_design_system48.Icon, { icon: import_CgMathPlus.CgMathPlus, iconColor: "currentColor", size: "1rem" }),
7161
7456
  addButtonText
7162
7457
  ]
7163
7458
  }
@@ -7173,7 +7468,7 @@ var FilterItems = ({
7173
7468
  })) == null ? void 0 : _a.options) != null ? _b : [];
7174
7469
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
7175
7470
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
7176
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
7471
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7177
7472
  FilterItem,
7178
7473
  {
7179
7474
  index: i,
@@ -7195,11 +7490,11 @@ var FilterItems = ({
7195
7490
  };
7196
7491
 
7197
7492
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7198
- var import_design_system49 = require("@uniformdev/design-system");
7493
+ var import_design_system50 = require("@uniformdev/design-system");
7199
7494
 
7200
7495
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
7201
- var import_design_system48 = require("@uniformdev/design-system");
7202
- var import_jsx_runtime77 = require("@emotion/react/jsx-runtime");
7496
+ var import_design_system49 = require("@uniformdev/design-system");
7497
+ var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
7203
7498
  var SearchAndFilterResultContainer = ({
7204
7499
  buttonText,
7205
7500
  clearButtonLabel = "clear",
@@ -7250,19 +7545,19 @@ var SearchAndFilterResultContainer = ({
7250
7545
  handleResetFilters();
7251
7546
  }
7252
7547
  };
7253
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
7254
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system48.HorizontalRhythm, { children: [
7255
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { children: [
7548
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
7549
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.HorizontalRhythm, { children: [
7550
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { children: [
7256
7551
  totalResults,
7257
7552
  " results ",
7258
7553
  searchTerm ? `for "${searchTerm}"` : null
7259
7554
  ] }),
7260
- !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system48.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7555
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
7261
7556
  ] }),
7262
- totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_design_system48.Callout, { title: automateCalloutTitle, type: "note", children: [
7263
- calloutText ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_design_system48.Paragraph, { children: calloutText }) : null,
7264
- hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7265
- import_design_system48.Button,
7557
+ totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_design_system49.Callout, { title: automateCalloutTitle, type: "note", children: [
7558
+ calloutText ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_design_system49.Paragraph, { children: calloutText }) : null,
7559
+ hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7560
+ import_design_system49.Button,
7266
7561
  {
7267
7562
  buttonType: "tertiaryOutline",
7268
7563
  size: "xs",
@@ -7276,14 +7571,14 @@ var SearchAndFilterResultContainer = ({
7276
7571
  };
7277
7572
 
7278
7573
  // src/components/SearchAndFilter/SearchAndFilter.tsx
7279
- var import_jsx_runtime78 = require("@emotion/react/jsx-runtime");
7574
+ var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
7280
7575
  var SearchAndFilter = ({
7281
7576
  filters,
7282
7577
  filterOptions,
7283
7578
  filterVisible,
7284
7579
  filterControls,
7285
7580
  viewSwitchControls,
7286
- resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(SearchAndFilterResultContainer, {}),
7581
+ resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SearchAndFilterResultContainer, {}),
7287
7582
  filterMapper: filterMapper2 = filterMapper,
7288
7583
  additionalFiltersContainer,
7289
7584
  onChange,
@@ -7295,7 +7590,7 @@ var SearchAndFilter = ({
7295
7590
  resetFilterValues = [],
7296
7591
  onResetFilterValues
7297
7592
  }) => {
7298
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7593
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7299
7594
  SearchAndFilterProvider,
7300
7595
  {
7301
7596
  filters,
@@ -7310,18 +7605,18 @@ var SearchAndFilter = ({
7310
7605
  filterMapper: filterMapper2,
7311
7606
  allowBindingSearchTerm,
7312
7607
  onResetFilterValues,
7313
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_design_system49.VerticalRhythm, { "data-testid": "search-and-filter", children: [
7314
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7315
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7608
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_design_system50.VerticalRhythm, { "data-testid": "search-and-filter", children: [
7609
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
7610
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7316
7611
  "div",
7317
7612
  {
7318
7613
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
7319
- children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7614
+ children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
7320
7615
  }
7321
7616
  ),
7322
7617
  viewSwitchControls
7323
7618
  ] }),
7324
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FilterItems, { additionalFiltersContainer }),
7619
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FilterItems, { additionalFiltersContainer }),
7325
7620
  resultsContainerView
7326
7621
  ] })
7327
7622
  }
@@ -7329,18 +7624,18 @@ var SearchAndFilter = ({
7329
7624
  };
7330
7625
 
7331
7626
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
7332
- var import_design_system50 = require("@uniformdev/design-system");
7333
- var import_react68 = require("react");
7627
+ var import_design_system51 = require("@uniformdev/design-system");
7628
+ var import_react75 = require("react");
7334
7629
  var import_react_use8 = require("react-use");
7335
- var import_jsx_runtime79 = require("@emotion/react/jsx-runtime");
7336
- var SearchOnlyContext = (0, import_react68.createContext)({
7630
+ var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
7631
+ var SearchOnlyContext = (0, import_react75.createContext)({
7337
7632
  searchTerm: "",
7338
7633
  setSearchTerm: () => {
7339
7634
  }
7340
7635
  });
7341
7636
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7342
7637
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
7343
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react68.useState)("");
7638
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react75.useState)("");
7344
7639
  (0, import_react_use8.useDebounce)(
7345
7640
  () => {
7346
7641
  setSearchTerm(localeSearchTerm);
@@ -7349,15 +7644,15 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7349
7644
  300,
7350
7645
  [localeSearchTerm]
7351
7646
  );
7352
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7647
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7353
7648
  SearchOnlyContext.Provider,
7354
7649
  {
7355
7650
  value: {
7356
7651
  searchTerm,
7357
7652
  setSearchTerm: setLocaleSearchTerm
7358
7653
  },
7359
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7360
- import_design_system50.InputKeywordSearch,
7654
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7655
+ import_design_system51.InputKeywordSearch,
7361
7656
  {
7362
7657
  placeholder: "Search...",
7363
7658
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -7371,18 +7666,18 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
7371
7666
  };
7372
7667
 
7373
7668
  // src/components/SearchAndFilter/SortItems.tsx
7374
- var import_design_system52 = require("@uniformdev/design-system");
7669
+ var import_design_system53 = require("@uniformdev/design-system");
7375
7670
 
7376
7671
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
7377
- var import_react69 = require("@emotion/react");
7378
- var import_design_system51 = require("@uniformdev/design-system");
7379
- var ConditionalFilterRow2 = import_react69.css`
7672
+ var import_react76 = require("@emotion/react");
7673
+ var import_design_system52 = require("@uniformdev/design-system");
7674
+ var ConditionalFilterRow2 = import_react76.css`
7380
7675
  display: grid;
7381
7676
  grid-template-columns: 35px 1fr;
7382
7677
  gap: var(--spacing-sm);
7383
7678
  margin-left: var(--spacing-base);
7384
7679
 
7385
- ${(0, import_design_system51.cq)("380px")} {
7680
+ ${(0, import_design_system52.cq)("380px")} {
7386
7681
  align-items: center;
7387
7682
 
7388
7683
  &:after {
@@ -7403,22 +7698,22 @@ var ConditionalFilterRow2 = import_react69.css`
7403
7698
  grid-template-columns: 50px 1fr;
7404
7699
  }
7405
7700
 
7406
- ${(0, import_design_system51.cq)("580px")} {
7701
+ ${(0, import_design_system52.cq)("580px")} {
7407
7702
  &:after {
7408
7703
  display: none;
7409
7704
  }
7410
7705
  }
7411
7706
 
7412
7707
  @media (prefers-reduced-motion: no-preference) {
7413
- animation: ${import_design_system51.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
7708
+ animation: ${import_design_system52.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
7414
7709
  }
7415
7710
  `;
7416
- var ConditionalInputRow2 = import_react69.css`
7711
+ var ConditionalInputRow2 = import_react76.css`
7417
7712
  display: flex;
7418
7713
  gap: var(--spacing-sm);
7419
7714
  flex-wrap: wrap;
7420
7715
 
7421
- ${(0, import_design_system51.cq)("380px")} {
7716
+ ${(0, import_design_system52.cq)("380px")} {
7422
7717
  & > div:nth-child(-n + 2) {
7423
7718
  width: calc(50% - var(--spacing-sm));
7424
7719
  }
@@ -7427,7 +7722,7 @@ var ConditionalInputRow2 = import_react69.css`
7427
7722
  width: calc(100% - 48px);
7428
7723
  }
7429
7724
  }
7430
- ${(0, import_design_system51.cq)("580px")} {
7725
+ ${(0, import_design_system52.cq)("580px")} {
7431
7726
  display: grid;
7432
7727
  grid-template-columns: 200px 160px 1fr 32px;
7433
7728
 
@@ -7436,13 +7731,13 @@ var ConditionalInputRow2 = import_react69.css`
7436
7731
  }
7437
7732
  }
7438
7733
  `;
7439
- var SearchInput2 = import_react69.css`
7734
+ var SearchInput2 = import_react76.css`
7440
7735
  && {
7441
7736
  max-height: 40px;
7442
7737
  min-height: unset;
7443
7738
  }
7444
7739
  `;
7445
- var FilterButton3 = import_react69.css`
7740
+ var FilterButton3 = import_react76.css`
7446
7741
  align-items: center;
7447
7742
  background: var(--white);
7448
7743
  border: 1px solid var(--gray-300);
@@ -7479,13 +7774,13 @@ var FilterButton3 = import_react69.css`
7479
7774
  opacity: var(--opacity-50);
7480
7775
  }
7481
7776
  `;
7482
- var FilterButtonText2 = import_react69.css`
7777
+ var FilterButtonText2 = import_react76.css`
7483
7778
  overflow: hidden;
7484
7779
  text-overflow: ellipsis;
7485
7780
  white-space: nowrap;
7486
7781
  max-width: 14ch;
7487
7782
  `;
7488
- var FilterButtonSelected2 = import_react69.css`
7783
+ var FilterButtonSelected2 = import_react76.css`
7489
7784
  background: var(--gray-100);
7490
7785
  border-color: var(--gray-300);
7491
7786
 
@@ -7493,7 +7788,7 @@ var FilterButtonSelected2 = import_react69.css`
7493
7788
  color: var(--accent-dark);
7494
7789
  }
7495
7790
  `;
7496
- var FilterButtonWithOptions2 = import_react69.css`
7791
+ var FilterButtonWithOptions2 = import_react76.css`
7497
7792
  :where([aria-expanded='true']) {
7498
7793
  background: var(--purple-rain-100);
7499
7794
  border-color: var(--accent-light);
@@ -7505,14 +7800,14 @@ var FilterButtonWithOptions2 = import_react69.css`
7505
7800
  }
7506
7801
  }
7507
7802
  `;
7508
- var SearchIcon2 = import_react69.css`
7803
+ var SearchIcon2 = import_react76.css`
7509
7804
  color: var(--icon-color);
7510
7805
  position: absolute;
7511
7806
  inset: 0 var(--spacing-base) 0 auto;
7512
7807
  margin: auto;
7513
7808
  transition: color var(--duration-fast) var(--timing-ease-out);
7514
7809
  `;
7515
- var AddConditionalBtn2 = import_react69.css`
7810
+ var AddConditionalBtn2 = import_react76.css`
7516
7811
  align-items: center;
7517
7812
  background: transparent;
7518
7813
  border: none;
@@ -7531,14 +7826,14 @@ var AddConditionalBtn2 = import_react69.css`
7531
7826
  color: var(--gray-400);
7532
7827
  }
7533
7828
  `;
7534
- var Title2 = import_react69.css`
7829
+ var Title2 = import_react76.css`
7535
7830
  color: var(--typography-light);
7536
7831
 
7537
7832
  &:focus {
7538
7833
  outline: none;
7539
7834
  }
7540
7835
  `;
7541
- var ResetConditionsBtn2 = import_react69.css`
7836
+ var ResetConditionsBtn2 = import_react76.css`
7542
7837
  background: transparent;
7543
7838
  border: none;
7544
7839
  color: var(--action-destructive-default);
@@ -7550,12 +7845,12 @@ var ResetConditionsBtn2 = import_react69.css`
7550
7845
  color: var(--action-destructive-hover);
7551
7846
  }
7552
7847
  `;
7553
- var IconBtn2 = import_react69.css`
7848
+ var IconBtn2 = import_react76.css`
7554
7849
  background: transparent;
7555
7850
  border: none;
7556
7851
  padding: var(--spacing-sm);
7557
7852
  `;
7558
- var SearchAndFilterOptionsContainer3 = import_react69.css`
7853
+ var SearchAndFilterOptionsContainer3 = import_react76.css`
7559
7854
  background: var(--gray-50);
7560
7855
  border: 1px solid var(--gray-300);
7561
7856
  border-radius: var(--rounded-base);
@@ -7568,34 +7863,34 @@ var SearchAndFilterOptionsContainer3 = import_react69.css`
7568
7863
  position: relative;
7569
7864
  z-index: 1;
7570
7865
  `;
7571
- var SearchAndFilterOptionsInnerContainer2 = import_react69.css`
7866
+ var SearchAndFilterOptionsInnerContainer2 = import_react76.css`
7572
7867
  display: flex;
7573
7868
  flex-direction: column;
7574
7869
  gap: var(--spacing-sm);
7575
7870
  padding-inline: var(--spacing-md);
7576
7871
  `;
7577
- var SearchAndFilterButtonGroup2 = import_react69.css`
7872
+ var SearchAndFilterButtonGroup2 = import_react76.css`
7578
7873
  margin-top: var(--spacing-xs);
7579
7874
  margin-left: calc(56px + var(--spacing-md));
7580
7875
  `;
7581
- var SortFilterWrapper = (hiddenLocaleInput) => import_react69.css`
7876
+ var SortFilterWrapper = (hiddenLocaleInput) => import_react76.css`
7582
7877
  align-items: center;
7583
7878
  display: flex;
7584
7879
  gap: var(--spacing-base);
7585
7880
  flex-grow: 1;
7586
7881
 
7587
- ${(0, import_design_system51.cq)("420px")} {
7882
+ ${(0, import_design_system52.cq)("420px")} {
7588
7883
  display: grid;
7589
7884
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
7590
7885
  }
7591
7886
  `;
7592
- var SortFilterInputRow = import_react69.css`
7887
+ var SortFilterInputRow = import_react76.css`
7593
7888
  align-items: center;
7594
7889
  display: grid;
7595
7890
  grid-template-columns: 1fr auto;
7596
7891
  gap: var(--spacing-base);
7597
7892
  `;
7598
- var InputVariableWrapper = import_react69.css`
7893
+ var InputVariableWrapper = import_react76.css`
7599
7894
  flex-grow: 1;
7600
7895
 
7601
7896
  // we need to override label styles nested within the input variable
@@ -7606,7 +7901,7 @@ var InputVariableWrapper = import_react69.css`
7606
7901
  `;
7607
7902
 
7608
7903
  // src/components/SearchAndFilter/SortItems.tsx
7609
- var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
7904
+ var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
7610
7905
  var SortItems = ({
7611
7906
  sortByLabel = "Sort by",
7612
7907
  localeLabel = "Show locale",
@@ -7628,11 +7923,11 @@ var SortItems = ({
7628
7923
  return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
7629
7924
  })) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
7630
7925
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
7631
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7632
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_design_system52.VerticalRhythm, { gap: "xs", children: [
7633
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { css: Title2, children: sortByLabel }),
7634
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { css: SortFilterInputRow, children: [
7635
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7926
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
7927
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_design_system53.VerticalRhythm, { gap: "xs", children: [
7928
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { css: Title2, children: sortByLabel }),
7929
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { css: SortFilterInputRow, children: [
7930
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7636
7931
  InputVariables,
7637
7932
  {
7638
7933
  disableInlineMenu: disableSortBinding,
@@ -7640,8 +7935,8 @@ var SortItems = ({
7640
7935
  value: sortField,
7641
7936
  valueToResetTo: "created_at",
7642
7937
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
7643
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7644
- import_design_system52.InputComboBox,
7938
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7939
+ import_design_system53.InputComboBox,
7645
7940
  {
7646
7941
  id: "sort-by-field",
7647
7942
  "aria-label": "Sort by",
@@ -7663,7 +7958,7 @@ var SortItems = ({
7663
7958
  )
7664
7959
  }
7665
7960
  ),
7666
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7961
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7667
7962
  InputVariables,
7668
7963
  {
7669
7964
  disableInlineMenu: disableSortBinding,
@@ -7671,8 +7966,8 @@ var SortItems = ({
7671
7966
  valueToResetTo: "DESC",
7672
7967
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
7673
7968
  onChange: (e) => onSortChange(`${sortField}_${e}`),
7674
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7675
- import_design_system52.SegmentedControl,
7969
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7970
+ import_design_system53.SegmentedControl,
7676
7971
  {
7677
7972
  noCheckmark: true,
7678
7973
  name: "sortBy",
@@ -7703,15 +7998,15 @@ var SortItems = ({
7703
7998
  )
7704
7999
  ] })
7705
8000
  ] }),
7706
- hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system52.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8001
+ hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system53.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7707
8002
  InputVariables,
7708
8003
  {
7709
8004
  label: localeLabelValue,
7710
8005
  value: localeValue,
7711
8006
  showMenuPosition: "inline-right",
7712
8007
  onChange: (e) => onLocaleChange(e != null ? e : ""),
7713
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7714
- import_design_system52.InputSelect,
8008
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8009
+ import_design_system53.InputSelect,
7715
8010
  {
7716
8011
  name: "localeReturned",
7717
8012
  "aria-label": localeLabelValue,
@@ -7741,7 +8036,7 @@ function createLocationValidator(setValue, validate) {
7741
8036
 
7742
8037
  // src/utils/useContentDataResourceLocaleInfo.ts
7743
8038
  var import_canvas12 = require("@uniformdev/canvas");
7744
- var import_react70 = require("react");
8039
+ var import_react77 = require("react");
7745
8040
  function useContentDataResourceLocaleInfo({
7746
8041
  locale,
7747
8042
  defaultLocale,
@@ -7749,12 +8044,12 @@ function useContentDataResourceLocaleInfo({
7749
8044
  dynamicInputs
7750
8045
  }) {
7751
8046
  var _a;
7752
- const setLocaleRef = (0, import_react70.useRef)(setLocale);
8047
+ const setLocaleRef = (0, import_react77.useRef)(setLocale);
7753
8048
  setLocaleRef.current = setLocale;
7754
8049
  const { flatVariables } = useVariables();
7755
8050
  const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas12.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas12.createVariableReference)(import_canvas12.LOCALE_DYNAMIC_INPUT_NAME) : defaultLocale != null ? defaultLocale : "";
7756
8051
  const boundLocale = (_a = (0, import_canvas12.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7757
- (0, import_react70.useEffect)(() => {
8052
+ (0, import_react77.useEffect)(() => {
7758
8053
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7759
8054
  setLocaleRef.current(effectiveLocale);
7760
8055
  }
@@ -7763,7 +8058,7 @@ function useContentDataResourceLocaleInfo({
7763
8058
  }
7764
8059
 
7765
8060
  // src/index.ts
7766
- var import_design_system53 = require("@uniformdev/design-system");
8061
+ var import_design_system54 = require("@uniformdev/design-system");
7767
8062
  __reExport(index_exports, require("@uniformdev/mesh-sdk"), module.exports);
7768
8063
  // Annotate the CommonJS export names for ESM import in node:
7769
8064
  0 && (module.exports = {
@@ -7785,6 +8080,10 @@ __reExport(index_exports, require("@uniformdev/mesh-sdk"), module.exports);
7785
8080
  DataTypeEditor,
7786
8081
  DateEditor,
7787
8082
  DateRangeEditor,
8083
+ DelegationContext,
8084
+ DelegationDisabledError,
8085
+ DelegationGate,
8086
+ DelegationProvider,
7788
8087
  DrawerContent,
7789
8088
  EDIT_VARIABLE_COMMAND,
7790
8089
  FilterButton,
@@ -7886,8 +8185,10 @@ __reExport(index_exports, require("@uniformdev/mesh-sdk"), module.exports);
7886
8185
  VariablesProvider,
7887
8186
  bindableFiltersMapper,
7888
8187
  convertConnectedDataToVariable,
8188
+ createDelegationFetch,
7889
8189
  createLocationValidator,
7890
8190
  filterMapper,
8191
+ isDelegationExpiredResponse,
7891
8192
  prettifyBindExpression,
7892
8193
  readOnlyAttributes,
7893
8194
  serializeVariablesEditorSerializedState,
@@ -7897,6 +8198,8 @@ __reExport(index_exports, require("@uniformdev/mesh-sdk"), module.exports);
7897
8198
  urlEncodeRequestUrl,
7898
8199
  useConnectedDataAsVariables,
7899
8200
  useContentDataResourceLocaleInfo,
8201
+ useDelegation,
8202
+ useDelegationFetch,
7900
8203
  useDynamicInputsAsVariables,
7901
8204
  useMeshLocation,
7902
8205
  useObjectSearchContext,