@uniformdev/mesh-sdk-react 17.5.1-alpha.105 → 17.5.1-alpha.135
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.ts +187 -185
- package/dist/index.esm.js +181 -181
- package/dist/index.js +179 -179
- package/dist/index.mjs +181 -181
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,99 +1,58 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { MeshLocationCore, UniformMeshSDK, MeshLocation } from '@uniformdev/mesh-sdk';
|
|
3
|
-
export * from '@uniformdev/mesh-sdk';
|
|
1
|
+
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import React__default, { SVGProps } from 'react';
|
|
6
|
-
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
7
4
|
import { TDate } from 'timeago.js';
|
|
8
5
|
import * as _emotion_react from '@emotion/react';
|
|
9
|
-
import { DataVariableDefinition } from '@uniformdev/canvas';
|
|
10
6
|
import { InputSelectProps } from '@uniformdev/design-system';
|
|
11
7
|
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputProps, InputSelect, InputToggle, InputToggleProps, InputKeywordSearch as KeywordSearchInput, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps } from '@uniformdev/design-system';
|
|
8
|
+
import { DataVariableDefinition } from '@uniformdev/canvas';
|
|
9
|
+
import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
|
|
10
|
+
import { MeshLocation, UniformMeshSDK, MeshLocationCore } from '@uniformdev/mesh-sdk';
|
|
11
|
+
export * from '@uniformdev/mesh-sdk';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
15
|
-
* Intended to be used within <MeshApp />.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated prefer useMeshLocation which has much more accurate type safety
|
|
18
|
-
*/
|
|
19
|
-
declare function useUniformMeshLocation<TLocationValue = unknown, TLocationMetadata = never, TLocationSetValue = TLocationValue>(): MeshLocationCore<TLocationValue, TLocationMetadata, TLocationSetValue>;
|
|
13
|
+
declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
autoResizingDisabled?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Provides a React-hook wrapper around Uniform Mesh SDK initialization.
|
|
26
|
-
* NOTE: initialization is an async operation and should be handled as such.
|
|
27
|
-
*
|
|
28
|
-
* @deprecated prefer <MeshApp /> to initialize and provide in a single component
|
|
29
|
-
*/
|
|
30
|
-
declare const useInitializeUniformMeshSdk: ({ autoResizingDisabled }?: UseUniformMeshSdkOptions) => {
|
|
31
|
-
initializing: boolean;
|
|
32
|
-
error: Error | undefined;
|
|
33
|
-
sdk: UniformMeshSDK | undefined;
|
|
34
|
-
};
|
|
15
|
+
declare const SvgCheckmark: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
35
16
|
|
|
36
|
-
|
|
37
|
-
* Provides convenient access to the current Uniform Mesh SDK instance via React hook.
|
|
38
|
-
* Intended to be used within <MeshApp />.
|
|
39
|
-
*/
|
|
40
|
-
declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
17
|
+
declare const SvgChevronDown: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
41
18
|
|
|
42
|
-
|
|
43
|
-
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
44
|
-
* Intended to be used within <MeshApp />.
|
|
45
|
-
*
|
|
46
|
-
* There are three primary ways to invoke this hook:
|
|
47
|
-
* 1. Without any arguments, this hook will return the current location regardless of its type. The result will be a union of all possible locations you can discriminate between i.e. with an if statement on the `type`
|
|
48
|
-
* const location = useMeshLocation();
|
|
49
|
-
* if (location.type === 'paramType') { // location is now known to be a paramType }
|
|
50
|
-
* 2. With a string argument, this hook will assert that the current location is the expected one and return the correct typings for that location.
|
|
51
|
-
* const location = useMeshLocation('settings');
|
|
52
|
-
* 3. With an explicit generic to set the expected param type data or param type settings data. This is useful because (2) will return unknown as the value type for param types.
|
|
53
|
-
* const location = useMeshLocation<'paramType', MyParamTypeValueType>();
|
|
54
|
-
*
|
|
55
|
-
* You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
|
|
56
|
-
*/
|
|
57
|
-
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
58
|
-
type: TLocationType;
|
|
59
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
60
|
-
type: TLocationType;
|
|
61
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
62
|
-
type: TLocationType;
|
|
63
|
-
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
64
|
-
type: TLocationType;
|
|
65
|
-
}> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
|
|
66
|
-
type: TLocationType;
|
|
67
|
-
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
68
|
-
type: TLocationType;
|
|
69
|
-
}>;
|
|
19
|
+
declare const SvgClose: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
70
20
|
|
|
71
|
-
|
|
72
|
-
interface UniformMeshLocationContextValue<TLocationValue = unknown, TLocationSetValue = TLocationValue> {
|
|
73
|
-
location: MeshLocation<TLocationValue, TLocationSetValue>;
|
|
74
|
-
}
|
|
75
|
-
/** @deprecated not intended for public usage */
|
|
76
|
-
declare const UniformMeshLocationContext: React__default.Context<UniformMeshLocationContextValue<unknown, unknown> | undefined>;
|
|
77
|
-
/** @deprecated not intended for public usage. Use <MeshApp /> instead. */
|
|
78
|
-
declare const UniformMeshLocationContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
79
|
-
/**
|
|
80
|
-
* Provides access to the current UniformMeshLocationContext value.
|
|
81
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` instead.
|
|
82
|
-
*/
|
|
83
|
-
declare const useUniformMeshLocationContext: <TLocationValue = unknown, TLocationSetValue = TLocationValue>() => UniformMeshLocationContextValue<TLocationValue, TLocationSetValue>;
|
|
21
|
+
declare const SvgDanger: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
84
22
|
|
|
85
|
-
|
|
86
|
-
|
|
23
|
+
declare const SvgExclamationPoint: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
24
|
+
|
|
25
|
+
declare const SvgInfo: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
26
|
+
|
|
27
|
+
declare const SvgLightbulb: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
28
|
+
|
|
29
|
+
declare const SvgMagnifyingGlass: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
30
|
+
|
|
31
|
+
declare const SvgMaximizeAlt: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
32
|
+
|
|
33
|
+
declare const SvgMinus: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
34
|
+
|
|
35
|
+
declare const SvgMoreVerticalAlt: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
36
|
+
|
|
37
|
+
declare const SvgPlus: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
38
|
+
|
|
39
|
+
declare namespace index {
|
|
40
|
+
export {
|
|
41
|
+
SvgCaution as Caution,
|
|
42
|
+
SvgCheckmark as Checkmark,
|
|
43
|
+
SvgChevronDown as ChevronDown,
|
|
44
|
+
SvgClose as Close,
|
|
45
|
+
SvgDanger as Danger,
|
|
46
|
+
SvgExclamationPoint as ExclamationPoint,
|
|
47
|
+
SvgInfo as Info,
|
|
48
|
+
SvgLightbulb as Lightbulb,
|
|
49
|
+
SvgMagnifyingGlass as MagnifyingGlass,
|
|
50
|
+
SvgMaximizeAlt as MaximizeAlt,
|
|
51
|
+
SvgMinus as Minus,
|
|
52
|
+
SvgMoreVerticalAlt as MoreVerticalAlt,
|
|
53
|
+
SvgPlus as Plus,
|
|
54
|
+
};
|
|
87
55
|
}
|
|
88
|
-
/** @deprecated not intended for public usage */
|
|
89
|
-
declare const UniformMeshSdkContext: React__default.Context<UniformMeshSdkContextValue | undefined>;
|
|
90
|
-
/** @deprecated not intended for public usage; use <MeshApp /> instead */
|
|
91
|
-
declare const UniformMeshSdkContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
92
|
-
/**
|
|
93
|
-
* Provides access to the current (initialized) Uniform Mesh SDK context value.
|
|
94
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` or `useUniformMeshSdk` instead.
|
|
95
|
-
*/
|
|
96
|
-
declare const useUniformMeshSdkContext: () => UniformMeshSdkContextValue;
|
|
97
56
|
|
|
98
57
|
interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = EntrySearchResult> {
|
|
99
58
|
selectedItem: TResult;
|
|
@@ -105,13 +64,6 @@ interface EntrySearchSelectedItemProps<TResult extends EntrySearchResult = Entry
|
|
|
105
64
|
}
|
|
106
65
|
declare const DefaultSelectedItem: React__default.FC<EntrySearchSelectedItemProps>;
|
|
107
66
|
|
|
108
|
-
interface EntrySearchRowProps<TResult extends EntrySearchResult = EntrySearchResult> {
|
|
109
|
-
result: TResult;
|
|
110
|
-
isSelected: boolean;
|
|
111
|
-
triggerSelection: () => void;
|
|
112
|
-
}
|
|
113
|
-
declare const DefaultSearchRow: React__default.FC<EntrySearchRowProps>;
|
|
114
|
-
|
|
115
67
|
declare type EntrySearchQueryOptions = {
|
|
116
68
|
count: number;
|
|
117
69
|
offset: number;
|
|
@@ -169,6 +121,13 @@ interface NoResultsProps {
|
|
|
169
121
|
}
|
|
170
122
|
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;
|
|
171
123
|
|
|
124
|
+
interface EntrySearchRowProps<TResult extends EntrySearchResult = EntrySearchResult> {
|
|
125
|
+
result: TResult;
|
|
126
|
+
isSelected: boolean;
|
|
127
|
+
triggerSelection: () => void;
|
|
128
|
+
}
|
|
129
|
+
declare const DefaultSearchRow: React__default.FC<EntrySearchRowProps>;
|
|
130
|
+
|
|
172
131
|
declare const searchRowContainer: _emotion_react.SerializedStyles;
|
|
173
132
|
declare const searchRowContainerWithPopover: _emotion_react.SerializedStyles;
|
|
174
133
|
declare const searchRowContainerActive: _emotion_react.SerializedStyles;
|
|
@@ -323,25 +282,8 @@ interface ProductSearchContextValue {
|
|
|
323
282
|
declare const ProductSearchContext: React__default.Context<ProductSearchContextValue | undefined>;
|
|
324
283
|
declare const useProductSearchContext: () => ProductSearchContextValue;
|
|
325
284
|
|
|
326
|
-
declare const productSearchRowContainer: _emotion_react.SerializedStyles;
|
|
327
|
-
declare const productSearchRowContent: _emotion_react.SerializedStyles;
|
|
328
|
-
declare const productSearchRowContentActive: _emotion_react.SerializedStyles;
|
|
329
|
-
declare const productSearchRowTitle: _emotion_react.SerializedStyles;
|
|
330
|
-
declare const productSearchRowCategory: _emotion_react.SerializedStyles;
|
|
331
|
-
declare const productSearchRowDetails: _emotion_react.SerializedStyles;
|
|
332
|
-
declare const productSearchRowActiveIcon: _emotion_react.SerializedStyles;
|
|
333
|
-
|
|
334
285
|
declare function ProductSearchRow({ result, isSelected, triggerSelection, }: EntrySearchRowProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
335
286
|
|
|
336
|
-
declare const productSelectedItemContainer: _emotion_react.SerializedStyles;
|
|
337
|
-
declare const productSelectedItemDetails: _emotion_react.SerializedStyles;
|
|
338
|
-
declare const productSelectedItemContent: _emotion_react.SerializedStyles;
|
|
339
|
-
declare const productSelectedItemImage: _emotion_react.SerializedStyles;
|
|
340
|
-
declare const productedSelectedItemLinkBtn: _emotion_react.SerializedStyles;
|
|
341
|
-
declare const productedSelectedItemSmallText: _emotion_react.SerializedStyles;
|
|
342
|
-
declare const productSelectedItemIcon: _emotion_react.SerializedStyles;
|
|
343
|
-
declare const productSelectedItemLinkContainer: _emotion_react.SerializedStyles;
|
|
344
|
-
|
|
345
287
|
declare function ProductSelectedItem({ selectedItem, onDeselect, }: EntrySearchSelectedItemProps<ProductSearchResult>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
346
288
|
|
|
347
289
|
declare const ResolvableLoadingValue: ({ value, text, loading, }: {
|
|
@@ -364,20 +306,22 @@ declare const SelectionField: ({ id, label, loading, selectedValues, values, onA
|
|
|
364
306
|
onRemove: (id: string) => void;
|
|
365
307
|
}) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
366
308
|
|
|
367
|
-
declare const
|
|
368
|
-
declare const
|
|
369
|
-
declare const
|
|
370
|
-
declare const
|
|
371
|
-
declare const
|
|
372
|
-
declare const
|
|
373
|
-
declare const
|
|
374
|
-
|
|
375
|
-
declare const
|
|
376
|
-
declare const
|
|
377
|
-
declare const
|
|
378
|
-
declare const
|
|
379
|
-
declare const
|
|
380
|
-
declare const
|
|
309
|
+
declare const productSearchRowContainer: _emotion_react.SerializedStyles;
|
|
310
|
+
declare const productSearchRowContent: _emotion_react.SerializedStyles;
|
|
311
|
+
declare const productSearchRowContentActive: _emotion_react.SerializedStyles;
|
|
312
|
+
declare const productSearchRowTitle: _emotion_react.SerializedStyles;
|
|
313
|
+
declare const productSearchRowCategory: _emotion_react.SerializedStyles;
|
|
314
|
+
declare const productSearchRowDetails: _emotion_react.SerializedStyles;
|
|
315
|
+
declare const productSearchRowActiveIcon: _emotion_react.SerializedStyles;
|
|
316
|
+
|
|
317
|
+
declare const productSelectedItemContainer: _emotion_react.SerializedStyles;
|
|
318
|
+
declare const productSelectedItemDetails: _emotion_react.SerializedStyles;
|
|
319
|
+
declare const productSelectedItemContent: _emotion_react.SerializedStyles;
|
|
320
|
+
declare const productSelectedItemImage: _emotion_react.SerializedStyles;
|
|
321
|
+
declare const productedSelectedItemLinkBtn: _emotion_react.SerializedStyles;
|
|
322
|
+
declare const productedSelectedItemSmallText: _emotion_react.SerializedStyles;
|
|
323
|
+
declare const productSelectedItemIcon: _emotion_react.SerializedStyles;
|
|
324
|
+
declare const productSelectedItemLinkContainer: _emotion_react.SerializedStyles;
|
|
381
325
|
|
|
382
326
|
interface DamItem {
|
|
383
327
|
id: string;
|
|
@@ -411,6 +355,21 @@ interface DamSelectedItemProps<TResult extends DamItem = DamItem> {
|
|
|
411
355
|
}
|
|
412
356
|
declare function DamSelectedItem({ selectedItem, onDeselect, onEditClosed, logoIcon, itemDetailsRendererComponent, }: DamSelectedItemProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
413
357
|
|
|
358
|
+
declare const damSelectedItemContainer: _emotion_react.SerializedStyles;
|
|
359
|
+
declare const damSelectedItemInner: _emotion_react.SerializedStyles;
|
|
360
|
+
declare const damSelectedItemDetails: _emotion_react.SerializedStyles;
|
|
361
|
+
declare const damSelectedItemCopy: _emotion_react.SerializedStyles;
|
|
362
|
+
declare const damSelectedItemTitle: _emotion_react.SerializedStyles;
|
|
363
|
+
declare const damSelectedItemIcon: _emotion_react.SerializedStyles;
|
|
364
|
+
declare const damSelectedItemPopover: _emotion_react.SerializedStyles;
|
|
365
|
+
declare const damSelectedItemSmallText: _emotion_react.SerializedStyles;
|
|
366
|
+
declare const damSelectedItemPopoverLabel: _emotion_react.SerializedStyles;
|
|
367
|
+
declare const damSelectedItemLinkContainer: _emotion_react.SerializedStyles;
|
|
368
|
+
declare const damSelectedItemLinkBtn: _emotion_react.SerializedStyles;
|
|
369
|
+
declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
|
|
370
|
+
declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
|
|
371
|
+
declare const damSelectItemImage: _emotion_react.SerializedStyles;
|
|
372
|
+
|
|
414
373
|
declare type MeshAppProps = {
|
|
415
374
|
loadingComponent?: React__default.ComponentType;
|
|
416
375
|
errorComponent?: React__default.ComponentType<{
|
|
@@ -419,6 +378,25 @@ declare type MeshAppProps = {
|
|
|
419
378
|
};
|
|
420
379
|
declare const MeshApp: React__default.FC<React__default.PropsWithChildren<MeshAppProps>>;
|
|
421
380
|
|
|
381
|
+
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
382
|
+
|
|
383
|
+
declare type InputToken = {
|
|
384
|
+
name: string;
|
|
385
|
+
value: string;
|
|
386
|
+
};
|
|
387
|
+
declare type InputVariablesProps = {
|
|
388
|
+
/** sets the input label value */
|
|
389
|
+
label: string;
|
|
390
|
+
/** sets the value of the input */
|
|
391
|
+
value: string;
|
|
392
|
+
/** sets the passed down function call */
|
|
393
|
+
onChange: (newValue: string) => void;
|
|
394
|
+
/** called when the field is pasted into */
|
|
395
|
+
onPaste?: (newValue: string) => void;
|
|
396
|
+
disableVariables?: boolean;
|
|
397
|
+
};
|
|
398
|
+
declare function InputVariables({ label, value, disableVariables, onChange, onPaste }: InputVariablesProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
399
|
+
|
|
422
400
|
declare type DataVariableDefinitionWithName = {
|
|
423
401
|
name: string;
|
|
424
402
|
} & DataVariableDefinition;
|
|
@@ -431,6 +409,8 @@ declare type VariableEditorProps = {
|
|
|
431
409
|
};
|
|
432
410
|
declare function VariableEditor({ variable, onSubmit, onCancel }: VariableEditorProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
433
411
|
|
|
412
|
+
declare function VariablesList(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
413
|
+
|
|
434
414
|
declare type VariablesProviderProps = React.PropsWithChildren<{
|
|
435
415
|
value: Record<string, DataVariableDefinition>;
|
|
436
416
|
onChange: (newValue: Record<string, DataVariableDefinition>) => void;
|
|
@@ -457,25 +437,6 @@ declare type VariablesContext = {
|
|
|
457
437
|
declare function VariablesProvider({ value, onChange, editVariableComponent, children, }: VariablesProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
458
438
|
declare function useVariables(): VariablesContext;
|
|
459
439
|
|
|
460
|
-
declare function VariablesList(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
461
|
-
|
|
462
|
-
declare type InputToken = {
|
|
463
|
-
name: string;
|
|
464
|
-
value: string;
|
|
465
|
-
};
|
|
466
|
-
declare type InputVariablesProps = {
|
|
467
|
-
/** sets the input label value */
|
|
468
|
-
label: string;
|
|
469
|
-
/** sets the value of the input */
|
|
470
|
-
value: string;
|
|
471
|
-
/** sets the passed down function call */
|
|
472
|
-
onChange: (newValue: string) => void;
|
|
473
|
-
disableVariables?: boolean;
|
|
474
|
-
};
|
|
475
|
-
declare function InputVariables({ label, value, disableVariables, onChange }: InputVariablesProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
476
|
-
|
|
477
|
-
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
478
|
-
|
|
479
440
|
declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
480
441
|
|
|
481
442
|
declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
@@ -489,16 +450,14 @@ declare type RequestParameter = {
|
|
|
489
450
|
declare type RequestData = {
|
|
490
451
|
relativeUrl: string;
|
|
491
452
|
headers: Array<RequestParameter>;
|
|
453
|
+
parameters: Array<RequestParameter>;
|
|
492
454
|
baseUrl?: string;
|
|
493
455
|
method?: string;
|
|
494
456
|
body?: string;
|
|
495
457
|
};
|
|
496
|
-
declare type ComputedRequestData = RequestData & {
|
|
497
|
-
parameters: Array<RequestParameter>;
|
|
498
|
-
};
|
|
499
458
|
declare type RequestProviderProps = React.PropsWithChildren<{
|
|
500
459
|
value: RequestData;
|
|
501
|
-
onChange: (
|
|
460
|
+
onChange: (delegate: (oldValue: RequestData) => RequestData) => void;
|
|
502
461
|
}>;
|
|
503
462
|
declare type RequestAction = {
|
|
504
463
|
type: 'setRelativeUrl';
|
|
@@ -527,13 +486,10 @@ declare type RequestAction = {
|
|
|
527
486
|
};
|
|
528
487
|
declare type RequestContext = {
|
|
529
488
|
dispatch: (event: RequestAction) => void;
|
|
530
|
-
request: Readonly<
|
|
489
|
+
request: Readonly<RequestData>;
|
|
531
490
|
};
|
|
532
491
|
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
533
492
|
declare function useRequest(): RequestContext;
|
|
534
|
-
declare function decomposeRelativeUrl(relativeUrl: string): [string, Array<RequestParameter>];
|
|
535
|
-
|
|
536
|
-
declare function RequestUrlInput(props: Omit<InputVariablesProps, 'value' | 'onChange'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
537
493
|
|
|
538
494
|
declare type RequestTypeContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
539
495
|
/**sets the background color of the container
|
|
@@ -550,48 +506,94 @@ declare type RequestTypeContainerProps = React.HTMLAttributes<HTMLDivElement> &
|
|
|
550
506
|
* </div> */
|
|
551
507
|
declare const RequestTypeContainer: ({ bgColor, children, ...props }: RequestTypeContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
552
508
|
|
|
553
|
-
declare
|
|
554
|
-
|
|
555
|
-
declare const SvgCheckmark: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
556
|
-
|
|
557
|
-
declare const SvgChevronDown: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
558
|
-
|
|
559
|
-
declare const SvgClose: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
560
|
-
|
|
561
|
-
declare const SvgDanger: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
562
|
-
|
|
563
|
-
declare const SvgExclamationPoint: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
509
|
+
declare function RequestUrlInput(props: Omit<InputVariablesProps, 'value' | 'onChange'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
564
510
|
|
|
565
|
-
declare
|
|
511
|
+
declare function urlEncodeRequestUrl(url: string, varValues?: Record<string, DataVariableDefinition>): string;
|
|
512
|
+
declare function urlEncodeRequestParameter(parameter: RequestParameter, varValues?: Record<string, DataVariableDefinition>): RequestParameter;
|
|
566
513
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
514
|
+
/** @deprecated */
|
|
515
|
+
interface UniformMeshLocationContextValue<TLocationValue = unknown, TLocationSetValue = TLocationValue> {
|
|
516
|
+
location: MeshLocation<TLocationValue, TLocationSetValue>;
|
|
517
|
+
}
|
|
518
|
+
/** @deprecated not intended for public usage */
|
|
519
|
+
declare const UniformMeshLocationContext: React__default.Context<UniformMeshLocationContextValue<unknown, unknown> | undefined>;
|
|
520
|
+
/** @deprecated not intended for public usage. Use <MeshApp /> instead. */
|
|
521
|
+
declare const UniformMeshLocationContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
522
|
+
/**
|
|
523
|
+
* Provides access to the current UniformMeshLocationContext value.
|
|
524
|
+
* @deprecated Not intended for public use. Use `useUniformMeshLocation` instead.
|
|
525
|
+
*/
|
|
526
|
+
declare const useUniformMeshLocationContext: <TLocationValue = unknown, TLocationSetValue = TLocationValue>() => UniformMeshLocationContextValue<TLocationValue, TLocationSetValue>;
|
|
570
527
|
|
|
571
|
-
|
|
528
|
+
interface UniformMeshSdkContextValue {
|
|
529
|
+
sdk: UniformMeshSDK;
|
|
530
|
+
}
|
|
531
|
+
/** @deprecated not intended for public usage */
|
|
532
|
+
declare const UniformMeshSdkContext: React__default.Context<UniformMeshSdkContextValue | undefined>;
|
|
533
|
+
/** @deprecated not intended for public usage; use <MeshApp /> instead */
|
|
534
|
+
declare const UniformMeshSdkContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
535
|
+
/**
|
|
536
|
+
* Provides access to the current (initialized) Uniform Mesh SDK context value.
|
|
537
|
+
* @deprecated Not intended for public use. Use `useUniformMeshLocation` or `useUniformMeshSdk` instead.
|
|
538
|
+
*/
|
|
539
|
+
declare const useUniformMeshSdkContext: () => UniformMeshSdkContextValue;
|
|
572
540
|
|
|
573
|
-
|
|
541
|
+
interface UseUniformMeshSdkOptions {
|
|
542
|
+
autoResizingDisabled?: boolean;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Provides a React-hook wrapper around Uniform Mesh SDK initialization.
|
|
546
|
+
* NOTE: initialization is an async operation and should be handled as such.
|
|
547
|
+
*
|
|
548
|
+
* @deprecated prefer <MeshApp /> to initialize and provide in a single component
|
|
549
|
+
*/
|
|
550
|
+
declare const useInitializeUniformMeshSdk: ({ autoResizingDisabled }?: UseUniformMeshSdkOptions) => {
|
|
551
|
+
initializing: boolean;
|
|
552
|
+
error: Error | undefined;
|
|
553
|
+
sdk: UniformMeshSDK | undefined;
|
|
554
|
+
};
|
|
574
555
|
|
|
575
|
-
|
|
556
|
+
/**
|
|
557
|
+
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
558
|
+
* Intended to be used within <MeshApp />.
|
|
559
|
+
*
|
|
560
|
+
* There are three primary ways to invoke this hook:
|
|
561
|
+
* 1. Without any arguments, this hook will return the current location regardless of its type. The result will be a union of all possible locations you can discriminate between i.e. with an if statement on the `type`
|
|
562
|
+
* const location = useMeshLocation();
|
|
563
|
+
* if (location.type === 'paramType') { // location is now known to be a paramType }
|
|
564
|
+
* 2. With a string argument, this hook will assert that the current location is the expected one and return the correct typings for that location.
|
|
565
|
+
* const location = useMeshLocation('settings');
|
|
566
|
+
* 3. With an explicit generic to set the expected param type data or param type settings data. This is useful because (2) will return unknown as the value type for param types.
|
|
567
|
+
* const location = useMeshLocation<'paramType', MyParamTypeValueType>();
|
|
568
|
+
*
|
|
569
|
+
* You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
|
|
570
|
+
*/
|
|
571
|
+
declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLocationValue = unknown, TLocationSetValue = TLocationValue>(expectedLocation?: TLocationType): Extract<_uniformdev_mesh_sdk.DataSourceLocation, {
|
|
572
|
+
type: TLocationType;
|
|
573
|
+
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
574
|
+
type: TLocationType;
|
|
575
|
+
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
576
|
+
type: TLocationType;
|
|
577
|
+
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
578
|
+
type: TLocationType;
|
|
579
|
+
}> | Extract<_uniformdev_mesh_sdk.ParamTypeConfigLocation<TLocationValue, unknown>, {
|
|
580
|
+
type: TLocationType;
|
|
581
|
+
}> | Extract<_uniformdev_mesh_sdk.SettingsLocation<TLocationValue>, {
|
|
582
|
+
type: TLocationType;
|
|
583
|
+
}>;
|
|
576
584
|
|
|
577
|
-
|
|
585
|
+
/**
|
|
586
|
+
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
587
|
+
* Intended to be used within <MeshApp />.
|
|
588
|
+
*
|
|
589
|
+
* @deprecated prefer useMeshLocation which has much more accurate type safety
|
|
590
|
+
*/
|
|
591
|
+
declare function useUniformMeshLocation<TLocationValue = unknown, TLocationMetadata = never, TLocationSetValue = TLocationValue>(): MeshLocationCore<TLocationValue, TLocationMetadata, TLocationSetValue>;
|
|
578
592
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
SvgClose as Close,
|
|
585
|
-
SvgDanger as Danger,
|
|
586
|
-
SvgExclamationPoint as ExclamationPoint,
|
|
587
|
-
SvgInfo as Info,
|
|
588
|
-
SvgLightbulb as Lightbulb,
|
|
589
|
-
SvgMagnifyingGlass as MagnifyingGlass,
|
|
590
|
-
SvgMaximizeAlt as MaximizeAlt,
|
|
591
|
-
SvgMinus as Minus,
|
|
592
|
-
SvgMoreVerticalAlt as MoreVerticalAlt,
|
|
593
|
-
SvgPlus as Plus,
|
|
594
|
-
};
|
|
595
|
-
}
|
|
593
|
+
/**
|
|
594
|
+
* Provides convenient access to the current Uniform Mesh SDK instance via React hook.
|
|
595
|
+
* Intended to be used within <MeshApp />.
|
|
596
|
+
*/
|
|
597
|
+
declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
596
598
|
|
|
597
|
-
export { Brand,
|
|
599
|
+
export { Brand, DamItem, DamSelectedItem, DamSelectedItemProps, DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, index as Icons, InputToken, InputVariables, InputVariablesProps, MeshApp, MeshAppProps, NoResultsProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, RequestAction, RequestBody, RequestContext, RequestData, RequestHeaders, RequestMethodSelect, RequestParameter, RequestParameters, RequestProvider, RequestProviderProps, RequestTypeContainer, RequestTypeContainerProps, RequestUrlInput, ResolvableLoadingValue, SelectionField, SelectionFieldValue, UniformMeshLocationContext, UniformMeshLocationContextProvider, UniformMeshLocationContextValue, UniformMeshSdkContext, UniformMeshSdkContextProvider, UniformMeshSdkContextValue, UseUniformMeshSdkOptions, VariableEditor, VariableEditorProps, VariablesAction, VariablesContext, VariablesList, VariablesProvider, VariablesProviderProps, badgeIcon, damSelectItemImage, damSelectedItemContainer, damSelectedItemCopy, damSelectedItemDetails, damSelectedItemIcon, damSelectedItemInfoBtn, damSelectedItemInner, damSelectedItemLinkBtn, damSelectedItemLinkContainer, damSelectedItemMediaContainer, damSelectedItemPopover, damSelectedItemPopoverLabel, damSelectedItemSmallText, damSelectedItemTitle, draggableContainer, draggableIcon, draggableIconOffset, draggableIconWrapper, entrySearchBtn, entrySearchConfig, entrySearchConfigHidden, entrySearchLoadMoreBtn, entrySearchResultList, entrySearchSelectIcon, entrySearchSelectImg, entrySearchSelectInput, entrySearchSelectOption, entrySearchWrapper, productSearchRowActiveIcon, productSearchRowCategory, productSearchRowContainer, productSearchRowContent, productSearchRowContentActive, productSearchRowDetails, productSearchRowTitle, productSelectedItemContainer, productSelectedItemContent, productSelectedItemDetails, productSelectedItemIcon, productSelectedItemImage, productSelectedItemLinkContainer, productedSelectedItemLinkBtn, productedSelectedItemSmallText, searchRowBtn, searchRowContainer, searchRowContainerActive, searchRowContainerWithPopover, searchRowPopover, searchRowText, searchRowTextSmall, selectItemLinkBtn, selectItemLinkContainer, selectItemPopover, selectItemPopoverLabel, selectItemSmallText, selectedItemContainer, selectedItemCopy, selectedItemDetails, selectedItemIcon, selectedItemInner, selectedItemTitle, urlEncodeRequestParameter, urlEncodeRequestUrl, useInitializeUniformMeshSdk, useMeshLocation, useProductQueryContext, useProductSearchContext, useRequest, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext, useVariables, variablesToList };
|