@uniformdev/mesh-sdk-react 19.92.3 → 19.93.1-alpha.40

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 CHANGED
@@ -5,7 +5,7 @@ import { TDate } from 'timeago.js';
5
5
  import * as _emotion_react from '@emotion/react';
6
6
  import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
7
7
  import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
8
- import { DynamicInput, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DynamicInputs, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
8
+ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
9
9
  export * from '@uniformdev/mesh-sdk';
10
10
  import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
11
11
  import { Emitter } from 'mitt';
@@ -385,11 +385,9 @@ declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
385
385
  declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
386
386
  declare const damSelectItemImage: _emotion_react.SerializedStyles;
387
387
 
388
- type MinimalDynamicInput = Omit<DynamicInput, 'source'>;
389
- type MinimalDynamicInputs = Record<string, MinimalDynamicInput>;
390
388
  type DataResourceDynamicInputProviderProps = {
391
389
  /** Explicitly provide dynamic input values. If not set, Mesh location will be used */
392
- dynamicInputs?: MinimalDynamicInputs;
390
+ dynamicInputs?: DynamicInputs;
393
391
  /** Child components of the provider. Variables-using components, such as InputVariables, can be used here. */
394
392
  children: ReactNode;
395
393
  };
@@ -799,7 +797,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
799
797
  addOmitIfEmpty?: boolean;
800
798
  /** (optional) sets and shows the the error message value */
801
799
  errorMessage?: string;
802
- /** (optional) sets and shows the the warning message value */
800
+ /** (optional) sets and shows the warning message value */
803
801
  warningMessage?: string;
804
802
  /** (optional) sets and shows the the info message value */
805
803
  infoMessage?: string;
@@ -1662,7 +1660,7 @@ declare function useRequestParameter(paramName: string): {
1662
1660
  declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
1663
1661
 
1664
1662
  /** Converts dynamic inputs into VariablesProvider-format variables */
1665
- declare function useDynamicInputsAsVariables(dynamicInputs: MinimalDynamicInputs): Record<string, MeshDataVariableDefinition>;
1663
+ declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
1666
1664
 
1667
1665
  /**
1668
1666
  * Provides convenient access to the current Uniform Mesh SDK instance via React hook.
@@ -1679,4 +1677,23 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
1679
1677
  */
1680
1678
  declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
1681
1679
 
1682
- 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 };
1680
+ type ContentDataResourceLocaleInfoResult = {
1681
+ effectiveLocale: string;
1682
+ boundLocale: string | undefined;
1683
+ };
1684
+ type ContentDataResourceLocaleInfoProps = {
1685
+ /** Current stored locale in mesh data type/resource.
1686
+ * It can be one of tree types:
1687
+ * - undefined - no locale stored in mesh data type/resource yet or it is not localized
1688
+ * - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
1689
+ * - variable reference - locale stored in mesh data type/resource as a variable reference (e.g. '${locale}')
1690
+ */
1691
+ locale: string | undefined;
1692
+ /** Map of dynamic inputs for current composition. Should be passed down from DataResource metadata */
1693
+ dynamicInputs: DynamicInputs;
1694
+ /** For platform internal use only. on locale change within Data Resource editor form we should change locale for whole composition */
1695
+ _setLocale?: (locale: string) => void;
1696
+ };
1697
+ declare function useContentDataResourceLocaleInfo({ locale, _setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
1698
+
1699
+ 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 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 };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { TDate } from 'timeago.js';
5
5
  import * as _emotion_react from '@emotion/react';
6
6
  import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
7
7
  import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
8
- import { DynamicInput, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DynamicInputs, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
8
+ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
9
9
  export * from '@uniformdev/mesh-sdk';
10
10
  import { DataVariableDefinition, DataResourceVariables, DataType } from '@uniformdev/canvas';
11
11
  import { Emitter } from 'mitt';
@@ -385,11 +385,9 @@ declare const damSelectedItemMediaContainer: _emotion_react.SerializedStyles;
385
385
  declare const damSelectedItemInfoBtn: _emotion_react.SerializedStyles;
386
386
  declare const damSelectItemImage: _emotion_react.SerializedStyles;
387
387
 
388
- type MinimalDynamicInput = Omit<DynamicInput, 'source'>;
389
- type MinimalDynamicInputs = Record<string, MinimalDynamicInput>;
390
388
  type DataResourceDynamicInputProviderProps = {
391
389
  /** Explicitly provide dynamic input values. If not set, Mesh location will be used */
392
- dynamicInputs?: MinimalDynamicInputs;
390
+ dynamicInputs?: DynamicInputs;
393
391
  /** Child components of the provider. Variables-using components, such as InputVariables, can be used here. */
394
392
  children: ReactNode;
395
393
  };
@@ -799,7 +797,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
799
797
  addOmitIfEmpty?: boolean;
800
798
  /** (optional) sets and shows the the error message value */
801
799
  errorMessage?: string;
802
- /** (optional) sets and shows the the warning message value */
800
+ /** (optional) sets and shows the warning message value */
803
801
  warningMessage?: string;
804
802
  /** (optional) sets and shows the the info message value */
805
803
  infoMessage?: string;
@@ -1662,7 +1660,7 @@ declare function useRequestParameter(paramName: string): {
1662
1660
  declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
1663
1661
 
1664
1662
  /** Converts dynamic inputs into VariablesProvider-format variables */
1665
- declare function useDynamicInputsAsVariables(dynamicInputs: MinimalDynamicInputs): Record<string, MeshDataVariableDefinition>;
1663
+ declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
1666
1664
 
1667
1665
  /**
1668
1666
  * Provides convenient access to the current Uniform Mesh SDK instance via React hook.
@@ -1679,4 +1677,23 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
1679
1677
  */
1680
1678
  declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
1681
1679
 
1682
- 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 };
1680
+ type ContentDataResourceLocaleInfoResult = {
1681
+ effectiveLocale: string;
1682
+ boundLocale: string | undefined;
1683
+ };
1684
+ type ContentDataResourceLocaleInfoProps = {
1685
+ /** Current stored locale in mesh data type/resource.
1686
+ * It can be one of tree types:
1687
+ * - undefined - no locale stored in mesh data type/resource yet or it is not localized
1688
+ * - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
1689
+ * - variable reference - locale stored in mesh data type/resource as a variable reference (e.g. '${locale}')
1690
+ */
1691
+ locale: string | undefined;
1692
+ /** Map of dynamic inputs for current composition. Should be passed down from DataResource metadata */
1693
+ dynamicInputs: DynamicInputs;
1694
+ /** For platform internal use only. on locale change within Data Resource editor form we should change locale for whole composition */
1695
+ _setLocale?: (locale: string) => void;
1696
+ };
1697
+ declare function useContentDataResourceLocaleInfo({ locale, _setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
1698
+
1699
+ 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 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 };
package/dist/index.esm.js CHANGED
@@ -4789,7 +4789,7 @@ var input2 = css23`
4789
4789
  appearance: none;
4790
4790
  box-sizing: border-box;
4791
4791
  background: var(--white);
4792
- border: 1px solid var(--white);
4792
+ border: 1px solid var(--gray-200);
4793
4793
  border-radius: var(--rounded-sm);
4794
4794
  color: var(--gray-700);
4795
4795
  font-size: var(--fs-sm);
@@ -4810,10 +4810,13 @@ var input2 = css23`
4810
4810
  &:focus,
4811
4811
  &:focus-within {
4812
4812
  border-radius: var(--rounded-md);
4813
- box-shadow: none;
4814
- border: 1px solid var(--gray-300);
4813
+ box-shadow: var(--elevation-100);
4814
+ border: 1px solid var(--accent-dark-active);
4815
4815
  outline: none;
4816
4816
  }
4817
+ &:hover {
4818
+ border: 1px solid var(--accent-dark-hover);
4819
+ }
4817
4820
 
4818
4821
  &:disabled,
4819
4822
  &:disabled::placeholder,
@@ -7132,6 +7135,28 @@ function createLocationValidator(setValue, validate) {
7132
7135
  });
7133
7136
  }
7134
7137
 
7138
+ // src/utils/useContentDataResourceLocaleInfo.ts
7139
+ import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
7140
+ import { useEffect as useEffect18, useRef as useRef16 } from "react";
7141
+ function useContentDataResourceLocaleInfo({
7142
+ locale,
7143
+ _setLocale,
7144
+ dynamicInputs
7145
+ }) {
7146
+ var _a;
7147
+ const setLocaleRef = useRef16(_setLocale);
7148
+ setLocaleRef.current = _setLocale;
7149
+ const { flatVariables } = useVariables();
7150
+ const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : "";
7151
+ const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7152
+ useEffect18(() => {
7153
+ if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7154
+ setLocaleRef.current(createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2));
7155
+ }
7156
+ }, [locale, effectiveLocale]);
7157
+ return { effectiveLocale, boundLocale: boundLocale ? boundLocale : void 0 };
7158
+ }
7159
+
7135
7160
  // src/index.ts
