@uniformdev/mesh-sdk-react 19.42.1-alpha.6 → 19.45.0

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.d.mts CHANGED
@@ -59,6 +59,7 @@ declare namespace index {
59
59
  };
60
60
  }
61
61
 
62
+ /** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
62
63
  interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = EntrySearchResult> {
63
64
  selectedItem: TResult;
64
65
  logoIcon: string | React__default.ComponentType<{
@@ -67,14 +68,17 @@ interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = Entry
67
68
  onDeselect: (item: TResult) => void;
68
69
  onEditClosed?: (item: TResult) => void;
69
70
  }
71
+ /** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
70
72
  declare const DefaultSelectedItem: React__default.FC<EntrySearchSelectedItemProps>;
71
73
 
74
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
72
75
  type EntrySearchQueryOptions = {
73
76
  count: number;
74
77
  offset: number;
75
78
  contentType?: string;
76
79
  cursor?: string;
77
80
  };
81
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
78
82
  type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
79
83
  search: (text: string, options: EntrySearchQueryOptions) => void;
80
84
  results: TResult[] | undefined;
@@ -108,6 +112,7 @@ type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
108
112
  */
109
113
  loadingIndicatorDelay?: number;
110
114
  };
115
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
111
116
  interface EntrySearchResult {
112
117
  id: string;
113
118
  title: string | JSX.Element;
@@ -116,21 +121,26 @@ interface EntrySearchResult {
116
121
  metadata?: Record<string, string | JSX.Element>;
117
122
  popoverData?: Record<string, string | JSX.Element>;
118
123
  }
124
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
119
125
  interface EntrySearchContentType {
120
126
  id: string;
121
127
  name: string;
122
128
  }
129
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
123
130
  interface NoResultsProps {
124
131
  searchText: string | undefined;
125
132
  selectedContentType: string | undefined;
126
133
  }
134
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
127
135
  declare const EntrySearch: <TResult extends EntrySearchResult>({ search, results, contentTypes, selectedItems, logoIcon, select, multiSelect, multiSelectId, rowComponent, selectedItemComponent, totalResults, cursor, resultsLoading, requireContentType, onAddNew, onEditClosed, onCancel, noResultsComponent, helpComponent, onSort, typeSelectorLabel, typeSelectorAllTypesOptionText, loadingIndicatorDelay, }: EntrySearchProps<TResult>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
128
136
 
137
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
129
138
  interface EntrySearchRowProps<TResult extends EntrySearchResult = EntrySearchResult> {
130
139
  result: TResult;
131
140
  isSelected: boolean;
132
141
  triggerSelection: () => void;
133
142
  }
143
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
134
144
  declare const DefaultSearchRow: React__default.FC<EntrySearchRowProps>;
135
145
 
136
146
  declare const searchRowContainer: _emotion_react.SerializedStyles;
@@ -198,10 +208,12 @@ interface ProductCategory {
198
208
  children?: ProductCategory[];
199
209
  }
200
210
 
211
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
201
212
  declare const ProductPreviewList: ({ products, }: {
202
213
  products: ProductSearchResults['products'] | undefined;
203
214
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
204
215
 
216
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
205
217
  interface ProductDynamicSelectorValue {
206
218
  count: number;
207
219
  categories?: string[];
@@ -210,6 +222,7 @@ interface ProductDynamicSelectorValue {
210
222
  sort?: string;
211
223
  sortOrder?: string;
212
224
  }
225
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
213
226
  interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = ProductDynamicSelectorValue> {
214
227
  value: TValue | undefined;
215
228
  setValue: (value: TValue) => Promise<void>;
@@ -235,21 +248,27 @@ interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = Product
235
248
  disableBrands?: boolean;
236
249
  restrictToSingleCategory?: boolean;
237
250
  }
251
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
238
252
  interface ProductQueryCategory {
239
253
  id: string;
240
254
  name: string;
241
255
  children?: ProductQueryCategory[];
242
256
  }
257
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
243
258
  interface Brand {
244
259
  id: string;
245
260
  name: string;
246
261
  }
262
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
247
263
  declare const ProductQuery: ({ value, setValue, brands, categories, loading, categoriesLoading, brandsLoading, logoIcon, onGetProducts, sortOptions, sortOrderOptions, categoryLabel, brandLabel, disableBrands, restrictToSingleCategory, }: ProductQueryProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
264
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
248
265
  interface ProductQueryContextValue {
249
266
  categories: ProductQueryProps['categories'];
250
267
  logoIcon: ProductQueryProps['logoIcon'];
251
268
  }
269
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
252
270
  declare const ProductQueryContext: React__default.Context<ProductQueryContextValue | undefined>;
271
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
253
272
  declare const useProductQueryContext: () => ProductQueryContextValue;
254
273
 
255
274
  type ProductSearchProps<TResult extends ProductSearchResult = ProductSearchResult> = Pick<EntrySearchProps<TResult>, 'multiSelect' | 'multiSelectId' | 'logoIcon' | 'rowComponent' | 'selectedItemComponent' | 'helpComponent' | 'noResultsComponent' | 'onSort' | 'typeSelectorAllTypesOptionText' | 'typeSelectorLabel'> & {
@@ -269,12 +288,14 @@ type ProductSearchProps<TResult extends ProductSearchResult = ProductSearchResul
269
288
  searchError?: Error;
270
289
  }>;
271
290
  };
291
+ /** @deprecated */
272
292
  interface GetProductOptions {
273
293
  limit?: number;
274
294
  offset?: number;
275
295
  categoryId?: string;
276
296
  cursor?: string;
277
297
  }
298
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs for implementation details */
278
299
  declare function ProductSearch({ selectedProducts, setSelectedProducts, onGetCategories, onSearchProducts, logoIcon, multiSelect, multiSelectId, selectedItemComponent, rowComponent, errorComponent, helpComponent, noResultsComponent, onSort, typeSelectorAllTypesOptionText, typeSelectorLabel, }: ProductSearchProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
279
300
  interface ProductSearchContextValue {
280
301
  logoIcon: ProductSearchProps['logoIcon'];
@@ -283,20 +304,25 @@ interface ProductSearchContextValue {
283
304
  declare const ProductSearchContext: React__default.Context<ProductSearchContextValue | undefined>;
284
305
  declare const useProductSearchContext: () => ProductSearchContextValue;
285
306
 
307
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
286
308
  declare function ProductSearchRow({ result, isSelected, triggerSelection, }: EntrySearchRowProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
287
309
 
310
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item*/
288
311
  declare function ProductSelectedItem({ selectedItem, onDeselect, }: EntrySearchSelectedItemProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
289
312
 
313
+ /** @deprecated please use DataRefreshButtonProps - https://mesh-design-system.netlify.app/?path=/story/object-search--data-refresh-button */
290
314
  declare const ResolvableLoadingValue: ({ value, text, loading, }: {
291
315
  value: string;
292
316
  text: string | undefined;
293
317
  loading: boolean;
294
318
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
295
319
 
320
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
296
321
  type SelectionFieldValue = {
297
322
  id: string;
298
323
  name: string;
299
324
  };
325
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
300
326
  declare const SelectionField: ({ id, label, loading, selectedValues, values, onAdd, onRemove, }: {
301
327
  id: string;
302
328
  label: string;
@@ -335,6 +361,7 @@ interface DamItem {
335
361
  type: 'image' | 'video' | 'file' | 'other';
336
362
  }
337
363
 
364
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
338
365
  interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
339
366
  /** The item used for rendering this component. */
340
367
  selectedItem: TResult;
@@ -354,6 +381,7 @@ interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
354
381
  item: TResult;
355
382
  }>;
356
383
  }
384
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
357
385
  declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
358
386
 
359
387
  declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
@@ -740,6 +768,10 @@ type InputVariablesProps<TEditorContext = unknown> = {
740
768
  * Note: automatically disabled if `disabled` or `disableVariables` is set
741
769
  */
742
770
  enableEditingVariables?: boolean;
771
+ /**
772
+ * Adds an additional option to omit the variable if it's empty from requests
773
+ */
774
+ addOmitIfEmpty?: boolean;
743
775
  /** (optional) sets and shows the the error message value */
744
776
  errorMessage?: string;
745
777
  /** (optional) sets and shows the the warning message value */
@@ -1433,18 +1465,19 @@ declare function ParamTypeDynamicDataProvider(props: ParamTypeDynamicDataProvide
1433
1465
  declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1434
1466
 
1435
1467
  /** Editor component to manage HTTP headers on a request */
1436
- declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1468
+ declare function RequestHeaders({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1437
1469
 
1438
1470
  /** Dropdown to pick a HTTP method for a request */
1439
1471
  declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1440
1472
 
1441
1473
  type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
1442
1474
  /** Component to manage query parameters on a request */
1443
- declare function RequestParameters({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1475
+ declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1444
1476
 
1445
1477
  type RequestParameter = {
1446
1478
  key: string;
1447
1479
  value: string;
1480
+ omitIfEmpty?: boolean;
1448
1481
  };
1449
1482
  type BaseRequestData = {
1450
1483
  baseUrl: string;
package/dist/index.d.ts CHANGED
@@ -59,6 +59,7 @@ declare namespace index {
59
59
  };
60
60
  }
61
61
 
62
+ /** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
62
63
  interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = EntrySearchResult> {
63
64
  selectedItem: TResult;
64
65
  logoIcon: string | React__default.ComponentType<{
@@ -67,14 +68,17 @@ interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = Entry
67
68
  onDeselect: (item: TResult) => void;
68
69
  onEditClosed?: (item: TResult) => void;
69
70
  }
71
+ /** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
70
72
  declare const DefaultSelectedItem: React__default.FC<EntrySearchSelectedItemProps>;
71
73
 
74
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
72
75
  type EntrySearchQueryOptions = {
73
76
  count: number;
74
77
  offset: number;
75
78
  contentType?: string;
76
79
  cursor?: string;
77
80
  };
81
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
78
82
  type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
79
83
  search: (text: string, options: EntrySearchQueryOptions) => void;
80
84
  results: TResult[] | undefined;
@@ -108,6 +112,7 @@ type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
108
112
  */
109
113
  loadingIndicatorDelay?: number;
110
114
  };
115
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
111
116
  interface EntrySearchResult {
112
117
  id: string;
113
118
  title: string | JSX.Element;
@@ -116,21 +121,26 @@ interface EntrySearchResult {
116
121
  metadata?: Record<string, string | JSX.Element>;
117
122
  popoverData?: Record<string, string | JSX.Element>;
118
123
  }
124
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
119
125
  interface EntrySearchContentType {
120
126
  id: string;
121
127
  name: string;
122
128
  }
129
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
123
130
  interface NoResultsProps {
124
131
  searchText: string | undefined;
125
132
  selectedContentType: string | undefined;
126
133
  }
134
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-container-with-inputs for implementation details */
127
135
  declare const EntrySearch: <TResult extends EntrySearchResult>({ search, results, contentTypes, selectedItems, logoIcon, select, multiSelect, multiSelectId, rowComponent, selectedItemComponent, totalResults, cursor, resultsLoading, requireContentType, onAddNew, onEditClosed, onCancel, noResultsComponent, helpComponent, onSort, typeSelectorLabel, typeSelectorAllTypesOptionText, loadingIndicatorDelay, }: EntrySearchProps<TResult>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
128
136
 
137
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
129
138
  interface EntrySearchRowProps<TResult extends EntrySearchResult = EntrySearchResult> {
130
139
  result: TResult;
131
140
  isSelected: boolean;
132
141
  triggerSelection: () => void;
133
142
  }
143
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
134
144
  declare const DefaultSearchRow: React__default.FC<EntrySearchRowProps>;
135
145
 
136
146
  declare const searchRowContainer: _emotion_react.SerializedStyles;
@@ -198,10 +208,12 @@ interface ProductCategory {
198
208
  children?: ProductCategory[];
199
209
  }
200
210
 
211
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
201
212
  declare const ProductPreviewList: ({ products, }: {
202
213
  products: ProductSearchResults['products'] | undefined;
203
214
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
204
215
 
216
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
205
217
  interface ProductDynamicSelectorValue {
206
218
  count: number;
207
219
  categories?: string[];
@@ -210,6 +222,7 @@ interface ProductDynamicSelectorValue {
210
222
  sort?: string;
211
223
  sortOrder?: string;
212
224
  }
225
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
213
226
  interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = ProductDynamicSelectorValue> {
214
227
  value: TValue | undefined;
215
228
  setValue: (value: TValue) => Promise<void>;
@@ -235,21 +248,27 @@ interface ProductQueryProps<TValue extends ProductDynamicSelectorValue = Product
235
248
  disableBrands?: boolean;
236
249
  restrictToSingleCategory?: boolean;
237
250
  }
251
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
238
252
  interface ProductQueryCategory {
239
253
  id: string;
240
254
  name: string;
241
255
  children?: ProductQueryCategory[];
242
256
  }
257
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
243
258
  interface Brand {
244
259
  id: string;
245
260
  name: string;
246
261
  }
262
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
247
263
  declare const ProductQuery: ({ value, setValue, brands, categories, loading, categoriesLoading, brandsLoading, logoIcon, onGetProducts, sortOptions, sortOrderOptions, categoryLabel, brandLabel, disableBrands, restrictToSingleCategory, }: ProductQueryProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
264
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
248
265
  interface ProductQueryContextValue {
249
266
  categories: ProductQueryProps['categories'];
250
267
  logoIcon: ProductQueryProps['logoIcon'];
251
268
  }
269
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
252
270
  declare const ProductQueryContext: React__default.Context<ProductQueryContextValue | undefined>;
271
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
253
272
  declare const useProductQueryContext: () => ProductQueryContextValue;
254
273
 
255
274
  type ProductSearchProps<TResult extends ProductSearchResult = ProductSearchResult> = Pick<EntrySearchProps<TResult>, 'multiSelect' | 'multiSelectId' | 'logoIcon' | 'rowComponent' | 'selectedItemComponent' | 'helpComponent' | 'noResultsComponent' | 'onSort' | 'typeSelectorAllTypesOptionText' | 'typeSelectorLabel'> & {
@@ -269,12 +288,14 @@ type ProductSearchProps<TResult extends ProductSearchResult = ProductSearchResul
269
288
  searchError?: Error;
270
289
  }>;
271
290
  };
291
+ /** @deprecated */
272
292
  interface GetProductOptions {
273
293
  limit?: number;
274
294
  offset?: number;
275
295
  categoryId?: string;
276
296
  cursor?: string;
277
297
  }
298
+ /** @deprecated in favour of ObjectSearchContainer, see https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs for implementation details */
278
299
  declare function ProductSearch({ selectedProducts, setSelectedProducts, onGetCategories, onSearchProducts, logoIcon, multiSelect, multiSelectId, selectedItemComponent, rowComponent, errorComponent, helpComponent, noResultsComponent, onSort, typeSelectorAllTypesOptionText, typeSelectorLabel, }: ProductSearchProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
279
300
  interface ProductSearchContextValue {
280
301
  logoIcon: ProductSearchProps['logoIcon'];
@@ -283,20 +304,25 @@ interface ProductSearchContextValue {
283
304
  declare const ProductSearchContext: React__default.Context<ProductSearchContextValue | undefined>;
284
305
  declare const useProductSearchContext: () => ProductSearchContextValue;
285
306
 
307
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
286
308
  declare function ProductSearchRow({ result, isSelected, triggerSelection, }: EntrySearchRowProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
287
309
 
310
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item*/
288
311
  declare function ProductSelectedItem({ selectedItem, onDeselect, }: EntrySearchSelectedItemProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
289
312
 
313
+ /** @deprecated please use DataRefreshButtonProps - https://mesh-design-system.netlify.app/?path=/story/object-search--data-refresh-button */
290
314
  declare const ResolvableLoadingValue: ({ value, text, loading, }: {
291
315
  value: string;
292
316
  text: string | undefined;
293
317
  loading: boolean;
294
318
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
295
319
 
320
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
296
321
  type SelectionFieldValue = {
297
322
  id: string;
298
323
  name: string;
299
324
  };
325
+ /** @deprecated please use ObjectSearchContainer - https://mesh-design-system.netlify.app/?path=/story/object-search--query-filter-with-inputs*/
300
326
  declare const SelectionField: ({ id, label, loading, selectedValues, values, onAdd, onRemove, }: {
301
327
  id: string;
302
328
  label: string;
@@ -335,6 +361,7 @@ interface DamItem {
335
361
  type: 'image' | 'video' | 'file' | 'other';
336
362
  }
337
363
 
364
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
338
365
  interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
339
366
  /** The item used for rendering this component. */
340
367
  selectedItem: TResult;
@@ -354,6 +381,7 @@ interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
354
381
  item: TResult;
355
382
  }>;
356
383
  }
384
+ /** @deprecated please use ObjectSearchResultItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-result-item */
357
385
  declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
358
386
 
359
387
  declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
@@ -740,6 +768,10 @@ type InputVariablesProps<TEditorContext = unknown> = {
740
768
  * Note: automatically disabled if `disabled` or `disableVariables` is set
741
769
  */
742
770
  enableEditingVariables?: boolean;
771
+ /**
772
+ * Adds an additional option to omit the variable if it's empty from requests
773
+ */
774
+ addOmitIfEmpty?: boolean;
743
775
  /** (optional) sets and shows the the error message value */
744
776
  errorMessage?: string;
745
777
  /** (optional) sets and shows the the warning message value */
@@ -1433,18 +1465,19 @@ declare function ParamTypeDynamicDataProvider(props: ParamTypeDynamicDataProvide
1433
1465
  declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1434
1466
 
1435
1467
  /** Editor component to manage HTTP headers on a request */
1436
- declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1468
+ declare function RequestHeaders({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1437
1469
 
1438
1470
  /** Dropdown to pick a HTTP method for a request */
1439
1471
  declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1440
1472
 
1441
1473
  type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
1442
1474
  /** Component to manage query parameters on a request */
1443
- declare function RequestParameters({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1475
+ declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1444
1476
 
1445
1477
  type RequestParameter = {
1446
1478
  key: string;
1447
1479
  value: string;
1480
+ omitIfEmpty?: boolean;
1448
1481
  };
1449
1482
  type BaseRequestData = {
1450
1483
  baseUrl: string;
package/dist/index.esm.js CHANGED
@@ -267,8 +267,8 @@ import { useAsyncFn, useDebounce } from "react-use";
267
267
 
268
268
  // src/components/commerce/SelectionField.tsx
269
269
  import { css as css2 } from "@emotion/react";
270
+ import { CgClose } from "@react-icons/all-files/cg/CgClose";
270
271
  import { Icon, InputSelect } from "@uniformdev/design-system";
271
- import { CgClose } from "react-icons/cg";
272
272
 
273
273
  // src/components/commerce/ResolvableLoadingValue.tsx
274
274
  import { Fragment, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
@@ -1077,9 +1077,10 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
1077
1077
 
1078
1078
  // src/components/legacy/EntrySearch/DefaultSelectedItem.tsx
1079
1079
  import { css as css9 } from "@emotion/react";
1080
+ import { CgClose as CgClose2 } from "@react-icons/all-files/cg/CgClose";
1081
+ import { CgInfo } from "@react-icons/all-files/cg/CgInfo";
1080
1082
  import { Icon as Icon2, useOutsideClick as useOutsideClick2 } from "@uniformdev/design-system";
1081
1083
  import { useEffect, useRef as useRef2, useState as useState2 } from "react";
1082
- import { CgClose as CgClose2, CgInfo } from "react-icons/cg";
1083
1084
  import { format as timeAgo } from "timeago.js";
1084
1085
 
1085
1086
  // src/utils/openWindowWithCloseCallback.ts
@@ -2037,8 +2038,8 @@ function ProductSearchRow({
2037
2038
 
2038
2039
  // src/components/commerce/ProductSelectedItem.tsx
2039
2040
  import { css as css15 } from "@emotion/react";
2041
+ import { CgClose as CgClose3 } from "@react-icons/all-files/cg/CgClose";
2040
2042
  import { Icon as Icon3, mq as mq4 } from "@uniformdev/design-system";
2041
- import { CgClose as CgClose3 } from "react-icons/cg";
2042
2043
 
2043
2044
  // src/components/commerce/styles/ProductSelectedItem.styles.ts
2044
2045
  import { css as css14 } from "@emotion/react";
@@ -2349,9 +2350,10 @@ var useProductSearchContext = () => {
2349
2350
 
2350
2351
  // src/components/dam/DamSelectedItem.tsx
2351
2352
  import { css as css17 } from "@emotion/react";
2353
+ import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
2354
+ import { CgInfo as CgInfo2 } from "@react-icons/all-files/cg/CgInfo";
2352
2355
  import { Icon as Icon4 } from "@uniformdev/design-system";
2353
2356
  import { useEffect as useEffect4, useRef as useRef6, useState as useState5 } from "react";
2354
- import { CgClose as CgClose4, CgInfo as CgInfo2 } from "react-icons/cg";
2355
2357
  import { format as timeAgo2 } from "timeago.js";
2356
2358
 
2357
2359
  // src/components/dam/DamSelectedItem.styles.ts
@@ -2988,6 +2990,7 @@ import {
2988
2990
  LexicalTypeaheadMenuPlugin,
2989
2991
  MenuOption
2990
2992
  } from "@lexical/react/LexicalTypeaheadMenuPlugin";
2993
+ import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
2991
2994
  import { createVariableReference } from "@uniformdev/canvas";
2992
2995
  import { HorizontalRhythm, MenuGroup, MenuItem as MenuItem2, MenuItemSeparator } from "@uniformdev/design-system";
2993
2996
  import { dequal } from "dequal/lite";
@@ -3000,7 +3003,6 @@ import {
3000
3003
  } from "lexical";
3001
3004
  import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef8, useState as useState8 } from "react";
3002
3005
  import { createPortal } from "react-dom";
3003
- import { AiFillPlusCircle } from "react-icons/ai";
3004
3006
 
3005
3007
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
3006
3008
  import { css as css18 } from "@emotion/react";
@@ -4033,10 +4035,10 @@ import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexica
4033
4035
  import { CLEAR_EDITOR_COMMAND } from "lexical";
4034
4036
 
4035
4037
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4038
+ import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircleFill";
4039
+ import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
4036
4040
  import { HorizontalRhythm as HorizontalRhythm2, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem3, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4037
4041
  import { useEffect as useEffect11, useRef as useRef9, useState as useState10 } from "react";
4038
- import { BsFillPlusCircleFill } from "react-icons/bs";
4039
- import { CgUsbC } from "react-icons/cg";
4040
4042
  import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4041
4043
  function SelectVariableMenu({
4042
4044
  onSelectVariable,
@@ -4070,11 +4072,12 @@ function SelectVariableMenu({
4070
4072
  Menu2,
4071
4073
  {
4072
4074
  placement: "bottom-start",
4075
+ withoutPortal: true,
4073
4076
  menuTrigger: /* @__PURE__ */ jsx34(
4074
4077
  "button",
4075
4078
  {
4076
- title: menuTooltip,
4077
4079
  ...buttonProps,
4080
+ title: menuTooltip,
4078
4081
  ref: btnRef,
4079
4082
  css: [menuBtn, buttonCss],
4080
4083
  type: "button",
@@ -4541,10 +4544,10 @@ function InputVariablesOverlayMenu({
4541
4544
  }
4542
4545
 
4543
4546
  // src/components/Variables/ParameterConnectionIndicator.tsx
4547
+ import { CgUsbC as CgUsbC2 } from "@react-icons/all-files/cg/CgUsbC";
4544
4548
  import { bindVariablesToObject } from "@uniformdev/canvas";
4545
4549
  import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu3 } from "@uniformdev/design-system";
4546
4550
  import { useMemo as useMemo11 } from "react";
4547
- import { CgUsbC as CgUsbC2 } from "react-icons/cg";
4548
4551
 
4549
4552
  // src/components/Variables/styles/ParameterVariables.styles.ts
4550
4553
  import { css as css23 } from "@emotion/react";
@@ -4570,6 +4573,12 @@ var variableBindButton2 = css23`
4570
4573
  background: none;
4571
4574
  color: currentColor;
4572
4575
  }
4576
+
4577
+ // fixes menu resizing issue within iframes
4578
+ // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4579
+ + [role='menu'] {
4580
+ max-height: unset;
4581
+ }
4573
4582
  `;
4574
4583
  var input2 = css23`
4575
4584
  display: block;
@@ -4610,8 +4619,7 @@ var input2 = css23`
4610
4619
  color: var(--gray-400);
4611
4620
  }
4612
4621
 
4613
- &[readonly],
4614
- &[contenteditable='false'] {
4622
+ &[readonly] {
4615
4623
  cursor: not-allowed;
4616
4624
  color: var(--gray-400);
4617
4625
  }
@@ -4653,6 +4661,7 @@ function ParameterConnectionIndicator({
4653
4661
  Menu3,
4654
4662
  {
4655
4663
  placement: "bottom-start",
4664
+ withoutPortal: true,
4656
4665
  menuTrigger: /* @__PURE__ */ jsx40(
4657
4666
  "button",
4658
4667
  {
@@ -5287,7 +5296,10 @@ import {
5287
5296
  WarningMessage as WarningMessage2
5288
5297
  } from "@uniformdev/design-system";
5289
5298
  import { jsx as jsx49, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5290
- function RequestHeaders({ disableVariables }) {
5299
+ function RequestHeaders({
5300
+ disableVariables,
5301
+ addOmitIfEmpty
5302
+ }) {
5291
5303
  var _a, _b;
5292
5304
  const { dispatch, request } = useRequest();
5293
5305
  const deezHeaders = [...request.headers, { key: "", value: "" }];
@@ -5305,7 +5317,8 @@ function RequestHeaders({ disableVariables }) {
5305
5317
  return /* @__PURE__ */ jsx49("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs29(Table2, { children: [
5306
5318
  /* @__PURE__ */ jsx49(TableHead2, { children: /* @__PURE__ */ jsxs29(TableRow2, { children: [
5307
5319
  /* @__PURE__ */ jsx49(TableCellHead2, { children: "Name" }),
5308
- /* @__PURE__ */ jsx49(TableCellHead2, { children: "Value" })
5320
+ /* @__PURE__ */ jsx49(TableCellHead2, { children: "Value" }),
5321
+ addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellHead2, { children: "Omit If Empty" }) : null
5309
5322
  ] }) }),
5310
5323
  /* @__PURE__ */ jsxs29(TableBody2, { children: [
5311
5324
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
@@ -5353,7 +5366,24 @@ function RequestHeaders({ disableVariables }) {
5353
5366
  enableEditingVariables: true,
5354
5367
  "data-testid": "header-value"
5355
5368
  }
5356
- ) : null })
5369
+ ) : null }),
5370
+ addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx49(
5371
+ Input3,
5372
+ {
5373
+ type: "checkbox",
5374
+ checked: header.omitIfEmpty,
5375
+ "data-testid": "header-omitifempty",
5376
+ onChange: (e) => dispatch({
5377
+ type: "updateHeader",
5378
+ header: {
5379
+ key: header.key,
5380
+ value: header.value,
5381
+ omitIfEmpty: e.currentTarget.checked
5382
+ },
5383
+ index
5384
+ })
5385
+ }
5386
+ ) : null }) : null
5357
5387
  ] }, index);
5358
5388
  })
5359
5389
  ] })
@@ -5393,25 +5423,30 @@ import {
5393
5423
  WarningMessage as WarningMessage3
5394
5424
  } from "@uniformdev/design-system";
5395
5425
  import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5396
- function RequestParameters({ disableVariables }) {
5426
+ function RequestParameters({
5427
+ disableVariables,
5428
+ addOmitIfEmpty
5429
+ }) {
5397
5430
  var _a, _b;
5398
5431
  const { dispatch, request } = useRequest();
5399
5432
  const deezParameters = [...request.parameters, { key: "", value: "" }];
5400
5433
  const handleUpdateParamFromMenu = ({
5401
5434
  key,
5402
5435
  value,
5436
+ omitIfEmpty,
5403
5437
  index
5404
5438
  }) => {
5405
5439
  dispatch({
5406
5440
  type: "updateParameter",
5407
- parameter: { key, value },
5441
+ parameter: { key, value, omitIfEmpty },
5408
5442
  index
5409
5443
  });
5410
5444
  };
5411
5445
  return /* @__PURE__ */ jsx51("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs30(Table3, { children: [
5412
5446
  /* @__PURE__ */ jsx51(TableHead3, { children: /* @__PURE__ */ jsxs30(TableRow3, { children: [
5413
5447
  /* @__PURE__ */ jsx51(TableCellHead3, { children: "Name" }),
5414
- /* @__PURE__ */ jsx51(TableCellHead3, { children: "Value" })
5448
+ /* @__PURE__ */ jsx51(TableCellHead3, { children: "Value" }),
5449
+ addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellHead3, { children: "Omit If Empty" }) : null
5415
5450
  ] }) }),
5416
5451
  /* @__PURE__ */ jsxs30(TableBody3, { children: [
5417
5452
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
@@ -5439,7 +5474,11 @@ function RequestParameters({ disableVariables }) {
5439
5474
  if (e.currentTarget.value) {
5440
5475
  dispatch({
5441
5476
  type: "updateParameter",
5442
- parameter: { key: e.currentTarget.value, value: parameter.value },
5477
+ parameter: {
5478
+ key: e.currentTarget.value,
5479
+ value: parameter.value,
5480
+ omitIfEmpty: parameter.omitIfEmpty
5481
+ },
5443
5482
  index
5444
5483
  });
5445
5484
  } else {
@@ -5456,6 +5495,7 @@ function RequestParameters({ disableVariables }) {
5456
5495
  onChange: (selectedVariable) => handleUpdateParamFromMenu({
5457
5496
  key: parameter.key,
5458
5497
  value: selectedVariable != null ? selectedVariable : "",
5498
+ omitIfEmpty: parameter.omitIfEmpty,
5459
5499
  index
5460
5500
  }),
5461
5501
  disableVariables,
@@ -5463,7 +5503,26 @@ function RequestParameters({ disableVariables }) {
5463
5503
  showAddVariableMenuOption: "Add variable...",
5464
5504
  enableEditingVariables: true
5465
5505
  }
5466
- ) : null })
5506
+ ) : null }),
5507
+ addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx51(
5508
+ Input4,
5509
+ {
5510
+ type: "checkbox",
5511
+ checked: parameter.omitIfEmpty,
5512
+ "data-testid": "parameter-omitifempty",
5513
+ onChange: (e) => {
5514
+ dispatch({
5515
+ type: "updateParameter",
5516
+ parameter: {
5517
+ key: parameter.key,
5518
+ value: parameter.value,
5519
+ omitIfEmpty: e.currentTarget.checked
5520
+ },
5521
+ index
5522
+ });
5523
+ }
5524
+ }
5525
+ ) : null }) : null
5467
5526
  ] }, index);
5468
5527
  })
5469
5528
  ] })
package/dist/index.js CHANGED
@@ -478,8 +478,8 @@ var import_react_use = require("react-use");
478
478
 
479
479
  // src/components/commerce/SelectionField.tsx
480
480
  var import_react3 = require("@emotion/react");
481
+ var import_CgClose = require("@react-icons/all-files/cg/CgClose");
481
482
  var import_design_system = require("@uniformdev/design-system");
482
- var import_cg = require("react-icons/cg");
483
483
 
484
484
  // src/components/commerce/ResolvableLoadingValue.tsx
485
485
  var import_jsx_runtime15 = require("@emotion/react/jsx-runtime");
@@ -578,7 +578,7 @@ var SelectionField = ({
578
578
  css: selectionFieldBtn,
579
579
  title: "remove",
580
580
  onClick: (e) => handleRemoveClick(e, selectedValue),
581
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system.Icon, { icon: import_cg.CgClose, iconColor: "currentColor", size: 20 })
581
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_design_system.Icon, { icon: import_CgClose.CgClose, iconColor: "currentColor", size: 20 })
582
582
  }
583
583
  )
584
584
  ] }, selectedValue);
@@ -1288,9 +1288,10 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
1288
1288
 
1289
1289
  // src/components/legacy/EntrySearch/DefaultSelectedItem.tsx
1290
1290
  var import_react12 = require("@emotion/react");
1291
+ var import_CgClose2 = require("@react-icons/all-files/cg/CgClose");
1292
+ var import_CgInfo = require("@react-icons/all-files/cg/CgInfo");
1291
1293
  var import_design_system6 = require("@uniformdev/design-system");
1292
1294
  var import_react13 = require("react");
1293
- var import_cg2 = require("react-icons/cg");
1294
1295
  var import_timeago = require("timeago.js");
1295
1296
 
1296
1297
  // src/utils/openWindowWithCloseCallback.ts
@@ -1440,7 +1441,7 @@ var DefaultSelectedItem = ({
1440
1441
  children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1441
1442
  import_design_system6.Icon,
1442
1443
  {
1443
- icon: import_cg2.CgInfo,
1444
+ icon: import_CgInfo.CgInfo,
1444
1445
  iconColor: "gray",
1445
1446
  size: 24,
1446
1447
  css: import_react12.css`
@@ -1563,7 +1564,7 @@ var DefaultSelectedItem = ({
1563
1564
  css: selectItemLinkBtn,
1564
1565
  children: [
1565
1566
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { css: selectItemSmallText, children: "Unlink" }),
1566
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system6.Icon, { icon: import_cg2.CgClose, iconColor: "red", size: 16 })
1567
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_design_system6.Icon, { icon: import_CgClose2.CgClose, iconColor: "red", size: 16 })
1567
1568
  ]
1568
1569
  }
1569
1570
  )
@@ -2238,8 +2239,8 @@ function ProductSearchRow({
2238
2239
 
2239
2240
  // src/components/commerce/ProductSelectedItem.tsx
2240
2241
  var import_react20 = require("@emotion/react");
2242
+ var import_CgClose3 = require("@react-icons/all-files/cg/CgClose");
2241
2243
  var import_design_system9 = require("@uniformdev/design-system");
2242
- var import_cg3 = require("react-icons/cg");
2243
2244
 
2244
2245
  // src/components/commerce/styles/ProductSelectedItem.styles.ts
2245
2246
  var import_react19 = require("@emotion/react");
@@ -2433,7 +2434,7 @@ function ProductSelectedItem({
2433
2434
  css: productedSelectedItemLinkBtn,
2434
2435
  children: [
2435
2436
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { css: productedSelectedItemSmallText, children: "Unlink" }),
2436
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system9.Icon, { icon: import_cg3.CgClose, iconColor: "red", size: 16 })
2437
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system9.Icon, { icon: import_CgClose3.CgClose, iconColor: "red", size: 16 })
2437
2438
  ]
2438
2439
  }
2439
2440
  )
@@ -2550,9 +2551,10 @@ var useProductSearchContext = () => {
2550
2551
 
2551
2552
  // src/components/dam/DamSelectedItem.tsx
2552
2553
  var import_react23 = require("@emotion/react");
2554
+ var import_CgClose4 = require("@react-icons/all-files/cg/CgClose");
2555
+ var import_CgInfo2 = require("@react-icons/all-files/cg/CgInfo");
2553
2556
  var import_design_system12 = require("@uniformdev/design-system");
2554
2557
  var import_react24 = require("react");
2555
- var import_cg4 = require("react-icons/cg");
2556
2558
  var import_timeago2 = require("timeago.js");
2557
2559
 
2558
2560
  // src/components/dam/DamSelectedItem.styles.ts
@@ -2703,7 +2705,7 @@ function DamSelectedItem({
2703
2705
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2704
2706
  import_design_system12.Icon,
2705
2707
  {
2706
- icon: import_cg4.CgInfo,
2708
+ icon: import_CgInfo2.CgInfo,
2707
2709
  iconColor: "gray",
2708
2710
  size: 24,
2709
2711
  css: import_react23.css`
@@ -2770,7 +2772,7 @@ function DamSelectedItem({
2770
2772
  css: damSelectedItemLinkBtn,
2771
2773
  children: [
2772
2774
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { css: damSelectedItemSmallText, children: "Unlink" }),
2773
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_design_system12.Icon, { icon: import_cg4.CgClose, iconColor: "red", size: 16 })
2775
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_design_system12.Icon, { icon: import_CgClose4.CgClose, iconColor: "red", size: 16 })
2774
2776
  ]
2775
2777
  }
2776
2778
  )
@@ -3172,13 +3174,13 @@ function InfoVariableReference({ children }) {
3172
3174
  var import_react35 = require("@emotion/react");
3173
3175
  var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerContext");
3174
3176
  var import_LexicalTypeaheadMenuPlugin = require("@lexical/react/LexicalTypeaheadMenuPlugin");
3177
+ var import_AiFillPlusCircle = require("@react-icons/all-files/ai/AiFillPlusCircle");
3175
3178
  var import_canvas2 = require("@uniformdev/canvas");
3176
3179
  var import_design_system17 = require("@uniformdev/design-system");
3177
3180
  var import_lite = require("dequal/lite");
3178
3181
  var import_lexical3 = require("lexical");
3179
3182
  var import_react36 = require("react");
3180
3183
  var import_react_dom = require("react-dom");
3181
- var import_ai = require("react-icons/ai");
3182
3184
 
3183
3185
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
3184
3186
  var import_react32 = require("@emotion/react");
@@ -3803,7 +3805,7 @@ function VariablesPlugin({
3803
3805
  },
3804
3806
  css: menuItemTextGroup,
3805
3807
  children: variable.name === ADD_VARIABLE_OPTION ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_design_system17.HorizontalRhythm, { gap: "sm", align: "center", children: [
3806
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ai.AiFillPlusCircle, { fill: "var(--gray-500)" }),
3808
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_AiFillPlusCircle.AiFillPlusCircle, { fill: "var(--gray-500)" }),
3807
3809
  " ",
3808
3810
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: variable.displayName })
3809
3811
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
@@ -4211,10 +4213,10 @@ var import_LexicalComposerContext6 = require("@lexical/react/LexicalComposerCont
4211
4213
  var import_lexical6 = require("lexical");
4212
4214
 
4213
4215
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4216
+ var import_BsFillPlusCircleFill = require("@react-icons/all-files/bs/BsFillPlusCircleFill");
4217
+ var import_CgUsbC = require("@react-icons/all-files/cg/CgUsbC");
4214
4218
  var import_design_system18 = require("@uniformdev/design-system");
4215
4219
  var import_react42 = require("react");
4216
- var import_bs = require("react-icons/bs");
4217
- var import_cg5 = require("react-icons/cg");
4218
4220
  var import_jsx_runtime34 = require("@emotion/react/jsx-runtime");
4219
4221
  function SelectVariableMenu({
4220
4222
  onSelectVariable,
@@ -4248,16 +4250,17 @@ function SelectVariableMenu({
4248
4250
  import_design_system18.Menu,
4249
4251
  {
4250
4252
  placement: "bottom-start",
4253
+ withoutPortal: true,
4251
4254
  menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4252
4255
  "button",
4253
4256
  {
4254
- title: menuTooltip,
4255
4257
  ...buttonProps,
4258
+ title: menuTooltip,
4256
4259
  ref: btnRef,
4257
4260
  css: [menuBtn, buttonCss],
4258
4261
  type: "button",
4259
4262
  "data-testid": "insert-variable",
4260
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_cg5.CgUsbC, { size: "1.4rem" })
4263
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_CgUsbC.CgUsbC, { size: "1.4rem" })
4261
4264
  }
4262
4265
  ),
4263
4266
  menuLabel: menuTooltip,
@@ -4271,7 +4274,7 @@ function SelectVariableMenu({
4271
4274
  },
4272
4275
  "data-testid": "add-variable-button",
4273
4276
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_design_system18.HorizontalRhythm, { gap: "sm", align: "center", children: [
4274
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_bs.BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4277
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_BsFillPlusCircleFill.BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
4275
4278
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: "Add\u2026" }) })
4276
4279
  ] })
4277
4280
  }
@@ -4707,10 +4710,10 @@ function InputVariablesOverlayMenu({
4707
4710
  }
4708
4711
 
4709
4712
  // src/components/Variables/ParameterConnectionIndicator.tsx
4713
+ var import_CgUsbC2 = require("@react-icons/all-files/cg/CgUsbC");
4710
4714
  var import_canvas6 = require("@uniformdev/canvas");
4711
4715
  var import_design_system20 = require("@uniformdev/design-system");
4712
4716
  var import_react49 = require("react");
4713
- var import_cg6 = require("react-icons/cg");
4714
4717
 
4715
4718
  // src/components/Variables/styles/ParameterVariables.styles.ts
4716
4719
  var import_react48 = require("@emotion/react");
@@ -4736,6 +4739,12 @@ var variableBindButton2 = import_react48.css`
4736
4739
  background: none;
4737
4740
  color: currentColor;
4738
4741
  }
4742
+
4743
+ // fixes menu resizing issue within iframes
4744
+ // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4745
+ + [role='menu'] {
4746
+ max-height: unset;
4747
+ }
4739
4748
  `;
4740
4749
  var input2 = import_react48.css`
4741
4750
  display: block;
@@ -4776,8 +4785,7 @@ var input2 = import_react48.css`
4776
4785
  color: var(--gray-400);
4777
4786
  }
4778
4787
 
4779
- &[readonly],
4780
- &[contenteditable='false'] {
4788
+ &[readonly] {
4781
4789
  cursor: not-allowed;
4782
4790
  color: var(--gray-400);
4783
4791
  }
@@ -4819,6 +4827,7 @@ function ParameterConnectionIndicator({
4819
4827
  import_design_system20.Menu,
4820
4828
  {
4821
4829
  placement: "bottom-start",
4830
+ withoutPortal: true,
4822
4831
  menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4823
4832
  "button",
4824
4833
  {
@@ -4826,7 +4835,7 @@ function ParameterConnectionIndicator({
4826
4835
  "aria-pressed": hasVariablesInValue,
4827
4836
  css: [menuBtn, variableBindButton2],
4828
4837
  type: "button",
4829
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_cg6.CgUsbC, { size: "1.4rem" })
4838
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_CgUsbC2.CgUsbC, { size: "1.4rem" })
4830
4839
  }
4831
4840
  ),
4832
4841
  menuLabel: menuTooltip,
@@ -5434,7 +5443,10 @@ function RequestBody() {
5434
5443
  // src/components/Request/RequestHeaders.tsx
5435
5444
  var import_design_system26 = require("@uniformdev/design-system");
5436
5445
  var import_jsx_runtime49 = require("@emotion/react/jsx-runtime");
5437
- function RequestHeaders({ disableVariables }) {
5446
+ function RequestHeaders({
5447
+ disableVariables,
5448
+ addOmitIfEmpty
5449
+ }) {
5438
5450
  var _a, _b;
5439
5451
  const { dispatch, request } = useRequest();
5440
5452
  const deezHeaders = [...request.headers, { key: "", value: "" }];
@@ -5452,7 +5464,8 @@ function RequestHeaders({ disableVariables }) {
5452
5464
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.Table, { children: [
5453
5465
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableRow, { children: [
5454
5466
  /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Name" }),
5455
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Value" })
5467
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Value" }),
5468
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellHead, { children: "Omit If Empty" }) : null
5456
5469
  ] }) }),
5457
5470
  /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_design_system26.TableBody, { children: [
5458
5471
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
@@ -5500,7 +5513,24 @@ function RequestHeaders({ disableVariables }) {
5500
5513
  enableEditingVariables: true,
5501
5514
  "data-testid": "header-value"
5502
5515
  }
5503
- ) : null })
5516
+ ) : null }),
5517
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_design_system26.TableCellData, { width: "50%", children: header.key ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5518
+ import_design_system26.Input,
5519
+ {
5520
+ type: "checkbox",
5521
+ checked: header.omitIfEmpty,
5522
+ "data-testid": "header-omitifempty",
5523
+ onChange: (e) => dispatch({
5524
+ type: "updateHeader",
5525
+ header: {
5526
+ key: header.key,
5527
+ value: header.value,
5528
+ omitIfEmpty: e.currentTarget.checked
5529
+ },
5530
+ index
5531
+ })
5532
+ }
5533
+ ) : null }) : null
5504
5534
  ] }, index);
5505
5535
  })
5506
5536
  ] })
@@ -5531,25 +5561,30 @@ function RequestMethodSelect(props) {
5531
5561
  // src/components/Request/RequestParameters.tsx
5532
5562
  var import_design_system28 = require("@uniformdev/design-system");
5533
5563
  var import_jsx_runtime51 = require("@emotion/react/jsx-runtime");
5534
- function RequestParameters({ disableVariables }) {
5564
+ function RequestParameters({
5565
+ disableVariables,
5566
+ addOmitIfEmpty
5567
+ }) {
5535
5568
  var _a, _b;
5536
5569
  const { dispatch, request } = useRequest();
5537
5570
  const deezParameters = [...request.parameters, { key: "", value: "" }];
5538
5571
  const handleUpdateParamFromMenu = ({
5539
5572
  key,
5540
5573
  value,
5574
+ omitIfEmpty,
5541
5575
  index
5542
5576
  }) => {
5543
5577
  dispatch({
5544
5578
  type: "updateParameter",
5545
- parameter: { key, value },
5579
+ parameter: { key, value, omitIfEmpty },
5546
5580
  index
5547
5581
  });
5548
5582
  };
5549
5583
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { css: innerContentStyles, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.Table, { children: [
5550
5584
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableRow, { children: [
5551
5585
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Name" }),
5552
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Value" })
5586
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Value" }),
5587
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellHead, { children: "Omit If Empty" }) : null
5553
5588
  ] }) }),
5554
5589
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_design_system28.TableBody, { children: [
5555
5590
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
@@ -5577,7 +5612,11 @@ function RequestParameters({ disableVariables }) {
5577
5612
  if (e.currentTarget.value) {
5578
5613
  dispatch({
5579
5614
  type: "updateParameter",
5580
- parameter: { key: e.currentTarget.value, value: parameter.value },
5615
+ parameter: {
5616
+ key: e.currentTarget.value,
5617
+ value: parameter.value,
5618
+ omitIfEmpty: parameter.omitIfEmpty
5619
+ },
5581
5620
  index
5582
5621
  });
5583
5622
  } else {
@@ -5594,6 +5633,7 @@ function RequestParameters({ disableVariables }) {
5594
5633
  onChange: (selectedVariable) => handleUpdateParamFromMenu({
5595
5634
  key: parameter.key,
5596
5635
  value: selectedVariable != null ? selectedVariable : "",
5636
+ omitIfEmpty: parameter.omitIfEmpty,
5597
5637
  index
5598
5638
  }),
5599
5639
  disableVariables,
@@ -5601,7 +5641,26 @@ function RequestParameters({ disableVariables }) {
5601
5641
  showAddVariableMenuOption: "Add variable...",
5602
5642
  enableEditingVariables: true
5603
5643
  }
5604
- ) : null })
5644
+ ) : null }),
5645
+ addOmitIfEmpty ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_design_system28.TableCellData, { width: "50%", children: parameter.key ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5646
+ import_design_system28.Input,
5647
+ {
5648
+ type: "checkbox",
5649
+ checked: parameter.omitIfEmpty,
5650
+ "data-testid": "parameter-omitifempty",
5651
+ onChange: (e) => {
5652
+ dispatch({
5653
+ type: "updateParameter",
5654
+ parameter: {
5655
+ key: parameter.key,
5656
+ value: parameter.value,
5657
+ omitIfEmpty: e.currentTarget.checked
5658
+ },
5659
+ index
5660
+ });
5661
+ }
5662
+ }
5663
+ ) : null }) : null
5605
5664
  ] }, index);
5606
5665
  })
5607
5666
  ] })
package/dist/index.mjs CHANGED
@@ -267,8 +267,8 @@ import { useAsyncFn, useDebounce } from "react-use";
267
267
 
268
268
  // src/components/commerce/SelectionField.tsx
269
269
  import { css as css2 } from "@emotion/react";
270
+ import { CgClose } from "@react-icons/all-files/cg/CgClose";
270
271
  import { Icon, InputSelect } from "@uniformdev/design-system";
271
- import { CgClose } from "react-icons/cg";
272
272
 
273
273
  // src/components/commerce/ResolvableLoadingValue.tsx
274
274
  import { Fragment, jsxs as jsxs4 } from "@emotion/react/jsx-runtime";
@@ -1077,9 +1077,10 @@ var DefaultSearchRow = ({ result, isSelected, triggerSelection }) => {
1077
1077
 
1078
1078
  // src/components/legacy/EntrySearch/DefaultSelectedItem.tsx
1079
1079
  import { css as css9 } from "@emotion/react";
1080
+ import { CgClose as CgClose2 } from "@react-icons/all-files/cg/CgClose";
1081
+ import { CgInfo } from "@react-icons/all-files/cg/CgInfo";
1080
1082
  import { Icon as Icon2, useOutsideClick as useOutsideClick2 } from "@uniformdev/design-system";
1081
1083
  import { useEffect, useRef as useRef2, useState as useState2 } from "react";
1082
- import { CgClose as CgClose2, CgInfo } from "react-icons/cg";
1083
1084
  import { format as timeAgo } from "timeago.js";
1084
1085
 
1085
1086
  // src/utils/openWindowWithCloseCallback.ts
@@ -2037,8 +2038,8 @@ function ProductSearchRow({
2037
2038
 
2038
2039
  // src/components/commerce/ProductSelectedItem.tsx
2039
2040
  import { css as css15 } from "@emotion/react";
2041
+ import { CgClose as CgClose3 } from "@react-icons/all-files/cg/CgClose";
2040
2042
  import { Icon as Icon3, mq as mq4 } from "@uniformdev/design-system";
2041
- import { CgClose as CgClose3 } from "react-icons/cg";
2042
2043
 
2043
2044
  // src/components/commerce/styles/ProductSelectedItem.styles.ts
2044
2045
  import { css as css14 } from "@emotion/react";
@@ -2349,9 +2350,10 @@ var useProductSearchContext = () => {
2349
2350
 
2350
2351
  // src/components/dam/DamSelectedItem.tsx
2351
2352
  import { css as css17 } from "@emotion/react";
2353
+ import { CgClose as CgClose4 } from "@react-icons/all-files/cg/CgClose";
2354
+ import { CgInfo as CgInfo2 } from "@react-icons/all-files/cg/CgInfo";
2352
2355
  import { Icon as Icon4 } from "@uniformdev/design-system";
2353
2356
  import { useEffect as useEffect4, useRef as useRef6, useState as useState5 } from "react";
2354
- import { CgClose as CgClose4, CgInfo as CgInfo2 } from "react-icons/cg";
2355
2357
  import { format as timeAgo2 } from "timeago.js";
2356
2358
 
2357
2359
  // src/components/dam/DamSelectedItem.styles.ts
@@ -2988,6 +2990,7 @@ import {
2988
2990
  LexicalTypeaheadMenuPlugin,
2989
2991
  MenuOption
2990
2992
  } from "@lexical/react/LexicalTypeaheadMenuPlugin";
2993
+ import { AiFillPlusCircle } from "@react-icons/all-files/ai/AiFillPlusCircle";
2991
2994
  import { createVariableReference } from "@uniformdev/canvas";
2992
2995
  import { HorizontalRhythm, MenuGroup, MenuItem as MenuItem2, MenuItemSeparator } from "@uniformdev/design-system";
2993
2996
  import { dequal } from "dequal/lite";
@@ -3000,7 +3003,6 @@ import {
3000
3003
  } from "lexical";
3001
3004
  import { useCallback, useEffect as useEffect7, useMemo as useMemo8, useRef as useRef8, useState as useState8 } from "react";
3002
3005
  import { createPortal } from "react-dom";
3003
- import { AiFillPlusCircle } from "react-icons/ai";
3004
3006
 
3005
3007
  // src/components/Variables/toolbox/SelectVariableMenu.styles.ts
3006
3008
  import { css as css18 } from "@emotion/react";
@@ -4033,10 +4035,10 @@ import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexica
4033
4035
  import { CLEAR_EDITOR_COMMAND } from "lexical";
4034
4036
 
4035
4037
  // src/components/Variables/toolbox/SelectVariableMenu.tsx
4038
+ import { BsFillPlusCircleFill } from "@react-icons/all-files/bs/BsFillPlusCircleFill";
4039
+ import { CgUsbC } from "@react-icons/all-files/cg/CgUsbC";
4036
4040
  import { HorizontalRhythm as HorizontalRhythm2, Menu as Menu2, MenuGroup as MenuGroup2, MenuItem as MenuItem3, MenuItemSeparator as MenuItemSeparator2 } from "@uniformdev/design-system";
4037
4041
  import { useEffect as useEffect11, useRef as useRef9, useState as useState10 } from "react";
4038
- import { BsFillPlusCircleFill } from "react-icons/bs";
4039
- import { CgUsbC } from "react-icons/cg";
4040
4042
  import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs19 } from "@emotion/react/jsx-runtime";
4041
4043
  function SelectVariableMenu({
4042
4044
  onSelectVariable,
@@ -4070,11 +4072,12 @@ function SelectVariableMenu({
4070
4072
  Menu2,
4071
4073
  {
4072
4074
  placement: "bottom-start",
4075
+ withoutPortal: true,
4073
4076
  menuTrigger: /* @__PURE__ */ jsx34(
4074
4077
  "button",
4075
4078
  {
4076
- title: menuTooltip,
4077
4079
  ...buttonProps,
4080
+ title: menuTooltip,
4078
4081
  ref: btnRef,
4079
4082
  css: [menuBtn, buttonCss],
4080
4083
  type: "button",
@@ -4541,10 +4544,10 @@ function InputVariablesOverlayMenu({
4541
4544
  }
4542
4545
 
4543
4546
  // src/components/Variables/ParameterConnectionIndicator.tsx
4547
+ import { CgUsbC as CgUsbC2 } from "@react-icons/all-files/cg/CgUsbC";
4544
4548
  import { bindVariablesToObject } from "@uniformdev/canvas";
4545
4549
  import { HorizontalRhythm as HorizontalRhythm3, Menu as Menu3 } from "@uniformdev/design-system";
4546
4550
  import { useMemo as useMemo11 } from "react";
4547
- import { CgUsbC as CgUsbC2 } from "react-icons/cg";
4548
4551
 
4549
4552
  // src/components/Variables/styles/ParameterVariables.styles.ts
4550
4553
  import { css as css23 } from "@emotion/react";
@@ -4570,6 +4573,12 @@ var variableBindButton2 = css23`
4570
4573
  background: none;
4571
4574
  color: currentColor;
4572
4575
  }
4576
+
4577
+ // fixes menu resizing issue within iframes
4578
+ // see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
4579
+ + [role='menu'] {
4580
+ max-height: unset;
4581
+ }
4573
4582
  `;
4574
4583
  var input2 = css23`
4575
4584
  display: block;
@@ -4610,8 +4619,7 @@ var input2 = css23`
4610
4619
  color: var(--gray-400);
4611
4620
  }
4612
4621
 
4613
- &[readonly],
4614
- &[contenteditable='false'] {
4622
+ &[readonly] {
4615
4623
  cursor: not-allowed;
4616
4624
  color: var(--gray-400);
4617
4625
  }
@@ -4653,6 +4661,7 @@ function ParameterConnectionIndicator({
4653
4661
  Menu3,
4654
4662
  {
4655
4663
  placement: "bottom-start",
4664
+ withoutPortal: true,
4656
4665
  menuTrigger: /* @__PURE__ */ jsx40(
4657
4666
  "button",
4658
4667
  {
@@ -5287,7 +5296,10 @@ import {
5287
5296
  WarningMessage as WarningMessage2
5288
5297
  } from "@uniformdev/design-system";
5289
5298
  import { jsx as jsx49, jsxs as jsxs29 } from "@emotion/react/jsx-runtime";
5290
- function RequestHeaders({ disableVariables }) {
5299
+ function RequestHeaders({
5300
+ disableVariables,
5301
+ addOmitIfEmpty
5302
+ }) {
5291
5303
  var _a, _b;
5292
5304
  const { dispatch, request } = useRequest();
5293
5305
  const deezHeaders = [...request.headers, { key: "", value: "" }];
@@ -5305,7 +5317,8 @@ function RequestHeaders({ disableVariables }) {
5305
5317
  return /* @__PURE__ */ jsx49("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs29(Table2, { children: [
5306
5318
  /* @__PURE__ */ jsx49(TableHead2, { children: /* @__PURE__ */ jsxs29(TableRow2, { children: [
5307
5319
  /* @__PURE__ */ jsx49(TableCellHead2, { children: "Name" }),
5308
- /* @__PURE__ */ jsx49(TableCellHead2, { children: "Value" })
5320
+ /* @__PURE__ */ jsx49(TableCellHead2, { children: "Value" }),
5321
+ addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellHead2, { children: "Omit If Empty" }) : null
5309
5322
  ] }) }),
5310
5323
  /* @__PURE__ */ jsxs29(TableBody2, { children: [
5311
5324
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.headers) == null ? void 0 : _b.map((baseHeader) => {
@@ -5353,7 +5366,24 @@ function RequestHeaders({ disableVariables }) {
5353
5366
  enableEditingVariables: true,
5354
5367
  "data-testid": "header-value"
5355
5368
  }
5356
- ) : null })
5369
+ ) : null }),
5370
+ addOmitIfEmpty ? /* @__PURE__ */ jsx49(TableCellData2, { width: "50%", children: header.key ? /* @__PURE__ */ jsx49(
5371
+ Input3,
5372
+ {
5373
+ type: "checkbox",
5374
+ checked: header.omitIfEmpty,
5375
+ "data-testid": "header-omitifempty",
5376
+ onChange: (e) => dispatch({
5377
+ type: "updateHeader",
5378
+ header: {
5379
+ key: header.key,
5380
+ value: header.value,
5381
+ omitIfEmpty: e.currentTarget.checked
5382
+ },
5383
+ index
5384
+ })
5385
+ }
5386
+ ) : null }) : null
5357
5387
  ] }, index);
5358
5388
  })
5359
5389
  ] })
@@ -5393,25 +5423,30 @@ import {
5393
5423
  WarningMessage as WarningMessage3
5394
5424
  } from "@uniformdev/design-system";
5395
5425
  import { jsx as jsx51, jsxs as jsxs30 } from "@emotion/react/jsx-runtime";
5396
- function RequestParameters({ disableVariables }) {
5426
+ function RequestParameters({
5427
+ disableVariables,
5428
+ addOmitIfEmpty
5429
+ }) {
5397
5430
  var _a, _b;
5398
5431
  const { dispatch, request } = useRequest();
5399
5432
  const deezParameters = [...request.parameters, { key: "", value: "" }];
5400
5433
  const handleUpdateParamFromMenu = ({
5401
5434
  key,
5402
5435
  value,
5436
+ omitIfEmpty,
5403
5437
  index
5404
5438
  }) => {
5405
5439
  dispatch({
5406
5440
  type: "updateParameter",
5407
- parameter: { key, value },
5441
+ parameter: { key, value, omitIfEmpty },
5408
5442
  index
5409
5443
  });
5410
5444
  };
5411
5445
  return /* @__PURE__ */ jsx51("div", { css: innerContentStyles, children: /* @__PURE__ */ jsxs30(Table3, { children: [
5412
5446
  /* @__PURE__ */ jsx51(TableHead3, { children: /* @__PURE__ */ jsxs30(TableRow3, { children: [
5413
5447
  /* @__PURE__ */ jsx51(TableCellHead3, { children: "Name" }),
5414
- /* @__PURE__ */ jsx51(TableCellHead3, { children: "Value" })
5448
+ /* @__PURE__ */ jsx51(TableCellHead3, { children: "Value" }),
5449
+ addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellHead3, { children: "Omit If Empty" }) : null
5415
5450
  ] }) }),
5416
5451
  /* @__PURE__ */ jsxs30(TableBody3, { children: [
5417
5452
  (_b = (_a = request.baseRequest) == null ? void 0 : _a.parameters) == null ? void 0 : _b.map((baseParameter) => {
@@ -5439,7 +5474,11 @@ function RequestParameters({ disableVariables }) {
5439
5474
  if (e.currentTarget.value) {
5440
5475
  dispatch({
5441
5476
  type: "updateParameter",
5442
- parameter: { key: e.currentTarget.value, value: parameter.value },
5477
+ parameter: {
5478
+ key: e.currentTarget.value,
5479
+ value: parameter.value,
5480
+ omitIfEmpty: parameter.omitIfEmpty
5481
+ },
5443
5482
  index
5444
5483
  });
5445
5484
  } else {
@@ -5456,6 +5495,7 @@ function RequestParameters({ disableVariables }) {
5456
5495
  onChange: (selectedVariable) => handleUpdateParamFromMenu({
5457
5496
  key: parameter.key,
5458
5497
  value: selectedVariable != null ? selectedVariable : "",
5498
+ omitIfEmpty: parameter.omitIfEmpty,
5459
5499
  index
5460
5500
  }),
5461
5501
  disableVariables,
@@ -5463,7 +5503,26 @@ function RequestParameters({ disableVariables }) {
5463
5503
  showAddVariableMenuOption: "Add variable...",
5464
5504
  enableEditingVariables: true
5465
5505
  }
5466
- ) : null })
5506
+ ) : null }),
5507
+ addOmitIfEmpty ? /* @__PURE__ */ jsx51(TableCellData3, { width: "50%", children: parameter.key ? /* @__PURE__ */ jsx51(
5508
+ Input4,
5509
+ {
5510
+ type: "checkbox",
5511
+ checked: parameter.omitIfEmpty,
5512
+ "data-testid": "parameter-omitifempty",
5513
+ onChange: (e) => {
5514
+ dispatch({
5515
+ type: "updateParameter",
5516
+ parameter: {
5517
+ key: parameter.key,
5518
+ value: parameter.value,
5519
+ omitIfEmpty: e.currentTarget.checked
5520
+ },
5521
+ index
5522
+ });
5523
+ }
5524
+ }
5525
+ ) : null }) : null
5467
5526
  ] }, index);
5468
5527
  })
5469
5528
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.42.1-alpha.6+8511a0877",
3
+ "version": "19.45.0",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -44,19 +44,19 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@hookform/resolvers": "^3.0.1",
47
- "@lexical/clipboard": "^0.11.3",
48
- "@lexical/react": "^0.11.3",
49
- "@lexical/selection": "^0.11.3",
50
- "@lexical/utils": "^0.11.3",
51
- "@uniformdev/canvas": "19.42.1-alpha.6+8511a0877",
52
- "@uniformdev/design-system": "19.42.1-alpha.6+8511a0877",
53
- "@uniformdev/mesh-sdk": "19.42.1-alpha.6+8511a0877",
47
+ "@lexical/clipboard": "^0.12.0",
48
+ "@lexical/react": "^0.12.0",
49
+ "@lexical/selection": "^0.12.0",
50
+ "@lexical/utils": "^0.12.0",
51
+ "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
52
+ "@uniformdev/canvas": "19.45.0",
53
+ "@uniformdev/design-system": "19.45.0",
54
+ "@uniformdev/mesh-sdk": "19.45.0",
54
55
  "dequal": "^2.0.3",
55
- "lexical": "^0.11.3",
56
+ "lexical": "^0.12.0",
56
57
  "mitt": "^3.0.0",
57
58
  "react-beautiful-dnd": "13.1.1",
58
59
  "react-hook-form": "^7.43.9",
59
- "react-icons": "4.10.1",
60
60
  "react-use": "17.4.0",
61
61
  "timeago.js": "4.0.2",
62
62
  "uuid": "9.0.0",
@@ -72,7 +72,7 @@
72
72
  "@emotion/react": "11.11.1",
73
73
  "@storybook/react": "6.5.16",
74
74
  "@svgr/cli": "6.5.1",
75
- "@types/react": "18.2.18",
75
+ "@types/react": "18.2.20",
76
76
  "@types/react-beautiful-dnd": "13.1.4",
77
77
  "@types/react-dom": "18.2.7",
78
78
  "@types/uuid": "9.0.2",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "8511a0877200b169973a40ab7c7684e6744f3d2f"
88
+ "gitHead": "ff90cd6bd6d9db14f0d3a2ba8bd4db538b66548c"
89
89
  }