@uniformdev/mesh-sdk-react 19.80.0 → 19.80.1-alpha.149
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 +8 -18
- package/dist/index.d.ts +8 -18
- package/dist/index.esm.js +190 -172
- package/dist/index.js +195 -177
- package/dist/index.mjs +190 -172
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -42,21 +42,7 @@ declare const SvgMoreVerticalAlt: (props: SVGProps<SVGSVGElement>) => _emotion_r
|
|
|
42
42
|
declare const SvgPlus: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
43
43
|
|
|
44
44
|
declare namespace index {
|
|
45
|
-
export {
|
|
46
|
-
SvgCaution as Caution,
|
|
47
|
-
SvgCheckmark as Checkmark,
|
|
48
|
-
SvgChevronDown as ChevronDown,
|
|
49
|
-
SvgClose as Close,
|
|
50
|
-
SvgDanger as Danger,
|
|
51
|
-
SvgExclamationPoint as ExclamationPoint,
|
|
52
|
-
SvgInfo as Info,
|
|
53
|
-
SvgLightbulb as Lightbulb,
|
|
54
|
-
SvgMagnifyingGlass as MagnifyingGlass,
|
|
55
|
-
SvgMaximizeAlt as MaximizeAlt,
|
|
56
|
-
SvgMinus as Minus,
|
|
57
|
-
SvgMoreVerticalAlt as MoreVerticalAlt,
|
|
58
|
-
SvgPlus as Plus,
|
|
59
|
-
};
|
|
45
|
+
export { SvgCaution as Caution, SvgCheckmark as Checkmark, SvgChevronDown as ChevronDown, SvgClose as Close, SvgDanger as Danger, SvgExclamationPoint as ExclamationPoint, SvgInfo as Info, SvgLightbulb as Lightbulb, SvgMagnifyingGlass as MagnifyingGlass, SvgMaximizeAlt as MaximizeAlt, SvgMinus as Minus, SvgMoreVerticalAlt as MoreVerticalAlt, SvgPlus as Plus };
|
|
60
46
|
}
|
|
61
47
|
|
|
62
48
|
/** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
|
|
@@ -1323,12 +1309,15 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1323
1309
|
list: ItemListProps<TExtraItemProps>;
|
|
1324
1310
|
/** function that sets the list of items to state */
|
|
1325
1311
|
onSetList: (value: ItemListProps) => void;
|
|
1312
|
+
/** is multi items selection allowed or not */
|
|
1313
|
+
isMulti: boolean;
|
|
1326
1314
|
};
|
|
1327
1315
|
type ObjectSearchProviderProps = {
|
|
1328
1316
|
children: ReactNode;
|
|
1329
1317
|
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
1318
|
+
isMulti?: boolean;
|
|
1330
1319
|
};
|
|
1331
|
-
declare const ObjectSearchProvider: ({ currentlySelectedItems, children }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1320
|
+
declare const ObjectSearchProvider: ({ currentlySelectedItems, isMulti, children, }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1332
1321
|
declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraItemProps = unknown>(): ObjectSearchContextProps<TExtraSearchFilters, TExtraItemProps>;
|
|
1333
1322
|
|
|
1334
1323
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
@@ -1337,7 +1326,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1337
1326
|
/** sets image parameters
|
|
1338
1327
|
* @deprecated Please use imageUrl to make it compatible with */
|
|
1339
1328
|
image?: {
|
|
1340
|
-
/** sets the src
|
|
1329
|
+
/** sets the src value */
|
|
1341
1330
|
src: string;
|
|
1342
1331
|
/** sets the alt text value */
|
|
1343
1332
|
alt: string;
|
|
@@ -1359,6 +1348,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1359
1348
|
children?: React$1.ReactNode;
|
|
1360
1349
|
/** sets whether multiple entries can be added to the results list context
|
|
1361
1350
|
* @default false
|
|
1351
|
+
* @deprecated Please use isMulti property in <ObjectSearchProvider />
|
|
1362
1352
|
*/
|
|
1363
1353
|
isMulti?: boolean;
|
|
1364
1354
|
/** sets disabled state to the interactive element */
|
|
@@ -1682,4 +1672,4 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
1682
1672
|
*/
|
|
1683
1673
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
1684
1674
|
|
|
1685
|
-
export { $createVariableNode, $isVariableNode, BaseRequestData, Brand, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, DamItem, DamSelectedItem, DamSelectedItemProps, DataRefreshButton, DataRefreshButtonProps, DataResourceDynamicInputProvider, DataResourceDynamicInputProviderProps, DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, DataResourceVariablesListProps, DataSourceEditor, DataSourceEditorProps, DataTypeEditor, DataTypeEditorProps, DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, DisconnectVariableCommandArguments, DispatchResult, EDIT_VARIABLE_COMMAND, EditVariableCommandArguments, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, InputVariablesProps, InsertVariableCommandArguments, ItemListProps, KnownUndefinedVariableInfo, LinkButton, MeshApp, MeshAppProps, MeshDataVariableDefinition, MinimalDynamicInput, MinimalDynamicInputs, NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, ObjectSearchContainerProps, ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, ObjectSearchFilterContainerProps, ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, ObjectSearchListItemProps, ObjectSearchProvider, ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, ObjectSearchResultItemButtonProps, ObjectSearchResultItemProps, ObjectSearchResultList, ObjectSearchResultListProps, ParamTypeDynamicDataProvider, ParamTypeDynamicDataProviderProps, ParameterConnectOptions, ParameterConnectionIndicator, ParameterConnectionIndicatorProps, ParameterOrSingleVariable, ParameterOrSingleVariableProps, ParameterVariables, ParameterVariablesProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, QueryFilterProps, QueryFilterSearchProps, RequestAction, RequestBody, RequestContext, RequestData, RequestHeaders, RequestMethodSelect, RequestParameter, RequestParameters, RequestParametersProps, RequestProvider, RequestProviderProps, RequestTypeContainer, RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SearchQueryProps, SelectedItemProps, SelectionField, SelectionFieldValue, SerializedVariableNode, SetLocationValueDispatch, SetLocationValueFunction, TextVariableRenderer, UseVariablesMenu, UseVariablesMenuInput, VariableEditor, VariableEditorCompleteEvent, VariableEditorProps, VariableNode, VariableNodeState, VariableSourceGroup, VariablesAction, VariablesContext, VariablesEvents, VariablesList, VariablesPlugin, VariablesPluginProps, VariablesProvider, 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, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
|
1675
|
+
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, 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 MinimalDynamicInput, type MinimalDynamicInputs, 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, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
package/dist/index.d.ts
CHANGED
|
@@ -42,21 +42,7 @@ declare const SvgMoreVerticalAlt: (props: SVGProps<SVGSVGElement>) => _emotion_r
|
|
|
42
42
|
declare const SvgPlus: (props: SVGProps<SVGSVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
43
43
|
|
|
44
44
|
declare namespace index {
|
|
45
|
-
export {
|
|
46
|
-
SvgCaution as Caution,
|
|
47
|
-
SvgCheckmark as Checkmark,
|
|
48
|
-
SvgChevronDown as ChevronDown,
|
|
49
|
-
SvgClose as Close,
|
|
50
|
-
SvgDanger as Danger,
|
|
51
|
-
SvgExclamationPoint as ExclamationPoint,
|
|
52
|
-
SvgInfo as Info,
|
|
53
|
-
SvgLightbulb as Lightbulb,
|
|
54
|
-
SvgMagnifyingGlass as MagnifyingGlass,
|
|
55
|
-
SvgMaximizeAlt as MaximizeAlt,
|
|
56
|
-
SvgMinus as Minus,
|
|
57
|
-
SvgMoreVerticalAlt as MoreVerticalAlt,
|
|
58
|
-
SvgPlus as Plus,
|
|
59
|
-
};
|
|
45
|
+
export { SvgCaution as Caution, SvgCheckmark as Checkmark, SvgChevronDown as ChevronDown, SvgClose as Close, SvgDanger as Danger, SvgExclamationPoint as ExclamationPoint, SvgInfo as Info, SvgLightbulb as Lightbulb, SvgMagnifyingGlass as MagnifyingGlass, SvgMaximizeAlt as MaximizeAlt, SvgMinus as Minus, SvgMoreVerticalAlt as MoreVerticalAlt, SvgPlus as Plus };
|
|
60
46
|
}
|
|
61
47
|
|
|
62
48
|
/** @deprecated please use ObjectSearchListItem - https://mesh-design-system.netlify.app/?path=/story/object-search--object-search-list-item */
|
|
@@ -1323,12 +1309,15 @@ type ObjectSearchContextProps<TExtraFilters = unknown, TExtraItemProps = unknown
|
|
|
1323
1309
|
list: ItemListProps<TExtraItemProps>;
|
|
1324
1310
|
/** function that sets the list of items to state */
|
|
1325
1311
|
onSetList: (value: ItemListProps) => void;
|
|
1312
|
+
/** is multi items selection allowed or not */
|
|
1313
|
+
isMulti: boolean;
|
|
1326
1314
|
};
|
|
1327
1315
|
type ObjectSearchProviderProps = {
|
|
1328
1316
|
children: ReactNode;
|
|
1329
1317
|
currentlySelectedItems?: Array<SelectedItemProps>;
|
|
1318
|
+
isMulti?: boolean;
|
|
1330
1319
|
};
|
|
1331
|
-
declare const ObjectSearchProvider: ({ currentlySelectedItems, children }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1320
|
+
declare const ObjectSearchProvider: ({ currentlySelectedItems, isMulti, children, }: ObjectSearchProviderProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
1332
1321
|
declare function useObjectSearchContext<TExtraSearchFilters = unknown, TExtraItemProps = unknown>(): ObjectSearchContextProps<TExtraSearchFilters, TExtraItemProps>;
|
|
1333
1322
|
|
|
1334
1323
|
type ObjectSearchListItemProps = SelectedItemProps & {
|
|
@@ -1337,7 +1326,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1337
1326
|
/** sets image parameters
|
|
1338
1327
|
* @deprecated Please use imageUrl to make it compatible with */
|
|
1339
1328
|
image?: {
|
|
1340
|
-
/** sets the src
|
|
1329
|
+
/** sets the src value */
|
|
1341
1330
|
src: string;
|
|
1342
1331
|
/** sets the alt text value */
|
|
1343
1332
|
alt: string;
|
|
@@ -1359,6 +1348,7 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1359
1348
|
children?: React$1.ReactNode;
|
|
1360
1349
|
/** sets whether multiple entries can be added to the results list context
|
|
1361
1350
|
* @default false
|
|
1351
|
+
* @deprecated Please use isMulti property in <ObjectSearchProvider />
|
|
1362
1352
|
*/
|
|
1363
1353
|
isMulti?: boolean;
|
|
1364
1354
|
/** sets disabled state to the interactive element */
|
|
@@ -1682,4 +1672,4 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
1682
1672
|
*/
|
|
1683
1673
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
1684
1674
|
|
|
1685
|
-
export { $createVariableNode, $isVariableNode, BaseRequestData, Brand, ControlledValuePlugin, DISCONNECT_VARIABLE_COMMAND, DamItem, DamSelectedItem, DamSelectedItemProps, DataRefreshButton, DataRefreshButtonProps, DataResourceDynamicInputProvider, DataResourceDynamicInputProviderProps, DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, DataResourceVariablesListProps, DataSourceEditor, DataSourceEditorProps, DataTypeEditor, DataTypeEditorProps, DataVariableDefinitionWithName, DefaultSearchRow, DefaultSelectedItem, DisconnectVariableCommandArguments, DispatchResult, EDIT_VARIABLE_COMMAND, EditVariableCommandArguments, EntrySearch, EntrySearchContentType, EntrySearchProps, EntrySearchQueryOptions, EntrySearchResult, EntrySearchRowProps, EntrySearchSelectedItemProps, GetProductOptions, GetProductsOptions, INSERT_VARIABLE_COMMAND, index as Icons, InputVariables, InputVariablesProps, InsertVariableCommandArguments, ItemListProps, KnownUndefinedVariableInfo, LinkButton, MeshApp, MeshAppProps, MeshDataVariableDefinition, MinimalDynamicInput, MinimalDynamicInputs, NoResultsProps, OPEN_INSERT_VARIABLE_COMMAND, ObjectSearchContainer, ObjectSearchContainerProps, ObjectSearchContextProps, ObjectSearchFilter, ObjectSearchFilterContainer, ObjectSearchFilterContainerProps, ObjectSearchFilterProps, ObjectSearchListItem, ObjectSearchListItemLoadingSkeleton, ObjectSearchListItemProps, ObjectSearchProvider, ObjectSearchProviderProps, ObjectSearchResultItem, ObjectSearchResultItemButton, ObjectSearchResultItemButtonProps, ObjectSearchResultItemProps, ObjectSearchResultList, ObjectSearchResultListProps, ParamTypeDynamicDataProvider, ParamTypeDynamicDataProviderProps, ParameterConnectOptions, ParameterConnectionIndicator, ParameterConnectionIndicatorProps, ParameterOrSingleVariable, ParameterOrSingleVariableProps, ParameterVariables, ParameterVariablesProps, ProductCategory, ProductDynamicSelectorValue, ProductPreviewList, ProductQuery, ProductQueryCategory, ProductQueryContext, ProductQueryContextValue, ProductQueryProps, ProductSearch, ProductSearchContext, ProductSearchContextValue, ProductSearchProps, ProductSearchResult, ProductSearchResults, ProductSearchRow, ProductSelectedItem, QueryFilter, QueryFilterProps, QueryFilterSearchProps, RequestAction, RequestBody, RequestContext, RequestData, RequestHeaders, RequestMethodSelect, RequestParameter, RequestParameters, RequestParametersProps, RequestProvider, RequestProviderProps, RequestTypeContainer, RequestTypeContainerProps, RequestUrl, RequestUrlInput, ResolvableLoadingValue, SearchQueryProps, SelectedItemProps, SelectionField, SelectionFieldValue, SerializedVariableNode, SetLocationValueDispatch, SetLocationValueFunction, TextVariableRenderer, UseVariablesMenu, UseVariablesMenuInput, VariableEditor, VariableEditorCompleteEvent, VariableEditorProps, VariableNode, VariableNodeState, VariableSourceGroup, VariablesAction, VariablesContext, VariablesEvents, VariablesList, VariablesPlugin, VariablesPluginProps, VariablesProvider, 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, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
|
1675
|
+
export { $createVariableNode, $isVariableNode, type BaseRequestData, type Brand, 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 MinimalDynamicInput, type MinimalDynamicInputs, 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, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useProductQueryContext, useProductSearchContext, useRequest, useRequestHeader, useRequestParameter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|
package/dist/index.esm.js
CHANGED
|
@@ -5136,7 +5136,6 @@ var tableCellDragIcon = css25`
|
|
|
5136
5136
|
`;
|
|
5137
5137
|
var variableName = css25`
|
|
5138
5138
|
border: none;
|
|
5139
|
-
color: var(--brand-secondary-5);
|
|
5140
5139
|
font-weight: var(--fw-medium);
|
|
5141
5140
|
padding: 0;
|
|
5142
5141
|
background: none;
|
|
@@ -5246,7 +5245,7 @@ function VariablesList() {
|
|
|
5246
5245
|
{
|
|
5247
5246
|
onButtonClick: () => dispatch({ type: "edit", variable: "" }),
|
|
5248
5247
|
"aria-label": "Add variable",
|
|
5249
|
-
buttonText: "
|
|
5248
|
+
buttonText: "Add variable",
|
|
5250
5249
|
icon: "math-plus",
|
|
5251
5250
|
css: { marginLeft: "var(--spacing-md)" }
|
|
5252
5251
|
}
|
|
@@ -6141,9 +6140,9 @@ var DataRefreshButton = ({
|
|
|
6141
6140
|
};
|
|
6142
6141
|
|
|
6143
6142
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6144
|
-
import { css as
|
|
6143
|
+
import { css as css32 } from "@emotion/react";
|
|
6145
6144
|
import { bindVariables } from "@uniformdev/canvas";
|
|
6146
|
-
import { Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
|
|
6145
|
+
import { Callout as Callout5, Container, IconsProvider, ScrollableList, VerticalRhythm as VerticalRhythm2 } from "@uniformdev/design-system";
|
|
6147
6146
|
|
|
6148
6147
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
6149
6148
|
import { bindVariablesToObject as bindVariablesToObject2 } from "@uniformdev/canvas";
|
|
@@ -6168,9 +6167,14 @@ var ObjectSearchContext = createContext5({
|
|
|
6168
6167
|
},
|
|
6169
6168
|
selectedListItems: [],
|
|
6170
6169
|
onRemoveAllSelectedItems: () => {
|
|
6171
|
-
}
|
|
6170
|
+
},
|
|
6171
|
+
isMulti: false
|
|
6172
6172
|
});
|
|
6173
|
-
var ObjectSearchProvider = ({
|
|
6173
|
+
var ObjectSearchProvider = ({
|
|
6174
|
+
currentlySelectedItems,
|
|
6175
|
+
isMulti = false,
|
|
6176
|
+
children
|
|
6177
|
+
}) => {
|
|
6174
6178
|
const [query, setQuery] = useState15({
|
|
6175
6179
|
contentType: "",
|
|
6176
6180
|
keyword: ""
|
|
@@ -6224,6 +6228,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
|
|
|
6224
6228
|
selectedListItems: selectedItems,
|
|
6225
6229
|
onRemoveAllSelectedItems,
|
|
6226
6230
|
list,
|
|
6231
|
+
isMulti,
|
|
6227
6232
|
onSetList
|
|
6228
6233
|
}),
|
|
6229
6234
|
[
|
|
@@ -6234,6 +6239,7 @@ var ObjectSearchProvider = ({ currentlySelectedItems, children }) => {
|
|
|
6234
6239
|
selectedItems,
|
|
6235
6240
|
onRemoveAllSelectedItems,
|
|
6236
6241
|
list,
|
|
6242
|
+
isMulti,
|
|
6237
6243
|
onSetList
|
|
6238
6244
|
]
|
|
6239
6245
|
);
|
|
@@ -6254,8 +6260,148 @@ function bindQuery(query, inputs) {
|
|
|
6254
6260
|
return result;
|
|
6255
6261
|
}
|
|
6256
6262
|
|
|
6257
|
-
// src/components/ObjectSearch/
|
|
6263
|
+
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6264
|
+
import { Chip, Popover } from "@uniformdev/design-system";
|
|
6265
|
+
|
|
6266
|
+
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6267
|
+
import { css as css31 } from "@emotion/react";
|
|
6268
|
+
import { skeletonLoading } from "@uniformdev/design-system";
|
|
6269
|
+
var ObjectListItemContainer = css31`
|
|
6270
|
+
align-items: center;
|
|
6271
|
+
border: 1px solid var(--gray-300);
|
|
6272
|
+
border-radius: var(--rounded-base);
|
|
6273
|
+
background: var(--white);
|
|
6274
|
+
display: grid;
|
|
6275
|
+
grid-template-columns: 1fr auto;
|
|
6276
|
+
padding: var(--spacing-sm);
|
|
6277
|
+
`;
|
|
6278
|
+
var ObjectListItemContainerDisabled = css31`
|
|
6279
|
+
opacity: var(--opacity-50);
|
|
6280
|
+
pointer-events: none;
|
|
6281
|
+
`;
|
|
6282
|
+
var ObjectListItemLoading = css31`
|
|
6283
|
+
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6284
|
+
border-color: transparent;
|
|
6285
|
+
min-height: 42px;
|
|
6286
|
+
position: relative;
|
|
6287
|
+
|
|
6288
|
+
&:before,
|
|
6289
|
+
&:after {
|
|
6290
|
+
background: var(--gray-200);
|
|
6291
|
+
content: '';
|
|
6292
|
+
display: block;
|
|
6293
|
+
height: 1rem;
|
|
6294
|
+
}
|
|
6295
|
+
|
|
6296
|
+
&:before {
|
|
6297
|
+
border-radius: var(--rounded-base);
|
|
6298
|
+
width: 10rem;
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
&:after {
|
|
6302
|
+
border-radius: var(--rounded-full);
|
|
6303
|
+
width: 1rem;
|
|
6304
|
+
}
|
|
6305
|
+
`;
|
|
6306
|
+
var ObjectListItemHeadingGroup = css31`
|
|
6307
|
+
align-items: center;
|
|
6308
|
+
display: grid;
|
|
6309
|
+
`;
|
|
6310
|
+
var ObjectListItemThumbnail = css31`
|
|
6311
|
+
width: 30px;
|
|
6312
|
+
object-fit: contain;
|
|
6313
|
+
`;
|
|
6314
|
+
var ObjectListItemTitle = css31`
|
|
6315
|
+
color: var(--brand-secondary-1);
|
|
6316
|
+
display: block;
|
|
6317
|
+
font-size: var(--fs-sm);
|
|
6318
|
+
`;
|
|
6319
|
+
var ObjectListItemSubtitle = css31`
|
|
6320
|
+
color: var(--gray-500);
|
|
6321
|
+
display: block;
|
|
6322
|
+
font-size: var(--fs-xs);
|
|
6323
|
+
line-height: 1;
|
|
6324
|
+
`;
|
|
6325
|
+
var ObjectListItemInfoContainer = css31`
|
|
6326
|
+
align-items: center;
|
|
6327
|
+
display: flex;
|
|
6328
|
+
gap: var(--spacing-sm);
|
|
6329
|
+
justify-content: center;
|
|
6330
|
+
`;
|
|
6331
|
+
var ObjectListItemControlledContent = css31`
|
|
6332
|
+
display: flex;
|
|
6333
|
+
gap: var(--spacing-sm);
|
|
6334
|
+
`;
|
|
6335
|
+
var ObjectListItemUnControlledContent = css31`
|
|
6336
|
+
margin-top: var(--spacing-sm);
|
|
6337
|
+
grid-column: 1 / -1;
|
|
6338
|
+
`;
|
|
6339
|
+
|
|
6340
|
+
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6258
6341
|
import { jsx as jsx59, jsxs as jsxs34 } from "@emotion/react/jsx-runtime";
|
|
6342
|
+
var ObjectSearchListItem = ({
|
|
6343
|
+
id,
|
|
6344
|
+
title,
|
|
6345
|
+
contentType,
|
|
6346
|
+
image,
|
|
6347
|
+
imageUrl,
|
|
6348
|
+
popoverData,
|
|
6349
|
+
onSelect,
|
|
6350
|
+
isMulti,
|
|
6351
|
+
disabled,
|
|
6352
|
+
children
|
|
6353
|
+
}) => {
|
|
6354
|
+
const { onSelectItem, selectedListItems, isMulti: globalIsMulti } = useObjectSearchContext();
|
|
6355
|
+
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
6356
|
+
const handleSelectItem = () => {
|
|
6357
|
+
var _a;
|
|
6358
|
+
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6359
|
+
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6360
|
+
if (isMulti === true || globalIsMulti) {
|
|
6361
|
+
return onSelectItem(selectedItem);
|
|
6362
|
+
}
|
|
6363
|
+
return onSelectItem([selectedItem]);
|
|
6364
|
+
};
|
|
6365
|
+
const selected = selectedListItems.some((item) => item.id === id);
|
|
6366
|
+
return /* @__PURE__ */ jsxs34(
|
|
6367
|
+
"div",
|
|
6368
|
+
{
|
|
6369
|
+
role: "listitem",
|
|
6370
|
+
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6371
|
+
"data-testid": "list-item",
|
|
6372
|
+
children: [
|
|
6373
|
+
/* @__PURE__ */ jsxs34(
|
|
6374
|
+
"div",
|
|
6375
|
+
{
|
|
6376
|
+
role: "button",
|
|
6377
|
+
onClick: handleSelectItem,
|
|
6378
|
+
css: ObjectListItemControlledContent,
|
|
6379
|
+
"aria-disabled": disabled,
|
|
6380
|
+
children: [
|
|
6381
|
+
!imageUrl ? null : /* @__PURE__ */ jsx59("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6382
|
+
!image || imageUrl ? null : /* @__PURE__ */ jsx59("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6383
|
+
/* @__PURE__ */ jsxs34("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6384
|
+
!contentType ? null : /* @__PURE__ */ jsx59("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6385
|
+
/* @__PURE__ */ jsx59("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
|
|
6386
|
+
] })
|
|
6387
|
+
]
|
|
6388
|
+
}
|
|
6389
|
+
),
|
|
6390
|
+
/* @__PURE__ */ jsxs34("div", { css: ObjectListItemInfoContainer, children: [
|
|
6391
|
+
selected ? /* @__PURE__ */ jsx59(Chip, { text: "selected", size: "xs" }) : null,
|
|
6392
|
+
!popoverData ? null : /* @__PURE__ */ jsx59(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6393
|
+
] }),
|
|
6394
|
+
!children ? null : /* @__PURE__ */ jsx59("div", { css: ObjectListItemUnControlledContent, children })
|
|
6395
|
+
]
|
|
6396
|
+
}
|
|
6397
|
+
);
|
|
6398
|
+
};
|
|
6399
|
+
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6400
|
+
return /* @__PURE__ */ jsx59("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
|
6401
|
+
};
|
|
6402
|
+
|
|
6403
|
+
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6404
|
+
import { jsx as jsx60, jsxs as jsxs35 } from "@emotion/react/jsx-runtime";
|
|
6259
6405
|
var ObjectSearchContainer = ({
|
|
6260
6406
|
label,
|
|
6261
6407
|
enableDynamicInputToResultId,
|
|
@@ -6267,19 +6413,20 @@ var ObjectSearchContainer = ({
|
|
|
6267
6413
|
const { onSelectItem, selectedListItems, list } = useObjectSearchContext();
|
|
6268
6414
|
const { flatVariables } = useVariables(true);
|
|
6269
6415
|
const inputValue = (_b = (_a = selectedListItems == null ? void 0 : selectedListItems[0]) == null ? void 0 : _a.id) != null ? _b : "";
|
|
6270
|
-
const
|
|
6416
|
+
const listItems = resultList != null ? resultList : /* @__PURE__ */ jsx60(DefaultResultList, {});
|
|
6417
|
+
const body = /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
|
|
6271
6418
|
searchFilters,
|
|
6272
|
-
|
|
6419
|
+
/* @__PURE__ */ jsx60(
|
|
6273
6420
|
ScrollableList,
|
|
6274
6421
|
{
|
|
6275
6422
|
role: "list",
|
|
6276
|
-
css:
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
children:
|
|
6423
|
+
css: css32`
|
|
6424
|
+
> div {
|
|
6425
|
+
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
6426
|
+
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
6427
|
+
}
|
|
6428
|
+
`,
|
|
6429
|
+
children: listItems
|
|
6283
6430
|
}
|
|
6284
6431
|
)
|
|
6285
6432
|
] });
|
|
@@ -6310,8 +6457,8 @@ var ObjectSearchContainer = ({
|
|
|
6310
6457
|
}
|
|
6311
6458
|
]);
|
|
6312
6459
|
};
|
|
6313
|
-
return /* @__PURE__ */
|
|
6314
|
-
/* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx60(IconsProvider, { children: /* @__PURE__ */ jsxs35(VerticalRhythm2, { children: [
|
|
6461
|
+
/* @__PURE__ */ jsx60(Container, { backgroundColor: "gray-50", padding: "var(--spacing-base)", border: true, children: label ? /* @__PURE__ */ jsx60(
|
|
6315
6462
|
InputVariables,
|
|
6316
6463
|
{
|
|
6317
6464
|
label,
|
|
@@ -6329,14 +6476,25 @@ var ObjectSearchContainer = ({
|
|
|
6329
6476
|
children
|
|
6330
6477
|
] }) });
|
|
6331
6478
|
};
|
|
6479
|
+
var DefaultResultList = () => {
|
|
6480
|
+
var _a;
|
|
6481
|
+
const { list } = useObjectSearchContext();
|
|
6482
|
+
if (!list.items) {
|
|
6483
|
+
return Array.from(Array(5).keys()).map((i) => /* @__PURE__ */ jsx60(ObjectSearchListItemLoadingSkeleton, {}, i));
|
|
6484
|
+
}
|
|
6485
|
+
if (list.items.length === 0) {
|
|
6486
|
+
return /* @__PURE__ */ jsx60(Callout5, { type: "info", children: "No results were found" });
|
|
6487
|
+
}
|
|
6488
|
+
return (_a = list.items) == null ? void 0 : _a.map((item) => /* @__PURE__ */ jsx60(ObjectSearchListItem, { ...item }, item.id));
|
|
6489
|
+
};
|
|
6332
6490
|
|
|
6333
6491
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6334
6492
|
import { InputKeywordSearch as InputKeywordSearch2, InputSelect as InputSelect6 } from "@uniformdev/design-system";
|
|
6335
6493
|
import { useMemo as useMemo15, useState as useState16 } from "react";
|
|
6336
6494
|
|
|
6337
6495
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6338
|
-
import { css as
|
|
6339
|
-
var ObjectSearchFilterContainerLabel =
|
|
6496
|
+
import { css as css33 } from "@emotion/react";
|
|
6497
|
+
var ObjectSearchFilterContainerLabel = css33`
|
|
6340
6498
|
align-items: center;
|
|
6341
6499
|
display: flex;
|
|
6342
6500
|
font-size: var(--fs-sm);
|
|
@@ -6344,18 +6502,18 @@ var ObjectSearchFilterContainerLabel = css32`
|
|
|
6344
6502
|
line-height: 1rem;
|
|
6345
6503
|
margin-bottom: var(--spacing-sm);
|
|
6346
6504
|
`;
|
|
6347
|
-
var ObjectSearchFilterContainer =
|
|
6505
|
+
var ObjectSearchFilterContainer = css33`
|
|
6348
6506
|
display: grid;
|
|
6349
6507
|
gap: var(--spacing-base);
|
|
6350
6508
|
`;
|
|
6351
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
6509
|
+
var ObjectSearchFilterGrid = (gridColumns) => css33`
|
|
6352
6510
|
display: grid;
|
|
6353
6511
|
grid-template-columns: ${gridColumns};
|
|
6354
6512
|
gap: var(--spacing-base);
|
|
6355
6513
|
`;
|
|
6356
6514
|
|
|
6357
6515
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6358
|
-
import { jsx as
|
|
6516
|
+
import { jsx as jsx61, jsxs as jsxs36 } from "@emotion/react/jsx-runtime";
|
|
6359
6517
|
var ObjectSearchFilter = ({
|
|
6360
6518
|
requireContentType,
|
|
6361
6519
|
typeSelectorAllTypesOptionText = "All content types",
|
|
@@ -6388,7 +6546,7 @@ var ObjectSearchFilter = ({
|
|
|
6388
6546
|
];
|
|
6389
6547
|
}, [requireContentType, typeSelectorAllTypesOptionText, selectOptions]);
|
|
6390
6548
|
const shouldRenderSelect = memoizedSelectOptions.length > 0;
|
|
6391
|
-
return /* @__PURE__ */
|
|
6549
|
+
return /* @__PURE__ */ jsxs36(
|
|
6392
6550
|
"fieldset",
|
|
6393
6551
|
{
|
|
6394
6552
|
css: [
|
|
@@ -6396,7 +6554,7 @@ var ObjectSearchFilter = ({
|
|
|
6396
6554
|
ObjectSearchFilterGrid(shouldRenderSelect ? "1fr 2fr" : "1fr")
|
|
6397
6555
|
],
|
|
6398
6556
|
children: [
|
|
6399
|
-
memoizedSelectOptions.length ? /* @__PURE__ */
|
|
6557
|
+
memoizedSelectOptions.length ? /* @__PURE__ */ jsx61(
|
|
6400
6558
|
InputSelect6,
|
|
6401
6559
|
{
|
|
6402
6560
|
label: selectLabel,
|
|
@@ -6406,7 +6564,7 @@ var ObjectSearchFilter = ({
|
|
|
6406
6564
|
value: query.contentType
|
|
6407
6565
|
}
|
|
6408
6566
|
) : null,
|
|
6409
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ jsx61(
|
|
6410
6568
|
InputKeywordSearch2,
|
|
6411
6569
|
{
|
|
6412
6570
|
inputFieldName: searchInputName,
|
|
@@ -6423,154 +6581,14 @@ var ObjectSearchFilter = ({
|
|
|
6423
6581
|
};
|
|
6424
6582
|
|
|
6425
6583
|
// src/components/ObjectSearch/ObjectSearchFilterContainer.tsx
|
|
6426
|
-
import { jsx as
|
|
6584
|
+
import { jsx as jsx62, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
6427
6585
|
var ObjectSearchFilterContainer2 = ({ label, children }) => {
|
|
6428
|
-
return /* @__PURE__ */
|
|
6429
|
-
label ? /* @__PURE__ */
|
|
6430
|
-
/* @__PURE__ */
|
|
6586
|
+
return /* @__PURE__ */ jsxs37("div", { children: [
|
|
6587
|
+
label ? /* @__PURE__ */ jsx62("span", { css: ObjectSearchFilterContainerLabel, children: label }) : null,
|
|
6588
|
+
/* @__PURE__ */ jsx62("div", { css: ObjectSearchFilterContainer, children })
|
|
6431
6589
|
] });
|
|
6432
6590
|
};
|
|
6433
6591
|
|
|
6434
|
-
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6435
|
-
import { Chip, Popover } from "@uniformdev/design-system";
|
|
6436
|
-
|
|
6437
|
-
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6438
|
-
import { css as css33 } from "@emotion/react";
|
|
6439
|
-
import { skeletonLoading } from "@uniformdev/design-system";
|
|
6440
|
-
var ObjectListItemContainer = css33`
|
|
6441
|
-
align-items: center;
|
|
6442
|
-
border: 1px solid var(--gray-300);
|
|
6443
|
-
border-radius: var(--rounded-base);
|
|
6444
|
-
background: var(--white);
|
|
6445
|
-
display: grid;
|
|
6446
|
-
grid-template-columns: 1fr auto;
|
|
6447
|
-
padding: var(--spacing-sm);
|
|
6448
|
-
`;
|
|
6449
|
-
var ObjectListItemContainerDisabled = css33`
|
|
6450
|
-
opacity: var(--opacity-50);
|
|
6451
|
-
pointer-events: none;
|
|
6452
|
-
`;
|
|
6453
|
-
var ObjectListItemLoading = css33`
|
|
6454
|
-
animation: ${skeletonLoading} 1s linear infinite alternate;
|
|
6455
|
-
border-color: transparent;
|
|
6456
|
-
min-height: 42px;
|
|
6457
|
-
position: relative;
|
|
6458
|
-
|
|
6459
|
-
&:before,
|
|
6460
|
-
&:after {
|
|
6461
|
-
background: var(--gray-200);
|
|
6462
|
-
content: '';
|
|
6463
|
-
display: block;
|
|
6464
|
-
height: 1rem;
|
|
6465
|
-
}
|
|
6466
|
-
|
|
6467
|
-
&:before {
|
|
6468
|
-
border-radius: var(--rounded-base);
|
|
6469
|
-
width: 10rem;
|
|
6470
|
-
}
|
|
6471
|
-
|
|
6472
|
-
&:after {
|
|
6473
|
-
border-radius: var(--rounded-full);
|
|
6474
|
-
width: 1rem;
|
|
6475
|
-
}
|
|
6476
|
-
`;
|
|
6477
|
-
var ObjectListItemHeadingGroup = css33`
|
|
6478
|
-
align-items: center;
|
|
6479
|
-
display: grid;
|
|
6480
|
-
`;
|
|
6481
|
-
var ObjectListItemThumbnail = css33`
|
|
6482
|
-
width: 30px;
|
|
6483
|
-
object-fit: contain;
|
|
6484
|
-
`;
|
|
6485
|
-
var ObjectListItemTitle = css33`
|
|
6486
|
-
color: var(--brand-secondary-1);
|
|
6487
|
-
display: block;
|
|
6488
|
-
font-size: var(--fs-sm);
|
|
6489
|
-
`;
|
|
6490
|
-
var ObjectListItemSubtitle = css33`
|
|
6491
|
-
color: var(--gray-500);
|
|
6492
|
-
display: block;
|
|
6493
|
-
font-size: var(--fs-xs);
|
|
6494
|
-
line-height: 1;
|
|
6495
|
-
`;
|
|
6496
|
-
var ObjectListItemInfoContainer = css33`
|
|
6497
|
-
align-items: center;
|
|
6498
|
-
display: flex;
|
|
6499
|
-
gap: var(--spacing-sm);
|
|
6500
|
-
justify-content: center;
|
|
6501
|
-
`;
|
|
6502
|
-
var ObjectListItemControlledContent = css33`
|
|
6503
|
-
display: flex;
|
|
6504
|
-
gap: var(--spacing-sm);
|
|
6505
|
-
`;
|
|
6506
|
-
var ObjectListItemUnControlledContent = css33`
|
|
6507
|
-
margin-top: var(--spacing-sm);
|
|
6508
|
-
grid-column: 1 / -1;
|
|
6509
|
-
`;
|
|
6510
|
-
|
|
6511
|
-
// src/components/ObjectSearch/ObjectSearchListItem.tsx
|
|
6512
|
-
import { jsx as jsx62, jsxs as jsxs37 } from "@emotion/react/jsx-runtime";
|
|
6513
|
-
var ObjectSearchListItem = ({
|
|
6514
|
-
id,
|
|
6515
|
-
title,
|
|
6516
|
-
contentType,
|
|
6517
|
-
image,
|
|
6518
|
-
imageUrl,
|
|
6519
|
-
popoverData,
|
|
6520
|
-
onSelect,
|
|
6521
|
-
isMulti = false,
|
|
6522
|
-
disabled,
|
|
6523
|
-
children
|
|
6524
|
-
}) => {
|
|
6525
|
-
const { onSelectItem, selectedListItems } = useObjectSearchContext();
|
|
6526
|
-
const formatedContentType = Array.isArray(contentType) ? contentType.join(", ") : contentType;
|
|
6527
|
-
const handleSelectItem = () => {
|
|
6528
|
-
var _a;
|
|
6529
|
-
const extraData = (_a = onSelect == null ? void 0 : onSelect()) != null ? _a : {};
|
|
6530
|
-
const selectedItem = { id, title, contentType, imageUrl, image, popoverData, ...extraData };
|
|
6531
|
-
if (isMulti) {
|
|
6532
|
-
return onSelectItem(selectedItem);
|
|
6533
|
-
}
|
|
6534
|
-
return onSelectItem([selectedItem]);
|
|
6535
|
-
};
|
|
6536
|
-
const selected = selectedListItems.some((item) => item.id === id);
|
|
6537
|
-
return /* @__PURE__ */ jsxs37(
|
|
6538
|
-
"div",
|
|
6539
|
-
{
|
|
6540
|
-
role: "listitem",
|
|
6541
|
-
css: [ObjectListItemContainer, disabled ? ObjectListItemContainerDisabled : void 0],
|
|
6542
|
-
"data-testid": "list-item",
|
|
6543
|
-
children: [
|
|
6544
|
-
/* @__PURE__ */ jsxs37(
|
|
6545
|
-
"div",
|
|
6546
|
-
{
|
|
6547
|
-
role: "button",
|
|
6548
|
-
onClick: handleSelectItem,
|
|
6549
|
-
css: ObjectListItemControlledContent,
|
|
6550
|
-
"aria-disabled": disabled,
|
|
6551
|
-
children: [
|
|
6552
|
-
!imageUrl ? null : /* @__PURE__ */ jsx62("img", { src: imageUrl, alt: `Thumbnail for ${title}`, css: ObjectListItemThumbnail }),
|
|
6553
|
-
!image || imageUrl ? null : /* @__PURE__ */ jsx62("img", { ...image, loading: (image == null ? void 0 : image.width) && image.height ? "lazy" : "eager" }),
|
|
6554
|
-
/* @__PURE__ */ jsxs37("div", { role: "heading", css: ObjectListItemHeadingGroup, children: [
|
|
6555
|
-
!contentType ? null : /* @__PURE__ */ jsx62("span", { css: ObjectListItemSubtitle, children: formatedContentType }),
|
|
6556
|
-
/* @__PURE__ */ jsx62("span", { css: ObjectListItemTitle, "data-testid": "title", children: title })
|
|
6557
|
-
] })
|
|
6558
|
-
]
|
|
6559
|
-
}
|
|
6560
|
-
),
|
|
6561
|
-
/* @__PURE__ */ jsxs37("div", { css: ObjectListItemInfoContainer, children: [
|
|
6562
|
-
selected ? /* @__PURE__ */ jsx62(Chip, { text: "selected", size: "xs" }) : null,
|
|
6563
|
-
!popoverData ? null : /* @__PURE__ */ jsx62(Popover, { baseId: title, ariaLabel: title, buttonText: `See ${title} details`, iconColor: "default", children: popoverData })
|
|
6564
|
-
] }),
|
|
6565
|
-
!children ? null : /* @__PURE__ */ jsx62("div", { css: ObjectListItemUnControlledContent, children })
|
|
6566
|
-
]
|
|
6567
|
-
}
|
|
6568
|
-
);
|
|
6569
|
-
};
|
|
6570
|
-
var ObjectSearchListItemLoadingSkeleton = () => {
|
|
6571
|
-
return /* @__PURE__ */ jsx62("div", { role: "presentation", css: [ObjectListItemContainer, ObjectListItemLoading] });
|
|
6572
|
-
};
|
|
6573
|
-
|
|
6574
6592
|
// src/components/ObjectSearch/ObjectSearchResultItem.tsx
|
|
6575
6593
|
import { Badge, Button as Button4, Popover as Popover2 } from "@uniformdev/design-system";
|
|
6576
6594
|
import { format as timeagoFormat } from "timeago.js";
|
|
@@ -7114,7 +7132,7 @@ function createLocationValidator(setValue, validate) {
|
|
|
7114
7132
|
import {
|
|
7115
7133
|
AddListButton as AddListButton2,
|
|
7116
7134
|
Button as Button6,
|
|
7117
|
-
Callout as
|
|
7135
|
+
Callout as Callout6,
|
|
7118
7136
|
DrawerContent,
|
|
7119
7137
|
Heading,
|
|
7120
7138
|
Input as Input6,
|
|
@@ -7153,7 +7171,7 @@ export {
|
|
|
7153
7171
|
$isVariableNode,
|
|
7154
7172
|
AddListButton2 as AddListButton,
|
|
7155
7173
|
Button6 as Button,
|
|
7156
|
-
|
|
7174
|
+
Callout6 as Callout,
|
|
7157
7175
|
ControlledValuePlugin,
|
|
7158
7176
|
DISCONNECT_VARIABLE_COMMAND,
|
|
7159
7177
|
DamSelectedItem,
|