@uniformdev/mesh-sdk-react 19.159.0 → 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,18 +146,20 @@ __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,
158
159
  VariablesList: () => VariablesList,
159
160
  VariablesPlugin: () => VariablesPlugin,
160
161
  VariablesProvider: () => VariablesProvider,
162
+ WORKFLOW_STAGES_OPERATORS: () => WORKFLOW_STAGES_OPERATORS,
161
163
  badgeIcon: () => badgeIcon,
162
164
  bindableFiltersMapper: () => bindableFiltersMapper,
163
165
  convertConnectedDataToVariable: () => convertConnectedDataToVariable,
@@ -246,7 +248,7 @@ __export(src_exports, {
246
248
  useVariableEditor: () => useVariableEditor,
247
249
  useVariables: () => useVariables,
248
250
  useVariablesMenu: () => useVariablesMenu,
249
- utilityColors: () => import_design_system63.utilityColors,
251
+ utilityColors: () => import_design_system64.utilityColors,
250
252
  variableDefaultTextValue: () => variableDefaultTextValue,
251
253
  variablePrefix: () => variablePrefix,
252
254
  variableSuffix: () => variableSuffix,
@@ -1892,8 +1894,7 @@ var EntrySearch = ({
1892
1894
  const handleCancelClick = (e) => {
1893
1895
  e.preventDefault();
1894
1896
  setListOpen(false);
1895
- if (onCancel)
1896
- onCancel();
1897
+ if (onCancel) onCancel();
1897
1898
  };
1898
1899
  const handleLoadMoreClick = () => {
1899
1900
  search(textInput, {
@@ -4880,8 +4881,7 @@ function VariablesComposer(props) {
4880
4881
  );
4881
4882
  const editorState = (0, import_react49.useRef)();
4882
4883
  const updateTimeout = (0, import_react49.useRef)();
4883
- if (typeof document === "undefined")
4884
- return null;
4884
+ if (typeof document === "undefined") return null;
4885
4885
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
4886
4886
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
4887
4887
  import_LexicalOnChangePlugin.OnChangePlugin,
@@ -5334,7 +5334,7 @@ function ParameterOrSingleVariable(props) {
5334
5334
  editorRef ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EditorRefPlugin, { editorRef }) : null,
5335
5335
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ControlledValuePlugin, { enabled: true, value }),
5336
5336
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_design_system23.HorizontalRhythm, { align: "center", gap: "xs", css: { width: "100%" }, children: [
5337
- /* @__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)(
5338
5338
  VariablesComposerInput,
5339
5339
  {
5340
5340
  "data-text-value": value,
@@ -7791,6 +7791,28 @@ var MULTI_SELECT_OPERATORS = [
7791
7791
  editorType: "empty"
7792
7792
  }
7793
7793
  ];
7794
+ var WORKFLOW_STAGES_OPERATORS = [
7795
+ {
7796
+ label: "is",
7797
+ value: "eq",
7798
+ editorType: "singleChoice"
7799
+ },
7800
+ {
7801
+ label: "is any of...",
7802
+ value: "in",
7803
+ editorType: "multiChoice"
7804
+ },
7805
+ {
7806
+ label: "is not",
7807
+ value: "neq",
7808
+ editorType: "singleChoice"
7809
+ },
7810
+ {
7811
+ label: "is none of...",
7812
+ value: "nin",
7813
+ editorType: "multiChoice"
7814
+ }
7815
+ ];
7794
7816
 
7795
7817
  // src/components/SearchAndFilter/editors/DateEditor.tsx
7796
7818
  var import_design_system41 = require("@uniformdev/design-system");
@@ -8301,32 +8323,80 @@ var TextEditor = ({
8301
8323
  );
8302
8324
  };
8303
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
+
8304
8374
  // src/components/SearchAndFilter/FilterButton.tsx
8305
- var import_design_system53 = require("@uniformdev/design-system");
8375
+ var import_design_system54 = require("@uniformdev/design-system");
8306
8376
 
8307
8377
  // src/components/SearchAndFilter/styles/SearchAndFilter.styles.ts
8308
- var import_react85 = require("@emotion/react");
8309
- var import_design_system52 = require("@uniformdev/design-system");
8310
- 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`
8311
8381
  align-items: stretch;
8312
8382
  display: grid;
8313
8383
  grid-template-columns: ${gridColumns};
8314
8384
  gap: var(--spacing-sm);
8315
8385
  `;
8316
- var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react85.css`
8386
+ var SearchAndFilterOutterControlWrapper = (gridColumns) => import_react86.css`
8317
8387
  align-items: stretch;
8318
8388
  display: grid;
8319
8389
  grid-template-columns: ${gridColumns};
8320
8390
  gap: var(--spacing-sm);
8321
8391
  `;
8322
- var ConditionalFilterRow = import_react85.css`
8392
+ var ConditionalFilterRow = import_react86.css`
8323
8393
  align-items: baseline;
8324
8394
  display: grid;
8325
8395
  grid-template-columns: 35px 1fr;
8326
8396
  gap: var(--spacing-sm);
8327
8397
  margin-left: var(--spacing-base);
8328
8398
 
8329
- ${(0, import_design_system52.cq)("380px")} {
8399
+ ${(0, import_design_system53.cq)("380px")} {
8330
8400
  &:after {
8331
8401
  content: '';
8332
8402
  display: block;
@@ -8345,22 +8415,22 @@ var ConditionalFilterRow = import_react85.css`
8345
8415
  grid-template-columns: 50px 1fr;
8346
8416
  }
8347
8417
 
8348
- ${(0, import_design_system52.cq)("580px")} {
8418
+ ${(0, import_design_system53.cq)("580px")} {
8349
8419
  &:after {
8350
8420
  display: none;
8351
8421
  }
8352
8422
  }
8353
8423
 
8354
8424
  @media (prefers-reduced-motion: no-preference) {
8355
- 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);
8356
8426
  }
8357
8427
  `;
8358
- var ConditionalInputRow = import_react85.css`
8428
+ var ConditionalInputRow = import_react86.css`
8359
8429
  display: flex;
8360
8430
  gap: var(--spacing-sm);
8361
8431
  flex-wrap: wrap;
8362
8432
 
8363
- ${(0, import_design_system52.cq)("380px")} {
8433
+ ${(0, import_design_system53.cq)("380px")} {
8364
8434
  & > div:nth-child(-n + 2) {
8365
8435
  width: calc(50% - var(--spacing-sm));
8366
8436
  }
@@ -8369,7 +8439,7 @@ var ConditionalInputRow = import_react85.css`
8369
8439
  width: calc(100% - 48px);
8370
8440
  }
8371
8441
  }
8372
- ${(0, import_design_system52.cq)("764px")} {
8442
+ ${(0, import_design_system53.cq)("764px")} {
8373
8443
  align-items: flex-start;
8374
8444
  display: grid;
8375
8445
  grid-template-columns: 200px 160px 1fr 32px;
@@ -8379,11 +8449,11 @@ var ConditionalInputRow = import_react85.css`
8379
8449
  }
8380
8450
  }
8381
8451
  `;
8382
- var SearchInput = import_react85.css`
8452
+ var SearchInput = import_react86.css`
8383
8453
  max-height: 40px;
8384
8454
  min-height: unset;
8385
8455
  `;
8386
- var BindableKeywordSearchInputStyles = import_react85.css`
8456
+ var BindableKeywordSearchInputStyles = import_react86.css`
8387
8457
  position: relative;
8388
8458
  width: 100%;
8389
8459
 
@@ -8398,19 +8468,19 @@ var BindableKeywordSearchInputStyles = import_react85.css`
8398
8468
  white-space: nowrap;
8399
8469
  }
8400
8470
  `;
8401
- var ClearSearchButtonContainer = import_react85.css`
8471
+ var ClearSearchButtonContainer = import_react86.css`
8402
8472
  align-items: center;
8403
8473
  display: flex;
8404
8474
  position: absolute;
8405
8475
  inset: 0 var(--spacing-lg) 0 auto;
8406
8476
  `;
8407
- var ClearSearchButtonStyles = import_react85.css`
8477
+ var ClearSearchButtonStyles = import_react86.css`
8408
8478
  background: none;
8409
8479
  border: none;
8410
8480
  padding: 0;
8411
8481
  pointer-events: all;
8412
8482
  `;
8413
- var FilterButton = import_react85.css`
8483
+ var FilterButton = import_react86.css`
8414
8484
  align-items: center;
8415
8485
  background: var(--white);
8416
8486
  border: 1px solid var(--gray-300);
@@ -8446,13 +8516,13 @@ var FilterButton = import_react85.css`
8446
8516
  opacity: var(--opacity-50);
8447
8517
  }
8448
8518
  `;
8449
- var FilterButtonText = import_react85.css`
8519
+ var FilterButtonText = import_react86.css`
8450
8520
  overflow: hidden;
8451
8521
  text-overflow: ellipsis;
8452
8522
  white-space: nowrap;
8453
8523
  max-width: 14ch;
8454
8524
  `;
8455
- var FilterButtonSelected = import_react85.css`
8525
+ var FilterButtonSelected = import_react86.css`
8456
8526
  background: var(--gray-100);
8457
8527
  border-color: var(--gray-300);
8458
8528
 
@@ -8460,7 +8530,7 @@ var FilterButtonSelected = import_react85.css`
8460
8530
  color: var(--accent-dark);
8461
8531
  }
8462
8532
  `;
8463
- var FilterButtonWithOptions = import_react85.css`
8533
+ var FilterButtonWithOptions = import_react86.css`
8464
8534
  :where([aria-expanded='true']) {
8465
8535
  background: var(--purple-rain-100);
8466
8536
  border-color: var(--accent-light);
@@ -8472,14 +8542,14 @@ var FilterButtonWithOptions = import_react85.css`
8472
8542
  }
8473
8543
  }
8474
8544
  `;
8475
- var SearchIcon = import_react85.css`
8545
+ var SearchIcon = import_react86.css`
8476
8546
  color: var(--icon-color);
8477
8547
  position: absolute;
8478
8548
  inset: 0 var(--spacing-base) 0 auto;
8479
8549
  margin: auto;
8480
8550
  transition: color var(--duration-fast) var(--timing-ease-out);
8481
8551
  `;
8482
- var AddConditionalBtn = import_react85.css`
8552
+ var AddConditionalBtn = import_react86.css`
8483
8553
  align-items: center;
8484
8554
  background: transparent;
8485
8555
  border: none;
@@ -8498,31 +8568,32 @@ var AddConditionalBtn = import_react85.css`
8498
8568
  color: var(--gray-400);
8499
8569
  }
8500
8570
  `;
8501
- var Title = import_react85.css`
8571
+ var Title = import_react86.css`
8502
8572
  color: var(--typography-light);
8503
8573
 
8504
8574
  &:focus {
8505
8575
  outline: none;
8506
8576
  }
8507
8577
  `;
8508
- var ResetConditionsBtn = import_react85.css`
8578
+ var ResetConditionsBtn = import_react86.css`
8509
8579
  background: transparent;
8510
8580
  border: none;
8511
8581
  color: var(--action-destructive-default);
8512
8582
  transition: color var(--duration-fast) var(--timing-ease-out);
8513
- padding: 0;
8583
+ padding: 0 var(--spacing-sm) 0 0;
8514
8584
 
8515
8585
  &:hover,
8516
8586
  &:focus {
8517
8587
  color: var(--action-destructive-hover);
8518
8588
  }
8519
8589
  `;
8520
- var IconBtn = import_react85.css`
8590
+ var IconBtn = import_react86.css`
8591
+ align-self: center;
8521
8592
  background: transparent;
8522
8593
  border: none;
8523
8594
  padding: var(--spacing-sm);
8524
8595
  `;
8525
- var SearchAndFilterOptionsContainer = import_react85.css`
8596
+ var SearchAndFilterOptionsContainer = import_react86.css`
8526
8597
  background: var(--gray-50);
8527
8598
  border: 1px solid var(--gray-300);
8528
8599
  border-radius: var(--rounded-base);
@@ -8533,21 +8604,21 @@ var SearchAndFilterOptionsContainer = import_react85.css`
8533
8604
  padding: var(--spacing-md) 0 var(--spacing-base);
8534
8605
  will-change: height;
8535
8606
  position: relative;
8536
- z-index: 1;
8607
+ z-index: 2;
8537
8608
  `;
8538
- var SearchAndFilterOptionsInnerContainer = import_react85.css`
8609
+ var SearchAndFilterOptionsInnerContainer = import_react86.css`
8539
8610
  display: flex;
8540
8611
  flex-direction: column;
8541
8612
  gap: var(--spacing-sm);
8542
8613
  padding-inline: var(--spacing-md);
8543
8614
  `;
8544
- var SearchAndFilterButtonGroup = import_react85.css`
8615
+ var SearchAndFilterButtonGroup = import_react86.css`
8545
8616
  margin-top: var(--spacing-xs);
8546
8617
  margin-left: calc(56px + var(--spacing-md));
8547
8618
  `;
8548
8619
 
8549
8620
  // src/components/SearchAndFilter/FilterButton.tsx
8550
- var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
8621
+ var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
8551
8622
  var FilterButton2 = ({
8552
8623
  text = "Filters",
8553
8624
  icon = "filter-add",
@@ -8556,7 +8627,7 @@ var FilterButton2 = ({
8556
8627
  dataTestId,
8557
8628
  ...props
8558
8629
  }) => {
8559
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
8630
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
8560
8631
  "button",
8561
8632
  {
8562
8633
  type: "button",
@@ -8568,9 +8639,9 @@ var FilterButton2 = ({
8568
8639
  ...props,
8569
8640
  "data-testid": dataTestId,
8570
8641
  children: [
8571
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_design_system53.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
8572
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { css: FilterButtonText, children: text }),
8573
- 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
8574
8645
  ]
8575
8646
  }
8576
8647
  );
@@ -8578,28 +8649,25 @@ var FilterButton2 = ({
8578
8649
 
8579
8650
  // src/components/SearchAndFilter/FilterControls.tsx
8580
8651
  var import_CgClose5 = require("@react-icons/all-files/cg/CgClose");
8581
- var import_design_system55 = require("@uniformdev/design-system");
8652
+ var import_design_system56 = require("@uniformdev/design-system");
8582
8653
  var import_lexical11 = require("lexical");
8583
- var import_react87 = require("react");
8654
+ var import_react88 = require("react");
8584
8655
  var import_react_use10 = require("react-use");
8585
8656
  var import_uuid3 = require("uuid");
8586
8657
 
8587
8658
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
8588
- var import_design_system54 = require("@uniformdev/design-system");
8589
- var import_react86 = require("react");
8659
+ var import_design_system55 = require("@uniformdev/design-system");
8660
+ var import_react87 = require("react");
8590
8661
 
8591
8662
  // src/components/SearchAndFilter/FilterEditor.tsx
8592
- var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
8663
+ var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
8593
8664
  var FilterEditorRenderer = ({ editorType, ...props }) => {
8594
8665
  const { filterMapper: contextFilterMapper } = useSearchAndFilter();
8595
8666
  const Editor = contextFilterMapper == null ? void 0 : contextFilterMapper[editorType];
8596
- if (!Editor) {
8597
- return null;
8598
- }
8599
- if (editorType === "empty") {
8600
- return null;
8667
+ if (!Editor || editorType === "empty") {
8668
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", {});
8601
8669
  }
8602
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Editor, { ...props });
8670
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Editor, { ...props });
8603
8671
  };
8604
8672
  var filterMapper = {
8605
8673
  multiChoice: FilterMultiChoiceEditor,
@@ -8607,6 +8675,7 @@ var filterMapper = {
8607
8675
  date: DateEditor,
8608
8676
  dateRange: DateRangeEditor,
8609
8677
  text: TextEditor,
8678
+ textMultiChoice: TextMultiChoiceEditor,
8610
8679
  numberRange: NumberRangeEditor,
8611
8680
  number: NumberEditor,
8612
8681
  statusMultiChoice: StatusMultiEditor,
@@ -8616,9 +8685,9 @@ var filterMapper = {
8616
8685
  function withInputVariables(WrappedComponent) {
8617
8686
  const WithInputVariables = (props) => {
8618
8687
  if (Array.isArray(props.value) || !props.bindable || props.disabled || props.readOnly) {
8619
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props });
8688
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props });
8620
8689
  }
8621
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8690
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8622
8691
  InputVariables,
8623
8692
  {
8624
8693
  disableInlineMenu: true,
@@ -8626,7 +8695,7 @@ function withInputVariables(WrappedComponent) {
8626
8695
  onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
8627
8696
  value: props.value,
8628
8697
  disabled: props.disabled,
8629
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props })
8698
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props })
8630
8699
  }
8631
8700
  );
8632
8701
  };
@@ -8636,16 +8705,16 @@ function withInputVariablesForMultiValue(WrappedComponent) {
8636
8705
  const WithInputVariables = (props) => {
8637
8706
  var _a;
8638
8707
  if (!props.bindable || props.disabled || props.readOnly) {
8639
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props });
8708
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props });
8640
8709
  }
8641
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
8710
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8642
8711
  InputVariables,
8643
8712
  {
8644
8713
  disableInlineMenu: true,
8645
8714
  showMenuPosition: "inline-right",
8646
8715
  onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
8647
8716
  value: (_a = props.value) == null ? void 0 : _a[0],
8648
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(WrappedComponent, { ...props })
8717
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(WrappedComponent, { ...props })
8649
8718
  }
8650
8719
  );
8651
8720
  };
@@ -8661,8 +8730,8 @@ var bindableFiltersMapper = {
8661
8730
  };
8662
8731
 
8663
8732
  // src/components/SearchAndFilter/hooks/useSearchAndFilter.tsx
8664
- var import_jsx_runtime82 = require("@emotion/react/jsx-runtime");
8665
- var SearchAndFilterContext = (0, import_react86.createContext)({
8733
+ var import_jsx_runtime83 = require("@emotion/react/jsx-runtime");
8734
+ var SearchAndFilterContext = (0, import_react87.createContext)({
8666
8735
  searchTerm: "",
8667
8736
  setSearchTerm: () => {
8668
8737
  },
@@ -8697,41 +8766,41 @@ var SearchAndFilterProvider = ({
8697
8766
  children,
8698
8767
  allowBindingSearchTerm
8699
8768
  }) => {
8700
- const [searchTerm, setSearchTerm] = (0, import_react86.useState)(defaultSearchTerm);
8701
- const deferredSearchTerm = (0, import_react86.useDeferredValue)(searchTerm);
8702
- const [filterVisibility, setFilterVisibility] = (0, import_react86.useState)(filterVisible);
8703
- 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)(
8704
8773
  (term) => {
8705
8774
  setSearchTerm(term);
8706
8775
  onSearchChange == null ? void 0 : onSearchChange(term);
8707
8776
  },
8708
8777
  [setSearchTerm, onSearchChange]
8709
8778
  );
8710
- const handleToggleFilterVisibility = (0, import_react86.useCallback)(
8779
+ const handleToggleFilterVisibility = (0, import_react87.useCallback)(
8711
8780
  (visible) => setFilterVisibility(visible),
8712
8781
  [setFilterVisibility]
8713
8782
  );
8714
- const handleAddFilter = (0, import_react86.useCallback)(() => {
8783
+ const handleAddFilter = (0, import_react87.useCallback)(() => {
8715
8784
  onChange([...filters, { field: "", operator: "", value: "" }]);
8716
8785
  }, [filters, onChange]);
8717
- const handleResetFilters = (0, import_react86.useCallback)(() => {
8786
+ const handleResetFilters = (0, import_react87.useCallback)(() => {
8718
8787
  onSearchChange == null ? void 0 : onSearchChange("");
8719
8788
  onChange(resetFilterValues);
8720
8789
  }, [onChange, resetFilterValues, onSearchChange]);
8721
- const handleDeleteFilter = (0, import_react86.useCallback)(
8790
+ const handleDeleteFilter = (0, import_react87.useCallback)(
8722
8791
  (index) => {
8723
8792
  const remainingFilters = filters.filter((_, i) => i !== index);
8724
8793
  onChange(remainingFilters);
8725
8794
  },
8726
8795
  [filters, onChange]
8727
8796
  );
8728
- const validFilterQuery = (0, import_react86.useMemo)(() => {
8797
+ const validFilterQuery = (0, import_react87.useMemo)(() => {
8729
8798
  const hasValidFilters = filters.every((f) => f.field && f.operator && f.value);
8730
8799
  if (hasValidFilters) {
8731
8800
  return filters;
8732
8801
  }
8733
8802
  }, [filters]);
8734
- (0, import_react86.useEffect)(() => {
8803
+ (0, import_react87.useEffect)(() => {
8735
8804
  if (filterVisibility) {
8736
8805
  const handleEscKeyFilterClose = (e) => {
8737
8806
  if (e.key === "Escape") {
@@ -8744,7 +8813,7 @@ var SearchAndFilterProvider = ({
8744
8813
  };
8745
8814
  }
8746
8815
  }, [filterVisibility]);
8747
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
8816
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8748
8817
  SearchAndFilterContext.Provider,
8749
8818
  {
8750
8819
  value: {
@@ -8763,17 +8832,17 @@ var SearchAndFilterProvider = ({
8763
8832
  filterMapper: filterMapper2,
8764
8833
  allowBindingSearchTerm
8765
8834
  },
8766
- 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 })
8767
8836
  }
8768
8837
  );
8769
8838
  };
8770
8839
  var useSearchAndFilter = () => {
8771
- const value = (0, import_react86.useContext)(SearchAndFilterContext);
8840
+ const value = (0, import_react87.useContext)(SearchAndFilterContext);
8772
8841
  return { ...value };
8773
8842
  };
8774
8843
 
8775
8844
  // src/components/SearchAndFilter/FilterControls.tsx
8776
- var import_jsx_runtime83 = require("@emotion/react/jsx-runtime");
8845
+ var import_jsx_runtime84 = require("@emotion/react/jsx-runtime");
8777
8846
  var FilterControls = ({
8778
8847
  children,
8779
8848
  hideSearchInput
@@ -8786,10 +8855,10 @@ var FilterControls = ({
8786
8855
  searchTerm,
8787
8856
  allowBindingSearchTerm
8788
8857
  } = useSearchAndFilter();
8789
- const editorRef = (0, import_react87.useRef)(null);
8858
+ const editorRef = (0, import_react88.useRef)(null);
8790
8859
  const hasVariableInSearchTerm = hasReferencedVariables(searchTerm);
8791
- const [idToResetInputVariables, setIdToResetInputVariables] = (0, import_react87.useState)("data-resource-search-term-input");
8792
- 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);
8793
8862
  (0, import_react_use10.useDebounce)(
8794
8863
  () => {
8795
8864
  setSearchTerm(localeSearchTerm);
@@ -8797,14 +8866,14 @@ var FilterControls = ({
8797
8866
  300,
8798
8867
  [localeSearchTerm]
8799
8868
  );
8800
- (0, import_react87.useEffect)(() => {
8869
+ (0, import_react88.useEffect)(() => {
8801
8870
  if (searchTerm === "") {
8802
8871
  setLocaleSearchTerm("");
8803
8872
  setIdToResetInputVariables(`data-resource-search-term-input-${(0, import_uuid3.v4)()}`);
8804
8873
  }
8805
8874
  }, [searchTerm]);
8806
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
8807
- /* @__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)(
8808
8877
  FilterButton2,
8809
8878
  {
8810
8879
  "aria-controls": "search-and-filter-options",
@@ -8817,8 +8886,8 @@ var FilterControls = ({
8817
8886
  dataTestId: "filters-button"
8818
8887
  }
8819
8888
  ),
8820
- hideSearchInput ? null : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { css: BindableKeywordSearchInputStyles, children: [
8821
- /* @__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)(
8822
8891
  InputVariables,
8823
8892
  {
8824
8893
  label: "",
@@ -8828,8 +8897,8 @@ var FilterControls = ({
8828
8897
  value: localeSearchTerm,
8829
8898
  onChange: (value) => setLocaleSearchTerm(value != null ? value : ""),
8830
8899
  disableVariables: !allowBindingSearchTerm,
8831
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
8832
- import_design_system55.InputKeywordSearch,
8900
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8901
+ import_design_system56.InputKeywordSearch,
8833
8902
  {
8834
8903
  placeholder: "Search...",
8835
8904
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -8841,7 +8910,7 @@ var FilterControls = ({
8841
8910
  )
8842
8911
  }
8843
8912
  ),
8844
- 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)(
8845
8914
  "button",
8846
8915
  {
8847
8916
  css: ClearSearchButtonStyles,
@@ -8855,7 +8924,7 @@ var FilterControls = ({
8855
8924
  },
8856
8925
  type: "button",
8857
8926
  "data-testid": "keyword-search-clear-button",
8858
- 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" })
8859
8928
  }
8860
8929
  ) }) : null
8861
8930
  ] }),
@@ -8864,22 +8933,22 @@ var FilterControls = ({
8864
8933
  };
8865
8934
 
8866
8935
  // src/components/SearchAndFilter/FilterItem.tsx
8867
- var import_design_system57 = require("@uniformdev/design-system");
8868
- var import_react89 = require("react");
8936
+ var import_design_system58 = require("@uniformdev/design-system");
8937
+ var import_react90 = require("react");
8869
8938
 
8870
8939
  // src/components/SearchAndFilter/FilterMenu.tsx
8871
- var import_design_system56 = require("@uniformdev/design-system");
8872
- var import_react88 = __toESM(require("react"));
8873
- 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");
8874
8943
  var SearchAndFilterOptionsContainer2 = ({
8875
8944
  buttonRow,
8876
8945
  additionalFiltersContainer,
8877
8946
  children
8878
8947
  }) => {
8879
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { css: SearchAndFilterOptionsContainer, children: [
8880
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { css: SearchAndFilterOptionsInnerContainer, children }),
8881
- buttonRow ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
8882
- 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,
8883
8952
  {
8884
8953
  css: SearchAndFilterButtonGroup,
8885
8954
  gap: "sm",
@@ -8888,7 +8957,7 @@ var SearchAndFilterOptionsContainer2 = ({
8888
8957
  children: buttonRow
8889
8958
  }
8890
8959
  ) : null,
8891
- additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: additionalFiltersContainer }) : null
8960
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { children: additionalFiltersContainer }) : null
8892
8961
  ] });
8893
8962
  };
8894
8963
  var FilterMenu = ({
@@ -8901,22 +8970,22 @@ var FilterMenu = ({
8901
8970
  resetButtonText = "reset"
8902
8971
  }) => {
8903
8972
  const { filterVisibility, setFilterVisibility, handleResetFilters, filters } = useSearchAndFilter();
8904
- const innerMenuRef = import_react88.default.useRef(null);
8905
- (0, import_react88.useEffect)(() => {
8973
+ const innerMenuRef = import_react89.default.useRef(null);
8974
+ (0, import_react89.useEffect)(() => {
8906
8975
  var _a;
8907
8976
  if (filterVisibility) {
8908
8977
  (_a = innerMenuRef.current) == null ? void 0 : _a.focus();
8909
8978
  }
8910
8979
  }, [filterVisibility]);
8911
- 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)(
8912
8981
  SearchAndFilterOptionsContainer2,
8913
8982
  {
8914
8983
  buttonRow: menuControls,
8915
8984
  additionalFiltersContainer,
8916
8985
  children: [
8917
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_design_system56.HorizontalRhythm, { gap: "sm", align: "center", justify: "space-between", children: [
8918
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { css: Title, ref: innerMenuRef, tabIndex: 0, children: filterTitle }),
8919
- (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)(
8920
8989
  "button",
8921
8990
  {
8922
8991
  type: "button",
@@ -8937,7 +9006,7 @@ var FilterMenu = ({
8937
9006
  };
8938
9007
 
8939
9008
  // src/components/SearchAndFilter/FilterItem.tsx
8940
- var import_jsx_runtime85 = require("@emotion/react/jsx-runtime");
9009
+ var import_jsx_runtime86 = require("@emotion/react/jsx-runtime");
8941
9010
  var FilterItem = ({
8942
9011
  index,
8943
9012
  paramOptions,
@@ -8945,7 +9014,8 @@ var FilterItem = ({
8945
9014
  valueOptions,
8946
9015
  onParamChange,
8947
9016
  onOperatorChange,
8948
- onValueChange
9017
+ onValueChange,
9018
+ initialCriteriaTitle = "Where"
8949
9019
  }) => {
8950
9020
  var _a, _b;
8951
9021
  const { filters, handleDeleteFilter, filterOptions } = useSearchAndFilter();
@@ -8953,7 +9023,7 @@ var FilterItem = ({
8953
9023
  const operatorLabel = filters[index].operator !== "" ? `operator ${filters[index].operator}` : "unknown operator";
8954
9024
  const metaDataLabel = filters[index].value !== "" ? `value ${filters[index].value}` : "unknown value";
8955
9025
  const metaDataPossibleOptions = (_b = (_a = operatorOptions.find((op) => filters[index].operator === op.value)) == null ? void 0 : _a.editorType) != null ? _b : "singleChoice";
8956
- const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react89.useMemo)(() => {
9026
+ const { selectedFieldValue, selectedOperatorValue, selectedMetaValue, readOnly, bindable } = (0, import_react90.useMemo)(() => {
8957
9027
  var _a2;
8958
9028
  const currentSelectedFilter = filterOptions.find((item) => {
8959
9029
  var _a3;
@@ -8980,11 +9050,11 @@ var FilterItem = ({
8980
9050
  menuIsOpen: false,
8981
9051
  isClearable: false
8982
9052
  } : {};
8983
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: ConditionalFilterRow, "data-testid": "filter-item", children: [
8984
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: index === 0 ? "Where" : "and" }),
8985
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { css: ConditionalInputRow, children: [
8986
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
8987
- 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,
8988
9058
  {
8989
9059
  "aria-label": label,
8990
9060
  options: paramOptions,
@@ -9010,8 +9080,8 @@ var FilterItem = ({
9010
9080
  name: `filter-field-${index}`
9011
9081
  }
9012
9082
  ),
9013
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9014
- import_design_system57.InputComboBox,
9083
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9084
+ import_design_system58.InputComboBox,
9015
9085
  {
9016
9086
  "aria-label": operatorLabel,
9017
9087
  options: operatorOptions,
@@ -9034,7 +9104,7 @@ var FilterItem = ({
9034
9104
  name: `filter-operator-${index}`
9035
9105
  }
9036
9106
  ),
9037
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9107
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9038
9108
  FilterEditorRenderer,
9039
9109
  {
9040
9110
  "aria-label": metaDataLabel,
@@ -9048,7 +9118,7 @@ var FilterItem = ({
9048
9118
  valueTestId: "filter-value"
9049
9119
  }
9050
9120
  ),
9051
- readOnly || index === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9121
+ readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9052
9122
  "button",
9053
9123
  {
9054
9124
  type: "button",
@@ -9056,15 +9126,36 @@ var FilterItem = ({
9056
9126
  "aria-label": "delete filter",
9057
9127
  css: IconBtn,
9058
9128
  "data-testid": "delete-filter",
9059
- 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" })
9060
9131
  }
9061
9132
  )
9062
9133
  ] })
9063
9134
  ] });
9064
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"]);
9065
9153
  var FilterItems = ({
9066
9154
  addButtonText = "add condition",
9067
- additionalFiltersContainer
9155
+ additionalFiltersContainer,
9156
+ filterTitle,
9157
+ resetButtonText,
9158
+ initialCriteriaTitle
9068
9159
  }) => {
9069
9160
  const { filterOptions, filters, setFilters, handleAddFilter } = useSearchAndFilter();
9070
9161
  const handleUpdateFilter = (index, prop, value) => {
@@ -9072,14 +9163,25 @@ var FilterItems = ({
9072
9163
  const next = [...filters];
9073
9164
  next[index] = { ...next[index], [prop]: value };
9074
9165
  if (prop === "operator") {
9075
- 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)) {
9076
9172
  next[index].value = next[index].value[0];
9077
9173
  }
9078
- 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)) {
9079
9178
  next[index].value = "";
9080
9179
  }
9081
- if (!Array.isArray(value) && ["between"].includes(value) && Array.isArray(next[index].value) === false) {
9082
- next[index].value = [next[index].value, ""];
9180
+ if (noValueOperators.has(newOperator)) {
9181
+ next[index].value = "";
9182
+ }
9183
+ if (newOperator === "between" && Array.isArray(currentValue) === false) {
9184
+ next[index].value = [currentValue, ""];
9083
9185
  }
9084
9186
  if (value === "def" || value === "true") {
9085
9187
  next[index].value = "true";
@@ -9098,12 +9200,12 @@ var FilterItems = ({
9098
9200
  }
9099
9201
  setFilters(next);
9100
9202
  };
9101
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9203
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9102
9204
  FilterMenu,
9103
9205
  {
9104
9206
  id: "search-and-filter-options",
9105
9207
  dataTestId: "search-and-filter-options",
9106
- menuControls: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
9208
+ menuControls: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
9107
9209
  "button",
9108
9210
  {
9109
9211
  type: "button",
@@ -9111,12 +9213,14 @@ var FilterItems = ({
9111
9213
  onClick: handleAddFilter,
9112
9214
  "data-testid": "add-filter",
9113
9215
  children: [
9114
- /* @__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" }),
9115
9217
  addButtonText
9116
9218
  ]
9117
9219
  }
9118
9220
  ),
9119
9221
  additionalFiltersContainer,
9222
+ filterTitle,
9223
+ resetButtonText,
9120
9224
  children: filters.map((item, i) => {
9121
9225
  var _a, _b, _c, _d, _e, _f;
9122
9226
  const availableTypeOptions = (_b = (_a = filterOptions.find((fo) => {
@@ -9125,7 +9229,7 @@ var FilterItems = ({
9125
9229
  })) == null ? void 0 : _a.options) != null ? _b : [];
9126
9230
  const possibleValueOptions = (_d = (_c = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _c.valueOptions) != null ? _d : [];
9127
9231
  const possibleOperators = (_f = (_e = availableTypeOptions == null ? void 0 : availableTypeOptions.find((op) => op.value === item.field)) == null ? void 0 : _e.operatorOptions) != null ? _f : [];
9128
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
9232
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
9129
9233
  FilterItem,
9130
9234
  {
9131
9235
  index: i,
@@ -9134,7 +9238,8 @@ var FilterItems = ({
9134
9238
  operatorOptions: possibleOperators,
9135
9239
  onOperatorChange: (e) => handleUpdateFilter(i, "operator", e),
9136
9240
  onValueChange: (e) => handleUpdateFilter(i, "value", e),
9137
- valueOptions: possibleValueOptions
9241
+ valueOptions: possibleValueOptions,
9242
+ initialCriteriaTitle
9138
9243
  },
9139
9244
  i
9140
9245
  );
@@ -9144,11 +9249,11 @@ var FilterItems = ({
9144
9249
  };
9145
9250
 
9146
9251
  // src/components/SearchAndFilter/SearchAndFilter.tsx
9147
- var import_design_system59 = require("@uniformdev/design-system");
9252
+ var import_design_system60 = require("@uniformdev/design-system");
9148
9253
 
9149
9254
  // src/components/SearchAndFilter/SearchAndFilterResultContainer.tsx
9150
- var import_design_system58 = require("@uniformdev/design-system");
9151
- 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");
9152
9257
  var SearchAndFilterResultContainer = ({
9153
9258
  buttonText,
9154
9259
  clearButtonLabel = "clear",
@@ -9178,31 +9283,40 @@ var SearchAndFilterResultContainer = ({
9178
9283
  handleResetFilters();
9179
9284
  }
9180
9285
  };
9181
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
9182
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system58.HorizontalRhythm, { children: [
9183
- /* @__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: [
9184
9289
  totalResults,
9185
9290
  " results ",
9186
9291
  searchTerm ? `for "${searchTerm}"` : null
9187
9292
  ] }),
9188
- !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 })
9189
9294
  ] }),
9190
- totalResults === 0 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system58.Callout, { title: calloutTitle != null ? calloutTitle : automateCalloutTitle(), type: "note", children: [
9191
- calloutText ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Paragraph, { children: calloutText }) : null,
9192
- hideClearButton ? null : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system58.Button, { buttonType: "tertiaryOutline", size: "xs", onClick: handleClearSearch, children: buttonText != null ? buttonText : "Clear search" })
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,
9299
+ {
9300
+ buttonType: "tertiaryOutline",
9301
+ size: "xs",
9302
+ onClick: handleClearSearch,
9303
+ "data-testid": "clear-search",
9304
+ children: buttonText != null ? buttonText : "Clear search"
9305
+ }
9306
+ )
9193
9307
  ] }) : null
9194
9308
  ] });
9195
9309
  };
9196
9310
 
9197
9311
  // src/components/SearchAndFilter/SearchAndFilter.tsx
9198
- var import_jsx_runtime87 = require("@emotion/react/jsx-runtime");
9312
+ var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
9199
9313
  var SearchAndFilter = ({
9200
9314
  filters,
9201
9315
  filterOptions,
9202
9316
  filterVisible,
9203
9317
  filterControls,
9204
9318
  viewSwitchControls,
9205
- resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SearchAndFilterResultContainer, {}),
9319
+ resultsContainerView = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(SearchAndFilterResultContainer, {}),
9206
9320
  filterMapper: filterMapper2 = filterMapper,
9207
9321
  additionalFiltersContainer,
9208
9322
  onChange,
@@ -9212,7 +9326,7 @@ var SearchAndFilter = ({
9212
9326
  allowBindingSearchTerm = false,
9213
9327
  resetFilterValues = []
9214
9328
  }) => {
9215
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
9329
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9216
9330
  SearchAndFilterProvider,
9217
9331
  {
9218
9332
  filters,
@@ -9225,18 +9339,18 @@ var SearchAndFilter = ({
9225
9339
  resetFilterValues,
9226
9340
  filterMapper: filterMapper2,
9227
9341
  allowBindingSearchTerm,
9228
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system59.VerticalRhythm, { "data-testid": "search-and-filter", children: [
9229
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { css: SearchAndFilterOutterControlWrapper(viewSwitchControls ? "1fr auto" : "1fr"), children: [
9230
- /* @__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)(
9231
9345
  "div",
9232
9346
  {
9233
9347
  css: SearchAndFilterControlsWrapper(viewSwitchControls ? "auto 1fr 0.05fr" : "auto 1fr"),
9234
- 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
9235
9349
  }
9236
9350
  ),
9237
9351
  viewSwitchControls
9238
9352
  ] }),
9239
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FilterItems, { additionalFiltersContainer }),
9353
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FilterItems, { additionalFiltersContainer }),
9240
9354
  resultsContainerView
9241
9355
  ] })
9242
9356
  }
@@ -9244,18 +9358,18 @@ var SearchAndFilter = ({
9244
9358
  };
9245
9359
 
9246
9360
  // src/components/SearchAndFilter/SearchOnlyFilter.tsx
9247
- var import_design_system60 = require("@uniformdev/design-system");
9248
- var import_react90 = require("react");
9361
+ var import_design_system61 = require("@uniformdev/design-system");
9362
+ var import_react91 = require("react");
9249
9363
  var import_react_use11 = require("react-use");
9250
- var import_jsx_runtime88 = require("@emotion/react/jsx-runtime");
9251
- var SearchOnlyContext = (0, import_react90.createContext)({
9364
+ var import_jsx_runtime89 = require("@emotion/react/jsx-runtime");
9365
+ var SearchOnlyContext = (0, import_react91.createContext)({
9252
9366
  searchTerm: "",
9253
9367
  setSearchTerm: () => {
9254
9368
  }
9255
9369
  });
9256
9370
  var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9257
9371
  const { searchTerm, setSearchTerm } = useSearchAndFilter();
9258
- const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react90.useState)("");
9372
+ const [localeSearchTerm, setLocaleSearchTerm] = (0, import_react91.useState)("");
9259
9373
  (0, import_react_use11.useDebounce)(
9260
9374
  () => {
9261
9375
  setSearchTerm(localeSearchTerm);
@@ -9264,15 +9378,15 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9264
9378
  300,
9265
9379
  [localeSearchTerm]
9266
9380
  );
9267
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9381
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9268
9382
  SearchOnlyContext.Provider,
9269
9383
  {
9270
9384
  value: {
9271
9385
  searchTerm,
9272
9386
  setSearchTerm: setLocaleSearchTerm
9273
9387
  },
9274
- children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { css: { maxWidth: maxWidth != null ? maxWidth : "712px" }, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
9275
- 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,
9276
9390
  {
9277
9391
  placeholder: "Search...",
9278
9392
  onSearchTextChanged: (e) => setLocaleSearchTerm(e),
@@ -9286,18 +9400,18 @@ var SearchOnlyFilter = ({ onSearchChange, maxWidth }) => {
9286
9400
  };
9287
9401
 
9288
9402
  // src/components/SearchAndFilter/SortItems.tsx
9289
- var import_design_system62 = require("@uniformdev/design-system");
9403
+ var import_design_system63 = require("@uniformdev/design-system");
9290
9404
 
9291
9405
  // src/components/SearchAndFilter/styles/SortItems.styles.ts
9292
- var import_react91 = require("@emotion/react");
9293
- var import_design_system61 = require("@uniformdev/design-system");
9294
- 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`
9295
9409
  display: grid;
9296
9410
  grid-template-columns: 35px 1fr;
9297
9411
  gap: var(--spacing-sm);
9298
9412
  margin-left: var(--spacing-base);
9299
9413
 
9300
- ${(0, import_design_system61.cq)("380px")} {
9414
+ ${(0, import_design_system62.cq)("380px")} {
9301
9415
  align-items: center;
9302
9416
 
9303
9417
  &:after {
@@ -9318,22 +9432,22 @@ var ConditionalFilterRow2 = import_react91.css`
9318
9432
  grid-template-columns: 50px 1fr;
9319
9433
  }
9320
9434
 
9321
- ${(0, import_design_system61.cq)("580px")} {
9435
+ ${(0, import_design_system62.cq)("580px")} {
9322
9436
  &:after {
9323
9437
  display: none;
9324
9438
  }
9325
9439
  }
9326
9440
 
9327
9441
  @media (prefers-reduced-motion: no-preference) {
9328
- 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);
9329
9443
  }
9330
9444
  `;
9331
- var ConditionalInputRow2 = import_react91.css`
9445
+ var ConditionalInputRow2 = import_react92.css`
9332
9446
  display: flex;
9333
9447
  gap: var(--spacing-sm);
9334
9448
  flex-wrap: wrap;
9335
9449
 
9336
- ${(0, import_design_system61.cq)("380px")} {
9450
+ ${(0, import_design_system62.cq)("380px")} {
9337
9451
  & > div:nth-child(-n + 2) {
9338
9452
  width: calc(50% - var(--spacing-sm));
9339
9453
  }
@@ -9342,7 +9456,7 @@ var ConditionalInputRow2 = import_react91.css`
9342
9456
  width: calc(100% - 48px);
9343
9457
  }
9344
9458
  }
9345
- ${(0, import_design_system61.cq)("580px")} {
9459
+ ${(0, import_design_system62.cq)("580px")} {
9346
9460
  display: grid;
9347
9461
  grid-template-columns: 200px 160px 1fr 32px;
9348
9462
 
@@ -9351,11 +9465,11 @@ var ConditionalInputRow2 = import_react91.css`
9351
9465
  }
9352
9466
  }
9353
9467
  `;
9354
- var SearchInput2 = import_react91.css`
9468
+ var SearchInput2 = import_react92.css`
9355
9469
  max-height: 40px;
9356
9470
  min-height: unset;
9357
9471
  `;
9358
- var FilterButton3 = import_react91.css`
9472
+ var FilterButton3 = import_react92.css`
9359
9473
  align-items: center;
9360
9474
  background: var(--white);
9361
9475
  border: 1px solid var(--gray-300);
@@ -9391,13 +9505,13 @@ var FilterButton3 = import_react91.css`
9391
9505
  opacity: var(--opacity-50);
9392
9506
  }
9393
9507
  `;
9394
- var FilterButtonText2 = import_react91.css`
9508
+ var FilterButtonText2 = import_react92.css`
9395
9509
  overflow: hidden;
9396
9510
  text-overflow: ellipsis;
9397
9511
  white-space: nowrap;
9398
9512
  max-width: 14ch;
9399
9513
  `;
9400
- var FilterButtonSelected2 = import_react91.css`
9514
+ var FilterButtonSelected2 = import_react92.css`
9401
9515
  background: var(--gray-100);
9402
9516
  border-color: var(--gray-300);
9403
9517
 
@@ -9405,7 +9519,7 @@ var FilterButtonSelected2 = import_react91.css`
9405
9519
  color: var(--accent-dark);
9406
9520
  }
9407
9521
  `;
9408
- var FilterButtonWithOptions2 = import_react91.css`
9522
+ var FilterButtonWithOptions2 = import_react92.css`
9409
9523
  :where([aria-expanded='true']) {
9410
9524
  background: var(--purple-rain-100);
9411
9525
  border-color: var(--accent-light);
@@ -9417,14 +9531,14 @@ var FilterButtonWithOptions2 = import_react91.css`
9417
9531
  }
9418
9532
  }
9419
9533
  `;
9420
- var SearchIcon2 = import_react91.css`
9534
+ var SearchIcon2 = import_react92.css`
9421
9535
  color: var(--icon-color);
9422
9536
  position: absolute;
9423
9537
  inset: 0 var(--spacing-base) 0 auto;
9424
9538
  margin: auto;
9425
9539
  transition: color var(--duration-fast) var(--timing-ease-out);
9426
9540
  `;
9427
- var AddConditionalBtn2 = import_react91.css`
9541
+ var AddConditionalBtn2 = import_react92.css`
9428
9542
  align-items: center;
9429
9543
  background: transparent;
9430
9544
  border: none;
@@ -9443,14 +9557,14 @@ var AddConditionalBtn2 = import_react91.css`
9443
9557
  color: var(--gray-400);
9444
9558
  }
9445
9559
  `;
9446
- var Title2 = import_react91.css`
9560
+ var Title2 = import_react92.css`
9447
9561
  color: var(--typography-light);
9448
9562
 
9449
9563
  &:focus {
9450
9564
  outline: none;
9451
9565
  }
9452
9566
  `;
9453
- var ResetConditionsBtn2 = import_react91.css`
9567
+ var ResetConditionsBtn2 = import_react92.css`
9454
9568
  background: transparent;
9455
9569
  border: none;
9456
9570
  color: var(--action-destructive-default);
@@ -9462,12 +9576,12 @@ var ResetConditionsBtn2 = import_react91.css`
9462
9576
  color: var(--action-destructive-hover);
9463
9577
  }
9464
9578
  `;
9465
- var IconBtn2 = import_react91.css`
9579
+ var IconBtn2 = import_react92.css`
9466
9580
  background: transparent;
9467
9581
  border: none;
9468
9582
  padding: var(--spacing-sm);
9469
9583
  `;
9470
- var SearchAndFilterOptionsContainer3 = import_react91.css`
9584
+ var SearchAndFilterOptionsContainer3 = import_react92.css`
9471
9585
  background: var(--gray-50);
9472
9586
  border: 1px solid var(--gray-300);
9473
9587
  border-radius: var(--rounded-base);
@@ -9480,17 +9594,17 @@ var SearchAndFilterOptionsContainer3 = import_react91.css`
9480
9594
  position: relative;
9481
9595
  z-index: 1;
9482
9596
  `;
9483
- var SearchAndFilterOptionsInnerContainer2 = import_react91.css`
9597
+ var SearchAndFilterOptionsInnerContainer2 = import_react92.css`
9484
9598
  display: flex;
9485
9599
  flex-direction: column;
9486
9600
  gap: var(--spacing-sm);
9487
9601
  padding-inline: var(--spacing-md);
9488
9602
  `;
9489
- var SearchAndFilterButtonGroup2 = import_react91.css`
9603
+ var SearchAndFilterButtonGroup2 = import_react92.css`
9490
9604
  margin-top: var(--spacing-xs);
9491
9605
  margin-left: calc(56px + var(--spacing-md));
9492
9606
  `;
9493
- var SortFilterWrapper = (hiddenLocaleInput) => import_react91.css`
9607
+ var SortFilterWrapper = (hiddenLocaleInput) => import_react92.css`
9494
9608
  align-items: center;
9495
9609
  border-top: 1px solid var(--gray-300);
9496
9610
  display: flex;
@@ -9500,18 +9614,18 @@ var SortFilterWrapper = (hiddenLocaleInput) => import_react91.css`
9500
9614
  position: relative;
9501
9615
  z-index: 0;
9502
9616
 
9503
- ${(0, import_design_system61.cq)("420px")} {
9617
+ ${(0, import_design_system62.cq)("420px")} {
9504
9618
  display: grid;
9505
9619
  grid-template-columns: ${hiddenLocaleInput ? "1fr" : "1fr minmax(140px, 0.25fr)"};
9506
9620
  }
9507
9621
  `;
9508
- var SortFilterInputRow = import_react91.css`
9622
+ var SortFilterInputRow = import_react92.css`
9509
9623
  align-items: center;
9510
9624
  display: grid;
9511
9625
  grid-template-columns: 1fr auto;
9512
9626
  gap: var(--spacing-base);
9513
9627
  `;
9514
- var InputVariableWrapper = import_react91.css`
9628
+ var InputVariableWrapper = import_react92.css`
9515
9629
  flex-grow: 1;
9516
9630
 
9517
9631
  // we need to override label styles nested within the input variable
@@ -9522,7 +9636,7 @@ var InputVariableWrapper = import_react91.css`
9522
9636
  `;
9523
9637
 
9524
9638
  // src/components/SearchAndFilter/SortItems.tsx
9525
- var import_jsx_runtime89 = require("@emotion/react/jsx-runtime");
9639
+ var import_jsx_runtime90 = require("@emotion/react/jsx-runtime");
9526
9640
  var SortItems = ({
9527
9641
  sortByLabel = "Sort by",
9528
9642
  localeLabel = "Show locale",
@@ -9544,11 +9658,11 @@ var SortItems = ({
9544
9658
  return (_a2 = item.options) == null ? void 0 : _a2.find((option) => option.value === sortField);
9545
9659
  })) == null ? void 0 : _a.options) == null ? void 0 : _b.find((nestedOption) => nestedOption.value === sortField);
9546
9660
  const localeLabelValue = sortOptions.length > 1 ? localeLabel : `${localeLabel}s`;
9547
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: [SortFilterWrapper(hideLocaleOptions)], "data-testid": "sorting-options", children: [
9548
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_design_system62.VerticalRhythm, { gap: "xs", children: [
9549
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { css: Title2, children: sortByLabel }),
9550
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: SortFilterInputRow, children: [
9551
- /* @__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)(
9552
9666
  InputVariables,
9553
9667
  {
9554
9668
  disableInlineMenu: disableSortBinding,
@@ -9556,8 +9670,8 @@ var SortItems = ({
9556
9670
  value: sortField,
9557
9671
  valueToResetTo: "created_at",
9558
9672
  onChange: (e) => onSortChange(`${e}_${sortDirection}`),
9559
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9560
- import_design_system62.InputComboBox,
9673
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9674
+ import_design_system63.InputComboBox,
9561
9675
  {
9562
9676
  id: "sort-by-field",
9563
9677
  "aria-label": "Sort by",
@@ -9579,7 +9693,7 @@ var SortItems = ({
9579
9693
  )
9580
9694
  }
9581
9695
  ),
9582
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9696
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9583
9697
  InputVariables,
9584
9698
  {
9585
9699
  disableInlineMenu: disableSortBinding,
@@ -9587,8 +9701,8 @@ var SortItems = ({
9587
9701
  valueToResetTo: "DESC",
9588
9702
  showMenuPosition: disableSortBinding ? void 0 : "inline-right",
9589
9703
  onChange: (e) => onSortChange(`${sortField}_${e}`),
9590
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9591
- import_design_system62.SegmentedControl,
9704
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9705
+ import_design_system63.SegmentedControl,
9592
9706
  {
9593
9707
  noCheckmark: true,
9594
9708
  name: "sortBy",
@@ -9619,15 +9733,15 @@ var SortItems = ({
9619
9733
  )
9620
9734
  ] })
9621
9735
  ] }),
9622
- 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)(
9623
9737
  InputVariables,
9624
9738
  {
9625
9739
  label: localeLabelValue,
9626
9740
  value: localeValue,
9627
9741
  showMenuPosition: "inline-right",
9628
9742
  onChange: (e) => onLocaleChange(e != null ? e : ""),
9629
- inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
9630
- import_design_system62.InputSelect,
9743
+ inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
9744
+ import_design_system63.InputSelect,
9631
9745
  {
9632
9746
  name: "localeReturned",
9633
9747
  "aria-label": localeLabelValue,
@@ -9657,19 +9771,19 @@ function createLocationValidator(setValue, validate) {
9657
9771
 
9658
9772
  // src/utils/useContentDataResourceLocaleInfo.ts
9659
9773
  var import_canvas10 = require("@uniformdev/canvas");
9660
- var import_react92 = require("react");
9774
+ var import_react93 = require("react");
9661
9775
  function useContentDataResourceLocaleInfo({
9662
9776
  locale,
9663
9777
  setLocale,
9664
9778
  dynamicInputs
9665
9779
  }) {
9666
9780
  var _a;
9667
- const setLocaleRef = (0, import_react92.useRef)(setLocale);
9781
+ const setLocaleRef = (0, import_react93.useRef)(setLocale);
9668
9782
  setLocaleRef.current = setLocale;
9669
9783
  const { flatVariables } = useVariables();
9670
9784
  const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas10.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME) : "";
9671
9785
  const boundLocale = (_a = (0, import_canvas10.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
9672
- (0, import_react92.useEffect)(() => {
9786
+ (0, import_react93.useEffect)(() => {
9673
9787
  if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
9674
9788
  setLocaleRef.current((0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME));
9675
9789
  }
@@ -9678,7 +9792,7 @@ function useContentDataResourceLocaleInfo({
9678
9792
  }
9679
9793
 
9680
9794
  // src/index.ts
9681
- var import_design_system63 = require("@uniformdev/design-system");
9795
+ var import_design_system64 = require("@uniformdev/design-system");
9682
9796
  __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
9683
9797
  // Annotate the CommonJS export names for ESM import in node:
9684
9798
  0 && (module.exports = {
@@ -9800,6 +9914,7 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
9800
9914
  Switch,
9801
9915
  TEXTBOX_OPERATORS,
9802
9916
  TextEditor,
9917
+ TextMultiChoiceEditor,
9803
9918
  TextVariableRenderer,
9804
9919
  Textarea,
9805
9920
  Theme,
@@ -9809,6 +9924,7 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
9809
9924
  VariablesList,
9810
9925
  VariablesPlugin,
9811
9926
  VariablesProvider,
9927
+ WORKFLOW_STAGES_OPERATORS,
9812
9928
  badgeIcon,
9813
9929
  bindableFiltersMapper,
9814
9930
  convertConnectedDataToVariable,