@uniformdev/mesh-sdk-react 19.38.3-alpha.70 → 19.38.3-alpha.78
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 +55 -6
- package/dist/index.d.ts +55 -6
- package/dist/index.esm.js +208 -115
- package/dist/index.js +482 -389
- package/dist/index.mjs +208 -115
- package/package.json +12 -12
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;
|
|
@@ -484,8 +512,12 @@ type VariableNodeState = {
|
|
|
484
512
|
isFresh: boolean;
|
|
485
513
|
/** Whether clicking the node has an effect (dispatching an edit event) */
|
|
486
514
|
hasClickEvent: boolean | undefined;
|
|
487
|
-
/** Tooltip of the node on
|
|
515
|
+
/** Tooltip of the node on hover */
|
|
488
516
|
tooltip: string | undefined;
|
|
517
|
+
/**
|
|
518
|
+
* Disables showing text in the variables node and replaces it with a loading indicator
|
|
519
|
+
*/
|
|
520
|
+
isLoading: boolean;
|
|
489
521
|
};
|
|
490
522
|
/** Renders a variable reference node within a Lexical editor */
|
|
491
523
|
declare class VariableNode extends DecoratorNode<JSX.Element> {
|
|
@@ -740,6 +772,10 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
740
772
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
741
773
|
*/
|
|
742
774
|
enableEditingVariables?: boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Adds an additional option to omit the variable if it's empty from requests
|
|
777
|
+
*/
|
|
778
|
+
addOmitIfEmpty?: boolean;
|
|
743
779
|
/** (optional) sets and shows the the error message value */
|
|
744
780
|
errorMessage?: string;
|
|
745
781
|
/** (optional) sets and shows the the warning message value */
|
|
@@ -844,7 +880,7 @@ type VariableEditorProps<TEditorContext = unknown> = {
|
|
|
844
880
|
};
|
|
845
881
|
declare function VariableEditor({ variable, onSubmit, onCancel, disableMeshTip }: VariableEditorProps<any>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
846
882
|
|
|
847
|
-
type VariablesProviderProps<TEditVariableContext = unknown> = React
|
|
883
|
+
type VariablesProviderProps<TEditVariableContext = unknown> = React.PropsWithChildren<{
|
|
848
884
|
/**
|
|
849
885
|
* Signals that components in this variables context are not intended to allow mutation
|
|
850
886
|
* of the variable values (i.e. editing, adding, or deleting variable definitions).
|
|
@@ -867,7 +903,13 @@ type VariablesProviderProps<TEditVariableContext = unknown> = React$1.PropsWithC
|
|
|
867
903
|
* Provide a component to handle editing a variable definition (e.g. a modal wrapper)
|
|
868
904
|
* If not passed, the editor will be rendered inline, with potentially strange results.
|
|
869
905
|
*/
|
|
870
|
-
editVariableComponent?: React
|
|
906
|
+
editVariableComponent?: React.ComponentType<VariableEditorProps<TEditVariableContext>>;
|
|
907
|
+
/**
|
|
908
|
+
* Signals to the provider that the variables value is in the process of being loaded.
|
|
909
|
+
* Variables editors may use this to avoid showing invalid variable states while loading,
|
|
910
|
+
* or to show a loading indicator.
|
|
911
|
+
*/
|
|
912
|
+
isLoading?: boolean;
|
|
871
913
|
}>;
|
|
872
914
|
type VariablesAction<TEditVariableContext> = {
|
|
873
915
|
type: 'edit';
|
|
@@ -924,8 +966,14 @@ type VariablesContext<TEditVariableContext> = {
|
|
|
924
966
|
* Used when binding the variables to a value.
|
|
925
967
|
*/
|
|
926
968
|
flatVariables: Readonly<Record<string, unknown>>;
|
|
969
|
+
/**
|
|
970
|
+
* The variables context value is in the process of being loaded.
|
|
971
|
+
* Variables editors may use this to avoid showing invalid variable states while loading,
|
|
972
|
+
* or to show a loading indicator.
|
|
973
|
+
*/
|
|
974
|
+
isLoading: boolean;
|
|
927
975
|
};
|
|
928
|
-
declare function VariablesProvider<TEditComponentContext = never>({ value, onChange, editVariableComponent, readOnly, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
976
|
+
declare function VariablesProvider<TEditComponentContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
929
977
|
declare function useVariables<TEditComponentContext = unknown>(returnEmptyWithoutProvider?: boolean): VariablesContext<TEditComponentContext>;
|
|
930
978
|
|
|
931
979
|
declare function useOnVariableUpdated(fn: (event: VariablesUpdateEvent) => void, disabled?: boolean): void;
|
|
@@ -1433,18 +1481,19 @@ declare function ParamTypeDynamicDataProvider(props: ParamTypeDynamicDataProvide
|
|
|
1433
1481
|
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1434
1482
|
|
|
1435
1483
|
/** Editor component to manage HTTP headers on a request */
|
|
1436
|
-
declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1484
|
+
declare function RequestHeaders({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1437
1485
|
|
|
1438
1486
|
/** Dropdown to pick a HTTP method for a request */
|
|
1439
1487
|
declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1440
1488
|
|
|
1441
1489
|
type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
|
|
1442
1490
|
/** Component to manage query parameters on a request */
|
|
1443
|
-
declare function RequestParameters({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1491
|
+
declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1444
1492
|
|
|
1445
1493
|
type RequestParameter = {
|
|
1446
1494
|
key: string;
|
|
1447
1495
|
value: string;
|
|
1496
|
+
omitIfEmpty?: boolean;
|
|
1448
1497
|
};
|
|
1449
1498
|
type BaseRequestData = {
|
|
1450
1499
|
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;
|
|
@@ -484,8 +512,12 @@ type VariableNodeState = {
|
|
|
484
512
|
isFresh: boolean;
|
|
485
513
|
/** Whether clicking the node has an effect (dispatching an edit event) */
|
|
486
514
|
hasClickEvent: boolean | undefined;
|
|
487
|
-
/** Tooltip of the node on
|
|
515
|
+
/** Tooltip of the node on hover */
|
|
488
516
|
tooltip: string | undefined;
|
|
517
|
+
/**
|
|
518
|
+
* Disables showing text in the variables node and replaces it with a loading indicator
|
|
519
|
+
*/
|
|
520
|
+
isLoading: boolean;
|
|
489
521
|
};
|
|
490
522
|
/** Renders a variable reference node within a Lexical editor */
|
|
491
523
|
declare class VariableNode extends DecoratorNode<JSX.Element> {
|
|
@@ -740,6 +772,10 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
740
772
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
741
773
|
*/
|
|
742
774
|
enableEditingVariables?: boolean;
|
|
775
|
+
/**
|
|
776
|
+
* Adds an additional option to omit the variable if it's empty from requests
|
|
777
|
+
*/
|
|
778
|
+
addOmitIfEmpty?: boolean;
|
|
743
779
|
/** (optional) sets and shows the the error message value */
|
|
744
780
|
errorMessage?: string;
|
|
745
781
|
/** (optional) sets and shows the the warning message value */
|
|
@@ -844,7 +880,7 @@ type VariableEditorProps<TEditorContext = unknown> = {
|
|
|
844
880
|
};
|
|
845
881
|
declare function VariableEditor({ variable, onSubmit, onCancel, disableMeshTip }: VariableEditorProps<any>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
846
882
|
|
|
847
|
-
type VariablesProviderProps<TEditVariableContext = unknown> = React
|
|
883
|
+
type VariablesProviderProps<TEditVariableContext = unknown> = React.PropsWithChildren<{
|
|
848
884
|
/**
|
|
849
885
|
* Signals that components in this variables context are not intended to allow mutation
|
|
850
886
|
* of the variable values (i.e. editing, adding, or deleting variable definitions).
|
|
@@ -867,7 +903,13 @@ type VariablesProviderProps<TEditVariableContext = unknown> = React$1.PropsWithC
|
|
|
867
903
|
* Provide a component to handle editing a variable definition (e.g. a modal wrapper)
|
|
868
904
|
* If not passed, the editor will be rendered inline, with potentially strange results.
|
|
869
905
|
*/
|
|
870
|
-
editVariableComponent?: React
|
|
906
|
+
editVariableComponent?: React.ComponentType<VariableEditorProps<TEditVariableContext>>;
|
|
907
|
+
/**
|
|
908
|
+
* Signals to the provider that the variables value is in the process of being loaded.
|
|
909
|
+
* Variables editors may use this to avoid showing invalid variable states while loading,
|
|
910
|
+
* or to show a loading indicator.
|
|
911
|
+
*/
|
|
912
|
+
isLoading?: boolean;
|
|
871
913
|
}>;
|
|
872
914
|
type VariablesAction<TEditVariableContext> = {
|
|
873
915
|
type: 'edit';
|
|
@@ -924,8 +966,14 @@ type VariablesContext<TEditVariableContext> = {
|
|
|
924
966
|
* Used when binding the variables to a value.
|
|
925
967
|
*/
|
|
926
968
|
flatVariables: Readonly<Record<string, unknown>>;
|
|
969
|
+
/**
|
|
970
|
+
* The variables context value is in the process of being loaded.
|
|
971
|
+
* Variables editors may use this to avoid showing invalid variable states while loading,
|
|
972
|
+
* or to show a loading indicator.
|
|
973
|
+
*/
|
|
974
|
+
isLoading: boolean;
|
|
927
975
|
};
|
|
928
|
-
declare function VariablesProvider<TEditComponentContext = never>({ value, onChange, editVariableComponent, readOnly, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
976
|
+
declare function VariablesProvider<TEditComponentContext = never>({ value, onChange, editVariableComponent, readOnly, isLoading, children, knownUndefinedValues, }: VariablesProviderProps<TEditComponentContext>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
929
977
|
declare function useVariables<TEditComponentContext = unknown>(returnEmptyWithoutProvider?: boolean): VariablesContext<TEditComponentContext>;
|
|
930
978
|
|
|
931
979
|
declare function useOnVariableUpdated(fn: (event: VariablesUpdateEvent) => void, disabled?: boolean): void;
|
|
@@ -1433,18 +1481,19 @@ declare function ParamTypeDynamicDataProvider(props: ParamTypeDynamicDataProvide
|
|
|
1433
1481
|
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1434
1482
|
|
|
1435
1483
|
/** Editor component to manage HTTP headers on a request */
|
|
1436
|
-
declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1484
|
+
declare function RequestHeaders({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1437
1485
|
|
|
1438
1486
|
/** Dropdown to pick a HTTP method for a request */
|
|
1439
1487
|
declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1440
1488
|
|
|
1441
1489
|
type RequestParametersProps = Pick<InputVariablesProps, 'disableVariables'>;
|
|
1442
1490
|
/** Component to manage query parameters on a request */
|
|
1443
|
-
declare function RequestParameters({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1491
|
+
declare function RequestParameters({ disableVariables, addOmitIfEmpty, }: Pick<InputVariablesProps, 'disableVariables' | 'addOmitIfEmpty'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1444
1492
|
|
|
1445
1493
|
type RequestParameter = {
|
|
1446
1494
|
key: string;
|
|
1447
1495
|
value: string;
|
|
1496
|
+
omitIfEmpty?: boolean;
|
|
1448
1497
|
};
|
|
1449
1498
|
type BaseRequestData = {
|
|
1450
1499
|
baseUrl: string;
|