@uniformdev/mesh-sdk-react 19.159.1-alpha.16 → 19.159.1-alpha.27

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
@@ -33,10 +33,10 @@ var src_exports = {};
33
33
  __export(src_exports, {
34
34
  $createVariableNode: () => $createVariableNode,
35
35
  $isVariableNode: () => $isVariableNode,
36
- AddListButton: () => import_design_system63.AddListButton,
37
- Button: () => import_design_system63.Button,
36
+ AddListButton: () => import_design_system64.AddListButton,
37
+ Button: () => import_design_system64.Button,
38
38
  CHECKBOX_OPERATORS: () => CHECKBOX_OPERATORS,
39
- Callout: () => import_design_system63.Callout,
39
+ Callout: () => import_design_system64.Callout,
40
40
  ControlledValuePlugin: () => ControlledValuePlugin,
41
41
  DATE_OPERATORS: () => DATE_OPERATORS,
42
42
  DISCONNECT_VARIABLE_COMMAND: () => DISCONNECT_VARIABLE_COMMAND,
@@ -51,7 +51,7 @@ __export(src_exports, {
51
51
  DateRangeEditor: () => DateRangeEditor,
52
52
  DefaultSearchRow: () => DefaultSearchRow,
53
53
  DefaultSelectedItem: () => DefaultSelectedItem,
54
- DrawerContent: () => import_design_system63.DrawerContent,
54
+ DrawerContent: () => import_design_system64.DrawerContent,
55
55
  EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
56
56
  EntrySearch: () => EntrySearch,
57
57
  FilterButton: () => FilterButton2,
@@ -62,22 +62,22 @@ __export(src_exports, {
62
62
  FilterMenu: () => FilterMenu,
63
63
  FilterMultiChoiceEditor: () => FilterMultiChoiceEditor,
64
64
  FilterSingleChoiceEditor: () => FilterSingleChoiceEditor,
65
- Heading: () => import_design_system63.Heading,
65
+ Heading: () => import_design_system64.Heading,
66
66
  INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
67
67
  Icons: () => icons_exports,
68
- Input: () => import_design_system63.Input,
69
- InputComboBox: () => import_design_system63.InputComboBox,
70
- InputKeywordSearch: () => import_design_system63.InputKeywordSearch,
71
- InputSelect: () => import_design_system63.InputSelect,
72
- InputToggle: () => import_design_system63.InputToggle,
68
+ Input: () => import_design_system64.Input,
69
+ InputComboBox: () => import_design_system64.InputComboBox,
70
+ InputKeywordSearch: () => import_design_system64.InputKeywordSearch,
71
+ InputSelect: () => import_design_system64.InputSelect,
72
+ InputToggle: () => import_design_system64.InputToggle,
73
73
  InputVariables: () => InputVariables,
74
- Label: () => import_design_system63.Label,
74
+ Label: () => import_design_system64.Label,
75
75
  LinkButton: () => LinkButton,
76
- LoadingIndicator: () => import_design_system63.LoadingIndicator,
77
- LoadingOverlay: () => import_design_system63.LoadingOverlay,
76
+ LoadingIndicator: () => import_design_system64.LoadingIndicator,
77
+ LoadingOverlay: () => import_design_system64.LoadingOverlay,
78
78
  MULTI_SELECT_OPERATORS: () => MULTI_SELECT_OPERATORS,
79
- Menu: () => import_design_system63.Menu,
80
- MenuItem: () => import_design_system63.MenuItem,
79
+ Menu: () => import_design_system64.Menu,
80
+ MenuItem: () => import_design_system64.MenuItem,
81
81
  MeshApp: () => MeshApp,
82
82
  NUMBER_OPERATORS: () => NUMBER_OPERATORS,
83
83
  NumberEditor: () => NumberEditor,
@@ -95,22 +95,22 @@ __export(src_exports, {
95
95
  PUBLISH_STATUS_FIELD_OPERATORS: () => PUBLISH_STATUS_FIELD_OPERATORS,
96
96
  ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
97
97
  ParameterConnectionIndicator: () => ParameterConnectionIndicator,
98
- ParameterGroup: () => import_design_system63.ParameterGroup,
99
- ParameterImage: () => import_design_system63.ParameterImage,
100
- ParameterImageInner: () => import_design_system63.ParameterImageInner,
101
- ParameterInput: () => import_design_system63.ParameterInput,
102
- ParameterInputInner: () => import_design_system63.ParameterInputInner,
103
- ParameterLabel: () => import_design_system63.ParameterLabel,
104
- ParameterMenuButton: () => import_design_system63.ParameterMenuButton,
98
+ ParameterGroup: () => import_design_system64.ParameterGroup,
99
+ ParameterImage: () => import_design_system64.ParameterImage,
100
+ ParameterImageInner: () => import_design_system64.ParameterImageInner,
101
+ ParameterInput: () => import_design_system64.ParameterInput,
102
+ ParameterInputInner: () => import_design_system64.ParameterInputInner,
103
+ ParameterLabel: () => import_design_system64.ParameterLabel,
104
+ ParameterMenuButton: () => import_design_system64.ParameterMenuButton,
105
105
  ParameterOrSingleVariable: () => ParameterOrSingleVariable,
106
- ParameterSelect: () => import_design_system63.ParameterSelect,
107
- ParameterSelectInner: () => import_design_system63.ParameterSelectInner,
108
- ParameterShell: () => import_design_system63.ParameterShell,
106
+ ParameterSelect: () => import_design_system64.ParameterSelect,
107
+ ParameterSelectInner: () => import_design_system64.ParameterSelectInner,
108
+ ParameterShell: () => import_design_system64.ParameterShell,
109
109
  ParameterShellContext: () => import_design_system14.ParameterShellContext,
110
- ParameterTextarea: () => import_design_system63.ParameterTextarea,
111
- ParameterTextareaInner: () => import_design_system63.ParameterTextareaInner,
112
- ParameterToggle: () => import_design_system63.ParameterToggle,
113
- ParameterToggleInner: () => import_design_system63.ParameterToggleInner,
110
+ ParameterTextarea: () => import_design_system64.ParameterTextarea,
111
+ ParameterTextareaInner: () => import_design_system64.ParameterTextareaInner,
112
+ ParameterToggle: () => import_design_system64.ParameterToggle,
113
+ ParameterToggleInner: () => import_design_system64.ParameterToggleInner,
114
114
  ParameterVariables: () => ParameterVariables,
115
115
  ProductPreviewList: () => ProductPreviewList,
116
116
  ProductQuery: () => ProductQuery,
@@ -133,8 +133,8 @@ __export(src_exports, {
133
133
  SELECT_OPERATORS: () => SELECT_OPERATORS,
134
134
  SYSTEM_DATE_OPERATORS: () => SYSTEM_DATE_OPERATORS,
135
135
  SYSTEM_FIELD_OPERATORS: () => SYSTEM_FIELD_OPERATORS,
136
- ScrollableList: () => import_design_system63.ScrollableList,
137
- ScrollableListItem: () => import_design_system63.ScrollableListItem,
136
+ ScrollableList: () => import_design_system64.ScrollableList,
137
+ ScrollableListItem: () => import_design_system64.ScrollableListItem,
138
138
  SearchAndFilter: () => SearchAndFilter,
139
139
  SearchAndFilterContext: () => SearchAndFilterContext,
140
140
  SearchAndFilterOptionsContainer: () => SearchAndFilterOptionsContainer2,
@@ -146,12 +146,13 @@ __export(src_exports, {
146
146
  SortItems: () => SortItems,
147
147
  StatusMultiEditor: () => StatusMultiEditor,
148
148
  StatusSingleEditor: () => StatusSingleEditor,
149
- Switch: () => import_design_system63.Switch,
149
+ Switch: () => import_design_system64.Switch,
150
150
  TEXTBOX_OPERATORS: () => TEXTBOX_OPERATORS,
151
151
  TextEditor: () => TextEditor,
152
+ TextMultiChoiceEditor: () => TextMultiChoiceEditor,
152
153
  TextVariableRenderer: () => TextVariableRenderer,
153
- Textarea: () => import_design_system63.Textarea,
154
- Theme: () => import_design_system63.Theme,
154
+ Textarea: () => import_design_system64.Textarea,
155
+ Theme: () => import_design_system64.Theme,
155
156
  USER_OPERATORS: () => USER_OPERATORS,
156
157
  VariableEditor: () => VariableEditor,
157
158
  VariableNode: () => VariableNode,
@@ -247,7 +248,7 @@ __export(src_exports, {
247
248
  useVariableEditor: () => useVariableEditor,
248
249
  useVariables: () => useVariables,
249
250
  useVariablesMenu: () => useVariablesMenu,
250
- utilityColors: () => import_design_system63.utilityColors,
251
+ utilityColors: () => import_design_system64.utilityColors,
251
252
  variableDefaultTextValue: () => variableDefaultTextValue,
252
253
  variablePrefix: () => variablePrefix,
253
254
  variableSuffix: () => variableSuffix,
@@ -1893,8 +1894,7 @@ var EntrySearch = ({
1893
1894
  const handleCancelClick = (e) => {
1894
1895
  e.preventDefault();
1895
1896
  setListOpen(false);
1896
- if (onCancel)
1897
- onCancel();
1897
+ if (onCancel) onCancel();
1898
1898
  };
1899
1899
  const handleLoadMoreClick = () => {
1900
1900
  search(textInput, {
@@ -4881,8 +4881,7 @@ function VariablesComposer(props) {
4881
4881
  );
4882
4882
  const editorState = (0, import_react49.useRef)();
4883
4883
  const updateTimeout = (0, import_react49.useRef)();
4884
- if (typeof document === "undefined")
4885
- return null;
4884
+ if (typeof document === "undefined") return null;
4886
4885
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
4887
4886
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4888
4887
  import_LexicalOnChangePlugin.OnChangePlugin,
@@ -5335,7 +5334,7 @@ function ParameterOrSingleVariable(props) {
5335
5334
  editorRef ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EditorRefPlugin, { editorRef }) : null,
5336
5335
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ControlledValuePlugin, { enabled: true, value }),
5337
5336
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_design_system23.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
5338
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { css: { flex: 1 }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5337
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { css: { flex: 1, minWidth: "0" }, children: inputWhenNoVariables && !hadVariablesInValue ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5339
5338
  VariablesComposerInput,
5340
5339
  {
5341
5340
  "data-text-value": value,
@@ -8324,32 +8323,80 @@ var TextEditor = ({
8324
8323
  );
8325
8324
  };
8326
8325
 
8326
+ // src/components/SearchAndFilter/editors/TextMultiChoiceEditor.tsx
8327
+ var import_design_system52 = require("@uniformdev/design-system");
8328
+ var import_react85 = require("react");
8329
+ var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
8330
+ var TextMultiChoiceEditor = ({
8331
+ value,
8332
+ disabled,
8333
+ readOnly,
8334
+ valueTestId,
8335
+ ...props
8336
+ }) => {
8337
+ const readOnlyProps = readOnly ? readOnlyAttributes : {};
8338
+ const isClearable = !readOnly || !disabled;
8339
+ const { groupedOptions, selectedOptions } = (0, import_react85.useMemo)(() => {
8340
+ var _a;
8341
+ const coercedValue = typeof value === "string" ? [value] : value != null ? value : [];
8342
+ const options = (_a = coercedValue.map((v) => ({ label: v, value: v }))) != null ? _a : [];
8343
+ return (0, import_design_system52.convertComboBoxGroupsToSelectableGroups)({ options, selectedItems: new Set(value) });
8344
+ }, [value]);
8345
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "data-testid": valueTestId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
8346
+ import_design_system52.InputCreatableComboBox,
8347
+ {
8348
+ ...props,
8349
+ placeholder: "Type a value\u2026",
8350
+ noOptionsMessage: () => "Type to create a new value",
8351
+ options: groupedOptions,
8352
+ isMulti: true,
8353
+ isClearable,
8354
+ isDisabled: disabled,
8355
+ onChange: (e) => {
8356
+ const selectedValues = (0, import_design_system52.getComboBoxSelectedSelectableGroups)(e);
8357
+ return props.onChange([...selectedValues]);
8358
+ },
8359
+ value: selectedOptions,
8360
+ "aria-readonly": readOnly,
8361
+ styles: {
8362
+ menu(base) {
8363
+ return {
8364
+ ...base,
8365
+ minWidth: "max-content"
8366
+ };
8367
+ }
8368
+ },
8369
+ ...readOnlyProps
8370
+ }
8371
+ ) });
8372
+ };
8373
+
8327
8374
  // src/components/SearchAndFilter/FilterButton.tsx
8328
- var import_design_system53 = require("@uniformdev/design-system");
8375
+ var import_design_system54 = require("@uniformdev/design-system");
8329
8376
 
8330
8377
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
8331
- var import_react85 = require("@emotion/react");
8332
- var import_design_system52 = require("@uniformdev/design-system");
8333
- var SearchAndFilterControlsWrapper = (gridColumns) => import_react85.css`
8378
+ var import_react86 = require("@emotion/react");
8379
+ var import_design_system53 = require("@uniformdev/design-system");
8380
+ var SearchAndFilterControlsWrapper = (gridColumns) => import_react86.css`
8334
8381
  align-items: stretch;
8335
8382
  display: grid;
8336
8383
  grid-template-columns: ${gridColumns};
8337
8384
  gap: var(--spacing-sm);
8338
8385
  `;
8339
- var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react85.css`
8386
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react86.css`
8340
8387
  align-items: stretch;
8341
8388
  display: grid;
8342
8389
  grid-template-columns: ${gridColumns};
8343
8390
  gap: var(--spacing-sm);
8344
8391
  `;
8345
- var ConditionalFilterRow = import_react85.css`
8392
+ var ConditionalFilterRow = import_react86.css`
8346
8393
  align-items: baseline;
8347
8394
  display: grid;
8348
8395
  grid-template-columns: 35px 1fr;
8349
8396
  gap: var(--spacing-sm);
8350
8397
  margin-left: var(--spacing-base);
8351
8398
 
8352
- ${(0, import_design_system52.cq)("380px")} {
8399
+ ${(0, import_design_system53.cq)("380px")} {
8353
8400
  &:after {
8354
8401
  content: '';
8355
8402
  display: block;
@@ -8368,22 +8415,22 @@ var ConditionalFilterRow = import_react85.css`
8368
8415
  grid-template-columns: 50px 1fr;
8369
8416
  }
8370
8417
 
8371
- ${(0, import_design_system52.cq)("580px")} {
8418
+ ${(0, import_design_system53.cq)("580px")} {
8372
8419
  &:after {
8373
8420
  display: none;
8374
8421
  }
8375
8422
  }
8376
8423
 
8377
8424
  @media (prefers-reduced-motion: no-preference) {
8378
- animation: ${import_design_system52.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
8425
+ animation: ${import_design_system53.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
8379
8426
  }
8380
8427
  `;
8381
- var ConditionalInputRow = import_react85.css`
8428
+ var ConditionalInputRow = import_react86.css`
8382
8429
  display: flex;
8383
8430
  gap: var(--spacing-sm);
8384
8431
  flex-wrap: wrap;
8385
8432
 
8386
- ${(0, import_design_system52.cq)("380px")} {
8433
+ ${(0, import_design_system53.cq)("380px")} {
8387
8434
  & > div:nth-child(-n + 2) {
8388
8435
  width: calc(50% - var(--spacing-sm));
8389
8436
  }
@@ -8392,7 +8439,7 @@ var ConditionalInputRow = import_react85.css`
8392
8439
  width: calc(100% - 48px);
8393
8440
  }
8394
8441
  }
8395
- ${(0, import_design_system52.cq)("764px")} {
8442
+ ${(0, import_design_system53.cq)("764px")} {
8396
8443
  align-items: flex-start;
8397
8444
  display: grid;
8398
8445
  grid-template-columns: 200px 160px 1fr 32px;
@@ -8402,11 +8449,11 @@ var ConditionalInputRow = import_react85.css`
8402
8449
  }
8403
8450
  }
8404
8451
  `;
8405
- var SearchInput = import_react85.css`
8452
+ var SearchInput = import_react86.css`
8406
8453
  max-height: 40px;
8407
8454
  min-height: unset;
8408
8455
  `;
8409
- var BindableKeywordSearchInputStyles = import_react85.css`
8456
+ var BindableKeywordSearchInputStyles = import_react86.css`
8410
8457
  position: relative;
8411
8458
  width: 100%;
8412
8459
 
@@ -8421,19 +8468,19 @@ var BindableKeywordSearchInputStyles = import_react85.css`
8421
8468
  white-space: nowrap;
8422
8469
  }
8423
8470
  `;
8424
- var ClearSearchButtonContainer = import_react85.css`
8471
+ var ClearSearchButtonContainer = import_react86.css`
8425
8472
  align-items: center;
8426
8473
  display: flex;
8427
8474
  position: absolute;
8428
8475
  inset: 0 var(--spacing-lg) 0 auto;
8429
8476
  `;
8430
- var ClearSearchButtonStyles = import_react85.css`
8477
+ var ClearSearchButtonStyles = import_react86.css`
8431
8478
  background: none;
8432
8479
  border: none;
8433
8480
  padding: 0;
8434
8481
  pointer-events: all;
8435
8482
  `;
8436
- var FilterButton = import_react85.css`
8483
+ var FilterButton = import_react86.css`
8437
8484
  align-items: center;
8438
8485
  background: var(--white);
8439
8486
  border: 1px solid var(--gray-300);
@@ -8469,13 +8516,13 @@ var FilterButton = import_react85.css`
8469
8516
  opacity: var(--opacity-50);
8470
8517
  }
8471
8518
  `;
8472
- var FilterButtonText = import_react85.css`
8519
+ var FilterButtonText = import_react86.css`
8473
8520
  overflow: hidden;
8474
8521
  text-overflow: ellipsis;
8475
8522
  white-space: nowrap;
8476
8523
  max-width: 14ch;
8477
8524
  `;
8478
- var FilterButtonSelected = import_react85.css`
8525
+ var FilterButtonSelected = import_react86.css`
8479
8526
  background: var(--gray-100);
8480
8527
  border-color: var(--gray-300);
8481
8528
 
@@ -8483,7 +8530,7 @@ var FilterButtonSelected = import_react85.css`
8483
8530
  color: var(--accent-dark);
8484
8531
  }
8485
8532
  `;
8486
- var FilterButtonWithOptions = import_react85.css`
8533
+ var FilterButtonWithOptions = import_react86.css`
8487
8534
  :where([aria-expanded='true']) {
8488
8535
  background: var(--purple-rain-100);
8489
8536
  border-color: var(--accent-light);
@@ -8495,14 +8542,14 @@ var FilterButtonWithOptions = import_react85.css`
8495
8542
  }
8496
8543
  }
8497
8544
  `;
8498
- var SearchIcon = import_react85.css`
8545
+ var SearchIcon = import_react86.css`
8499
8546
  color: var(--icon-color);
8500
8547
  position: absolute;
8501
8548
  inset: 0 var(--spacing-base) 0 auto;
8502
8549
  margin: auto;
8503
8550
  transition: color var(--duration-fast) var(--timing-ease-out);
8504
8551
  `;
8505
- var AddConditionalBtn = import_react85.css`
8552
+ var AddConditionalBtn = import_react86.css`
8506
8553
  align-items: center;
8507
8554
  background: transparent;
8508
8555
  border: none;
@@ -8521,31 +8568,32 @@ var AddConditionalBtn = import_react85.css`
8521
8568
  color: var(--gray-400);
8522
8569
  }
8523
8570
  `;
8524
- var Title = import_react85.css`
8571
+ var Title = import_react86.css`
8525
8572
  color: var(--typography-light);
8526
8573
 
8527
8574
  &:focus {
8528
8575
  outline: none;
8529
8576
  }
8530
8577
  `;
8531
- var ResetConditionsBtn = import_react85.css`
8578
+ var ResetConditionsBtn = import_react86.css`
8532
8579
  background: transparent;
8533
8580
  border: none;
8534
8581
  color: var(--action-destructive-default);
8535
8582
  transition: color var(--duration-fast) var(--timing-ease-out);
8536
- padding: 0;
8583
+ padding: 0 var(--spacing-sm) 0 0;
8537
8584
 
8538
8585
  &:hover,
8539
8586
  &:focus {
8540
8587
  color: var(--action-destructive-hover);
8541
8588
  }
8542
8589
  `;
8543
- var IconBtn = import_react85.css`
8590
+ var IconBtn = import_react86.css`
8591
+ align-self: center;
8544
8592
  background: transparent;
8545
8593
  border: none;
8546
8594
  padding: var(--spacing-sm);
8547
8595
  `;
8548
- var SearchAndFilterOptionsContainer = import_react85.css`
8596
+ var SearchAndFilterOptionsContainer = import_react86.css`
8549
8597
  background: var(--gray-50);
8550
8598
  border: 1px solid var(--gray-300);
8551
8599
  border-radius: var(--rounded-base);
@@ -8558,19 +8606,19 @@ var SearchAndFilterOptionsContainer = import_react85.css`
8558
8606
  position: relative;
8559
8607
  z-index: 2;
8560
8608
  `;
8561
- var SearchAndFilterOptionsInnerContainer = import_react85.css`
8609
+ var SearchAndFilterOptionsInnerContainer = import_react86.css`
8562
8610
  display: flex;
8563
8611
  flex-direction: column;
8564
8612
  gap: var(--spacing-sm);
8565
8613
  padding-inline: var(--spacing-md);
8566
8614
  `;
8567
- var SearchAndFilterButtonGroup = import_react85.css`
8615
+ var SearchAndFilterButtonGroup = import_react86.css`
8568
8616
  margin-top: var(--spacing-xs);
8569
8617
  margin-left: calc(56px + var(--spacing-md));
8570
8618
  `;
8571
8619
 
8572
8620
  // src/components/SearchAndFilter/FilterButton.tsx
8573
- var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
8621
+ var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
8574
8622
  var FilterButton2 = ({
8575
8623
  text = "Filters",
8576
8624
  icon = "filter-add",
@@ -8579,7 +8627,7 @@ var FilterButton2 = ({
8579
8627
  dataTestId,
8580
8628
  ...props
8581
8629
  }) => {
8582
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
8630
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
8583
8631
  "button",
8584
8632
  {
8585
8633
  type: "button",
@@ -8591,9 +8639,9 @@ var FilterButton2 = ({
8591
8639
  ...props,
8592
8640
  "data-testid": dataTestId,
8593
8641
  children: [
8594
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system53.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
8595
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { css: FilterButtonText, children: text }),
8596
- filterCount ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system53.Counter, { count: filterCount, bgColor: "var(--white)" }) : null
8642
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
8643
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: FilterButtonText, children: text }),
8644
+ filterCount ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Counter, { count: filterCount, bgColor: "var(--white)" }) : null
8597
8645
  ]
8598
8646
  }
8599
8647
  );
@@ -8601,28 +8649,25 @@ var FilterButton2 = ({
8601
8649
 
8602
8650
  // src/components/SearchAndFilter/FilterControls.tsx
8603
8651
  var import_CgClose5 = require("@react-icons/all-files/cg/CgClose");
8604
- var import_design_system55 = require("@uniformdev/design-system");
8652
+ var import_design_system56 = require("@uniformdev/design-system");
8605
8653
  var import_lexical11 = require("lexical");
8606
- var import_react87 = require("react");
8654
+ var import_react88 = require("react");
8607
8655
  var import_react_use10 = require("react-use");
8608
8656
  var import_uuid3 = require("uuid");
8609
8657
 
8610
8658
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
8611
- var import_design_system54 = require("@uniformdev/design-system");
8612
- var import_react86 = require("react");
8659
+ var import_design_system55 = require("@uniformdev/design-system");
8660
+ var import_react87 = require("react");
8613
8661
 
8614
8662
  // src/components/SearchAndFilter/FilterEditor.tsx
8615
- var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
8663
+ var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
8616
8664
  var FilterEditorRenderer = ({ editorType, ...props }) => {
8617
8665
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
8618
8666
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
8619
- if (!Editor) {
8620
- return null;
8667
+ if (!Editor || editorType === "empty") {
8668
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", {});
8621
8669
  }
8622
- if (editorType === "empty") {
8623
- return null;
8624
- }
8625
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Editor, { ...props });
8670
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Editor, { ...props });
8626
8671
  };
8627
8672
  var filterMapper = {
8628
8673
  multiChoice: FilterMultiChoiceEditor,
@@ -8630,6 +8675,7 @@ var filterMapper = {
8630
8675
  date: DateEditor,
8631
8676
  dateRange: DateRangeEditor,
8632
8677
  text: TextEditor,
8678
+ textMultiChoice: TextMultiChoiceEditor,
8633
8679
  numberRange: NumberRangeEditor,
8634
8680
  number: NumberEditor,
8635
8681
  statusMultiChoice: StatusMultiEditor,
@@ -8639,9 +8685,9 @@ var filterMapper = {
8639
8685
  function withInputVariables(WrappedComponent) {
8640
8686
  const WithInputVariables = (props) => {
8641
8687
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
8642
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props });
8688
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props });
8643
8689
  }
8644
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8690
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8645
8691
  InputVariables,
8646
8692
  {
8647
8693
  disableInlineMenu: true,
@@ -8649,7 +8695,7 @@ function withInputVariables(WrappedComponent) {
8649
8695
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
8650
8696
  value: props.value,
8651
8697
  disabled: props.disabled,
8652
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props })
8698
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props })
8653
8699
  }
8654
8700
  );
8655
8701
  };
@@ -8659,16 +8705,16 @@ function withInputVariablesForMultiValue(WrappedComponent) {
8659
8705
  const WithInputVariables = (props) => {
8660
8706
  var _a;
8661
8707
  if (!props.bindable || props.disabled || props.readOnly) {
8662
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props });
8708
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props });
8663
8709
  }
8664
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8710
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8665
8711
  InputVariables,
8666
8712
  {
8667
8713
  disableInlineMenu: true,
8668
8714
  showMenuPosition: "inline-right",
8669
8715
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
8670
8716
  value: (_a = props.value) == null ? void 0 : _a[0],
8671
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props })
8717
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props })
8672
8718
  }
8673
8719
  );
8674
8720
  };
@@ -8684,8 +8730,8 @@ var bindableFiltersMapper = {
8684
8730
  };
8685
8731
 
8686
8732
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
8687
- var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
8688
- var SearchAndFilterContext = (0, import_react86.createContext)({
8733
+ var import_jsx_runtime83 = require("@emotion/react/jsx-runtime");
8734
+ var SearchAndFilterContext = (0, import_react87.createContext)({
8689
8735
  searchTerm: "",
8690
8736
  setSearchTerm: () => {
8691
8737
  },
@@ -8720,41 +8766,41 @@ var SearchAndFilterProvider = ({
8720
8766
  children,
8721
8767
  allowBindingSearchTerm
8722
8768
  }) => {
8723
- const [searchTerm, setSearchTerm] = (0, import_react86.useState)(defaultSearchTerm);
8724
- const deferredSearchTerm = (0, import_react86.useDeferredValue)(searchTerm);
8725
- const [filterVisibility, setFilterVisibility] = (0, import_react86.useState)(filterVisible);
8726
- const handleSearchTerm = (0, import_react86.useCallback)(
8769
+ const [searchTerm, setSearchTerm] = (0, import_react87.useState)(defaultSearchTerm);
8770
+ const deferredSearchTerm = (0, import_react87.useDeferredValue)(searchTerm);
8771
+ const [filterVisibility, setFilterVisibility] = (0, import_react87.useState)(filterVisible);
8772
+ const handleSearchTerm = (0, import_react87.useCallback)(
8727
8773
  (term) => {
8728
8774
  setSearchTerm(term);
8729
8775
  onSearchChange == null ? void 0 : onSearchChange(term);
8730
8776
  },
8731
8777
  [setSearchTerm, onSearchChange]
8732
8778
  );
8733
- const handleToggleFilterVisibility = (0, import_react86.useCallback)(
8779
+ const handleToggleFilterVisibility = (0, import_react87.useCallback)(
8734
8780
  (visible) => setFilterVisibility(visible),
8735
8781
  [setFilterVisibility]
8736
8782
  );
8737
- const handleAddFilter = (0, import_react86.useCallback)(() => {
8783
+ const handleAddFilter = (0, import_react87.useCallback)(() => {
8738
8784
  onChange([...filters, { field: "", operator: "", value: "" }]);
8739
8785
  }, [filters, onChange]);
8740
- const handleResetFilters = (0, import_react86.useCallback)(() => {
8786
+ const handleResetFilters = (0, import_react87.useCallback)(() => {
8741
8787
  onSearchChange == null ? void 0 : onSearchChange("");
8742
8788
  onChange(resetFilterValues);
8743
8789
  }, [onChange, resetFilterValues, onSearchChange]);
8744
- const handleDeleteFilter = (0, import_react86.useCallback)(
8790
+ const handleDeleteFilter = (0, import_react87.useCallback)(
8745
8791
  (index) => {
8746
8792
  const remainingFilters = filters.filter((_, i) => i !== index);
8747
8793
  onChange(remainingFilters);
8748
8794
  },
8749
8795
  [filters, onChange]
8750
8796
  );
8751
- const validFilterQuery = (0, import_react86.useMemo)(() => {
8797
+ const validFilterQuery = (0, import_react87.useMemo)(() => {
8752
8798
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
8753
8799
  if (hasValidFilters) {
8754
8800
  return filters;
8755
8801
  }
8756
8802
  }, [filters]);
8757
- (0, import_react86.useEffect)(() => {
8803
+ (0, import_react87.useEffect)(() => {
8758
8804
  if (filterVisibility) {
8759
8805
  const handleEscKeyFilterClose = (e) => {
8760
8806
  if (e.key === "Escape") {
@@ -8767,7 +8813,7 @@ var SearchAndFilterProvider = ({
8767
8813
  };
8768
8814
  }
8769
8815
  }, [filterVisibility]);
8770
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8816
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8771
8817
  SearchAndFilterContext.Provider,
8772
8818
  {
8773
8819
  value: {
@@ -8786,17 +8832,17 @@ var SearchAndFilterProvider = ({
8786
8832
  filterMapper: filterMapper2,
8787
8833
  allowBindingSearchTerm
8788
8834
  },
8789
- children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_design_system54.VerticalRhythm, { children })
8835
+ children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_design_system55.VerticalRhythm, { children })
8790
8836
  }
8791
8837
  );
8792
8838
  };
8793
8839
  var useSearchAndFilter = () => {
8794
- const value = (0, import_react86.useContext)(SearchAndFilterContext);
8840
+ const value = (0, import_react87.useContext)(SearchAndFilterContext);
8795
8841
  return { ...value };
8796
8842
  };
8797
8843
 
8798
8844
  // src/components/SearchAndFilter/FilterControls.tsx
8799
- var import_jsx_runtime83 = require("@emotion/react/jsx-runtime");
8845
+ var import_jsx_runtime84 = require("@emotion/react/jsx-runtime");
8800
8846
  var FilterControls = ({
8801
8847
  children,
8802
8848
  hideSearchInput
@@ -8809,10 +8855,10 @@ var FilterControls = ({
8809
8855
  searchTerm,
8810
8856
  allowBindingSearchTerm
8811
8857
  } = useSearchAndFilter();
8812
- const editorRef = (0, import_react87.useRef)(null);
8858
+ const editorRef = (0, import_react88.useRef)(null);
8813
8859
  const hasVariableInSearchTerm = hasReferencedVariables(searchTerm);
8814
- const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react87.useState)("data-resource-search-term-input");
8815
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react87.useState)(searchTerm);
8860
+ const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react88.useState)("data-resource-search-term-input");
8861
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react88.useState)(searchTerm);
8816
8862
  (0, import_react_use10.useDebounce)(
8817
8863
  () => {
8818
8864
  setSearchTerm(localeSearchTerm);
@@ -8820,14 +8866,14 @@ var FilterControls = ({
8820
8866
  300,
8821
8867
  [localeSearchTerm]
8822
8868
  );
8823
- (0, import_react87.useEffect)(() => {
8869
+ (0, import_react88.useEffect)(() => {
8824
8870
  if (searchTerm === "") {
8825
8871
  setLocaleSearchTerm("");
8826
8872
  setIdToResetInputVariables(`data-resource-search-term-input-${(0, import_uuid3.v4)()}`);
8827
8873
  }
8828
8874
  }, [searchTerm]);
8829
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
8830
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8875
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
8876
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8831
8877
  FilterButton2,
8832
8878
  {
8833
8879
  "aria-controls": "search-and-filter-options",
@@ -8840,8 +8886,8 @@ var FilterControls = ({
8840
8886
  dataTestId: "filters-button"
8841
8887
  }
8842
8888
  ),
8843
- hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { css: BindableKeywordSearchInputStyles, children: [
8844
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8889
+ hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { css: BindableKeywordSearchInputStyles, children: [
8890
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8845
8891
  InputVariables,
8846
8892
  {
8847
8893
  label: "",
@@ -8851,8 +8897,8 @@ var FilterControls = ({
8851
8897
  value: localeSearchTerm,
8852
8898
  onChange: (value) => setLocaleSearchTerm(value != null ? value : ""),
8853
8899
  disableVariables: !allowBindingSearchTerm,
8854
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8855
- import_design_system55.InputKeywordSearch,
8900
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8901
+ import_design_system56.InputKeywordSearch,
8856
8902
  {
8857
8903
  placeholder: "Search...",
8858
8904
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -8864,7 +8910,7 @@ var FilterControls = ({
8864
8910
  )
8865
8911
  }
8866
8912
  ),
8867
- hasVariableInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8913
+ hasVariableInSearchTerm ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { css: ClearSearchButtonContainer, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8868
8914
  "button",
8869
8915
  {
8870
8916
  css: ClearSearchButtonStyles,
@@ -8878,7 +8924,7 @@ var FilterControls = ({
8878
8924
  },
8879
8925
  type: "button",
8880
8926
  "data-testid": "keyword-search-clear-button",
8881
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_design_system55.Icon, { icon: import_CgClose5.CgClose, iconColor: "red", size: "1rem" })
8927
+ children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_design_system56.Icon, { icon: import_CgClose5.CgClose, iconColor: "red", size: "1rem" })
8882
8928
  }
8883
8929
  ) }) : null
8884
8930
  ] }),
@@ -8887,22 +8933,22 @@ var FilterControls = ({
8887
8933
  };
8888
8934
 
8889
8935
  // src/components/SearchAndFilter/FilterItem.tsx
8890
- var import_design_system57 = require("@uniformdev/design-system");
8891
- var import_react89 = require("react");
8936
+ var import_design_system58 = require("@uniformdev/design-system");
8937
+ var import_react90 = require("react");
8892
8938
 
8893
8939
  // src/components/SearchAndFilter/FilterMenu.tsx
8894
- var import_design_system56 = require("@uniformdev/design-system");
8895
- var import_react88 = __toESM(require("react"));
8896
- var import_jsx_runtime84 = require("@emotion/react/jsx-runtime");
8940
+ var import_design_system57 = require("@uniformdev/design-system");
8941
+ var import_react89 = __toESM(require("react"));
8942
+ var import_jsx_runtime85 = require("@emotion/react/jsx-runtime");
8897
8943
  var SearchAndFilterOptionsContainer2 = ({
8898
8944
  buttonRow,
8899
8945
  additionalFiltersContainer,
8900
8946
  children
8901
8947
  }) => {
8902
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
8903
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
8904
- buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8905
- import_design_system56.HorizontalRhythm,
8948
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
8949
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
8950
+ buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8951
+ import_design_system57.HorizontalRhythm,
8906
8952
  {
8907
8953
  css: SearchAndFilterButtonGroup,
8908
8954
  gap: "sm",
@@ -8911,7 +8957,7 @@ var SearchAndFilterOptionsContainer2 = ({
8911
8957
  children: buttonRow
8912
8958
  }
8913
8959
  ) : null,
8914
- additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: additionalFiltersContainer }) : null
8960
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { children: additionalFiltersContainer }) : null
8915
8961
  ] });
8916
8962
  };
8917
8963
  var FilterMenu = ({
@@ -8924,22 +8970,22 @@ var FilterMenu = ({
8924
8970
  resetButtonText = "reset"
8925
8971
  }) => {
8926
8972
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
8927
- const innerMenuRef = import_react88.default.useRef(null);
8928
- (0, import_react88.useEffect)(() => {
8973
+ const innerMenuRef = import_react89.default.useRef(null);
8974
+ (0, import_react89.useEffect)(() => {
8929
8975
  var _a;
8930
8976
  if (filterVisibility) {
8931
8977
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
8932
8978
  }
8933
8979
  }, [filterVisibility]);
8934
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_design_system56.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
8980
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system57.VerticalRhythm, { gap: "sm", "aria-haspopup": "true", id, "data-testid": dataTestId, children: filterVisibility ? /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
8935
8981
  SearchAndFilterOptionsContainer2,
8936
8982
  {
8937
8983
  buttonRow: menuControls,
8938
8984
  additionalFiltersContainer,
8939
8985
  children: [
8940
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_design_system56.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
8941
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }),
8942
- (filters == null ? void 0 : filters.length) ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8986
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_design_system57.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
8987
+ filterTitle ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }) : null,
8988
+ (filters == null ? void 0 : filters.length) && resetButtonText ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8943
8989
  "button",
8944
8990
  {
8945
8991
  type: "button",
@@ -8960,7 +9006,7 @@ var FilterMenu = ({
8960
9006
  };
8961
9007
 
8962
9008
  // src/components/SearchAndFilter/FilterItem.tsx
8963
- var import_jsx_runtime85 = require("@emotion/react/jsx-runtime");
9009
+ var import_jsx_runtime86 = require("@emotion/react/jsx-runtime");
8964
9010
  var FilterItem = ({
8965
9011
  index,
8966
9012
  paramOptions,
@@ -8968,7 +9014,8 @@ var FilterItem = ({
8968
9014
  valueOptions,
8969
9015
  onParamChange,
8970
9016
  onOperatorChange,
8971
- onValueChange
9017
+ onValueChange,
9018
+ initialCriteriaTitle = "Where"
8972
9019
  }) => {
8973
9020
  var _a, _b;
8974
9021
  const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
@@ -8976,7 +9023,7 @@ var FilterItem = ({
8976
9023
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
8977
9024
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
8978
9025
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
8979
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react89.useMemo)(() => {
9026
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react90.useMemo)(() => {
8980
9027
  var _a2;
8981
9028
  const currentSelectedFilter = filterOptions.find((item) => {
8982
9029
  var _a3;
@@ -9003,11 +9050,11 @@ var FilterItem = ({
9003
9050
  menuIsOpen: false,
9004
9051
  isClearable: false
9005
9052
  } : {};
9006
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
9007
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: index === 0 ? "Where" : "and" }),
9008
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: ConditionalInputRow, children: [
9009
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9010
- import_design_system57.InputComboBox,
9053
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
9054
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: index === 0 ? initialCriteriaTitle : "and" }),
9055
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { css: ConditionalInputRow, children: [
9056
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9057
+ import_design_system58.InputComboBox,
9011
9058
  {
9012
9059
  "aria-label": label,
9013
9060
  options: paramOptions,
@@ -9033,8 +9080,8 @@ var FilterItem = ({
9033
9080
  name: `filter-field-${index}`
9034
9081
  }
9035
9082
  ),
9036
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9037
- import_design_system57.InputComboBox,
9083
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9084
+ import_design_system58.InputComboBox,
9038
9085
  {
9039
9086
  "aria-label": operatorLabel,
9040
9087
  options: operatorOptions,
@@ -9057,7 +9104,7 @@ var FilterItem = ({
9057
9104
  name: `filter-operator-${index}`
9058
9105
  }
9059
9106
  ),
9060
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9107
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9061
9108
  FilterEditorRenderer,
9062
9109
  {
9063
9110
  "aria-label": metaDataLabel,
@@ -9071,7 +9118,7 @@ var FilterItem = ({
9071
9118
  valueTestId: "filter-value"
9072
9119
  }
9073
9120
  ),
9074
- readOnly || index === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9121
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9075
9122
  "button",
9076
9123
  {
9077
9124
  type: "button",
@@ -9079,15 +9126,36 @@ var FilterItem = ({
9079
9126
  "aria-label": "delete filter",
9080
9127
  css: IconBtn,
9081
9128
  "data-testid": "delete-filter",
9082
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system57.Icon, { icon: "trash", iconColor: "red", size: "1rem" })
9129
+ disabled: filters.length === 1,
9130
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Icon, { icon: "trash", iconColor: filters.length === 1 ? "gray" : "red", size: "1rem" })
9083
9131
  }
9084
9132
  )
9085
9133
  ] })
9086
9134
  ] });
9087
9135
  };
9136
+ var singleValuedOperators = /* @__PURE__ */ new Set([
9137
+ "eq",
9138
+ "neq",
9139
+ "lt",
9140
+ "gt",
9141
+ "is",
9142
+ "!is",
9143
+ "has",
9144
+ "!has",
9145
+ "startswith",
9146
+ "!startswith",
9147
+ "endswith",
9148
+ "!endswith"
9149
+ ]);
9150
+ var arrayValuedOperators = /* @__PURE__ */ new Set(["in", "nin", "is$", "!is$"]);
9151
+ var clearValueOnChangeAwayFromOperators = /* @__PURE__ */ new Set(["def", "ndef", "empty", "!empty", "between"]);
9152
+ var noValueOperators = /* @__PURE__ */ new Set(["empty", "!empty"]);
9088
9153
  var FilterItems = ({
9089
9154
  addButtonText = "add condition",
9090
- additionalFiltersContainer
9155
+ additionalFiltersContainer,
9156
+ filterTitle,
9157
+ resetButtonText,
9158
+ initialCriteriaTitle
9091
9159
  }) => {
9092
9160
  const { filterOptions, filters, setFilters, handleAddFilter } = useSearchAndFilter();
9093
9161
  const handleUpdateFilter = (index, prop, value) => {
@@ -9095,14 +9163,25 @@ var FilterItems = ({
9095
9163
  const next = [...filters];
9096
9164
  next[index] = { ...next[index], [prop]: value };
9097
9165
  if (prop === "operator") {
9098
- if (!Array.isArray(value) && ["eq", "neq", "lt", "gt"].includes(value) && Array.isArray(next[index].value)) {
9166
+ const newOperator = value;
9167
+ const currentValue = next[index].value;
9168
+ if (Array.isArray(newOperator)) {
9169
+ throw new Error("Operator value must be a single string");
9170
+ }
9171
+ if (singleValuedOperators.has(newOperator) && Array.isArray(currentValue)) {
9099
9172
  next[index].value = next[index].value[0];
9100
9173
  }
9101
- if (filters[index].operator === "ndef" || filters[index].operator === "def") {
9174
+ if (arrayValuedOperators.has(newOperator) && Array.isArray(currentValue) === false) {
9175
+ next[index].value = currentValue ? [currentValue] : [];
9176
+ }
9177
+ if (clearValueOnChangeAwayFromOperators.has(filters[index].operator)) {
9178
+ next[index].value = "";
9179
+ }
9180
+ if (noValueOperators.has(newOperator)) {
9102
9181
  next[index].value = "";
9103
9182
  }
9104
- if (!Array.isArray(value) && ["between"].includes(value) && Array.isArray(next[index].value) === false) {
9105
- next[index].value = [next[index].value, ""];
9183
+ if (newOperator === "between" && Array.isArray(currentValue) === false) {
9184
+ next[index].value = [currentValue, ""];
9106
9185
  }
9107
9186
  if (value === "def" || value === "true") {
9108
9187
  next[index].value = "true";
@@ -9121,12 +9200,12 @@ var FilterItems = ({
9121
9200
  }
9122
9201
  setFilters(next);
9123
9202
  };
9124
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9203
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9125
9204
  FilterMenu,
9126
9205
  {
9127
9206
  id: "search-and-filter-options",
9128
9207
  dataTestId: "search-and-filter-options",
9129
- menuControls: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
9208
+ menuControls: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
9130
9209
  "button",
9131
9210
  {
9132
9211
  type: "button",
@@ -9134,12 +9213,14 @@ var FilterItems = ({
9134
9213
  onClick: handleAddFilter,
9135
9214
  "data-testid": "add-filter",
9136
9215
  children: [
9137
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system57.Icon, { icon: "math-plus", iconColor: "currentColor", size: "1rem" }),
9216
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Icon, { icon: "math-plus", iconColor: "currentColor", size: "1rem" }),
9138
9217
  addButtonText
9139
9218
  ]
9140
9219
  }
9141
9220
  ),
9142
9221
  additionalFiltersContainer,
9222
+ filterTitle,
9223
+ resetButtonText,
9143
9224
  children: filters.map((item, i) => {
9144
9225
  var _a, _b, _c, _d, _e, _f;
9145
9226
  const availableTypeOptions = (_b = (_a = filterOptions.find((fo) => {
@@ -9148,7 +9229,7 @@ var FilterItems = ({
9148
9229
  })) == null ? void 0 : _a.options) != null ? _b : [];
9149
9230
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
9150
9231
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
9151
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9232
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9152
9233
  FilterItem,
9153
9234
  {
9154
9235
  index: i,
@@ -9157,7 +9238,8 @@ var FilterItems = ({
9157
9238
  operatorOptions: possibleOperators,
9158
9239
  onOperatorChange: (e) => handleUpdateFilter(i, "operator", e),
9159
9240
  onValueChange: (e) => handleUpdateFilter(i, "value", e),
9160
- valueOptions: possibleValueOptions
9241
+ valueOptions: possibleValueOptions,
9242
+ initialCriteriaTitle
9161
9243
  },
9162
9244
  i
9163
9245
  );
@@ -9167,11 +9249,11 @@ var FilterItems = ({
9167
9249
  };
9168
9250
 
9169
9251
  // src/components/SearchAndFilter/SearchAndFilter.tsx
9170
- var import_design_system59 = require("@uniformdev/design-system");
9252
+ var import_design_system60 = require("@uniformdev/design-system");
9171
9253
 
9172
9254
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
9173
- var import_design_system58 = require("@uniformdev/design-system");
9174
- var import_jsx_runtime86 = require("@emotion/react/jsx-runtime");
9255
+ var import_design_system59 = require("@uniformdev/design-system");
9256
+ var import_jsx_runtime87 = require("@emotion/react/jsx-runtime");
9175
9257
  var SearchAndFilterResultContainer = ({
9176
9258
  buttonText,
9177
9259
  clearButtonLabel = "clear",
@@ -9201,19 +9283,19 @@ var SearchAndFilterResultContainer = ({
9201
9283
  handleResetFilters();
9202
9284
  }
9203
9285
  };
9204
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
9205
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system58.HorizontalRhythm, { children: [
9206
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { children: [
9286
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
9287
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system59.HorizontalRhythm, { children: [
9288
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("span", { children: [
9207
9289
  totalResults,
9208
9290
  " results ",
9209
9291
  searchTerm ? `for "${searchTerm}"` : null
9210
9292
  ] }),
9211
- !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
9293
+ !searchTerm || hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_design_system59.Button, { buttonType: "ghostDestructive", size: "zero", onClick: handleClearSearch, children: clearButtonLabel })
9212
9294
  ] }),
9213
- totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system58.Callout, { title: calloutTitle != null ? calloutTitle : automateCalloutTitle(), type: "note", children: [
9214
- calloutText ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Paragraph, { children: calloutText }) : null,
9215
- hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9216
- import_design_system58.Button,
9295
+ totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system59.Callout, { title: calloutTitle != null ? calloutTitle : automateCalloutTitle(), type: "note", children: [
9296
+ calloutText ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_design_system59.Paragraph, { children: calloutText }) : null,
9297
+ hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9298
+ import_design_system59.Button,
9217
9299
  {
9218
9300
  buttonType: "tertiaryOutline",
9219
9301
  size: "xs",
@@ -9227,14 +9309,14 @@ var SearchAndFilterResultContainer = ({
9227
9309
  };
9228
9310
 
9229
9311
  // src/components/SearchAndFilter/SearchAndFilter.tsx
9230
- var import_jsx_runtime87 = require("@emotion/react/jsx-runtime");
9312
+ var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
9231
9313
  var SearchAndFilter = ({
9232
9314
  filters,
9233
9315
  filterOptions,
9234
9316
  filterVisible,
9235
9317
  filterControls,
9236
9318
  viewSwitchControls,
9237
- resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchAndFilterResultContainer, {}),
9319
+ resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(SearchAndFilterResultContainer, {}),
9238
9320
  filterMapper: filterMapper2 = filterMapper,
9239
9321
  additionalFiltersContainer,
9240
9322
  onChange,
@@ -9244,7 +9326,7 @@ var SearchAndFilter = ({
9244
9326
  allowBindingSearchTerm = false,
9245
9327
  resetFilterValues = []
9246
9328
  }) => {
9247
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9329
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9248
9330
  SearchAndFilterProvider,
9249
9331
  {
9250
9332
  filters,
@@ -9257,18 +9339,18 @@ var SearchAndFilter = ({
9257
9339
  resetFilterValues,
9258
9340
  filterMapper: filterMapper2,
9259
9341
  allowBindingSearchTerm,
9260
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system59.VerticalRhythm, { "data-testid": "search-and-filter", children: [
9261
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
9262
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9342
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_design_system60.VerticalRhythm, { "data-testid": "search-and-filter", children: [
9343
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
9344
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9263
9345
  "div",
9264
9346
  {
9265
9347
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
9266
- children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
9348
+ children: !filterControls ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FilterControls, { hideSearchInput: !onSearchChange }) : filterControls
9267
9349
  }
9268
9350
  ),
9269
9351
  viewSwitchControls
9270
9352
  ] }),
9271
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterItems, { additionalFiltersContainer }),
9353
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FilterItems, { additionalFiltersContainer }),
9272
9354
  resultsContainerView
9273
9355
  ] })
9274
9356
  }
@@ -9276,18 +9358,18 @@ var SearchAndFilter = ({
9276
9358
  };
9277
9359
 
9278
9360
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
9279
- var import_design_system60 = require("@uniformdev/design-system");
9280
- var import_react90 = require("react");
9361
+ var import_design_system61 = require("@uniformdev/design-system");
9362
+ var import_react91 = require("react");
9281
9363
  var import_react_use11 = require("react-use");
9282
- var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
9283
- var SearchOnlyContext = (0, import_react90.createContext)({
9364
+ var import_jsx_runtime89 = require("@emotion/react/jsx-runtime");
9365
+ var SearchOnlyContext = (0, import_react91.createContext)({
9284
9366
  searchTerm: "",
9285
9367
  setSearchTerm: () => {
9286
9368
  }
9287
9369
  });
9288
9370
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9289
9371
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
9290
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react90.useState)("");
9372
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react91.useState)("");
9291
9373
  (0, import_react_use11.useDebounce)(
9292
9374
  () => {
9293
9375
  setSearchTerm(localeSearchTerm);
@@ -9296,15 +9378,15 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9296
9378
  300,
9297
9379
  [localeSearchTerm]
9298
9380
  );
9299
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9381
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9300
9382
  SearchOnlyContext.Provider,
9301
9383
  {
9302
9384
  value: {
9303
9385
  searchTerm,
9304
9386
  setSearchTerm: setLocaleSearchTerm
9305
9387
  },
9306
- children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9307
- import_design_system60.InputKeywordSearch,
9388
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9389
+ import_design_system61.InputKeywordSearch,
9308
9390
  {
9309
9391
  placeholder: "Search...",
9310
9392
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -9318,18 +9400,18 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9318
9400
  };
9319
9401
 
9320
9402
  // src/components/SearchAndFilter/SortItems.tsx
9321
- var import_design_system62 = require("@uniformdev/design-system");
9403
+ var import_design_system63 = require("@uniformdev/design-system");
9322
9404
 
9323
9405
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
9324
- var import_react91 = require("@emotion/react");
9325
- var import_design_system61 = require("@uniformdev/design-system");
9326
- var ConditionalFilterRow2 = import_react91.css`
9406
+ var import_react92 = require("@emotion/react");
9407
+ var import_design_system62 = require("@uniformdev/design-system");
9408
+ var ConditionalFilterRow2 = import_react92.css`
9327
9409
  display: grid;
9328
9410
  grid-template-columns: 35px 1fr;
9329
9411
  gap: var(--spacing-sm);
9330
9412
  margin-left: var(--spacing-base);
9331
9413
 
9332
- ${(0, import_design_system61.cq)("380px")} {
9414
+ ${(0, import_design_system62.cq)("380px")} {
9333
9415
  align-items: center;
9334
9416
 
9335
9417
  &:after {
@@ -9350,22 +9432,22 @@ var ConditionalFilterRow2 = import_react91.css`
9350
9432
  grid-template-columns: 50px 1fr;
9351
9433
  }
9352
9434
 
9353
- ${(0, import_design_system61.cq)("580px")} {
9435
+ ${(0, import_design_system62.cq)("580px")} {
9354
9436
  &:after {
9355
9437
  display: none;
9356
9438
  }
9357
9439
  }
9358
9440
 
9359
9441
  @media (prefers-reduced-motion: no-preference) {
9360
- animation: ${import_design_system61.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
9442
+ animation: ${import_design_system62.fadeInLtr} var(--duration-fast) var(--timing-ease-out);
9361
9443
  }
9362
9444
  `;
9363
- var ConditionalInputRow2 = import_react91.css`
9445
+ var ConditionalInputRow2 = import_react92.css`
9364
9446
  display: flex;
9365
9447
  gap: var(--spacing-sm);
9366
9448
  flex-wrap: wrap;
9367
9449
 
9368
- ${(0, import_design_system61.cq)("380px")} {
9450
+ ${(0, import_design_system62.cq)("380px")} {
9369
9451
  & > div:nth-child(-n + 2) {
9370
9452
  width: calc(50% - var(--spacing-sm));
9371
9453
  }
@@ -9374,7 +9456,7 @@ var ConditionalInputRow2 = import_react91.css`
9374
9456
  width: calc(100% - 48px);
9375
9457
  }
9376
9458
  }
9377
- ${(0, import_design_system61.cq)("580px")} {
9459
+ ${(0, import_design_system62.cq)("580px")} {
9378
9460
  display: grid;
9379
9461
  grid-template-columns: 200px 160px 1fr 32px;
9380
9462
 
@@ -9383,11 +9465,11 @@ var ConditionalInputRow2 = import_react91.css`
9383
9465
  }
9384
9466
  }
9385
9467
  `;
9386
- var SearchInput2 = import_react91.css`
9468
+ var SearchInput2 = import_react92.css`
9387
9469
  max-height: 40px;
9388
9470
  min-height: unset;
9389
9471
  `;
9390
- var FilterButton3 = import_react91.css`
9472
+ var FilterButton3 = import_react92.css`
9391
9473
  align-items: center;
9392
9474
  background: var(--white);
9393
9475
  border: 1px solid var(--gray-300);
@@ -9423,13 +9505,13 @@ var FilterButton3 = import_react91.css`
9423
9505
  opacity: var(--opacity-50);
9424
9506
  }
9425
9507
  `;
9426
- var FilterButtonText2 = import_react91.css`
9508
+ var FilterButtonText2 = import_react92.css`
9427
9509
  overflow: hidden;
9428
9510
  text-overflow: ellipsis;
9429
9511
  white-space: nowrap;
9430
9512
  max-width: 14ch;
9431
9513
  `;
9432
- var FilterButtonSelected2 = import_react91.css`
9514
+ var FilterButtonSelected2 = import_react92.css`
9433
9515
  background: var(--gray-100);
9434
9516
  border-color: var(--gray-300);
9435
9517
 
@@ -9437,7 +9519,7 @@ var FilterButtonSelected2 = import_react91.css`
9437
9519
  color: var(--accent-dark);
9438
9520
  }
9439
9521
  `;
9440
- var FilterButtonWithOptions2 = import_react91.css`
9522
+ var FilterButtonWithOptions2 = import_react92.css`
9441
9523
  :where([aria-expanded='true']) {
9442
9524
  background: var(--purple-rain-100);
9443
9525
  border-color: var(--accent-light);
@@ -9449,14 +9531,14 @@ var FilterButtonWithOptions2 = import_react91.css`
9449
9531
  }
9450
9532
  }
9451
9533
  `;
9452
- var SearchIcon2 = import_react91.css`
9534
+ var SearchIcon2 = import_react92.css`
9453
9535
  color: var(--icon-color);
9454
9536
  position: absolute;
9455
9537
  inset: 0 var(--spacing-base) 0 auto;
9456
9538
  margin: auto;
9457
9539
  transition: color var(--duration-fast) var(--timing-ease-out);
9458
9540
  `;
9459
- var AddConditionalBtn2 = import_react91.css`
9541
+ var AddConditionalBtn2 = import_react92.css`
9460
9542
  align-items: center;
9461
9543
  background: transparent;
9462
9544
  border: none;
@@ -9475,14 +9557,14 @@ var AddConditionalBtn2 = import_react91.css`
9475
9557
  color: var(--gray-400);
9476
9558
  }
9477
9559
  `;
9478
- var Title2 = import_react91.css`
9560
+ var Title2 = import_react92.css`
9479
9561
  color: var(--typography-light);
9480
9562
 
9481
9563
  &:focus {
9482
9564
  outline: none;
9483
9565
  }
9484
9566
  `;
9485
- var ResetConditionsBtn2 = import_react91.css`
9567
+ var ResetConditionsBtn2 = import_react92.css`
9486
9568
  background: transparent;
9487
9569
  border: none;
9488
9570
  color: var(--action-destructive-default);
@@ -9494,12 +9576,12 @@ var ResetConditionsBtn2 = import_react91.css`
9494
9576
  color: var(--action-destructive-hover);
9495
9577
  }
9496
9578
  `;
9497
- var IconBtn2 = import_react91.css`
9579
+ var IconBtn2 = import_react92.css`
9498
9580
  background: transparent;
9499
9581
  border: none;
9500
9582
  padding: var(--spacing-sm);
9501
9583
  `;
9502
- var SearchAndFilterOptionsContainer3 = import_react91.css`
9584
+ var SearchAndFilterOptionsContainer3 = import_react92.css`
9503
9585
  background: var(--gray-50);
9504
9586
  border: 1px solid var(--gray-300);
9505
9587
  border-radius: var(--rounded-base);
@@ -9512,17 +9594,17 @@ var SearchAndFilterOptionsContainer3 = import_react91.css`
9512
9594
  position: relative;
9513
9595
  z-index: 1;
9514
9596
  `;
9515
- var SearchAndFilterOptionsInnerContainer2 = import_react91.css`
9597
+ var SearchAndFilterOptionsInnerContainer2 = import_react92.css`
9516
9598
  display: flex;
9517
9599
  flex-direction: column;
9518
9600
  gap: var(--spacing-sm);
9519
9601
  padding-inline: var(--spacing-md);
9520
9602
  `;
9521
- var SearchAndFilterButtonGroup2 = import_react91.css`
9603
+ var SearchAndFilterButtonGroup2 = import_react92.css`
9522
9604
  margin-top: var(--spacing-xs);
9523
9605
  margin-left: calc(56px + var(--spacing-md));
9524
9606
  `;
9525
- var SortFilterWrapper = (hiddenLocaleInput) => import_react91.css`
9607
+ var SortFilterWrapper = (hiddenLocaleInput) => import_react92.css`
9526
9608
  align-items: center;
9527
9609
  border-top: 1px solid var(--gray-300);
9528
9610
  display: flex;
@@ -9532,18 +9614,18 @@ var SortFilterWrapper = (hiddenLocaleInput) => import_react91.css`
9532
9614
  position: relative;
9533
9615
  z-index: 0;
9534
9616
 
9535
- ${(0, import_design_system61.cq)("420px")} {
9617
+ ${(0, import_design_system62.cq)("420px")} {
9536
9618
  display: grid;
9537
9619
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
9538
9620
  }
9539
9621
  `;
9540
- var SortFilterInputRow = import_react91.css`
9622
+ var SortFilterInputRow = import_react92.css`
9541
9623
  align-items: center;
9542
9624
  display: grid;
9543
9625
  grid-template-columns: 1fr auto;
9544
9626
  gap: var(--spacing-base);
9545
9627
  `;
9546
- var InputVariableWrapper = import_react91.css`
9628
+ var InputVariableWrapper = import_react92.css`
9547
9629
  flex-grow: 1;
9548
9630
 
9549
9631
  // we need to override label styles nested within the input variable
@@ -9554,7 +9636,7 @@ var InputVariableWrapper = import_react91.css`
9554
9636
  `;
9555
9637
 
9556
9638
  // src/components/SearchAndFilter/SortItems.tsx
9557
- var import_jsx_runtime89 = require("@emotion/react/jsx-runtime");
9639
+ var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
9558
9640
  var SortItems = ({
9559
9641
  sortByLabel = "Sort by",
9560
9642
  localeLabel = "Show locale",
@@ -9576,11 +9658,11 @@ var SortItems = ({
9576
9658
  return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
9577
9659
  })) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
9578
9660
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
9579
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
9580
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_design_system62.VerticalRhythm, { gap: "xs", children: [
9581
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { css: Title2, children: sortByLabel }),
9582
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: SortFilterInputRow, children: [
9583
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9661
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
9662
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_design_system63.VerticalRhythm, { gap: "xs", children: [
9663
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { css: Title2, children: sortByLabel }),
9664
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { css: SortFilterInputRow, children: [
9665
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9584
9666
  InputVariables,
9585
9667
  {
9586
9668
  disableInlineMenu: disableSortBinding,
@@ -9588,8 +9670,8 @@ var SortItems = ({
9588
9670
  value: sortField,
9589
9671
  valueToResetTo: "created_at",
9590
9672
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
9591
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9592
- import_design_system62.InputComboBox,
9673
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9674
+ import_design_system63.InputComboBox,
9593
9675
  {
9594
9676
  id: "sort-by-field",
9595
9677
  "aria-label": "Sort by",
@@ -9611,7 +9693,7 @@ var SortItems = ({
9611
9693
  )
9612
9694
  }
9613
9695
  ),
9614
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9696
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9615
9697
  InputVariables,
9616
9698
  {
9617
9699
  disableInlineMenu: disableSortBinding,
@@ -9619,8 +9701,8 @@ var SortItems = ({
9619
9701
  valueToResetTo: "DESC",
9620
9702
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
9621
9703
  onChange: (e) => onSortChange(`${sortField}_${e}`),
9622
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9623
- import_design_system62.SegmentedControl,
9704
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9705
+ import_design_system63.SegmentedControl,
9624
9706
  {
9625
9707
  noCheckmark: true,
9626
9708
  name: "sortBy",
@@ -9651,15 +9733,15 @@ var SortItems = ({
9651
9733
  )
9652
9734
  ] })
9653
9735
  ] }),
9654
- hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_design_system62.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9736
+ hideLocaleOptions ? null : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_design_system63.VerticalRhythm, { gap: "xs", css: InputVariableWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9655
9737
  InputVariables,
9656
9738
  {
9657
9739
  label: localeLabelValue,
9658
9740
  value: localeValue,
9659
9741
  showMenuPosition: "inline-right",
9660
9742
  onChange: (e) => onLocaleChange(e != null ? e : ""),
9661
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9662
- import_design_system62.InputSelect,
9743
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9744
+ import_design_system63.InputSelect,
9663
9745
  {
9664
9746
  name: "localeReturned",
9665
9747
  "aria-label": localeLabelValue,
@@ -9689,19 +9771,19 @@ function createLocationValidator(setValue, validate) {
9689
9771
 
9690
9772
  // src/utils/useContentDataResourceLocaleInfo.ts
9691
9773
  var import_canvas10 = require("@uniformdev/canvas");
9692
- var import_react92 = require("react");
9774
+ var import_react93 = require("react");
9693
9775
  function useContentDataResourceLocaleInfo({
9694
9776
  locale,
9695
9777
  setLocale,
9696
9778
  dynamicInputs
9697
9779
  }) {
9698
9780
  var _a;
9699
- const setLocaleRef = (0, import_react92.useRef)(setLocale);
9781
+ const setLocaleRef = (0, import_react93.useRef)(setLocale);
9700
9782
  setLocaleRef.current = setLocale;
9701
9783
  const { flatVariables } = useVariables();
9702
9784
  const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas10.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME) : "";
9703
9785
  const boundLocale = (_a = (0, import_canvas10.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
9704
- (0, import_react92.useEffect)(() => {
9786
+ (0, import_react93.useEffect)(() => {
9705
9787
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
9706
9788
  setLocaleRef.current((0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME));
9707
9789
  }
@@ -9710,7 +9792,7 @@ function useContentDataResourceLocaleInfo({
9710
9792
  }
9711
9793
 
9712
9794
  // src/index.ts
9713
- var import_design_system63 = require("@uniformdev/design-system");
9795
+ var import_design_system64 = require("@uniformdev/design-system");
9714
9796
  __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
9715
9797
  // Annotate the CommonJS export names for ESM import in node:
9716
9798
  0 && (module.exports = {
@@ -9832,6 +9914,7 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
9832
9914
  Switch,
9833
9915
  TEXTBOX_OPERATORS,
9834
9916
  TextEditor,
9917
+ TextMultiChoiceEditor,
9835
9918
  TextVariableRenderer,
9836
9919
  Textarea,
9837
9920
  Theme,