7136
7161
  import {
7137
7162
  AddListButton as AddListButton2,
@@ -7335,6 +7360,7 @@ export {
7335
7360
  urlEncodeRequestParameter,
7336
7361
  urlEncodeRequestUrl,
7337
7362
  useConnectedDataAsVariables,
7363
+ useContentDataResourceLocaleInfo,
7338
7364
  useDynamicInputsAsVariables,
7339
7365
  useMeshLocation,
7340
7366
  useObjectSearchContext,
package/dist/index.js CHANGED
@@ -195,6 +195,7 @@ __export(src_exports, {
195
195
  urlEncodeRequestParameter: () => urlEncodeRequestParameter,
196
196
  urlEncodeRequestUrl: () => urlEncodeRequestUrl,
197
197
  useConnectedDataAsVariables: () => useConnectedDataAsVariables,
198
+ useContentDataResourceLocaleInfo: () => useContentDataResourceLocaleInfo,
198
199
  useDynamicInputsAsVariables: () => useDynamicInputsAsVariables,
199
200
  useMeshLocation: () => useMeshLocation,
200
201
  useObjectSearchContext: () => useObjectSearchContext,
@@ -4955,7 +4956,7 @@ var input2 = import_react50.css`
4955
4956
  appearance: none;
4956
4957
  box-sizing: border-box;
4957
4958
  background: var(--white);
4958
- border: 1px solid var(--white);
4959
+ border: 1px solid var(--gray-200);
4959
4960
  border-radius: var(--rounded-sm);
4960
4961
  color: var(--gray-700);
4961
4962
  font-size: var(--fs-sm);
@@ -4976,10 +4977,13 @@ var input2 = import_react50.css`
4976
4977
  &:focus,
4977
4978
  &:focus-within {
4978
4979
  border-radius: var(--rounded-md);
4979
- box-shadow: none;
4980
- border: 1px solid var(--gray-300);
4980
+ box-shadow: var(--elevation-100);
4981
+ border: 1px solid var(--accent-dark-active);
4981
4982
  outline: none;
4982
4983
  }
4984
+ &:hover {
4985
+ border: 1px solid var(--accent-dark-hover);
4986
+ }
4983
4987
 
4984
4988
  &:disabled,
4985
4989
  &:disabled::placeholder,
@@ -7263,6 +7267,28 @@ function createLocationValidator(setValue, validate) {
7263
7267
  });
7264
7268
  }
7265
7269
 
7270
+ // src/utils/useContentDataResourceLocaleInfo.ts
7271
+ var import_canvas10 = require("@uniformdev/canvas");
7272
+ var import_react74 = require("react");
7273
+ function useContentDataResourceLocaleInfo({
7274
+ locale,
7275
+ _setLocale,
7276
+ dynamicInputs
7277
+ }) {
7278
+ var _a;
7279
+ const setLocaleRef = (0, import_react74.useRef)(_setLocale);
7280
+ setLocaleRef.current = _setLocale;
7281
+ const { flatVariables } = useVariables();
7282
+ const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas10.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME) : "";
7283
+ const boundLocale = (_a = (0, import_canvas10.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7284
+ (0, import_react74.useEffect)(() => {
7285
+ if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7286
+ setLocaleRef.current((0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME));
7287
+ }
7288
+ }, [locale, effectiveLocale]);
7289
+ return { effectiveLocale, boundLocale: boundLocale ? boundLocale : void 0 };
7290
+ }
7291
+
7266
7292
  // src/index.ts
7267
7293
  var import_design_system41 = require("@uniformdev/design-system");
7268
7294
  __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
@@ -7432,6 +7458,7 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
7432
7458
  urlEncodeRequestParameter,
7433
7459
  urlEncodeRequestUrl,
7434
7460
  useConnectedDataAsVariables,
7461
+ useContentDataResourceLocaleInfo,
7435
7462
  useDynamicInputsAsVariables,
7436
7463
  useMeshLocation,
7437
7464
  useObjectSearchContext,
package/dist/index.mjs CHANGED
@@ -4789,7 +4789,7 @@ var input2 = css23`
4789
4789
  appearance: none;
4790
4790
  box-sizing: border-box;
4791
4791
  background: var(--white);
4792
- border: 1px solid var(--white);
4792
+ border: 1px solid var(--gray-200);
4793
4793
  border-radius: var(--rounded-sm);
4794
4794
  color: var(--gray-700);
4795
4795
  font-size: var(--fs-sm);
@@ -4810,10 +4810,13 @@ var input2 = css23`
4810
4810
  &:focus,
4811
4811
  &:focus-within {
4812
4812
  border-radius: var(--rounded-md);
4813
- box-shadow: none;
4814
- border: 1px solid var(--gray-300);
4813
+ box-shadow: var(--elevation-100);
4814
+ border: 1px solid var(--accent-dark-active);
4815
4815
  outline: none;
4816
4816
  }
4817
+ &:hover {
4818
+ border: 1px solid var(--accent-dark-hover);
4819
+ }
4817
4820
 
4818
4821
  &:disabled,
4819
4822
  &:disabled::placeholder,
@@ -7132,6 +7135,28 @@ function createLocationValidator(setValue, validate) {
7132
7135
  });
7133
7136
  }
