@uniformdev/mesh-sdk-react 18.34.0 → 18.35.1-alpha.12
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 +354 -75
- package/dist/index.esm.js +767 -70
- package/dist/index.js +805 -103
- package/dist/index.mjs +767 -70
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import React__default, { SVGProps, ComponentType, PropsWithChildren } from 'react';
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { SVGProps, ComponentType, PropsWithChildren, HTMLAttributes, ReactNode, AnchorHTMLAttributes } from 'react';
|
|
4
4
|
import { TDate } from 'timeago.js';
|
|
5
5
|
import * as _emotion_react from '@emotion/react';
|
|
6
6
|
import { DataVariableDefinition, DataResourceVariables } from '@uniformdev/canvas';
|
|
7
7
|
import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
|
|
8
|
-
import { MeshLocation, SetValueOptions, DataSourceLocationValue, DataTypeLocationValue
|
|
8
|
+
import { MeshLocation, SetValueOptions, DataSourceLocationValue, DataTypeLocationValue } from '@uniformdev/mesh-sdk';
|
|
9
9
|
export * from '@uniformdev/mesh-sdk';
|
|
10
|
-
import { InputSelectProps } from '@uniformdev/design-system';
|
|
11
|
-
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps,
|
|
10
|
+
import { BadgeThemeProps, InputSelectProps } from '@uniformdev/design-system';
|
|
11
|
+
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps, useParameterShell } from '@uniformdev/design-system';
|
|
12
12
|
|
|
13
13
|
declare const SvgCaution: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
14
14
|
|
|
@@ -77,20 +77,20 @@ type EntrySearchProps<TResult extends EntrySearchResult = EntrySearchResult> = {
|
|
|
77
77
|
cursor?: string;
|
|
78
78
|
contentTypes?: EntrySearchContentType[];
|
|
79
79
|
selectedItems: TResult[] | undefined;
|
|
80
|
-
logoIcon: string | React.ComponentType<{
|
|
80
|
+
logoIcon: string | React$1.ComponentType<{
|
|
81
81
|
className?: string;
|
|
82
82
|
}>;
|
|
83
83
|
select: (items: TResult[], selectedContentType?: string) => void;
|
|
84
84
|
requireContentType?: boolean;
|
|
85
85
|
multiSelectId?: string;
|
|
86
86
|
multiSelect?: boolean;
|
|
87
|
-
rowComponent?: React.FC<EntrySearchRowProps<TResult>>;
|
|
88
|
-
selectedItemComponent?: React.FC<EntrySearchSelectedItemProps<TResult>>;
|
|
87
|
+
rowComponent?: React$1.FC<EntrySearchRowProps<TResult>>;
|
|
88
|
+
selectedItemComponent?: React$1.FC<EntrySearchSelectedItemProps<TResult>>;
|
|
89
89
|
onAddNew?: (type: EntrySearchContentType) => void;
|
|
90
90
|
onEditClosed?: (item: EntrySearchResult) => void;
|
|
91
91
|
onCancel?: () => void;
|
|
92
92
|
resultsLoading?: boolean;
|
|
93
|
-
noResultsComponent?: React.FC<{
|
|
93
|
+
noResultsComponent?: React$1.FC<{
|
|
94
94
|
searchText?: string;
|
|
95
95
|
selectedContentType?: string;
|
|
96
96
|
}>;
|
|
@@ -182,10 +182,6 @@ type ProductSearchResult = EntrySearchResult & {
|
|
|
182
182
|
id: string;
|
|
183
183
|
name: string;
|
|
184
184
|
}>;
|
|
185
|
-
/** @deprecated Use `editLink` instead. */
|
|
186
|
-
url?: string;
|
|
187
|
-
/** @deprecated Use `title` instead. */
|
|
188
|
-
name?: string;
|
|
189
185
|
};
|
|
190
186
|
interface ProductSearchResults {
|
|
191
187
|
total: number;
|
|
@@ -389,8 +385,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
389
385
|
type: TLocationType;
|
|
390
386
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
391
387
|
type: TLocationType;
|
|
392
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
393
|
-
type: TLocationType;
|
|
394
388
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
395
389
|
type: TLocationType;
|
|
396
390
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -404,8 +398,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
404
398
|
type: TLocationType;
|
|
405
399
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
406
400
|
type: TLocationType;
|
|
407
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
408
|
-
type: TLocationType;
|
|
409
401
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
410
402
|
type: TLocationType;
|
|
411
403
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -418,8 +410,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
418
410
|
type: TLocationType;
|
|
419
411
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
420
412
|
type: TLocationType;
|
|
421
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
422
|
-
type: TLocationType;
|
|
423
413
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
424
414
|
type: TLocationType;
|
|
425
415
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -470,10 +460,10 @@ declare function VariableEditor({ variable, onSubmit, onCancel }: VariableEditor
|
|
|
470
460
|
|
|
471
461
|
declare function VariablesList(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
472
462
|
|
|
473
|
-
type VariablesProviderProps = React.PropsWithChildren<{
|
|
463
|
+
type VariablesProviderProps = React$1.PropsWithChildren<{
|
|
474
464
|
value: Record<string, DataVariableDefinition>;
|
|
475
465
|
onChange: (newValue: Record<string, DataVariableDefinition>) => void;
|
|
476
|
-
editVariableComponent?: React.ComponentType<VariableEditorProps>;
|
|
466
|
+
editVariableComponent?: React$1.ComponentType<VariableEditorProps>;
|
|
477
467
|
}>;
|
|
478
468
|
type VariablesAction = {
|
|
479
469
|
type: 'edit';
|
|
@@ -562,6 +552,345 @@ type MeshAppProps = {
|
|
|
562
552
|
};
|
|
563
553
|
declare const MeshApp: React__default.FC<React__default.PropsWithChildren<MeshAppProps>>;
|
|
564
554
|
|
|
555
|
+
type DataRefreshButtonProps = HTMLAttributes<HTMLButtonElement> & {
|
|
556
|
+
/** sets the button text */
|
|
557
|
+
buttonText: string;
|
|
558
|
+
/** shows or hides the loading indicator when retrieving data */
|
|
559
|
+
isLoading: boolean;
|
|
560
|
+
/** sets the onClick function */
|
|
561
|
+
onRefreshData: () => void;
|
|
562
|
+
};
|
|
563
|
+
/**
|
|
564
|
+
* @description The data refresh button is a UI component to indicate to users a request for data is taking place
|
|
565
|
+
* @example <DataRefreshButton buttonText="my button" isLoading /> */
|
|
566
|
+
declare const DataRefreshButton: ({ buttonText, isLoading, onRefreshData, ...props }: DataRefreshButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
567
|
+
|
|
568
|
+
type ObjectSearchContainerProps = {
|
|
569
|
+
/** a child node that places components within the search location */
|
|
570
|
+
searchFilters: ReactNode;
|
|
571
|
+
/** a child node that places components within a scrollable list location */
|
|
572
|
+
resultList?: ReactNode;
|
|
573
|
+
/** allows any child element */
|
|
574
|
+
children?: ReactNode;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* @description Object search container is an opinionated layout for search parameters and retrieved results
|
|
578
|
+
* @example <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} /> */
|
|
579
|
+
declare const ObjectSearchContainer: ({ searchFilters, resultList, children, }: ObjectSearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
580
|
+
|
|
581
|
+
type ObjectSearchFilterProps = {
|
|
582
|
+
/** shows or hides the required content type select option */
|
|
583
|
+
requireContentType?: boolean;
|
|
584
|
+
/** sets the text for the required content type select option
|
|
585
|
+
* @default 'All content types'
|
|
586
|
+
*/
|
|
587
|
+
typeSelectorAllTypesOptionText?: string;
|
|
588
|
+
/** sets the select input value label text
|
|
589
|
+
* @default 'Content Type Select'
|
|
590
|
+
*/
|
|
591
|
+
selectLabel?: string;
|
|
592
|
+
/** sets the select input options */
|
|
593
|
+
selectOptions: Array<{
|
|
594
|
+
id: string;
|
|
595
|
+
name?: string;
|
|
596
|
+
label: string;
|
|
597
|
+
}>;
|
|
598
|
+
/** sets the search input name value
|
|
599
|
+
* @default 'searchText'
|
|
600
|
+
*/
|
|
601
|
+
searchInputName?: string;
|
|
602
|
+
/** sets the search input placeholder text
|
|
603
|
+
* @default 'Enter keyword to narrow your results'
|
|
604
|
+
*/
|
|
605
|
+
searchInputPlaceholderText?: string;
|
|
606
|
+
};
|
|
607
|
+
/**
|
|
608
|
+
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
609
|
+
* that can be extended with custom fuctions
|
|
610
|
+
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
611
|
+
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
612
|
+
|
|
613
|
+
type ObjectSearchFilterContainerProps = {
|
|
614
|
+
/** sets the title for the container */
|
|
615
|
+
label: string;
|
|
616
|
+
/** sets child components in an opinionated layout */
|
|
617
|
+
children?: React.ReactNode;
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* @description an opinionated layout for search filters
|
|
621
|
+
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
622
|
+
*/
|
|
623
|
+
declare const ObjectSearchFilterContainer: ({ label, children }: ObjectSearchFilterContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
624
|
+
|
|
625
|
+
type SearchQueryProps = {
|
|
626
|
+
/** sets the content type in the search context */
|
|
627
|
+
contentType?: string;
|
|
628
|
+
/** sets the keyword search in the search context */
|
|
629
|
+
keyword?: string;
|
|
630
|
+
};
|
|
631
|
+
type SelectedItemExtendedProps = {
|
|
632
|
+
[key: string]: unknown;
|
|
633
|
+
};
|
|
634
|
+
type SelectedItemProps<TProps extends SelectedItemExtendedProps = SelectedItemExtendedProps> = {
|
|
635
|
+
/** sets the id value */
|
|
636
|
+
id: string;
|
|
637
|
+
/** sets the title value */
|
|
638
|
+
title: string;
|
|
639
|
+
/** sets the name valu, sometimes used for products */
|
|
640
|
+
name?: string;
|
|
641
|
+
/** sets the subtitle value */
|
|
642
|
+
subtitle?: string;
|
|
643
|
+
/** sets the content type value */
|
|
644
|
+
contentType?: string | string[];
|
|
645
|
+
/** sets the created date value using TimeAgo to transform the date */
|
|
646
|
+
createdAt?: TDate;
|
|
647
|
+
/** sets the image src */
|
|
648
|
+
imageUrl?: string;
|
|
649
|
+
/** sets the link icon */
|
|
650
|
+
editLinkIcon?: string | React.ComponentType<{
|
|
651
|
+
className?: string;
|
|
652
|
+
}>;
|
|
653
|
+
/** sets the link href value to an external source */
|
|
654
|
+
editLink?: string;
|
|
655
|
+
/** sets the published date value using TimeAgo to transform the date */
|
|
656
|
+
publishedAt?: TDate;
|
|
657
|
+
/** sets the publish status */
|
|
658
|
+
publishStatus?: {
|
|
659
|
+
/** sets the text value of the publish badge */
|
|
660
|
+
text: string;
|
|
661
|
+
/** sets the theme value of the publish badge
|
|
662
|
+
* @default 'unimportant'
|
|
663
|
+
*/
|
|
664
|
+
theme?: BadgeThemeProps;
|
|
665
|
+
};
|
|
666
|
+
/** sets any additional meta data */
|
|
667
|
+
metadata?: Record<string, string>;
|
|
668
|
+
/** allows for child react elements to be nested in the popover */
|
|
669
|
+
popoverData?: ReactNode;
|
|
670
|
+
} & TProps;
|
|
671
|
+
type ItemsProp = Array<SelectedItemProps & Record<string, unknown>>;
|
|
672
|
+
type ItemListProps<TList extends ItemsProp = ItemsProp> = {
|
|
673
|
+
items?: TList;
|
|
674
|
+
[key: string]: unknown;
|
|
675
|
+
};
|
|
676
|
+
type ObjectSearchContextProps = {
|
|
677
|
+
/** function that updates / sets the search query state */
|
|
678
|
+
onSetQuery: (value: SearchQueryProps) => void;
|
|
679
|
+
/** current search query state */
|
|
680
|
+
query: SearchQueryProps;
|
|
681
|
+
/** function that sets the selected items to state */
|
|
682
|
+
onSelectItem: (selectedResult: any) => void;
|
|
683
|
+
/** function that clears all selected items from state */
|
|
684
|
+
onRemoveAllSelectedItems: () => void;
|
|
685
|
+
/** current selected items in state */
|
|
686
|
+
selectedListItems: Array<SelectedItemProps>;
|
|
687
|
+
/** current list of results in state */
|
|
688
|
+
list: ItemListProps;
|
|
689
|
+
/** function that sets the list of items to state */
|
|
690
|
+
onSetList: (value: ItemListProps) => void;
|
|
691
|
+
};
|
|
692
|
+
type ObjectSearchProviderProps = {
|
|
693
|
+
children: ReactNode;
|
|
694
|
+
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
695
|
+
};
|
|
696
|
+
declare const ObjectSearchProvider: ({ currentlySelectedItems, children }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
697
|
+
declare const useObjectSearchContext: () => {
|
|
698
|
+
/** function that updates / sets the search query state */
|
|
699
|
+
onSetQuery: (value: SearchQueryProps) => void;
|
|
700
|
+
/** current search query state */
|
|
701
|
+
query: SearchQueryProps;
|
|
702
|
+
/** function that sets the selected items to state */
|
|
703
|
+
onSelectItem: (selectedResult: any) => void;
|
|
704
|
+
/** function that clears all selected items from state */
|
|
705
|
+
onRemoveAllSelectedItems: () => void;
|
|
706
|
+
/** current selected items in state */
|
|
707
|
+
selectedListItems: Array<SelectedItemProps>;
|
|
708
|
+
/** current list of results in state */
|
|
709
|
+
list: ItemListProps;
|
|
710
|
+
/** function that sets the list of items to state */
|
|
711
|
+
onSetList: (value: ItemListProps) => void;
|
|
712
|
+
};
|
|
713
|
+
|
|
714
|
+
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
715
|
+
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
716
|
+
contentType?: string | string[];
|
|
717
|
+
/** sets image parameters */
|
|
718
|
+
image?: {
|
|
719
|
+
/** sets the src valuue */
|
|
720
|
+
src: string;
|
|
721
|
+
/** sets the alt text value */
|
|
722
|
+
alt: string;
|
|
723
|
+
/** set the width attribute of the image
|
|
724
|
+
* if both width and height are set the image loading attribute is set to `lazy`
|
|
725
|
+
*/
|
|
726
|
+
width?: number;
|
|
727
|
+
/** set the height attribute of the image
|
|
728
|
+
* if both width and height are set the image loading attribute is set to `lazy`
|
|
729
|
+
*/
|
|
730
|
+
height?: number;
|
|
731
|
+
};
|
|
732
|
+
/** sets the function call on the role="button" wrapping element */
|
|
733
|
+
onSelect?: (data?: Record<string, unknown>) => void;
|
|
734
|
+
/** allows child components within the popover data */
|
|
735
|
+
popoverData?: React$1.ReactNode;
|
|
736
|
+
/** allows authors to add any child component that is not controlled by Uniform */
|
|
737
|
+
children?: React$1.ReactNode;
|
|
738
|
+
/** sets whether multiple entries can be added to the results list context
|
|
739
|
+
* @default false
|
|
740
|
+
*/
|
|
741
|
+
isMulti?: boolean;
|
|
742
|
+
};
|
|
743
|
+
/**
|
|
744
|
+
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
745
|
+
* @example <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem> */
|
|
746
|
+
declare const ObjectSearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, children, ...props }: ObjectSearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
747
|
+
/**
|
|
748
|
+
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
749
|
+
* @example <ObjectSearchListItemLoadingSkeleton />
|
|
750
|
+
*/
|
|
751
|
+
declare const ObjectSearchListItemLoadingSkeleton: () => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
752
|
+
|
|
753
|
+
type ObjectSearchResultItemProps = SelectedItemProps & {
|
|
754
|
+
/** sets additional remove functionality onto of default removal */
|
|
755
|
+
onRemove?: () => void;
|
|
756
|
+
/** sets whether to show or hide the remove button
|
|
757
|
+
* @default false
|
|
758
|
+
*/
|
|
759
|
+
hideRemoveButton?: boolean;
|
|
760
|
+
/** sets user defined child nodes that are uncontrolled by Uniform */
|
|
761
|
+
children?: ReactNode;
|
|
762
|
+
/** disable or enable drag and drop functionality
|
|
763
|
+
* @default false
|
|
764
|
+
*/
|
|
765
|
+
disableDnD?: boolean;
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* @description An opinionated result item, best used for selected results
|
|
769
|
+
* @example <ObjectSearchResultItem id="my-result" title="title" />
|
|
770
|
+
*/
|
|
771
|
+
declare const ObjectSearchResultItem: ({ id, title, name, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, }: ObjectSearchResultItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
772
|
+
|
|
773
|
+
type ObjectSearchResultItemButtonProps<THtml extends HTMLAttributes<HTMLElement> = HTMLAttributes<HTMLButtonElement>> = {
|
|
774
|
+
/** sets the button or link text value */
|
|
775
|
+
text: string;
|
|
776
|
+
/** sets the button or link icon */
|
|
777
|
+
icon?: string | React.ComponentType<{
|
|
778
|
+
className?: string;
|
|
779
|
+
}>;
|
|
780
|
+
} & THtml;
|
|
781
|
+
/**
|
|
782
|
+
* @description An opinionated button component best used within the ObjectSearchResultItem component
|
|
783
|
+
* @example <ObjectSearchResultItemButton text="button text" icon="/my-image.png" onClick={() => myFunction()} />
|
|
784
|
+
*/
|
|
785
|
+
declare const ObjectSearchResultItemButton: ({ text, icon, ...props }: ObjectSearchResultItemButtonProps<HTMLAttributes<HTMLButtonElement>>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
786
|
+
/**
|
|
787
|
+
* @description An opinionated link component styled the same of the ObjectSearchResultItemButton component,
|
|
788
|
+
* that automatically sets the target and rel attributes. Best used within the ObjectSearchResultItem component
|
|
789
|
+
* @example <LinkButton text="link text" icon="/my-image.png" />
|
|
790
|
+
*/
|
|
791
|
+
declare const LinkButton: ({ text, icon, ...props }: ObjectSearchResultItemButtonProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'target' | 'rel'>>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
792
|
+
|
|
793
|
+
type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = SelectedItemProps> = {
|
|
794
|
+
/** sets the result label value
|
|
795
|
+
* @default 'Selected'
|
|
796
|
+
*/
|
|
797
|
+
resultLabelText?: string;
|
|
798
|
+
/** sets the on remove button click action */
|
|
799
|
+
onRemoveAllSelected?: () => void;
|
|
800
|
+
/** sets the remove button text
|
|
801
|
+
* @default 'Remove all'
|
|
802
|
+
*/
|
|
803
|
+
removeButtonText?: string;
|
|
804
|
+
/** sets whether to show or hide the remove button
|
|
805
|
+
* @default false
|
|
806
|
+
*/
|
|
807
|
+
hideRemoveButton?: boolean;
|
|
808
|
+
/** allows additional buttons to be added to the result title group */
|
|
809
|
+
additionalButtons?: React.ReactNode;
|
|
810
|
+
/** allows placing child components within the result list area */
|
|
811
|
+
renderResultComponent?: (value: TRenderComponent) => React.ReactNode;
|
|
812
|
+
/** disable or enable drag and drop functionality
|
|
813
|
+
* @default false
|
|
814
|
+
*/
|
|
815
|
+
disableDnD?: boolean;
|
|
816
|
+
/** sets the draggable id value */
|
|
817
|
+
multiSelectId?: string;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* @description An opinionated result list UI component that has built in drag and drop functionality and removal of all selected items from context.
|
|
821
|
+
* The result item component defaults to <ObjectSearchResultItem {...props} />, however this can be overridden with any other UI component and still
|
|
822
|
+
* maintain drag and drop functionality
|
|
823
|
+
* @example <ObjectSearchResultList id="my-id" title="title" renderResultComponent={(values) => <CustomComponent {...values} />} />
|
|
824
|
+
*/
|
|
825
|
+
declare const ObjectSearchResultList: ({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, additionalButtons, renderResultComponent, multiSelectId, disableDnD, }: ObjectSearchResultListProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
826
|
+
|
|
827
|
+
type QueryFilterSearchProps = {
|
|
828
|
+
/** sets the count value */
|
|
829
|
+
count: number;
|
|
830
|
+
/** sets the sortBy filter value */
|
|
831
|
+
sortBy: string;
|
|
832
|
+
/** sets the sortOrder filter value */
|
|
833
|
+
sortOrder: string;
|
|
834
|
+
};
|
|
835
|
+
type QuertFilterSelectionOptionProps = Array<{
|
|
836
|
+
id: string;
|
|
837
|
+
name: string;
|
|
838
|
+
label: string;
|
|
839
|
+
}>;
|
|
840
|
+
type QueryFilterProps<TSelectOptions extends QuertFilterSelectionOptionProps = QuertFilterSelectionOptionProps> = {
|
|
841
|
+
/** sets the query filter title
|
|
842
|
+
* @default 'Configure Query'
|
|
843
|
+
*/
|
|
844
|
+
queryFilterTitle?: string;
|
|
845
|
+
/** sets the content type all selected options label
|
|
846
|
+
* @default 'All content types'
|
|
847
|
+
*/
|
|
848
|
+
typeSelectorAllTypesOptionText?: string;
|
|
849
|
+
/** sets the content type label value
|
|
850
|
+
* @default 'Filter by content type'
|
|
851
|
+
*/
|
|
852
|
+
contentTypeLabel?: string;
|
|
853
|
+
/** sets the content type select options */
|
|
854
|
+
contentTypeOptions: TSelectOptions;
|
|
855
|
+
/** sets whether the content type filter is required */
|
|
856
|
+
requireContentType?: boolean;
|
|
857
|
+
/** sets the count label value
|
|
858
|
+
* @default 'Count'
|
|
859
|
+
*/
|
|
860
|
+
countLabel?: string;
|
|
861
|
+
/** sets the count value or items to show
|
|
862
|
+
* @default 5
|
|
863
|
+
*/
|
|
864
|
+
countValue?: number;
|
|
865
|
+
/** sets the sort label text
|
|
866
|
+
* @default 'Sort'
|
|
867
|
+
*/
|
|
868
|
+
sortLabel?: string;
|
|
869
|
+
/** sets the sort select options value */
|
|
870
|
+
sortOptions: TSelectOptions;
|
|
871
|
+
/** sets the sort order lable value
|
|
872
|
+
* @default 'Sort Order'
|
|
873
|
+
*/
|
|
874
|
+
sortOrderLabel?: string;
|
|
875
|
+
/** sets the sort order select options value */
|
|
876
|
+
sortOrderOptions: TSelectOptions;
|
|
877
|
+
/** sets the search input name value
|
|
878
|
+
* @default 'searchText'
|
|
879
|
+
*/
|
|
880
|
+
searchInputName?: string;
|
|
881
|
+
/** sets the search input placeholder text
|
|
882
|
+
* @default 'Enter keyword to narrow your results'
|
|
883
|
+
*/
|
|
884
|
+
searchInputPlaceholderText?: string;
|
|
885
|
+
/** allows for additional child components, for example more input components */
|
|
886
|
+
children?: ReactNode;
|
|
887
|
+
};
|
|
888
|
+
/**
|
|
889
|
+
* @description An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
890
|
+
* @example <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
891
|
+
*/
|
|
892
|
+
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, countLabel, countValue, sortLabel, sortOptions, sortOrderLabel, sortOrderOptions, children, }: QueryFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
893
|
+
|
|
565
894
|
/** Editor component to let you write a request body for POST requests */
|
|
566
895
|
declare function RequestBody(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
567
896
|
|
|
@@ -592,7 +921,7 @@ type RequestData = {
|
|
|
592
921
|
method?: string;
|
|
593
922
|
body?: string;
|
|
594
923
|
};
|
|
595
|
-
type RequestProviderProps = React.PropsWithChildren<{
|
|
924
|
+
type RequestProviderProps = React$1.PropsWithChildren<{
|
|
596
925
|
value: RequestData;
|
|
597
926
|
onChange: (delegate: (oldValue: RequestData) => RequestData) => void;
|
|
598
927
|
}>;
|
|
@@ -629,12 +958,12 @@ type RequestContext = {
|
|
|
629
958
|
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
630
959
|
declare function useRequest(): RequestContext;
|
|
631
960
|
|
|
632
|
-
type RequestTypeContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
961
|
+
type RequestTypeContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
633
962
|
/**sets the background color of the container
|
|
634
963
|
* @default 'transparent'
|
|
635
964
|
*/
|
|
636
965
|
bgColor?: 'transparent' | 'var(--gray-100)';
|
|
637
|
-
children: React.ReactNode;
|
|
966
|
+
children: React$1.ReactNode;
|
|
638
967
|
};
|
|
639
968
|
/**
|
|
640
969
|
* @description a container to layout content in a 2 column grid format = 12ch 1fr
|
|
@@ -682,56 +1011,6 @@ declare function useRequestParameter(paramName: string): {
|
|
|
682
1011
|
update: (value: string) => void;
|
|
683
1012
|
};
|
|
684
1013
|
|
|
685
|
-
/** @deprecated */
|
|
686
|
-
interface UniformMeshLocationContextValue<TLocationValue = unknown, TLocationSetValue = TLocationValue> {
|
|
687
|
-
location: MeshLocation<TLocationValue, TLocationSetValue>;
|
|
688
|
-
}
|
|
689
|
-
/** @deprecated not intended for public usage */
|
|
690
|
-
declare const UniformMeshLocationContext: React__default.Context<UniformMeshLocationContextValue<unknown, unknown> | undefined>;
|
|
691
|
-
/** @deprecated not intended for public usage. Use <MeshApp /> instead. */
|
|
692
|
-
declare const UniformMeshLocationContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
693
|
-
/**
|
|
694
|
-
* Provides access to the current UniformMeshLocationContext value.
|
|
695
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` instead.
|
|
696
|
-
*/
|
|
697
|
-
declare const useUniformMeshLocationContext: <TLocationValue = unknown, TLocationSetValue = TLocationValue>() => UniformMeshLocationContextValue<TLocationValue, TLocationSetValue>;
|
|
698
|
-
|
|
699
|
-
interface UniformMeshSdkContextValue {
|
|
700
|
-
sdk: UniformMeshSDK;
|
|
701
|
-
}
|
|
702
|
-
/** @deprecated not intended for public usage */
|
|
703
|
-
declare const UniformMeshSdkContext: React__default.Context<UniformMeshSdkContextValue | undefined>;
|
|
704
|
-
/** @deprecated not intended for public usage; use <MeshApp /> instead */
|
|
705
|
-
declare const UniformMeshSdkContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
706
|
-
/**
|
|
707
|
-
* Provides access to the current (initialized) Uniform Mesh SDK context value.
|
|
708
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` or `useUniformMeshSdk` instead.
|
|
709
|
-
*/
|
|
710
|
-
declare const useUniformMeshSdkContext: () => UniformMeshSdkContextValue;
|
|
711
|
-
|
|
712
|
-
interface UseUniformMeshSdkOptions {
|
|
713
|
-
autoResizingDisabled?: boolean;
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Provides a React-hook wrapper around Uniform Mesh SDK initialization.
|
|
717
|
-
* NOTE: initialization is an async operation and should be handled as such.
|
|
718
|
-
*
|
|
719
|
-
* @deprecated prefer <MeshApp /> to initialize and provide in a single component
|
|
720
|
-
*/
|
|
721
|
-
declare const useInitializeUniformMeshSdk: ({ autoResizingDisabled }?: UseUniformMeshSdkOptions) => {
|
|
722
|
-
initializing: boolean;
|
|
723
|
-
error: Error | undefined;
|
|
724
|
-
sdk: UniformMeshSDK | undefined;
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
729
|
-
* Intended to be used within <MeshApp />.
|
|
730
|
-
*
|
|
731
|
-
* @deprecated prefer useMeshLocation which has much more accurate type safety
|
|
732
|
-
*/
|
|
733
|
-
declare function useUniformMeshLocation<TLocationValue = unknown, TLocationMetadata = never, TLocationSetValue = TLocationValue>(): MeshLocationCore<TLocationValue, TLocationMetadata, TLocationSetValue>;
|
|
734
|
-
|
|
735
1014
|
/**
|
|
736
1015
|
* Provides convenient access to the current Uniform Mesh SDK instance via React hook.
|
|
737
1016
|
* Intended to be used within <MeshApp />.
|
|
@@ -747,4 +1026,4 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
747
1026
|
*/
|
|
748
1027
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
749
1028
|
|
|
750
|
-
export { BaseRequestData, Brand, DamItem, DamSelectedItem, DamSelectedItemProps, DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListProps, DataSourceEditor, DataSourceEditorProps, DataTypeEditor, DataTypeEditorProps, DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, DispatchResult, 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, RequestParametersProps, RequestProvider, RequestProviderProps, RequestTypeContainer, RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SelectionField, SelectionFieldValue, SetLocationValueDispatch, SetLocationValueFunction, TextVariableRenderer,
|
|
1029
|
+
export { BaseRequestData, Brand, DamItem, DamSelectedItem, DamSelectedItemProps, DataRefreshButton, DataRefreshButtonProps, DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListProps, DataSourceEditor, DataSourceEditorProps, DataTypeEditor, DataTypeEditorProps, DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, DispatchResult, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, index as Icons, InputToken, InputVariables, InputVariablesProps, ItemListProps, LinkButton, MeshApp, MeshAppProps, NoResultsProps, ObjectSearchContainer, ObjectSearchContainerProps, ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, ObjectSearchFilterContainerProps, ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, ObjectSearchListItemProps, ObjectSearchProvider, ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, ObjectSearchResultItemButtonProps, ObjectSearchResultItemProps, ObjectSearchResultList, ObjectSearchResultListProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, QueryFilterProps, QueryFilterSearchProps, RequestAction, RequestBody, RequestContext, RequestData, RequestHeaders, RequestMethodSelect, RequestParameter, RequestParameters, RequestParametersProps, RequestProvider, RequestProviderProps, RequestTypeContainer, RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SearchQueryProps, SelectedItemProps, SelectionField, SelectionFieldValue, SetLocationValueDispatch, SetLocationValueFunction, TextVariableRenderer, VariableEditor, VariableEditorProps, VariablesAction, VariablesContext, VariablesList, VariablesProvider, VariablesProviderProps, badgeIcon, createLocationValidator, 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, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariables, variablesToList };
|