@uniformdev/mesh-sdk-react 20.50.2-alpha.2 → 20.50.2-alpha.77

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
@@ -2,7 +2,7 @@ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
4
4
  import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
5
- import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
5
+ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, UniformMeshSDK, BindableTypes } from '@uniformdev/mesh-sdk';
6
6
  export * from '@uniformdev/mesh-sdk';
7
7
  import { DataVariableDefinition, DataResourceVariables, DataType, DataSourceVariantsKeys } from '@uniformdev/canvas';
8
8
  import { Emitter } from 'mitt';
@@ -892,6 +892,100 @@ type DataTypeEditorProps = PropsWithChildren<{
892
892
  */
893
893
  declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_jsx_runtime.JSX.Element;
894
894
 
895
+ /**
896
+ * Status of the delegation session as seen from the React provider.
897
+ *
898
+ * @deprecated This beta identity delegation API may change with breaking changes.
899
+ */
900
+ type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
901
+ /**
902
+ * Value provided by DelegationProvider via React context.
903
+ *
904
+ * @deprecated This beta identity delegation API may change with breaking changes.
905
+ */
906
+ interface DelegationContextValue {
907
+ status: DelegationStatus;
908
+ error: Error | null;
909
+ reacquire: () => void;
910
+ }
911
+ /** @deprecated This beta identity delegation API may change with breaking changes. */
912
+ declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
913
+
914
+ /**
915
+ * @deprecated This beta identity delegation API may change with breaking changes.
916
+ */
917
+ interface DelegationGateProps {
918
+ children: React__default.ReactNode;
919
+ /** Shown while delegation is starting. Omit to use the default loading UI. */
920
+ loadingComponent?: React__default.ReactNode;
921
+ /** Shown when identity delegation is not enabled for this integration. Omit to use the default callout. */
922
+ disabledComponent?: React__default.ReactNode;
923
+ /** Shown when delegation fails. Omit to use the default error callout. */
924
+ errorComponent?: React__default.ReactNode | ((props: {
925
+ error: Error;
926
+ }) => React__default.ReactNode);
927
+ }
928
+ /**
929
+ * Renders children only when the delegation session is active.
930
+ * Shows appropriate fallback UI for loading, disabled, and error states.
931
+ *
932
+ * Sensible defaults use the design system (loading overlay, callouts). Pass `loadingComponent`,
933
+ * `disabledComponent`, or `errorComponent` to customize; pass `null` to render nothing for that state.
934
+ *
935
+ * @deprecated This beta identity delegation API may change with breaking changes.
936
+ */
937
+ declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
938
+
939
+ /**
940
+ * @deprecated This beta identity delegation API may change with breaking changes.
941
+ */
942
+ interface DelegationProviderProps {
943
+ /** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
944
+ sdk: UniformMeshSDK;
945
+ /**
946
+ * Called with the session token to exchange it for a delegation token on your backend.
947
+ * Resolve on success, throw on failure.
948
+ */
949
+ onSessionToken: (sessionToken: string) => Promise<void>;
950
+ /**
951
+ * Called to check if a delegation session is already active (e.g. a valid cookie exists).
952
+ * Return `true` to skip the session-token exchange.
953
+ */
954
+ checkActive: () => Promise<boolean>;
955
+ /**
956
+ * When `true`, re-checks the delegation session after the tab becomes visible again
957
+ * following a period of being hidden. If the server reports the session is no longer
958
+ * active (e.g. the access token expired and the refresh token is gone/invalid), the
959
+ * full session-token exchange is re-run; otherwise the check is silent and does not
960
+ * flip the status back to `acquiring`.
961
+ *
962
+ * Defaults to `true`.
963
+ */
964
+ revalidateOnFocus?: boolean;
965
+ /**
966
+ * Minimum number of milliseconds the tab must have been hidden before a
967
+ * `revalidateOnFocus` check runs. Prevents hammering the server on rapid tab
968
+ * switches. Defaults to 5 minutes.
969
+ */
970
+ revalidateAfterMs?: number;
971
+ children: React__default.ReactNode;
972
+ }
973
+ /**
974
+ * Manages the identity delegation lifecycle: checks for an existing session, acquires a
975
+ * session token from the dashboard parent if needed, and delegates exchange to the caller.
976
+ *
977
+ * Should ONLY be used to wrap locations which actually needed delegation and not the entire app like <MeshApp />.
978
+ *
979
+ * Also handles stale-session recovery: when the tab becomes visible again after being
980
+ * hidden for longer than `revalidateAfterMs`, the provider silently re-checks via
981
+ * `checkActive` and re-runs the session exchange only if the server says the session is
982
+ * no longer active. This covers the "returned after a long time" case where the stored
983
+ * access token has expired and the refresh token is also gone or no longer valid.
984
+ *
985
+ * @deprecated This beta identity delegation API may change with breaking changes.
986
+ */
987
+ declare function DelegationProvider({ sdk, onSessionToken, checkActive, revalidateOnFocus, revalidateAfterMs, children, }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
988
+
895
989
  type MeshAppProps = {
896
990
  loadingComponent?: React__default.ComponentType;
897
991
  errorComponent?: React__default.ComponentType<{
@@ -1555,7 +1649,7 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
1555
1649
  };
1556
1650
 
1557
1651
  /** a list of possible operator values that sync with uniform search api */
1558
- type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts' | 'checked' | 'nchecked';
1652
+ type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'all' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts' | 'checked' | 'nchecked';
1559
1653
  type OperatorValueType = {
1560
1654
  value: OperatorValue;
1561
1655
  };
@@ -1742,6 +1836,8 @@ type SearchAndFilterProviderProps = {
1742
1836
  onResetFilterValues?: () => void;
1743
1837
  /** the total number of results */
1744
1838
  totalResults?: number;
1839
+ /** whether data is currently loading */
1840
+ isLoading?: boolean;
1745
1841
  /** the filter mapper function */
1746
1842
  filterMapper?: FilterMapper;
1747
1843
  /** sets child components giving access to useSearchAndFilter context */
@@ -1776,6 +1872,8 @@ type SearchAndFilterContextProps = {
1776
1872
  filterMapper?: FilterMapper;
1777
1873
  /** the total number of results */
1778
1874
  totalResults?: number;
1875
+ /** whether data is currently loading */
1876
+ isLoading?: boolean;
1779
1877
  /** Allow to bind dynamic inputs to the search term */
1780
1878
  allowBindingSearchTerm?: boolean;
1781
1879
  };
@@ -1784,7 +1882,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
1784
1882
  * Search and filter provider
1785
1883
  * @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
1786
1884
  * */
1787
- declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
1885
+ declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, isLoading, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
1788
1886
  /** Search and filter hook
1789
1887
  * @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
1790
1888
  */
@@ -1815,6 +1913,8 @@ declare const useSearchAndFilter: () => {
1815
1913
  filterMapper?: FilterMapper;
1816
1914
  /** the total number of results */
1817
1915
  totalResults?: number;
1916
+ /** whether data is currently loading */
1917
+ isLoading?: boolean;
1818
1918
  /** Allow to bind dynamic inputs to the search term */
1819
1919
  allowBindingSearchTerm?: boolean;
1820
1920
  };
@@ -1830,6 +1930,8 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
1830
1930
  viewSwitchControls?: React$1.ReactNode;
1831
1931
  /** The number of total results */
1832
1932
  totalResults?: number;
1933
+ /** Whether data is currently loading */
1934
+ isLoading?: boolean;
1833
1935
  /** The results container view
1834
1936
  * @default '<SearchAndFilterResultContainer />'
1835
1937
  */
@@ -1847,7 +1949,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
1847
1949
  * Search and filter component
1848
1950
  * @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
1849
1951
  * */
1850
- declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, allowBindingSearchTerm, resetFilterValues, onResetFilterValues, }: SearchAndFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
1952
+ declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, isLoading, allowBindingSearchTerm, resetFilterValues, onResetFilterValues, }: SearchAndFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
1851
1953
 
1852
1954
  type FilterItemsProps = {
1853
1955
  /** The text for the add button */
@@ -1957,6 +2059,14 @@ declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue,
1957
2059
  /** Converts connected data map into VariablesProvider-format variables */
1958
2060
  declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
1959
2061
 
2062
+ /**
2063
+ * Returns the current delegation session state.
2064
+ * Must be used within a `DelegationProvider`.
2065
+ *
2066
+ * @deprecated This beta identity delegation API may change with breaking changes.
2067
+ */
2068
+ declare function useDelegation(): DelegationContextValue;
2069
+
1960
2070
  /** Converts dynamic inputs into VariablesProvider-format variables */
1961
2071
  declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
1962
2072
 
@@ -2007,4 +2117,4 @@ type ContentDataResourceLocaleInfoProps = {
2007
2117
  };
2008
2118
  declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
2009
2119
 
2010
- export { $createVariableNode, $isVariableNode, type BadgeThemeProps, type BaseRequestData, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DATE_TIME_OPERATORS, DISCONNECT_VARIABLE_COMMAND, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, type FilterItemProps, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterOptionGroup, type FilterOptionLeftHandComponentProps, FilterSingleChoiceEditor, type FiltersProps, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, type InputOptionGroup, type InputOptionValue, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MULTI_SELECT_OPERATORS, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, OPTIONAL_SYSTEM_FIELD_OPERATORS, 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, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, type RequestActionContext, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, SELECT_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, SortItems, type SortItemsProps, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextMultiChoiceEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableChip, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, filterMapper, prettifyBindExpression, readOnlyAttributes, serializeVariablesEditorSerializedState, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
2120
+ export { $createVariableNode, $isVariableNode, type BadgeThemeProps, type BaseRequestData, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DATE_TIME_OPERATORS, DISCONNECT_VARIABLE_COMMAND, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, DelegationContext, type DelegationContextValue, DelegationGate, type DelegationGateProps, DelegationProvider, type DelegationProviderProps, type DelegationStatus, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, type FilterItemProps, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterOptionGroup, type FilterOptionLeftHandComponentProps, FilterSingleChoiceEditor, type FiltersProps, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, type InputOptionGroup, type InputOptionValue, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MULTI_SELECT_OPERATORS, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, OPTIONAL_SYSTEM_FIELD_OPERATORS, 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, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, type RequestActionContext, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, SELECT_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, SortItems, type SortItemsProps, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextMultiChoiceEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableChip, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, filterMapper, prettifyBindExpression, readOnlyAttributes, serializeVariablesEditorSerializedState, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDelegation, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
4
4
  import * as _uniformdev_mesh_sdk from '@uniformdev/mesh-sdk';
5
- import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, BindableTypes } from '@uniformdev/mesh-sdk';
5
+ import { DynamicInputs, MeshLocation, SetValueOptions, EditConnectedDataResponseCancellationContext, DataSourceLocationValue, DataTypeLocationValue, UniformMeshSDK, BindableTypes } from '@uniformdev/mesh-sdk';
6
6
  export * from '@uniformdev/mesh-sdk';
7
7
  import { DataVariableDefinition, DataResourceVariables, DataType, DataSourceVariantsKeys } from '@uniformdev/canvas';
8
8
  import { Emitter } from 'mitt';
@@ -892,6 +892,100 @@ type DataTypeEditorProps = PropsWithChildren<{
892
892
  */
893
893
  declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_jsx_runtime.JSX.Element;
894
894
 
895
+ /**
896
+ * Status of the delegation session as seen from the React provider.
897
+ *
898
+ * @deprecated This beta identity delegation API may change with breaking changes.
899
+ */
900
+ type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
901
+ /**
902
+ * Value provided by DelegationProvider via React context.
903
+ *
904
+ * @deprecated This beta identity delegation API may change with breaking changes.
905
+ */
906
+ interface DelegationContextValue {
907
+ status: DelegationStatus;
908
+ error: Error | null;
909
+ reacquire: () => void;
910
+ }
911
+ /** @deprecated This beta identity delegation API may change with breaking changes. */
912
+ declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
913
+
914
+ /**
915
+ * @deprecated This beta identity delegation API may change with breaking changes.
916
+ */
917
+ interface DelegationGateProps {
918
+ children: React__default.ReactNode;
919
+ /** Shown while delegation is starting. Omit to use the default loading UI. */
920
+ loadingComponent?: React__default.ReactNode;
921
+ /** Shown when identity delegation is not enabled for this integration. Omit to use the default callout. */
922
+ disabledComponent?: React__default.ReactNode;
923
+ /** Shown when delegation fails. Omit to use the default error callout. */
924
+ errorComponent?: React__default.ReactNode | ((props: {
925
+ error: Error;
926
+ }) => React__default.ReactNode);
927
+ }
928
+ /**
929
+ * Renders children only when the delegation session is active.
930
+ * Shows appropriate fallback UI for loading, disabled, and error states.
931
+ *
932
+ * Sensible defaults use the design system (loading overlay, callouts). Pass `loadingComponent`,
933
+ * `disabledComponent`, or `errorComponent` to customize; pass `null` to render nothing for that state.
934
+ *
935
+ * @deprecated This beta identity delegation API may change with breaking changes.
936
+ */
937
+ declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
938
+
939
+ /**
940
+ * @deprecated This beta identity delegation API may change with breaking changes.
941
+ */
942
+ interface DelegationProviderProps {
943
+ /** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
944
+ sdk: UniformMeshSDK;
945
+ /**
946
+ * Called with the session token to exchange it for a delegation token on your backend.
947
+ * Resolve on success, throw on failure.
948
+ */
949
+ onSessionToken: (sessionToken: string) => Promise<void>;
950
+ /**
951
+ * Called to check if a delegation session is already active (e.g. a valid cookie exists).
952
+ * Return `true` to skip the session-token exchange.
953
+ */
954
+ checkActive: () => Promise<boolean>;
955
+ /**
956
+ * When `true`, re-checks the delegation session after the tab becomes visible again
957
+ * following a period of being hidden. If the server reports the session is no longer
958
+ * active (e.g. the access token expired and the refresh token is gone/invalid), the
959
+ * full session-token exchange is re-run; otherwise the check is silent and does not
960
+ * flip the status back to `acquiring`.
961
+ *
962
+ * Defaults to `true`.
963
+ */
964
+ revalidateOnFocus?: boolean;
965
+ /**
966
+ * Minimum number of milliseconds the tab must have been hidden before a
967
+ * `revalidateOnFocus` check runs. Prevents hammering the server on rapid tab
968
+ * switches. Defaults to 5 minutes.
969
+ */
970
+ revalidateAfterMs?: number;
971
+ children: React__default.ReactNode;
972
+ }
973
+ /**
974
+ * Manages the identity delegation lifecycle: checks for an existing session, acquires a
975
+ * session token from the dashboard parent if needed, and delegates exchange to the caller.
976
+ *
977
+ * Should ONLY be used to wrap locations which actually needed delegation and not the entire app like <MeshApp />.
978
+ *
979
+ * Also handles stale-session recovery: when the tab becomes visible again after being
980
+ * hidden for longer than `revalidateAfterMs`, the provider silently re-checks via
981
+ * `checkActive` and re-runs the session exchange only if the server says the session is
982
+ * no longer active. This covers the "returned after a long time" case where the stored
983
+ * access token has expired and the refresh token is also gone or no longer valid.
984
+ *
985
+ * @deprecated This beta identity delegation API may change with breaking changes.
986
+ */
987
+ declare function DelegationProvider({ sdk, onSessionToken, checkActive, revalidateOnFocus, revalidateAfterMs, children, }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
988
+
895
989
  type MeshAppProps = {
896
990
  loadingComponent?: React__default.ComponentType;
897
991
  errorComponent?: React__default.ComponentType<{
@@ -1555,7 +1649,7 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
1555
1649
  };
1556
1650
 
1557
1651
  /** a list of possible operator values that sync with uniform search api */
1558
- type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts' | 'checked' | 'nchecked';
1652
+ type OperatorValue = 'eq' | 'sys-date-eq' | 'neq' | 'gt' | 'sys-date-gt' | 'gte' | 'sys-date-gte' | 'lt' | 'sys-date-lt' | 'lte' | 'sys-date-lte' | 'in' | 'nin' | 'all' | 'between' | 'sys-date-between' | 'ndef' | 'def' | 'match' | 'starts' | 'checked' | 'nchecked';
1559
1653
  type OperatorValueType = {
1560
1654
  value: OperatorValue;
1561
1655
  };
@@ -1742,6 +1836,8 @@ type SearchAndFilterProviderProps = {
1742
1836
  onResetFilterValues?: () => void;
1743
1837
  /** the total number of results */
1744
1838
  totalResults?: number;
1839
+ /** whether data is currently loading */
1840
+ isLoading?: boolean;
1745
1841
  /** the filter mapper function */
1746
1842
  filterMapper?: FilterMapper;
1747
1843
  /** sets child components giving access to useSearchAndFilter context */
@@ -1776,6 +1872,8 @@ type SearchAndFilterContextProps = {
1776
1872
  filterMapper?: FilterMapper;
1777
1873
  /** the total number of results */
1778
1874
  totalResults?: number;
1875
+ /** whether data is currently loading */
1876
+ isLoading?: boolean;
1779
1877
  /** Allow to bind dynamic inputs to the search term */
1780
1878
  allowBindingSearchTerm?: boolean;
1781
1879
  };
@@ -1784,7 +1882,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
1784
1882
  * Search and filter provider
1785
1883
  * @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
1786
1884
  * */
1787
- declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
1885
+ declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, isLoading, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
1788
1886
  /** Search and filter hook
1789
1887
  * @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
1790
1888
  */
@@ -1815,6 +1913,8 @@ declare const useSearchAndFilter: () => {
1815
1913
  filterMapper?: FilterMapper;
1816
1914
  /** the total number of results */
1817
1915
  totalResults?: number;
1916
+ /** whether data is currently loading */
1917
+ isLoading?: boolean;
1818
1918
  /** Allow to bind dynamic inputs to the search term */
1819
1919
  allowBindingSearchTerm?: boolean;
1820
1920
  };
@@ -1830,6 +1930,8 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
1830
1930
  viewSwitchControls?: React$1.ReactNode;
1831
1931
  /** The number of total results */
1832
1932
  totalResults?: number;
1933
+ /** Whether data is currently loading */
1934
+ isLoading?: boolean;
1833
1935
  /** The results container view
1834
1936
  * @default '<SearchAndFilterResultContainer />'
1835
1937
  */
@@ -1847,7 +1949,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
1847
1949
  * Search and filter component
1848
1950
  * @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
1849
1951
  * */
1850
- declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, allowBindingSearchTerm, resetFilterValues, onResetFilterValues, }: SearchAndFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
1952
+ declare const SearchAndFilter: ({ filters, filterOptions, filterVisible, filterControls, viewSwitchControls, resultsContainerView, filterMapper, additionalFiltersContainer, onChange, defaultSearchTerm, onSearchChange, totalResults, isLoading, allowBindingSearchTerm, resetFilterValues, onResetFilterValues, }: SearchAndFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
1851
1953
 
1852
1954
  type FilterItemsProps = {
1853
1955
  /** The text for the add button */
@@ -1957,6 +2059,14 @@ declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue,
1957
2059
  /** Converts connected data map into VariablesProvider-format variables */
1958
2060
  declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
1959
2061
 
2062
+ /**
2063
+ * Returns the current delegation session state.
2064
+ * Must be used within a `DelegationProvider`.
2065
+ *
2066
+ * @deprecated This beta identity delegation API may change with breaking changes.
2067
+ */
2068
+ declare function useDelegation(): DelegationContextValue;
2069
+
1960
2070
  /** Converts dynamic inputs into VariablesProvider-format variables */
1961
2071
  declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
1962
2072
 
@@ -2007,4 +2117,4 @@ type ContentDataResourceLocaleInfoProps = {
2007
2117
  };
2008
2118
  declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
2009
2119
 
2010
- export { $createVariableNode, $isVariableNode, type BadgeThemeProps, type BaseRequestData, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DATE_TIME_OPERATORS, DISCONNECT_VARIABLE_COMMAND, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, type FilterItemProps, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterOptionGroup, type FilterOptionLeftHandComponentProps, FilterSingleChoiceEditor, type FiltersProps, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, type InputOptionGroup, type InputOptionValue, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MULTI_SELECT_OPERATORS, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, OPTIONAL_SYSTEM_FIELD_OPERATORS, 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, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, type RequestActionContext, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, SELECT_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, SortItems, type SortItemsProps, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextMultiChoiceEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableChip, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, filterMapper, prettifyBindExpression, readOnlyAttributes, serializeVariablesEditorSerializedState, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
2120
+ export { $createVariableNode, $isVariableNode, type BadgeThemeProps, type BaseRequestData, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, DATE_OPERATORS, DATE_TIME_OPERATORS, DISCONNECT_VARIABLE_COMMAND, DataRefreshButton, type DataRefreshButtonProps, DataResourceDynamicInputProvider, type DataResourceDynamicInputProviderProps, type DataResourceVariableRendererProps, DataResourceVariablesList, DataResourceVariablesListExplicit, type DataResourceVariablesListProps, DataSourceEditor, type DataSourceEditorProps, DataTypeEditor, type DataTypeEditorProps, type DataVariableDefinitionWithName, DateEditor, DateRangeEditor, DelegationContext, type DelegationContextValue, DelegationGate, type DelegationGateProps, DelegationProvider, type DelegationProviderProps, type DelegationStatus, type DisconnectVariableCommandArguments, type DispatchResult, EDIT_VARIABLE_COMMAND, type EditVariableCommandArguments, type Filter, FilterButton, type FilterButtonProps, FilterControls, type FilterEditor, FilterEditorRenderer, type FilterEditorRendererProps, FilterItem, type FilterItemProps, FilterItems, type FilterItemsProps, type FilterMapper, FilterMenu, FilterMultiChoiceEditor, type FilterOption, type FilterOptionGroup, type FilterOptionLeftHandComponentProps, FilterSingleChoiceEditor, type FiltersProps, INSERT_VARIABLE_COMMAND, index as Icons, type InputOption, type InputOptionGroup, type InputOptionValue, InputVariables, type InputVariablesProps, type InsertVariableCommandArguments, type ItemListProps, type KnownUndefinedVariableInfo, type KnownUndefinedVariableInfoWithName, LinkButton, MULTI_SELECT_OPERATORS, MeshApp, type MeshAppProps, type MeshDataVariableDefinition, NUMBER_OPERATORS, NumberEditor, NumberRangeEditor, OPEN_INSERT_VARIABLE_COMMAND, OPTIONAL_SYSTEM_FIELD_OPERATORS, 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, type Operator, type OperatorType, type OperatorValue, type OperatorValueType, PUBLISH_STATUS_FIELD_OPERATORS, ParamTypeDynamicDataProvider, type ParamTypeDynamicDataProviderProps, type ParameterConnectOptions, ParameterConnectionIndicator, type ParameterConnectionIndicatorProps, ParameterOrSingleVariable, type ParameterOrSingleVariableProps, ParameterVariables, type ParameterVariablesProps, QueryFilter, type QueryFilterProps, type QueryFilterSearchProps, RICHTEXT_OPERATORS, type RequestAction, type RequestActionContext, RequestBody, type RequestContext, type RequestData, RequestHeaders, RequestMethodSelect, type RequestParameter, RequestParameters, type RequestParametersProps, RequestProvider, type RequestProviderProps, RequestTypeContainer, type RequestTypeContainerProps, RequestUrl, RequestUrlInput, SELECT_OPERATORS, SYSTEM_FIELD_OPERATORS, SearchAndFilter, SearchAndFilterContext, type SearchAndFilterContextProps, SearchAndFilterOptionsContainer, type SearchAndFilterOptionsContainerProps, type SearchAndFilterProps, SearchAndFilterProvider, type SearchAndFilterProviderProps, SearchAndFilterResultContainer, type SearchAndFilterResultContainerProps, SearchOnlyContext, SearchOnlyFilter, type SearchOnlyProviderProps, type SearchQueryProps, type SelectedItemProps, type SerializedVariableNode, type SetLocationValueDispatch, type SetLocationValueFunction, SortItems, type SortItemsProps, StatusMultiEditor, StatusSingleEditor, TEXTBOX_OPERATORS, TextEditor, TextMultiChoiceEditor, TextVariableRenderer, USER_OPERATORS, type UseVariablesMenu, type UseVariablesMenuInput, VariableChip, VariableEditor, type VariableEditorCompleteEvent, type VariableEditorProps, VariableNode, type VariableNodeState, type VariableSourceGroup, type VariablesAction, type VariablesContext, type VariablesEvents, VariablesList, VariablesPlugin, type VariablesPluginProps, VariablesProvider, type VariablesProviderProps, bindableFiltersMapper, convertConnectedDataToVariable, createLocationValidator, filterMapper, prettifyBindExpression, readOnlyAttributes, serializeVariablesEditorSerializedState, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDelegation, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };