@uniformdev/mesh-sdk-react 17.4.1-alpha.37 → 17.5.1-alpha.6
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 +131 -2
- package/dist/index.esm.js +674 -136
- package/dist/index.js +674 -136
- package/dist/index.mjs +674 -136
- package/package.json +15 -10
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import React__default, { SVGProps } from 'react';
|
|
|
6
6
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
7
7
|
import { TDate } from 'timeago.js';
|
|
8
8
|
import * as _emotion_react from '@emotion/react';
|
|
9
|
-
|
|
9
|
+
import { DataVariableDefinition } from '@uniformdev/canvas';
|
|
10
|
+
import { InputSelectProps } from '@uniformdev/design-system';
|
|
11
|
+
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';
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
@@ -417,6 +419,133 @@ declare type MeshAppProps = {
|
|
|
417
419
|
};
|
|
418
420
|
declare const MeshApp: React__default.FC<React__default.PropsWithChildren<MeshAppProps>>;
|
|
419
421
|
|
|
422
|
+
declare type DataVariableDefinitionWithName = {
|
|
423
|
+
name: string;
|
|
424
|
+
} & DataVariableDefinition;
|
|
425
|
+
declare function variablesToList(variables: Record<string, DataVariableDefinition> | undefined): Array<DataVariableDefinitionWithName>;
|
|
426
|
+
|
|
427
|
+
declare type VariableEditorProps = {
|
|
428
|
+
variable: string;
|
|
429
|
+
onSubmit: (values: DataVariableDefinitionWithName) => void | Promise<void>;
|
|
430
|
+
onCancel: () => void;
|
|
431
|
+
};
|
|
432
|
+
declare function VariableEditor({ variable, onSubmit, onCancel }: VariableEditorProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
433
|
+
|
|
434
|
+
declare type VariablesProviderProps = React.PropsWithChildren<{
|
|
435
|
+
value: Record<string, DataVariableDefinition>;
|
|
436
|
+
onChange: (newValue: Record<string, DataVariableDefinition>) => void;
|
|
437
|
+
editVariableComponent?: React.ComponentType<VariableEditorProps>;
|
|
438
|
+
}>;
|
|
439
|
+
declare type VariablesAction = {
|
|
440
|
+
type: 'edit';
|
|
441
|
+
variable: string;
|
|
442
|
+
} | {
|
|
443
|
+
type: 'remove';
|
|
444
|
+
variable: string;
|
|
445
|
+
} | {
|
|
446
|
+
type: 'set';
|
|
447
|
+
variable: DataVariableDefinitionWithName;
|
|
448
|
+
openEditor?: boolean;
|
|
449
|
+
};
|
|
450
|
+
declare type VariablesContext = {
|
|
451
|
+
dispatch: (event: VariablesAction) => void;
|
|
452
|
+
variables: Readonly<Record<string, DataVariableDefinition>>;
|
|
453
|
+
};
|
|
454
|
+
declare function VariablesProvider({ value, onChange, editVariableComponent, children, }: VariablesProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
455
|
+
declare function useVariables(): VariablesContext;
|
|
456
|
+
|
|
457
|
+
declare function VariablesList(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
458
|
+
|
|
459
|
+
declare type InputToken = {
|
|
460
|
+
name: string;
|
|
461
|
+
value: string;
|
|
462
|
+
};
|
|
463
|
+
declare type InputVariablesProps = {
|
|
464
|
+
/** sets the input label value */
|
|
465
|
+
label: string;
|
|
466
|
+
/** sets the value of the input */
|
|
467
|
+
value: string;
|
|
468
|
+
/** sets the passed down function call */
|
|
469
|
+
onChange: (newValue: string) => void;
|
|
470
|
+
disableVariables?: boolean;
|
|
471
|
+
};
|
|
472
|
+
declare function InputVariables({ label, value, disableVariables, onChange }: InputVariablesProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
473
|
+
|
|
474
|
+
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
475
|
+
|
|
476
|
+
declare function RequestHeaders({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
477
|
+
|
|
478
|
+
declare function RequestMethodSelect(props: Omit<InputSelectProps, 'value' | 'onChange' | 'options'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
479
|
+
|
|
480
|
+
declare function RequestParameters({ disableVariables }: Pick<InputVariablesProps, 'disableVariables'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
481
|
+
|
|
482
|
+
declare type RequestParameter = {
|
|
483
|
+
key: string;
|
|
484
|
+
value: string;
|
|
485
|
+
};
|
|
486
|
+
declare type RequestData = {
|
|
487
|
+
relativeUrl: string;
|
|
488
|
+
headers: Array<RequestParameter>;
|
|
489
|
+
baseUrl?: string;
|
|
490
|
+
method?: string;
|
|
491
|
+
body?: string;
|
|
492
|
+
};
|
|
493
|
+
declare type ComputedRequestData = RequestData & {
|
|
494
|
+
parameters: Array<RequestParameter>;
|
|
495
|
+
};
|
|
496
|
+
declare type RequestProviderProps = React.PropsWithChildren<{
|
|
497
|
+
value: RequestData;
|
|
498
|
+
onChange: (newValue: ComputedRequestData) => void;
|
|
499
|
+
}>;
|
|
500
|
+
declare type RequestAction = {
|
|
501
|
+
type: 'setRelativeUrl';
|
|
502
|
+
relativeUrl: string;
|
|
503
|
+
} | {
|
|
504
|
+
type: 'updateHeader';
|
|
505
|
+
header: RequestParameter;
|
|
506
|
+
index?: number;
|
|
507
|
+
} | {
|
|
508
|
+
type: 'removeHeader';
|
|
509
|
+
index: number;
|
|
510
|
+
} | {
|
|
511
|
+
type: 'updateParameter';
|
|
512
|
+
parameter: RequestParameter;
|
|
513
|
+
index?: number;
|
|
514
|
+
} | {
|
|
515
|
+
type: 'removeParameter';
|
|
516
|
+
index: number;
|
|
517
|
+
} | {
|
|
518
|
+
type: 'setMethod';
|
|
519
|
+
method: string;
|
|
520
|
+
} | {
|
|
521
|
+
type: 'setBody';
|
|
522
|
+
body: string;
|
|
523
|
+
};
|
|
524
|
+
declare type RequestContext = {
|
|
525
|
+
dispatch: (event: RequestAction) => void;
|
|
526
|
+
request: Readonly<ComputedRequestData>;
|
|
527
|
+
};
|
|
528
|
+
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
529
|
+
declare function useRequest(): RequestContext;
|
|
530
|
+
declare function decomposeRelativeUrl(relativeUrl: string): [string, Array<RequestParameter>];
|
|
531
|
+
|
|
532
|
+
declare function RequestUrlInput(props: Omit<InputVariablesProps, 'value' | 'onChange'>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
533
|
+
|
|
534
|
+
declare type RequestTypeContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
535
|
+
/**sets the background color of the container
|
|
536
|
+
* @default 'transparent'
|
|
537
|
+
*/
|
|
538
|
+
bgColor?: 'transparent' | 'var(--gray-100)';
|
|
539
|
+
children: React.ReactNode;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* @description a container to layout content in a 2 column grid format = 12ch 1fr
|
|
543
|
+
* @example <RequestTypeContainer bgColor="var(--gray-100)">
|
|
544
|
+
* <label>Name <input type="text" /></label>
|
|
545
|
+
* <label>Name <input type="text" /></label>
|
|
546
|
+
* </div> */
|
|
547
|
+
declare const RequestTypeContainer: ({ bgColor, children, ...props }: RequestTypeContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
548
|
+
|
|
420
549
|
declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
421
550
|
|
|
422
551
|
declare const SvgCheckmark: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
@@ -461,4 +590,4 @@ declare namespace index {
|
|
|
461
590
|
};
|
|
462
591
|
}
|
|
463
592
|
|
|
464
|
-
export { Brand, DamItem, DamSelectedItem, DamSelectedItemProps, DefaultSearchRow, DefaultSelectedItem, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, index as Icons, MeshApp, MeshAppProps, NoResultsProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, ResolvableLoadingValue, SelectionField, SelectionFieldValue, UniformMeshLocationContext, UniformMeshLocationContextProvider, UniformMeshLocationContextValue, UniformMeshSdkContext, UniformMeshSdkContextProvider, UniformMeshSdkContextValue, UseUniformMeshSdkOptions, 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, useInitializeUniformMeshSdk, useMeshLocation, useProductQueryContext, useProductSearchContext, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext };
|
|
593
|
+
export { Brand, ComputedRequestData, 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, decomposeRelativeUrl, 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, useInitializeUniformMeshSdk, useMeshLocation, useProductQueryContext, useProductSearchContext, useRequest, useUniformMeshLocation, useUniformMeshLocationContext, useUniformMeshSdk, useUniformMeshSdkContext, useVariables, variablesToList };
|