@uniformdev/mesh-sdk-react 19.136.0 → 19.136.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +160 -52
- package/dist/index.d.ts +160 -52
- package/dist/index.esm.js +705 -462
- package/dist/index.js +790 -549
- package/dist/index.mjs +705 -462
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponse
|
|
|
9
9
|
export * from '@uniformdev/mesh-sdk';
|
|
10
10
|
import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
|
|
11
11
|
import { Emitter } from 'mitt';
|
|
12
|
-
import { BadgeThemeProps, InputSelectProps } from '@uniformdev/design-system';
|
|
12
|
+
import { BadgeThemeProps, InputSelectProps, FilterEditorCommonInputProps } from '@uniformdev/design-system';
|
|
13
13
|
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, DrawerContent, 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';
|
|
14
14
|
import * as lexical from 'lexical';
|
|
15
15
|
import { SerializedEditorState, SerializedLexicalNode, Spread, DecoratorNode, NodeKey, LexicalNode, LexicalEditor, EditorState } from 'lexical';
|
|
@@ -391,6 +391,8 @@ type DataResourceDynamicInputProviderProps = {
|
|
|
391
391
|
/** Child components of the provider. Variables-using components, such as InputVariables, can be used here. */
|
|
392
392
|
children: ReactNode;
|
|
393
393
|
};
|
|
394
|
+
declare const DataResourceInputContext: React$1.Context<DynamicInputs | undefined>;
|
|
395
|
+
declare const useDataResourceDynamicInputs: () => DynamicInputs | undefined;
|
|
394
396
|
/**
|
|
395
397
|
* Wrapper for data resource locations. Provides read-only access to dynamic inputs as if they were variables,
|
|
396
398
|
* using variables-aware components (i.e. InputVariables). This simplifies building dynamic-input-aware editors,
|
|
@@ -788,6 +790,13 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
788
790
|
multiLine?: boolean;
|
|
789
791
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
790
792
|
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
793
|
+
/**
|
|
794
|
+
* Defines single place to render "Insert variable" menu buttons.
|
|
795
|
+
* Be aware that it will override "disableInlineMenu" if set.
|
|
796
|
+
*
|
|
797
|
+
* @deprecated beta
|
|
798
|
+
*/
|
|
799
|
+
showMenuPosition?: 'label' | 'input' | 'inline-right';
|
|
791
800
|
/**
|
|
792
801
|
* Enables clicking a variable reference to edit the variable
|
|
793
802
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -1197,56 +1206,10 @@ type ObjectSearchContainerProps = {
|
|
|
1197
1206
|
};
|
|
1198
1207
|
/**
|
|
1199
1208
|
* @description Object search container is an opinionated layout for search parameters and retrieved results
|
|
1200
|
-
* @example <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} />
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
type ObjectSearchFilterProps = {
|
|
1204
|
-
/** shows or hides the required content type select option */
|
|
1205
|
-
requireContentType?: boolean;
|
|
1206
|
-
/** sets the text for the required content type select option
|
|
1207
|
-
* @default 'All content types'
|
|
1208
|
-
*/
|
|
1209
|
-
typeSelectorAllTypesOptionText?: string;
|
|
1210
|
-
/** sets the select input value label text
|
|
1211
|
-
* @default 'Content Type Select'
|
|
1212
|
-
*/
|
|
1213
|
-
selectLabel?: string;
|
|
1214
|
-
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1215
|
-
selectOptions?: Array<{
|
|
1216
|
-
id?: string;
|
|
1217
|
-
name?: string;
|
|
1218
|
-
label: string;
|
|
1219
|
-
value?: string;
|
|
1220
|
-
}>;
|
|
1221
|
-
/** sets the search input name value
|
|
1222
|
-
* @default 'searchText'
|
|
1223
|
-
*/
|
|
1224
|
-
searchInputName?: string;
|
|
1225
|
-
/** sets the search input placeholder text
|
|
1226
|
-
* @default 'Enter keyword to narrow your results'
|
|
1227
|
-
*/
|
|
1228
|
-
searchInputPlaceholderText?: string;
|
|
1229
|
-
};
|
|
1230
|
-
/**
|
|
1231
|
-
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1232
|
-
* that can be extended with custom functions
|
|
1233
|
-
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
1234
|
-
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1235
|
-
|
|
1236
|
-
type ObjectSearchFilterContainerProps = {
|
|
1237
|
-
/**
|
|
1238
|
-
* sets the title for the container
|
|
1239
|
-
* @deprecated we recommend setting the label on ObjectSearchContainer instead
|
|
1240
|
-
*/
|
|
1241
|
-
label?: string;
|
|
1242
|
-
/** sets child components in an opinionated layout */
|
|
1243
|
-
children?: React.ReactNode;
|
|
1244
|
-
};
|
|
1245
|
-
/**
|
|
1246
|
-
* @description an opinionated layout for search filters
|
|
1247
|
-
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1209
|
+
* @example <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} />
|
|
1210
|
+
* @deprecated Please use ControlledObjectSearchProvider with SearchAndFilter instead. You can use Mesh Example for reference.
|
|
1248
1211
|
*/
|
|
1249
|
-
declare const
|
|
1212
|
+
declare const ObjectSearchContainer: ({ label, enableDynamicInputToResultId, searchFilters, resultList, children, }: ObjectSearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1250
1213
|
|
|
1251
1214
|
type SearchQueryProps<TExtraFilters = unknown> = {
|
|
1252
1215
|
/** sets the content type in the search context */
|
|
@@ -1255,6 +1218,7 @@ type SearchQueryProps<TExtraFilters = unknown> = {
|
|
|
1255
1218
|
keyword?: string;
|
|
1256
1219
|
/** sets the locale in the search context */
|
|
1257
1220
|
locale?: string;
|
|
1221
|
+
dynamicEntryId?: string;
|
|
1258
1222
|
} & TExtraFilters;
|
|
1259
1223
|
type SelectedItemProps<TExtraProps = unknown> = {
|
|
1260
1224
|
/** sets the id value */
|
|
@@ -1324,18 +1288,97 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1324
1288
|
/** current list of results in state */
|
|
1325
1289
|
list: ItemListProps<TExtraItemProps>;
|
|
1326
1290
|
/** function that sets the list of items to state */
|
|
1327
|
-
onSetList
|
|
1291
|
+
onSetList?: (value: ItemListProps) => void;
|
|
1328
1292
|
/** is multi items selection allowed or not */
|
|
1329
1293
|
isMulti: boolean;
|
|
1294
|
+
localeOptions?: {
|
|
1295
|
+
label: string;
|
|
1296
|
+
value: string;
|
|
1297
|
+
}[];
|
|
1298
|
+
enableFilterByLocale?: boolean;
|
|
1299
|
+
isListLoading?: boolean;
|
|
1300
|
+
isSelectedItemsListLoading?: boolean;
|
|
1301
|
+
dynamicEntryId?: string;
|
|
1330
1302
|
};
|
|
1303
|
+
declare const ObjectSearchContext: React$1.Context<ObjectSearchContextProps<unknown, unknown>>;
|
|
1331
1304
|
type ObjectSearchProviderProps = {
|
|
1332
1305
|
children: ReactNode;
|
|
1333
1306
|
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
1307
|
+
searchResultList?: Array<SelectedItemProps>;
|
|
1334
1308
|
isMulti?: boolean;
|
|
1335
1309
|
defaultQuery?: SearchQueryProps;
|
|
1336
1310
|
};
|
|
1311
|
+
/**
|
|
1312
|
+
* @deprecated Please use ControlledObjectSearchProvider with SearchAndFilter instead. You can use Mesh Example for reference.
|
|
1313
|
+
*/
|
|
1337
1314
|
declare const ObjectSearchProvider: ({ currentlySelectedItems, isMulti, children, defaultQuery, }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1338
1315
|
declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraItemProps = unknown>(): ObjectSearchContextProps<TExtraSearchFilters, TExtraItemProps>;
|
|
1316
|
+
declare function bindQuery(query: SearchQueryProps, inputs: Record<string, unknown>): {
|
|
1317
|
+
/** sets the content type in the search context */
|
|
1318
|
+
contentType?: string | undefined;
|
|
1319
|
+
/** sets the keyword search in the search context */
|
|
1320
|
+
keyword?: string | undefined;
|
|
1321
|
+
/** sets the locale in the search context */
|
|
1322
|
+
locale?: string | undefined;
|
|
1323
|
+
dynamicEntryId?: string | undefined;
|
|
1324
|
+
};
|
|
1325
|
+
|
|
1326
|
+
type ObjectSearchFilterProps = {
|
|
1327
|
+
/** shows or hides the required content type select option */
|
|
1328
|
+
requireContentType?: boolean;
|
|
1329
|
+
/** sets the text for the required content type select option
|
|
1330
|
+
* @default 'All content types'
|
|
1331
|
+
*/
|
|
1332
|
+
typeSelectorAllTypesOptionText?: string;
|
|
1333
|
+
/** sets the select input value label text
|
|
1334
|
+
* @default 'Content Type Select'
|
|
1335
|
+
*/
|
|
1336
|
+
selectLabel?: string;
|
|
1337
|
+
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1338
|
+
selectOptions?: Array<{
|
|
1339
|
+
id?: string;
|
|
1340
|
+
name?: string;
|
|
1341
|
+
label: string;
|
|
1342
|
+
value?: string;
|
|
1343
|
+
}>;
|
|
1344
|
+
/** sets the search input name value
|
|
1345
|
+
* @default 'searchText'
|
|
1346
|
+
*/
|
|
1347
|
+
searchInputName?: string;
|
|
1348
|
+
/** sets the search input placeholder text
|
|
1349
|
+
* @default 'Enter keyword to narrow your results'
|
|
1350
|
+
*/
|
|
1351
|
+
searchInputPlaceholderText?: string;
|
|
1352
|
+
/** sets the label for the locale selectbox filter */
|
|
1353
|
+
localeFilterLabel?: string;
|
|
1354
|
+
/** sets the locale options for the locale selectbox filter */
|
|
1355
|
+
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1356
|
+
/** enables or disables the locale filter */
|
|
1357
|
+
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1358
|
+
};
|
|
1359
|
+
/**
|
|
1360
|
+
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1361
|
+
* that can be extended with custom functions
|
|
1362
|
+
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} />
|
|
1363
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1364
|
+
*/
|
|
1365
|
+
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, localeFilterLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1366
|
+
|
|
1367
|
+
type ObjectSearchFilterContainerProps = {
|
|
1368
|
+
/**
|
|
1369
|
+
* sets the title for the container
|
|
1370
|
+
* @deprecated we recommend setting the label on ObjectSearchContainer instead
|
|
1371
|
+
*/
|
|
1372
|
+
label?: string;
|
|
1373
|
+
/** sets child components in an opinionated layout */
|
|
1374
|
+
children?: React.ReactNode;
|
|
1375
|
+
};
|
|
1376
|
+
/**
|
|
1377
|
+
* @description an opinionated layout for search filters
|
|
1378
|
+
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1379
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1380
|
+
*/
|
|
1381
|
+
declare const ObjectSearchFilterContainer: ({ label, children }: ObjectSearchFilterContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1339
1382
|
|
|
1340
1383
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
1341
1384
|
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
@@ -1540,9 +1583,29 @@ type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = Q
|
|
|
1540
1583
|
/**
|
|
1541
1584
|
* @description An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
1542
1585
|
* @example <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
1586
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1543
1587
|
*/
|
|
1544
1588
|
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, searchInputLabel, countLabel, countValue, sortLabel, sortOptions, sortOrderLabel, sortOrderOptions, children, }: QueryFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1545
1589
|
|
|
1590
|
+
declare function ObjectSearchListOfSearchResults(): _emotion_react_types_jsx_namespace.EmotionJSX.Element | _emotion_react_types_jsx_namespace.EmotionJSX.Element[] | undefined;
|
|
1591
|
+
|
|
1592
|
+
type ControlledObjectSearchProviderProps = {
|
|
1593
|
+
children: ReactNode;
|
|
1594
|
+
selectedItems: Array<SelectedItemProps> | undefined;
|
|
1595
|
+
searchResultItems: Array<SelectedItemProps> | undefined;
|
|
1596
|
+
selectedItemsLoading?: boolean;
|
|
1597
|
+
searchResultItemsLoading?: boolean;
|
|
1598
|
+
searchResultListLoading?: boolean;
|
|
1599
|
+
onQueryChange: (value: SearchQueryProps) => void;
|
|
1600
|
+
onSelectItemsChange: (selectedItems: Array<SelectedItemProps>) => void;
|
|
1601
|
+
isMulti?: boolean;
|
|
1602
|
+
query: SearchQueryProps;
|
|
1603
|
+
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1604
|
+
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1605
|
+
dynamicEntryId?: ObjectSearchContextProps['dynamicEntryId'];
|
|
1606
|
+
};
|
|
1607
|
+
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems, selectedItemsLoading, searchResultListLoading, searchResultItemsLoading, onQueryChange, onSelectItemsChange, isMulti, children, query, enableFilterByLocale, localeOptions, dynamicEntryId, }: ControlledObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1608
|
+
|
|
1546
1609
|
type ParamTypeDynamicDataProviderProps = {
|
|
1547
1610
|
/** Child components of the provider. Variables-using components, such as ParameterVariables, can be used here. */
|
|
1548
1611
|
children: ReactNode;
|
|
@@ -1683,6 +1746,51 @@ declare function useRequestParameter(paramName: string): {
|
|
|
1683
1746
|
update: (value: string) => void;
|
|
1684
1747
|
};
|
|
1685
1748
|
|
|
1749
|
+
declare const bindableFiltersMapper: {
|
|
1750
|
+
multiChoice: React__default.FC<Omit<FilterEditorCommonInputProps, "value"> & {
|
|
1751
|
+
value?: string[] | undefined;
|
|
1752
|
+
options: {
|
|
1753
|
+
label: string;
|
|
1754
|
+
value: string;
|
|
1755
|
+
}[];
|
|
1756
|
+
onChange: (e: string[]) => void;
|
|
1757
|
+
}>;
|
|
1758
|
+
singleChoice: React__default.FC<Omit<FilterEditorCommonInputProps, "value"> & {
|
|
1759
|
+
value?: string | undefined;
|
|
1760
|
+
options: {
|
|
1761
|
+
label: string;
|
|
1762
|
+
value: string;
|
|
1763
|
+
}[];
|
|
1764
|
+
onChange: (e: string) => void;
|
|
1765
|
+
}>;
|
|
1766
|
+
date: React__default.FC<FilterEditorCommonInputProps & {
|
|
1767
|
+
value?: string | undefined;
|
|
1768
|
+
options?: {
|
|
1769
|
+
label: string;
|
|
1770
|
+
value: string;
|
|
1771
|
+
}[] | undefined;
|
|
1772
|
+
}>;
|
|
1773
|
+
text: React__default.FC<FilterEditorCommonInputProps & {
|
|
1774
|
+
value?: string | undefined;
|
|
1775
|
+
options?: {
|
|
1776
|
+
label: string;
|
|
1777
|
+
value: string;
|
|
1778
|
+
}[] | undefined;
|
|
1779
|
+
}>;
|
|
1780
|
+
number: React__default.FC<FilterEditorCommonInputProps & {
|
|
1781
|
+
value?: string | undefined;
|
|
1782
|
+
options?: {
|
|
1783
|
+
label: string;
|
|
1784
|
+
value: string;
|
|
1785
|
+
}[] | undefined;
|
|
1786
|
+
}>;
|
|
1787
|
+
dateRange: React__default.ComponentType<any> | null;
|
|
1788
|
+
empty: React__default.ComponentType<any> | null;
|
|
1789
|
+
numberRange: React__default.ComponentType<any> | null;
|
|
1790
|
+
statusMultiChoice: React__default.ComponentType<any> | null;
|
|
1791
|
+
statusSingleChoice: React__default.ComponentType<any> | null;
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1686
1794
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1687
1795
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1688
1796
|
|
|
@@ -1734,4 +1842,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
1734
1842
|
};
|
|
1735
1843
|
declare function useContentDataResourceLocaleInfo({ locale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
1736
1844
|
|
|
1737
|
-
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, type NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, TextVariableRenderer, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, convertConnectedDataToVariable, 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, hasReferencedVariables, prettifyBindExpression, 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, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
|
1845
|
+
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledObjectSearchProvider, type ControlledObjectSearchProviderProps, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, DataResourceInputContext, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, type NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, ObjectSearchContext, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchListOfSearchResults, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, TextVariableRenderer, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, bindQuery, bindableFiltersMapper, convertConnectedDataToVariable, 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, hasReferencedVariables, prettifyBindExpression, 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, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDataResourceDynamicInputs, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponse
|
|
|
9
9
|
export * from '@uniformdev/mesh-sdk';
|
|
10
10
|
import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
|
|
11
11
|
import { Emitter } from 'mitt';
|
|
12
|
-
import { BadgeThemeProps, InputSelectProps } from '@uniformdev/design-system';
|
|
12
|
+
import { BadgeThemeProps, InputSelectProps, FilterEditorCommonInputProps } from '@uniformdev/design-system';
|
|
13
13
|
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, DrawerContent, 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';
|
|
14
14
|
import * as lexical from 'lexical';
|
|
15
15
|
import { SerializedEditorState, SerializedLexicalNode, Spread, DecoratorNode, NodeKey, LexicalNode, LexicalEditor, EditorState } from 'lexical';
|
|
@@ -391,6 +391,8 @@ type DataResourceDynamicInputProviderProps = {
|
|
|
391
391
|
/** Child components of the provider. Variables-using components, such as InputVariables, can be used here. */
|
|
392
392
|
children: ReactNode;
|
|
393
393
|
};
|
|
394
|
+
declare const DataResourceInputContext: React$1.Context<DynamicInputs | undefined>;
|
|
395
|
+
declare const useDataResourceDynamicInputs: () => DynamicInputs | undefined;
|
|
394
396
|
/**
|
|
395
397
|
* Wrapper for data resource locations. Provides read-only access to dynamic inputs as if they were variables,
|
|
396
398
|
* using variables-aware components (i.e. InputVariables). This simplifies building dynamic-input-aware editors,
|
|
@@ -788,6 +790,13 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
788
790
|
multiLine?: boolean;
|
|
789
791
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
790
792
|
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
793
|
+
/**
|
|
794
|
+
* Defines single place to render "Insert variable" menu buttons.
|
|
795
|
+
* Be aware that it will override "disableInlineMenu" if set.
|
|
796
|
+
*
|
|
797
|
+
* @deprecated beta
|
|
798
|
+
*/
|
|
799
|
+
showMenuPosition?: 'label' | 'input' | 'inline-right';
|
|
791
800
|
/**
|
|
792
801
|
* Enables clicking a variable reference to edit the variable
|
|
793
802
|
* Note: automatically disabled if `disabled` or `disableVariables` is set
|
|
@@ -1197,56 +1206,10 @@ type ObjectSearchContainerProps = {
|
|
|
1197
1206
|
};
|
|
1198
1207
|
/**
|
|
1199
1208
|
* @description Object search container is an opinionated layout for search parameters and retrieved results
|
|
1200
|
-
* @example <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} />
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
type ObjectSearchFilterProps = {
|
|
1204
|
-
/** shows or hides the required content type select option */
|
|
1205
|
-
requireContentType?: boolean;
|
|
1206
|
-
/** sets the text for the required content type select option
|
|
1207
|
-
* @default 'All content types'
|
|
1208
|
-
*/
|
|
1209
|
-
typeSelectorAllTypesOptionText?: string;
|
|
1210
|
-
/** sets the select input value label text
|
|
1211
|
-
* @default 'Content Type Select'
|
|
1212
|
-
*/
|
|
1213
|
-
selectLabel?: string;
|
|
1214
|
-
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1215
|
-
selectOptions?: Array<{
|
|
1216
|
-
id?: string;
|
|
1217
|
-
name?: string;
|
|
1218
|
-
label: string;
|
|
1219
|
-
value?: string;
|
|
1220
|
-
}>;
|
|
1221
|
-
/** sets the search input name value
|
|
1222
|
-
* @default 'searchText'
|
|
1223
|
-
*/
|
|
1224
|
-
searchInputName?: string;
|
|
1225
|
-
/** sets the search input placeholder text
|
|
1226
|
-
* @default 'Enter keyword to narrow your results'
|
|
1227
|
-
*/
|
|
1228
|
-
searchInputPlaceholderText?: string;
|
|
1229
|
-
};
|
|
1230
|
-
/**
|
|
1231
|
-
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1232
|
-
* that can be extended with custom functions
|
|
1233
|
-
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} /> */
|
|
1234
|
-
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1235
|
-
|
|
1236
|
-
type ObjectSearchFilterContainerProps = {
|
|
1237
|
-
/**
|
|
1238
|
-
* sets the title for the container
|
|
1239
|
-
* @deprecated we recommend setting the label on ObjectSearchContainer instead
|
|
1240
|
-
*/
|
|
1241
|
-
label?: string;
|
|
1242
|
-
/** sets child components in an opinionated layout */
|
|
1243
|
-
children?: React.ReactNode;
|
|
1244
|
-
};
|
|
1245
|
-
/**
|
|
1246
|
-
* @description an opinionated layout for search filters
|
|
1247
|
-
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1209
|
+
* @example <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} />
|
|
1210
|
+
* @deprecated Please use ControlledObjectSearchProvider with SearchAndFilter instead. You can use Mesh Example for reference.
|
|
1248
1211
|
*/
|
|
1249
|
-
declare const
|
|
1212
|
+
declare const ObjectSearchContainer: ({ label, enableDynamicInputToResultId, searchFilters, resultList, children, }: ObjectSearchContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1250
1213
|
|
|
1251
1214
|
type SearchQueryProps<TExtraFilters = unknown> = {
|
|
1252
1215
|
/** sets the content type in the search context */
|
|
@@ -1255,6 +1218,7 @@ type SearchQueryProps<TExtraFilters = unknown> = {
|
|
|
1255
1218
|
keyword?: string;
|
|
1256
1219
|
/** sets the locale in the search context */
|
|
1257
1220
|
locale?: string;
|
|
1221
|
+
dynamicEntryId?: string;
|
|
1258
1222
|
} & TExtraFilters;
|
|
1259
1223
|
type SelectedItemProps<TExtraProps = unknown> = {
|
|
1260
1224
|
/** sets the id value */
|
|
@@ -1324,18 +1288,97 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1324
1288
|
/** current list of results in state */
|
|
1325
1289
|
list: ItemListProps<TExtraItemProps>;
|
|
1326
1290
|
/** function that sets the list of items to state */
|
|
1327
|
-
onSetList
|
|
1291
|
+
onSetList?: (value: ItemListProps) => void;
|
|
1328
1292
|
/** is multi items selection allowed or not */
|
|
1329
1293
|
isMulti: boolean;
|
|
1294
|
+
localeOptions?: {
|
|
1295
|
+
label: string;
|
|
1296
|
+
value: string;
|
|
1297
|
+
}[];
|
|
1298
|
+
enableFilterByLocale?: boolean;
|
|
1299
|
+
isListLoading?: boolean;
|
|
1300
|
+
isSelectedItemsListLoading?: boolean;
|
|
1301
|
+
dynamicEntryId?: string;
|
|
1330
1302
|
};
|
|
1303
|
+
declare const ObjectSearchContext: React$1.Context<ObjectSearchContextProps<unknown, unknown>>;
|
|
1331
1304
|
type ObjectSearchProviderProps = {
|
|
1332
1305
|
children: ReactNode;
|
|
1333
1306
|
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
1307
|
+
searchResultList?: Array<SelectedItemProps>;
|
|
1334
1308
|
isMulti?: boolean;
|
|
1335
1309
|
defaultQuery?: SearchQueryProps;
|
|
1336
1310
|
};
|
|
1311
|
+
/**
|
|
1312
|
+
* @deprecated Please use ControlledObjectSearchProvider with SearchAndFilter instead. You can use Mesh Example for reference.
|
|
1313
|
+
*/
|
|
1337
1314
|
declare const ObjectSearchProvider: ({ currentlySelectedItems, isMulti, children, defaultQuery, }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1338
1315
|
declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraItemProps = unknown>(): ObjectSearchContextProps<TExtraSearchFilters, TExtraItemProps>;
|
|
1316
|
+
declare function bindQuery(query: SearchQueryProps, inputs: Record<string, unknown>): {
|
|
1317
|
+
/** sets the content type in the search context */
|
|
1318
|
+
contentType?: string | undefined;
|
|
1319
|
+
/** sets the keyword search in the search context */
|
|
1320
|
+
keyword?: string | undefined;
|
|
1321
|
+
/** sets the locale in the search context */
|
|
1322
|
+
locale?: string | undefined;
|
|
1323
|
+
dynamicEntryId?: string | undefined;
|
|
1324
|
+
};
|
|
1325
|
+
|
|
1326
|
+
type ObjectSearchFilterProps = {
|
|
1327
|
+
/** shows or hides the required content type select option */
|
|
1328
|
+
requireContentType?: boolean;
|
|
1329
|
+
/** sets the text for the required content type select option
|
|
1330
|
+
* @default 'All content types'
|
|
1331
|
+
*/
|
|
1332
|
+
typeSelectorAllTypesOptionText?: string;
|
|
1333
|
+
/** sets the select input value label text
|
|
1334
|
+
* @default 'Content Type Select'
|
|
1335
|
+
*/
|
|
1336
|
+
selectLabel?: string;
|
|
1337
|
+
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
1338
|
+
selectOptions?: Array<{
|
|
1339
|
+
id?: string;
|
|
1340
|
+
name?: string;
|
|
1341
|
+
label: string;
|
|
1342
|
+
value?: string;
|
|
1343
|
+
}>;
|
|
1344
|
+
/** sets the search input name value
|
|
1345
|
+
* @default 'searchText'
|
|
1346
|
+
*/
|
|
1347
|
+
searchInputName?: string;
|
|
1348
|
+
/** sets the search input placeholder text
|
|
1349
|
+
* @default 'Enter keyword to narrow your results'
|
|
1350
|
+
*/
|
|
1351
|
+
searchInputPlaceholderText?: string;
|
|
1352
|
+
/** sets the label for the locale selectbox filter */
|
|
1353
|
+
localeFilterLabel?: string;
|
|
1354
|
+
/** sets the locale options for the locale selectbox filter */
|
|
1355
|
+
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1356
|
+
/** enables or disables the locale filter */
|
|
1357
|
+
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1358
|
+
};
|
|
1359
|
+
/**
|
|
1360
|
+
* @description Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1361
|
+
* that can be extended with custom functions
|
|
1362
|
+
* @example <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} />
|
|
1363
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1364
|
+
*/
|
|
1365
|
+
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, localeFilterLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1366
|
+
|
|
1367
|
+
type ObjectSearchFilterContainerProps = {
|
|
1368
|
+
/**
|
|
1369
|
+
* sets the title for the container
|
|
1370
|
+
* @deprecated we recommend setting the label on ObjectSearchContainer instead
|
|
1371
|
+
*/
|
|
1372
|
+
label?: string;
|
|
1373
|
+
/** sets child components in an opinionated layout */
|
|
1374
|
+
children?: React.ReactNode;
|
|
1375
|
+
};
|
|
1376
|
+
/**
|
|
1377
|
+
* @description an opinionated layout for search filters
|
|
1378
|
+
* @example <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1379
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1380
|
+
*/
|
|
1381
|
+
declare const ObjectSearchFilterContainer: ({ label, children }: ObjectSearchFilterContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1339
1382
|
|
|
1340
1383
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
1341
1384
|
/** sets the content type value, this is normally used for subtitles e.g. Kitchens */
|
|
@@ -1540,9 +1583,29 @@ type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = Q
|
|
|
1540
1583
|
/**
|
|
1541
1584
|
* @description An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
1542
1585
|
* @example <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
1586
|
+
* @deprecated Please use SearchAndFilter from @uniformdev/design-system instead.
|
|
1543
1587
|
*/
|
|
1544
1588
|
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, searchInputLabel, countLabel, countValue, sortLabel, sortOptions, sortOrderLabel, sortOrderOptions, children, }: QueryFilterProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1545
1589
|
|
|
1590
|
+
declare function ObjectSearchListOfSearchResults(): _emotion_react_types_jsx_namespace.EmotionJSX.Element | _emotion_react_types_jsx_namespace.EmotionJSX.Element[] | undefined;
|
|
1591
|
+
|
|
1592
|
+
type ControlledObjectSearchProviderProps = {
|
|
1593
|
+
children: ReactNode;
|
|
1594
|
+
selectedItems: Array<SelectedItemProps> | undefined;
|
|
1595
|
+
searchResultItems: Array<SelectedItemProps> | undefined;
|
|
1596
|
+
selectedItemsLoading?: boolean;
|
|
1597
|
+
searchResultItemsLoading?: boolean;
|
|
1598
|
+
searchResultListLoading?: boolean;
|
|
1599
|
+
onQueryChange: (value: SearchQueryProps) => void;
|
|
1600
|
+
onSelectItemsChange: (selectedItems: Array<SelectedItemProps>) => void;
|
|
1601
|
+
isMulti?: boolean;
|
|
1602
|
+
query: SearchQueryProps;
|
|
1603
|
+
localeOptions?: ObjectSearchContextProps['localeOptions'];
|
|
1604
|
+
enableFilterByLocale?: ObjectSearchContextProps['enableFilterByLocale'];
|
|
1605
|
+
dynamicEntryId?: ObjectSearchContextProps['dynamicEntryId'];
|
|
1606
|
+
};
|
|
1607
|
+
declare const ControlledObjectSearchProvider: ({ selectedItems, searchResultItems, selectedItemsLoading, searchResultListLoading, searchResultItemsLoading, onQueryChange, onSelectItemsChange, isMulti, children, query, enableFilterByLocale, localeOptions, dynamicEntryId, }: ControlledObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1608
|
+
|
|
1546
1609
|
type ParamTypeDynamicDataProviderProps = {
|
|
1547
1610
|
/** Child components of the provider. Variables-using components, such as ParameterVariables, can be used here. */
|
|
1548
1611
|
children: ReactNode;
|
|
@@ -1683,6 +1746,51 @@ declare function useRequestParameter(paramName: string): {
|
|
|
1683
1746
|
update: (value: string) => void;
|
|
1684
1747
|
};
|
|
1685
1748
|
|
|
1749
|
+
declare const bindableFiltersMapper: {
|
|
1750
|
+
multiChoice: React__default.FC<Omit<FilterEditorCommonInputProps, "value"> & {
|
|
1751
|
+
value?: string[] | undefined;
|
|
1752
|
+
options: {
|
|
1753
|
+
label: string;
|
|
1754
|
+
value: string;
|
|
1755
|
+
}[];
|
|
1756
|
+
onChange: (e: string[]) => void;
|
|
1757
|
+
}>;
|
|
1758
|
+
singleChoice: React__default.FC<Omit<FilterEditorCommonInputProps, "value"> & {
|
|
1759
|
+
value?: string | undefined;
|
|
1760
|
+
options: {
|
|
1761
|
+
label: string;
|
|
1762
|
+
value: string;
|
|
1763
|
+
}[];
|
|
1764
|
+
onChange: (e: string) => void;
|
|
1765
|
+
}>;
|
|
1766
|
+
date: React__default.FC<FilterEditorCommonInputProps & {
|
|
1767
|
+
value?: string | undefined;
|
|
1768
|
+
options?: {
|
|
1769
|
+
label: string;
|
|
1770
|
+
value: string;
|
|
1771
|
+
}[] | undefined;
|
|
1772
|
+
}>;
|
|
1773
|
+
text: React__default.FC<FilterEditorCommonInputProps & {
|
|
1774
|
+
value?: string | undefined;
|
|
1775
|
+
options?: {
|
|
1776
|
+
label: string;
|
|
1777
|
+
value: string;
|
|
1778
|
+
}[] | undefined;
|
|
1779
|
+
}>;
|
|
1780
|
+
number: React__default.FC<FilterEditorCommonInputProps & {
|
|
1781
|
+
value?: string | undefined;
|
|
1782
|
+
options?: {
|
|
1783
|
+
label: string;
|
|
1784
|
+
value: string;
|
|
1785
|
+
}[] | undefined;
|
|
1786
|
+
}>;
|
|
1787
|
+
dateRange: React__default.ComponentType<any> | null;
|
|
1788
|
+
empty: React__default.ComponentType<any> | null;
|
|
1789
|
+
numberRange: React__default.ComponentType<any> | null;
|
|
1790
|
+
statusMultiChoice: React__default.ComponentType<any> | null;
|
|
1791
|
+
statusSingleChoice: React__default.ComponentType<any> | null;
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1686
1794
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1687
1795
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1688
1796
|
|
|
@@ -1734,4 +1842,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
1734
1842
|
};
|
|
1735
1843
|
declare function useContentDataResourceLocaleInfo({ locale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
1736
1844
|
|
|
1737
|
-
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, type NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, TextVariableRenderer, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, convertConnectedDataToVariable, 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, hasReferencedVariables, prettifyBindExpression, 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, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
|
1845
|
+
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledObjectSearchProvider, type ControlledObjectSearchProviderProps, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, type DamItem, DamSelectedItem, type DamSelectedItemProps, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, DataResourceInputContext, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, EntrySearch, type EntrySearchContentType, type EntrySearchProps, type EntrySearchQueryOptions, type EntrySearchResult, type EntrySearchRowProps, type EntrySearchSelectedItemProps, type GetProductOptions, type GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, LinkButton, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, type NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, type ObjectSearchContainerProps, ObjectSearchContext, type ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, type ObjectSearchFilterContainerProps, type ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, type ObjectSearchListItemProps, ObjectSearchListOfSearchResults, ObjectSearchProvider, type ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, type ObjectSearchResultItemButtonProps, type ObjectSearchResultItemProps, ObjectSearchResultList, type ObjectSearchResultListProps, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, type ProductCategory, type ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, type ProductQueryCategory, ProductQueryContext, type ProductQueryContextValue, type ProductQueryProps, ProductSearch, ProductSearchContext, type ProductSearchContextValue, type ProductSearchProps, type ProductSearchResult, type ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, type RequestAction, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, type SearchQueryProps, type SelectedItemProps, SelectionField, type SelectionFieldValue, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, TextVariableRenderer, type UseVariablesMenu, type UseVariablesMenuInput, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, badgeIcon, bindQuery, bindableFiltersMapper, convertConnectedDataToVariable, 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, hasReferencedVariables, prettifyBindExpression, 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, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDataResourceDynamicInputs, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|