@uniformdev/mesh-sdk-react 18.32.1-alpha.26 → 18.33.1-alpha.7
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 +15 -411
- package/dist/index.esm.js +35 -816
- package/dist/index.js +61 -864
- package/dist/index.mjs +35 -816
- package/package.json +4 -4
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
|
|
3
|
-
import React__default, { SVGProps, ComponentType, PropsWithChildren
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { SVGProps, ComponentType, PropsWithChildren } 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 {
|
|
11
|
-
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps,
|
|
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, 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
|
|
80
|
+
logoIcon: string | React.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
|
|
88
|
-
selectedItemComponent?: React
|
|
87
|
+
rowComponent?: React.FC<EntrySearchRowProps<TResult>>;
|
|
88
|
+
selectedItemComponent?: React.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
|
|
93
|
+
noResultsComponent?: React.FC<{
|
|
94
94
|
searchText?: string;
|
|
95
95
|
selectedContentType?: string;
|
|
96
96
|
}>;
|
|
@@ -389,8 +389,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
389
389
|
type: TLocationType;
|
|
390
390
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
391
391
|
type: TLocationType;
|
|
392
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
393
|
-
type: TLocationType;
|
|
394
392
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
395
393
|
type: TLocationType;
|
|
396
394
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -404,8 +402,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
404
402
|
type: TLocationType;
|
|
405
403
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
406
404
|
type: TLocationType;
|
|
407
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
408
|
-
type: TLocationType;
|
|
409
405
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
410
406
|
type: TLocationType;
|
|
411
407
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -418,8 +414,6 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
418
414
|
type: TLocationType;
|
|
419
415
|
}> | Extract<_uniformdev_mesh_sdk.DataTypeLocation, {
|
|
420
416
|
type: TLocationType;
|
|
421
|
-
}> | Extract<_uniformdev_mesh_sdk.DataTypeInstanceLocation, {
|
|
422
|
-
type: TLocationType;
|
|
423
417
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
424
418
|
type: TLocationType;
|
|
425
419
|
}> | Extract<_uniformdev_mesh_sdk.ParamTypeLocation<TLocationValue, unknown, TLocationSetValue, unknown>, {
|
|
@@ -470,10 +464,10 @@ declare function VariableEditor({ variable, onSubmit, onCancel }: VariableEditor
|
|
|
470
464
|
|
|
471
465
|
declare function VariablesList(): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
472
466
|
|
|
473
|
-
type VariablesProviderProps = React
|
|
467
|
+
type VariablesProviderProps = React.PropsWithChildren<{
|
|
474
468
|
value: Record<string, DataVariableDefinition>;
|
|
475
469
|
onChange: (newValue: Record<string, DataVariableDefinition>) => void;
|
|
476
|
-
editVariableComponent?: React
|
|
470
|
+
editVariableComponent?: React.ComponentType<VariableEditorProps>;
|
|
477
471
|
}>;
|
|
478
472
|
type VariablesAction = {
|
|
479
473
|
type: 'edit';
|
|
@@ -554,346 +548,6 @@ type DataTypeEditorProps = PropsWithChildren<{
|
|
|
554
548
|
*/
|
|
555
549
|
declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
556
550
|
|
|
557
|
-
type DataRefreshButtonProps = HTMLAttributes<HTMLButtonElement> & {
|
|
558
|
-
/** sets the button text */
|
|
559
|
-
buttonText: string;
|
|
560
|
-
/** shows or hides the loading indicator when retrieving data */
|
|
561
|
-
isLoading: boolean;
|
|
562
|
-
/** sets the onClick function */
|
|
563
|
-
onRefreshData: () => void;
|
|
564
|
-
};
|
|
565
|
-
/**
|
|
566
|
-
* @description The data refresh button is a UI component to indicate to users a request for data is taking place
|
|
567
|
-
* @example <DataRefreshButton buttonText="my button" isLoading /> */
|
|
568
|
-
declare const DataRefreshButton: ({ buttonText, isLoading, onRefreshData, ...props }: DataRefreshButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
569
|
-
|
|
570
|
-
type EntrySearchContainerProps = {
|
|
571
|
-
/** a child node that places components within the search location */
|
|
572
|
-
searchFilters: ReactNode;
|
|
573
|
-
/** a child node that places components within a scrollable list location */
|
|
574
|
-
resultList?: ReactNode;
|
|
575
|
-
/** allows any child element */
|
|
576
|
-
children?: ReactNode;
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* @description Entry search container is an opinionated layout for search parameters and retrieved results
|
|
580
|
-
* @example <EntrySearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} /> */
|
|
581
|
-
declare const EntrySearchContainer: ({ searchFilters, resultList, children }: EntrySearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
582
|
-
|
|
583
|
-
type EntrySearchFilterProps = {
|
|
584
|
-
/** shows or hides the required content type select option */
|
|
585
|
-
requireContentType?: boolean;
|
|
586
|
-
/** sets the text for the required content type select option
|
|
587
|
-
* @default 'All content types'
|
|
588
|
-
*/
|
|
589
|
-
typeSelectorAllTypesOptionText?: string;
|
|
590
|
-
/** sets the select input value label text
|
|
591
|
-
* @default 'Content Type Select'
|
|
592
|
-
*/
|
|
593
|
-
selectLabel?: string;
|
|
594
|
-
/** sets the select input options */
|
|
595
|
-
selectOptions: Array<{
|
|
596
|
-
id: string;
|
|
597
|
-
name?: string;
|
|
598
|
-
label: string;
|
|
599
|
-
}>;
|
|
600
|
-
/** sets the search input name value
|
|
601
|
-
* @default 'searchText'
|
|
602
|
-
*/
|
|
603
|
-
searchInputName?: string;
|
|
604
|
-
/** sets the search input placeholder text
|
|
605
|
-
* @default 'Enter keyword to narrow your results'
|
|
606
|
-
*/
|
|
607
|
-
searchInputPlaceholderText?: string;
|
|
608
|
-
};
|
|
609
|
-
/**
|
|
610
|
-
* @description Entry search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
611
|
-
* that can be extended with custom fuctions
|
|
612
|
-
* @example <EntrySearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
613
|
-
declare const EntrySearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: EntrySearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
614
|
-
|
|
615
|
-
type EntrySearchFilterContainerProps = {
|
|
616
|
-
/** sets the title for the container */
|
|
617
|
-
label: string;
|
|
618
|
-
/** sets child components in an opinionated layout */
|
|
619
|
-
children?: React.ReactNode;
|
|
620
|
-
};
|
|
621
|
-
/**
|
|
622
|
-
* @description an opinionated layout for search filters
|
|
623
|
-
* @example <EntrySearchFilterContainer label="my label"><input type="text" aria-label="my input" /></EntrySearchFilterContainer>
|
|
624
|
-
*/
|
|
625
|
-
declare const EntrySearchFilterContainer: ({ label, children }: EntrySearchFilterContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
626
|
-
|
|
627
|
-
type SearchQueryProps = {
|
|
628
|
-
/** sets the content type in the search context */
|
|
629
|
-
contentType?: string;
|
|
630
|
-
/** sets the keyword search in the search context */
|
|
631
|
-
keyword?: string;
|
|
632
|
-
};
|
|
633
|
-
type SelectedItemExtendedProps = {
|
|
634
|
-
[key: string]: unknown;
|
|
635
|
-
};
|
|
636
|
-
type SelectedItemProps<TProps extends SelectedItemExtendedProps = SelectedItemExtendedProps> = {
|
|
637
|
-
/** sets the id value */
|
|
638
|
-
id: string;
|
|
639
|
-
/** sets the title value */
|
|
640
|
-
title: string;
|
|
641
|
-
/** sets the name valu, sometimes used for products */
|
|
642
|
-
name?: string;
|
|
643
|
-
/** sets the subtitle value */
|
|
644
|
-
subtitle?: string;
|
|
645
|
-
/** sets the content type value */
|
|
646
|
-
contentType?: string | string[];
|
|
647
|
-
/** sets the created date value using TimeAgo to transform the date */
|
|
648
|
-
createdAt?: TDate;
|
|
649
|
-
/** sets the image src */
|
|
650
|
-
imageUrl?: string;
|
|
651
|
-
/** sets the link icon */
|
|
652
|
-
editLinkIcon?: string | React.ComponentType<{
|
|
653
|
-
className?: string;
|
|
654
|
-
}>;
|
|
655
|
-
/** sets the link href value to an external source */
|
|
656
|
-
editLink?: string;
|
|
657
|
-
/** sets the published date value using TimeAgo to transform the date */
|
|
658
|
-
publishedAt?: TDate;
|
|
659
|
-
/** sets the publish status */
|
|
660
|
-
publishStatus?: {
|
|
661
|
-
/** sets the text value of the publish badge */
|
|
662
|
-
text: string;
|
|
663
|
-
/** sets the theme value of the publish badge
|
|
664
|
-
* @default 'unimportant'
|
|
665
|
-
*/
|
|
666
|
-
theme?: BadgeThemeProps;
|
|
667
|
-
};
|
|
668
|
-
/** sets any additional meta data */
|
|
669
|
-
metadata?: Record<string, string>;
|
|
670
|
-
/** allows for child react elements to be nested in the popover */
|
|
671
|
-
popoverData?: ReactNode;
|
|
672
|
-
} & TProps;
|
|
673
|
-
type ItemsProp = Array<SelectedItemProps & Record<string, unknown>>;
|
|
674
|
-
type ItemListProps<TList extends ItemsProp = ItemsProp> = {
|
|
675
|
-
items?: TList;
|
|
676
|
-
[key: string]: unknown;
|
|
677
|
-
};
|
|
678
|
-
type EntrySearchContextProps = {
|
|
679
|
-
/** function that updates / sets the search query state */
|
|
680
|
-
onSetQuery: (value: SearchQueryProps) => void;
|
|
681
|
-
/** current search query state */
|
|
682
|
-
query: SearchQueryProps;
|
|
683
|
-
/** function that sets the selected items to state */
|
|
684
|
-
onSelectItem: (selectedResult: any) => void;
|
|
685
|
-
/** function that clears all selected items from state */
|
|
686
|
-
onRemoveAllSelectedItems: () => void;
|
|
687
|
-
/** current selected items in state */
|
|
688
|
-
selectedListItems: Array<SelectedItemProps>;
|
|
689
|
-
/** current list of results in state */
|
|
690
|
-
list: ItemListProps;
|
|
691
|
-
/** function that sets the list of items to state */
|
|
692
|
-
onSetList: (value: ItemListProps) => void;
|
|
693
|
-
};
|
|
694
|
-
declare const EntrySearchContext: React$1.Context<EntrySearchContextProps>;
|
|
695
|
-
type EntrySearchProviderProps = {
|
|
696
|
-
children: ReactNode;
|
|
697
|
-
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
698
|
-
};
|
|
699
|
-
declare const EntrySearchProvider: ({ currentlySelectedItems, children }: EntrySearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
700
|
-
declare const useEntrySearchContext: () => {
|
|
701
|
-
/** function that updates / sets the search query state */
|
|
702
|
-
onSetQuery: (value: SearchQueryProps) => void;
|
|
703
|
-
/** current search query state */
|
|
704
|
-
query: SearchQueryProps;
|
|
705
|
-
/** function that sets the selected items to state */
|
|
706
|
-
onSelectItem: (selectedResult: any) => void;
|
|
707
|
-
/** function that clears all selected items from state */
|
|
708
|
-
onRemoveAllSelectedItems: () => void;
|
|
709
|
-
/** current selected items in state */
|
|
710
|
-
selectedListItems: Array<SelectedItemProps>;
|
|
711
|
-
/** current list of results in state */
|
|
712
|
-
list: ItemListProps;
|
|
713
|
-
/** function that sets the list of items to state */
|
|
714
|
-
onSetList: (value: ItemListProps) => void;
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
type EntrySearchListItemProps = SelectedItemProps & {
|
|
718
|
-
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
719
|
-
contentType?: string | string[];
|
|
720
|
-
/** sets image parameters */
|
|
721
|
-
image?: {
|
|
722
|
-
/** sets the src valuue */
|
|
723
|
-
src: string;
|
|
724
|
-
/** sets the alt text value */
|
|
725
|
-
alt: string;
|
|
726
|
-
/** set the width attribute of the image
|
|
727
|
-
* if both width and height are set the image loading attribute is set to `lazy`
|
|
728
|
-
*/
|
|
729
|
-
width?: number;
|
|
730
|
-
/** set the height attribute of the image
|
|
731
|
-
* if both width and height are set the image loading attribute is set to `lazy`
|
|
732
|
-
*/
|
|
733
|
-
height?: number;
|
|
734
|
-
};
|
|
735
|
-
/** sets the function call on the role="button" wrapping element */
|
|
736
|
-
onSelect?: (data?: Record<string, unknown>) => void;
|
|
737
|
-
/** allows child components within the popover data */
|
|
738
|
-
popoverData?: React$1.ReactNode;
|
|
739
|
-
/** allows authors to add any child component that is not controlled by Uniform */
|
|
740
|
-
children?: React$1.ReactNode;
|
|
741
|
-
/** sets whether multiple entries can be added to the results list context
|
|
742
|
-
* @default false
|
|
743
|
-
*/
|
|
744
|
-
isMulti?: boolean;
|
|
745
|
-
};
|
|
746
|
-
/**
|
|
747
|
-
* @description entry search list item is an opinionated UI component best used for initial retrieved results
|
|
748
|
-
* @example <EntrySearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></EntrySearchListItem> */
|
|
749
|
-
declare const EntrySearchListItem: ({ id, title, contentType, image, popoverData, onSelect, isMulti, children, ...props }: EntrySearchListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
750
|
-
/**
|
|
751
|
-
* An opinionated loading skeleton component best used with EntrySearchListItem
|
|
752
|
-
* @example <EntrySearchListItemLoadingSkeleton />
|
|
753
|
-
*/
|
|
754
|
-
declare const EntrySearchListItemLoadingSkeleton: () => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
755
|
-
|
|
756
|
-
type EntrySearchResultItemProps = SelectedItemProps & {
|
|
757
|
-
/** sets additional remove functionality onto of default removal */
|
|
758
|
-
onRemove?: () => void;
|
|
759
|
-
/** sets whether to show or hide the remove button
|
|
760
|
-
* @default false
|
|
761
|
-
*/
|
|
762
|
-
hideRemoveButton?: boolean;
|
|
763
|
-
/** sets user defined child nodes that are uncontrolled by Uniform */
|
|
764
|
-
children?: ReactNode;
|
|
765
|
-
/** disable or enable drag and drop functionality
|
|
766
|
-
* @default false
|
|
767
|
-
*/
|
|
768
|
-
disableDnD?: boolean;
|
|
769
|
-
};
|
|
770
|
-
/**
|
|
771
|
-
* @description An opinionated result item, best used for selected results
|
|
772
|
-
* @example <EntrySearchResultItem id="my-result" title="title" />
|
|
773
|
-
*/
|
|
774
|
-
declare const EntrySearchResultItem: ({ id, title, name, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, }: EntrySearchResultItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
775
|
-
|
|
776
|
-
type EntrySearchResultItemButtonProps<THtml extends HTMLAttributes<HTMLElement> = HTMLAttributes<HTMLButtonElement>> = {
|
|
777
|
-
/** sets the button or link text value */
|
|
778
|
-
text: string;
|
|
779
|
-
/** sets the button or link icon */
|
|
780
|
-
icon?: string | React.ComponentType<{
|
|
781
|
-
className?: string;
|
|
782
|
-
}>;
|
|
783
|
-
} & THtml;
|
|
784
|
-
/**
|
|
785
|
-
* @description An opinionated button component best used within the EntrySearchResultItem component
|
|
786
|
-
* @example <EntrySearchResultItemButton text="button text" icon="/my-image.png" onClick={() => myFunction()} />
|
|
787
|
-
*/
|
|
788
|
-
declare const EntrySearchResultItemButton: ({ text, icon, ...props }: EntrySearchResultItemButtonProps<HTMLAttributes<HTMLButtonElement>>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
789
|
-
/**
|
|
790
|
-
* @description An opinionated link component styled the same of the EntrySearchResultItemButton component,
|
|
791
|
-
* that automatically sets the target and rel attributes. Best used within the EntrySearchResultItem component
|
|
792
|
-
* @example <LinkButton text="link text" icon="/my-image.png" />
|
|
793
|
-
*/
|
|
794
|
-
declare const LinkButton: ({ text, icon, ...props }: EntrySearchResultItemButtonProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'target' | 'rel'>>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
795
|
-
|
|
796
|
-
type EntrySearchResultListProps<TRenderComponent extends SelectedItemProps = SelectedItemProps> = {
|
|
797
|
-
/** sets the result label value
|
|
798
|
-
* @default 'Selected'
|
|
799
|
-
*/
|
|
800
|
-
resultLabelText?: string;
|
|
801
|
-
/** sets the on remove button click action */
|
|
802
|
-
onRemoveAllSelected?: () => void;
|
|
803
|
-
/** sets the remove button text
|
|
804
|
-
* @default 'Remove all'
|
|
805
|
-
*/
|
|
806
|
-
removeButtonText?: string;
|
|
807
|
-
/** sets whether to show or hide the remove button
|
|
808
|
-
* @default false
|
|
809
|
-
*/
|
|
810
|
-
hideRemoveButton?: boolean;
|
|
811
|
-
/** allows additional buttons to be added to the result title group */
|
|
812
|
-
additionalButtons?: React.ReactNode;
|
|
813
|
-
/** allows placing child components within the result list area */
|
|
814
|
-
renderResultComponent?: (value: TRenderComponent) => React.ReactNode;
|
|
815
|
-
/** disable or enable drag and drop functionality
|
|
816
|
-
* @default false
|
|
817
|
-
*/
|
|
818
|
-
disableDnD?: boolean;
|
|
819
|
-
/** sets the draggable id value */
|
|
820
|
-
multiSelectId?: string;
|
|
821
|
-
};
|
|
822
|
-
/**
|
|
823
|
-
* @description An opinionated result list UI component that has built in drag and drop functionality and removal of all selected items from context.
|
|
824
|
-
* The result item component defaults to <EntrySearchResultItem {...props} />, however this can be overridden with any other UI component and still
|
|
825
|
-
* maintain drag and drop functionality
|
|
826
|
-
* @example <EntrySearchResultList id="my-id" title="title" renderResultComponent={(values) => <CustomComponent {...values} />} />
|
|
827
|
-
*/
|
|
828
|
-
declare const EntrySearchResultList: ({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, additionalButtons, renderResultComponent, multiSelectId, disableDnD, }: EntrySearchResultListProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
829
|
-
|
|
830
|
-
type QueryFilterSearchProps = {
|
|
831
|
-
/** sets the count value */
|
|
832
|
-
count: number;
|
|
833
|
-
/** sets the sortBy filter value */
|
|
834
|
-
sortBy: string;
|
|
835
|
-
/** sets the sortOrder filter value */
|
|
836
|
-
sortOrder: string;
|
|
837
|
-
};
|
|
838
|
-
type QuertFilterSelectionOptionProps = Array<{
|
|
839
|
-
id: string;
|
|
840
|
-
name: string;
|
|
841
|
-
label: string;
|
|
842
|
-
}>;
|
|
843
|
-
type QueryFilterProps<TSelectOptions extends QuertFilterSelectionOptionProps = QuertFilterSelectionOptionProps> = {
|
|
844
|
-
/** sets the query filter title
|
|
845
|
-
* @default 'Configure Query'
|
|
846
|
-
*/
|
|
847
|
-
queryFilterTitle?: string;
|
|
848
|
-
/** sets the content type all selected options label
|
|
849
|
-
* @default 'All content types'
|
|
850
|
-
*/
|
|
851
|
-
typeSelectorAllTypesOptionText?: string;
|
|
852
|
-
/** sets the content type label value
|
|
853
|
-
* @default 'Filter by content type'
|
|
854
|
-
*/
|
|
855
|
-
contentTypeLabel?: string;
|
|
856
|
-
/** sets the content type select options */
|
|
857
|
-
contentTypeOptions: TSelectOptions;
|
|
858
|
-
/** sets whether the content type filter is required */
|
|
859
|
-
requireContentType?: boolean;
|
|
860
|
-
/** sets the count label value
|
|
861
|
-
* @default 'Count'
|
|
862
|
-
*/
|
|
863
|
-
countLabel?: string;
|
|
864
|
-
/** sets the count value or items to show
|
|
865
|
-
* @default 5
|
|
866
|
-
*/
|
|
867
|
-
countValue?: number;
|
|
868
|
-
/** sets the sort label text
|
|
869
|
-
* @default 'Sort'
|
|
870
|
-
*/
|
|
871
|
-
sortLabel?: string;
|
|
872
|
-
/** sets the sort select options value */
|
|
873
|
-
sortOptions: TSelectOptions;
|
|
874
|
-
/** sets the sort order lable value
|
|
875
|
-
* @default 'Sort Order'
|
|
876
|
-
*/
|
|
877
|
-
sortOrderLabel?: string;
|
|
878
|
-
/** sets the sort order select options value */
|
|
879
|
-
sortOrderOptions: TSelectOptions;
|
|
880
|
-
/** sets the search input name value
|
|
881
|
-
* @default 'searchText'
|
|
882
|
-
*/
|
|
883
|
-
searchInputName?: string;
|
|
884
|
-
/** sets the search input placeholder text
|
|
885
|
-
* @default 'Enter keyword to narrow your results'
|
|
886
|
-
*/
|
|
887
|
-
searchInputPlaceholderText?: string;
|
|
888
|
-
/** allows for additional child components, for example more input components */
|
|
889
|
-
children?: ReactNode;
|
|
890
|
-
};
|
|
891
|
-
/**
|
|
892
|
-
* @description An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
893
|
-
* @example <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
894
|
-
*/
|
|
895
|
-
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;
|
|
896
|
-
|
|
897
551
|
type MeshAppProps = {
|
|
898
552
|
loadingComponent?: React__default.ComponentType;
|
|
899
553
|
errorComponent?: React__default.ComponentType<{
|
|
@@ -932,7 +586,7 @@ type RequestData = {
|
|
|
932
586
|
method?: string;
|
|
933
587
|
body?: string;
|
|
934
588
|
};
|
|
935
|
-
type RequestProviderProps = React
|
|
589
|
+
type RequestProviderProps = React.PropsWithChildren<{
|
|
936
590
|
value: RequestData;
|
|
937
591
|
onChange: (delegate: (oldValue: RequestData) => RequestData) => void;
|
|
938
592
|
}>;
|
|
@@ -969,12 +623,12 @@ type RequestContext = {
|
|
|
969
623
|
declare function RequestProvider({ value, onChange, children }: RequestProviderProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
970
624
|
declare function useRequest(): RequestContext;
|
|
971
625
|
|
|
972
|
-
type RequestTypeContainerProps = React
|
|
626
|
+
type RequestTypeContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
973
627
|
/**sets the background color of the container
|
|
974
628
|
* @default 'transparent'
|
|
975
629
|
*/
|
|
976
630
|
bgColor?: 'transparent' | 'var(--gray-100)';
|
|
977
|
-
children: React
|
|
631
|
+
children: React.ReactNode;
|
|
978
632
|
};
|
|
979
633
|
/**
|
|
980
634
|
* @description a container to layout content in a 2 column grid format = 12ch 1fr
|
|
@@ -1022,56 +676,6 @@ declare function useRequestParameter(paramName: string): {
|
|
|
1022
676
|
update: (value: string) => void;
|
|
1023
677
|
};
|
|
1024
678
|
|
|
1025
|
-
/** @deprecated */
|
|
1026
|
-
interface UniformMeshLocationContextValue<TLocationValue = unknown, TLocationSetValue = TLocationValue> {
|
|
1027
|
-
location: MeshLocation<TLocationValue, TLocationSetValue>;
|
|
1028
|
-
}
|
|
1029
|
-
/** @deprecated not intended for public usage */
|
|
1030
|
-
declare const UniformMeshLocationContext: React__default.Context<UniformMeshLocationContextValue<unknown, unknown> | undefined>;
|
|
1031
|
-
/** @deprecated not intended for public usage. Use <MeshApp /> instead. */
|
|
1032
|
-
declare const UniformMeshLocationContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
1033
|
-
/**
|
|
1034
|
-
* Provides access to the current UniformMeshLocationContext value.
|
|
1035
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` instead.
|
|
1036
|
-
*/
|
|
1037
|
-
declare const useUniformMeshLocationContext: <TLocationValue = unknown, TLocationSetValue = TLocationValue>() => UniformMeshLocationContextValue<TLocationValue, TLocationSetValue>;
|
|
1038
|
-
|
|
1039
|
-
interface UniformMeshSdkContextValue {
|
|
1040
|
-
sdk: UniformMeshSDK;
|
|
1041
|
-
}
|
|
1042
|
-
/** @deprecated not intended for public usage */
|
|
1043
|
-
declare const UniformMeshSdkContext: React__default.Context<UniformMeshSdkContextValue | undefined>;
|
|
1044
|
-
/** @deprecated not intended for public usage; use <MeshApp /> instead */
|
|
1045
|
-
declare const UniformMeshSdkContextProvider: React__default.FC<React__default.PropsWithChildren<unknown>>;
|
|
1046
|
-
/**
|
|
1047
|
-
* Provides access to the current (initialized) Uniform Mesh SDK context value.
|
|
1048
|
-
* @deprecated Not intended for public use. Use `useUniformMeshLocation` or `useUniformMeshSdk` instead.
|
|
1049
|
-
*/
|
|
1050
|
-
declare const useUniformMeshSdkContext: () => UniformMeshSdkContextValue;
|
|
1051
|
-
|
|
1052
|
-
interface UseUniformMeshSdkOptions {
|
|
1053
|
-
autoResizingDisabled?: boolean;
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Provides a React-hook wrapper around Uniform Mesh SDK initialization.
|
|
1057
|
-
* NOTE: initialization is an async operation and should be handled as such.
|
|
1058
|
-
*
|
|
1059
|
-
* @deprecated prefer <MeshApp /> to initialize and provide in a single component
|
|
1060
|
-
*/
|
|
1061
|
-
declare const useInitializeUniformMeshSdk: ({ autoResizingDisabled }?: UseUniformMeshSdkOptions) => {
|
|
1062
|
-
initializing: boolean;
|
|
1063
|
-
error: Error | undefined;
|
|
1064
|
-
sdk: UniformMeshSDK | undefined;
|
|
1065
|
-
};
|
|
1066
|
-
|
|
1067
|
-
/**
|
|
1068
|
-
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
1069
|
-
* Intended to be used within <MeshApp />.
|
|
1070
|
-
*
|
|
1071
|
-
* @deprecated prefer useMeshLocation which has much more accurate type safety
|
|
1072
|
-
*/
|
|
1073
|
-
declare function useUniformMeshLocation<TLocationValue = unknown, TLocationMetadata = never, TLocationSetValue = TLocationValue>(): MeshLocationCore<TLocationValue, TLocationMetadata, TLocationSetValue>;
|
|
1074
|
-
|
|
1075
679
|
/**
|
|
1076
680
|
* Provides convenient access to the current Uniform Mesh SDK instance via React hook.
|
|
1077
681
|
* Intended to be used within <MeshApp />.
|
|
@@ -1087,4 +691,4 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
1087
691
|
*/
|
|
1088
692
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
1089
693
|
|
|
1090
|
-
export { BaseRequestData, Brand, DamItem, DamSelectedItem, DamSelectedItemProps,
|
|
694
|
+
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, 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, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariables, variablesToList };
|