7134
7137
 
7138
+ // src/utils/useContentDataResourceLocaleInfo.ts
7139
+ import { bindVariables as bindVariables2, createVariableReference as createVariableReference4, LOCALE_DYNAMIC_INPUT_NAME as LOCALE_DYNAMIC_INPUT_NAME2 } from "@uniformdev/canvas";
7140
+ import { useEffect as useEffect18, useRef as useRef16 } from "react";
7141
+ function useContentDataResourceLocaleInfo({
7142
+ locale,
7143
+ _setLocale,
7144
+ dynamicInputs
7145
+ }) {
7146
+ var _a;
7147
+ const setLocaleRef = useRef16(_setLocale);
7148
+ setLocaleRef.current = _setLocale;
7149
+ const { flatVariables } = useVariables();
7150
+ const effectiveLocale = locale != null ? locale : dynamicInputs[LOCALE_DYNAMIC_INPUT_NAME2] ? createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2) : "";
7151
+ const boundLocale = (_a = bindVariables2({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
7152
+ useEffect18(() => {
7153
+ if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
7154
+ setLocaleRef.current(createVariableReference4(LOCALE_DYNAMIC_INPUT_NAME2));
7155
+ }
7156
+ }, [locale, effectiveLocale]);
7157
+ return { effectiveLocale, boundLocale: boundLocale ? boundLocale : void 0 };
7158
+ }
7159
+
7135
7160
  // src/index.ts
7136
7161
  import {
7137
7162
  AddListButton as AddListButton2,
@@ -7335,6 +7360,7 @@ export {
7335
7360
  urlEncodeRequestParameter,
7336
7361
  urlEncodeRequestUrl,
7337
7362
  useConnectedDataAsVariables,
7363
+ useContentDataResourceLocaleInfo,
7338
7364
  useDynamicInputsAsVariables,
7339
7365
  useMeshLocation,
7340
7366
  useObjectSearchContext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.92.3",
3
+ "version": "19.93.1-alpha.40+6fc526bf8b",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,9 +50,9 @@
50
50
  "@lexical/selection": "^0.12.0",
51
51
  "@lexical/utils": "^0.12.0",
52
52
  "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v4.10.1/react-icons-all-files-4.10.1.tgz",
53
- "@uniformdev/canvas": "19.92.3",
54
- "@uniformdev/design-system": "19.92.3",
55
- "@uniformdev/mesh-sdk": "19.92.3",
53
+ "@uniformdev/canvas": "19.93.1-alpha.40+6fc526bf8b",
54
+ "@uniformdev/design-system": "19.93.1-alpha.40+6fc526bf8b",
55
+ "@uniformdev/mesh-sdk": "19.93.1-alpha.40+6fc526bf8b",
56
56
  "dequal": "^2.0.3",
57
57
  "lexical": "^0.12.0",
58
58
  "mitt": "^3.0.0",
@@ -74,7 +74,7 @@
74
74
  "@storybook/react": "6.5.16",
75
75
  "@svgr/cli": "6.5.1",
76
76
  "@types/react": "18.2.40",
77
- "@types/react-beautiful-dnd": "13.1.7",
77
+ "@types/react-beautiful-dnd": "13.1.8",
78
78
  "@types/react-dom": "18.2.17",
79
79
  "@types/uuid": "9.0.4",
80
80
  "react": "18.2.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "7eeadbc2ffc4a2808ddbe8ef9258ae46504cec91"
89
+ "gitHead": "6fc526bf8be2c940317c2876080ee9072608356b"
90
90
  }