@uniformdev/mesh-sdk-react 20.50.2-alpha.1 → 20.50.2-alpha.39
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 +64 -5
- package/dist/index.d.ts +64 -5
- package/dist/index.esm.js +389 -269
- package/dist/index.js +630 -506
- package/dist/index.mjs +389 -269
- package/package.json +6 -6
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,51 @@ type DataTypeEditorProps = PropsWithChildren<{
|
|
|
892
892
|
*/
|
|
893
893
|
declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
894
894
|
|
|
895
|
+
/** Status of the delegation session as seen from the React provider. */
|
|
896
|
+
type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
|
|
897
|
+
/** Value provided by DelegationProvider via React context. */
|
|
898
|
+
interface DelegationContextValue {
|
|
899
|
+
status: DelegationStatus;
|
|
900
|
+
error: Error | null;
|
|
901
|
+
reacquire: () => void;
|
|
902
|
+
}
|
|
903
|
+
declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
|
|
904
|
+
|
|
905
|
+
interface DelegationGateProps {
|
|
906
|
+
children: React__default.ReactNode;
|
|
907
|
+
loadingComponent?: React__default.ReactNode;
|
|
908
|
+
disabledComponent?: React__default.ReactNode;
|
|
909
|
+
errorComponent?: React__default.ReactNode | ((props: {
|
|
910
|
+
error: Error;
|
|
911
|
+
}) => React__default.ReactNode);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Renders children only when the delegation session is active.
|
|
915
|
+
* Shows appropriate fallback UI for loading, disabled, and error states.
|
|
916
|
+
*/
|
|
917
|
+
declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
|
|
918
|
+
|
|
919
|
+
interface DelegationProviderProps {
|
|
920
|
+
/** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
|
|
921
|
+
sdk: UniformMeshSDK;
|
|
922
|
+
/**
|
|
923
|
+
* Called with the session token to exchange it for a delegation token on your backend.
|
|
924
|
+
* Resolve on success, throw on failure.
|
|
925
|
+
*/
|
|
926
|
+
onSessionToken: (sessionToken: string) => Promise<void>;
|
|
927
|
+
/**
|
|
928
|
+
* Called to check if a delegation session is already active (e.g. a valid cookie exists).
|
|
929
|
+
* Return `true` to skip the session-token exchange.
|
|
930
|
+
*/
|
|
931
|
+
checkActive: () => Promise<boolean>;
|
|
932
|
+
children: React__default.ReactNode;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Manages the identity delegation lifecycle: checks for an existing session, acquires a
|
|
936
|
+
* session token from the dashboard parent if needed, and delegates exchange to the caller.
|
|
937
|
+
*/
|
|
938
|
+
declare function DelegationProvider({ sdk, onSessionToken, checkActive, children }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
939
|
+
|
|
895
940
|
type MeshAppProps = {
|
|
896
941
|
loadingComponent?: React__default.ComponentType;
|
|
897
942
|
errorComponent?: React__default.ComponentType<{
|
|
@@ -1555,7 +1600,7 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
|
|
|
1555
1600
|
};
|
|
1556
1601
|
|
|
1557
1602
|
/** 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';
|
|
1603
|
+
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
1604
|
type OperatorValueType = {
|
|
1560
1605
|
value: OperatorValue;
|
|
1561
1606
|
};
|
|
@@ -1742,6 +1787,8 @@ type SearchAndFilterProviderProps = {
|
|
|
1742
1787
|
onResetFilterValues?: () => void;
|
|
1743
1788
|
/** the total number of results */
|
|
1744
1789
|
totalResults?: number;
|
|
1790
|
+
/** whether data is currently loading */
|
|
1791
|
+
isLoading?: boolean;
|
|
1745
1792
|
/** the filter mapper function */
|
|
1746
1793
|
filterMapper?: FilterMapper;
|
|
1747
1794
|
/** sets child components giving access to useSearchAndFilter context */
|
|
@@ -1776,6 +1823,8 @@ type SearchAndFilterContextProps = {
|
|
|
1776
1823
|
filterMapper?: FilterMapper;
|
|
1777
1824
|
/** the total number of results */
|
|
1778
1825
|
totalResults?: number;
|
|
1826
|
+
/** whether data is currently loading */
|
|
1827
|
+
isLoading?: boolean;
|
|
1779
1828
|
/** Allow to bind dynamic inputs to the search term */
|
|
1780
1829
|
allowBindingSearchTerm?: boolean;
|
|
1781
1830
|
};
|
|
@@ -1784,7 +1833,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
|
|
|
1784
1833
|
* Search and filter provider
|
|
1785
1834
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
1786
1835
|
* */
|
|
1787
|
-
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1836
|
+
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
1837
|
/** Search and filter hook
|
|
1789
1838
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
1790
1839
|
*/
|
|
@@ -1815,6 +1864,8 @@ declare const useSearchAndFilter: () => {
|
|
|
1815
1864
|
filterMapper?: FilterMapper;
|
|
1816
1865
|
/** the total number of results */
|
|
1817
1866
|
totalResults?: number;
|
|
1867
|
+
/** whether data is currently loading */
|
|
1868
|
+
isLoading?: boolean;
|
|
1818
1869
|
/** Allow to bind dynamic inputs to the search term */
|
|
1819
1870
|
allowBindingSearchTerm?: boolean;
|
|
1820
1871
|
};
|
|
@@ -1830,6 +1881,8 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1830
1881
|
viewSwitchControls?: React$1.ReactNode;
|
|
1831
1882
|
/** The number of total results */
|
|
1832
1883
|
totalResults?: number;
|
|
1884
|
+
/** Whether data is currently loading */
|
|
1885
|
+
isLoading?: boolean;
|
|
1833
1886
|
/** The results container view
|
|
1834
1887
|
* @default '<SearchAndFilterResultContainer />'
|
|
1835
1888
|
*/
|
|
@@ -1847,7 +1900,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1847
1900
|
* Search and filter component
|
|
1848
1901
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
1849
1902
|
* */
|
|
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;
|
|
1903
|
+
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
1904
|
|
|
1852
1905
|
type FilterItemsProps = {
|
|
1853
1906
|
/** The text for the add button */
|
|
@@ -1957,6 +2010,12 @@ declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue,
|
|
|
1957
2010
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1958
2011
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1959
2012
|
|
|
2013
|
+
/**
|
|
2014
|
+
* Returns the current delegation session state.
|
|
2015
|
+
* Must be used within a `DelegationProvider`.
|
|
2016
|
+
*/
|
|
2017
|
+
declare function useDelegation(): DelegationContextValue;
|
|
2018
|
+
|
|
1960
2019
|
/** Converts dynamic inputs into VariablesProvider-format variables */
|
|
1961
2020
|
declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
|
|
1962
2021
|
|
|
@@ -2007,4 +2066,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2007
2066
|
};
|
|
2008
2067
|
declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
2009
2068
|
|
|
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 };
|
|
2069
|
+
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,51 @@ type DataTypeEditorProps = PropsWithChildren<{
|
|
|
892
892
|
*/
|
|
893
893
|
declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
894
894
|
|
|
895
|
+
/** Status of the delegation session as seen from the React provider. */
|
|
896
|
+
type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
|
|
897
|
+
/** Value provided by DelegationProvider via React context. */
|
|
898
|
+
interface DelegationContextValue {
|
|
899
|
+
status: DelegationStatus;
|
|
900
|
+
error: Error | null;
|
|
901
|
+
reacquire: () => void;
|
|
902
|
+
}
|
|
903
|
+
declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
|
|
904
|
+
|
|
905
|
+
interface DelegationGateProps {
|
|
906
|
+
children: React__default.ReactNode;
|
|
907
|
+
loadingComponent?: React__default.ReactNode;
|
|
908
|
+
disabledComponent?: React__default.ReactNode;
|
|
909
|
+
errorComponent?: React__default.ReactNode | ((props: {
|
|
910
|
+
error: Error;
|
|
911
|
+
}) => React__default.ReactNode);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Renders children only when the delegation session is active.
|
|
915
|
+
* Shows appropriate fallback UI for loading, disabled, and error states.
|
|
916
|
+
*/
|
|
917
|
+
declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
|
|
918
|
+
|
|
919
|
+
interface DelegationProviderProps {
|
|
920
|
+
/** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
|
|
921
|
+
sdk: UniformMeshSDK;
|
|
922
|
+
/**
|
|
923
|
+
* Called with the session token to exchange it for a delegation token on your backend.
|
|
924
|
+
* Resolve on success, throw on failure.
|
|
925
|
+
*/
|
|
926
|
+
onSessionToken: (sessionToken: string) => Promise<void>;
|
|
927
|
+
/**
|
|
928
|
+
* Called to check if a delegation session is already active (e.g. a valid cookie exists).
|
|
929
|
+
* Return `true` to skip the session-token exchange.
|
|
930
|
+
*/
|
|
931
|
+
checkActive: () => Promise<boolean>;
|
|
932
|
+
children: React__default.ReactNode;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Manages the identity delegation lifecycle: checks for an existing session, acquires a
|
|
936
|
+
* session token from the dashboard parent if needed, and delegates exchange to the caller.
|
|
937
|
+
*/
|
|
938
|
+
declare function DelegationProvider({ sdk, onSessionToken, checkActive, children }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
939
|
+
|
|
895
940
|
type MeshAppProps = {
|
|
896
941
|
loadingComponent?: React__default.ComponentType;
|
|
897
942
|
errorComponent?: React__default.ComponentType<{
|
|
@@ -1555,7 +1600,7 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
|
|
|
1555
1600
|
};
|
|
1556
1601
|
|
|
1557
1602
|
/** 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';
|
|
1603
|
+
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
1604
|
type OperatorValueType = {
|
|
1560
1605
|
value: OperatorValue;
|
|
1561
1606
|
};
|
|
@@ -1742,6 +1787,8 @@ type SearchAndFilterProviderProps = {
|
|
|
1742
1787
|
onResetFilterValues?: () => void;
|
|
1743
1788
|
/** the total number of results */
|
|
1744
1789
|
totalResults?: number;
|
|
1790
|
+
/** whether data is currently loading */
|
|
1791
|
+
isLoading?: boolean;
|
|
1745
1792
|
/** the filter mapper function */
|
|
1746
1793
|
filterMapper?: FilterMapper;
|
|
1747
1794
|
/** sets child components giving access to useSearchAndFilter context */
|
|
@@ -1776,6 +1823,8 @@ type SearchAndFilterContextProps = {
|
|
|
1776
1823
|
filterMapper?: FilterMapper;
|
|
1777
1824
|
/** the total number of results */
|
|
1778
1825
|
totalResults?: number;
|
|
1826
|
+
/** whether data is currently loading */
|
|
1827
|
+
isLoading?: boolean;
|
|
1779
1828
|
/** Allow to bind dynamic inputs to the search term */
|
|
1780
1829
|
allowBindingSearchTerm?: boolean;
|
|
1781
1830
|
};
|
|
@@ -1784,7 +1833,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
|
|
|
1784
1833
|
* Search and filter provider
|
|
1785
1834
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
1786
1835
|
* */
|
|
1787
|
-
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1836
|
+
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
1837
|
/** Search and filter hook
|
|
1789
1838
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
1790
1839
|
*/
|
|
@@ -1815,6 +1864,8 @@ declare const useSearchAndFilter: () => {
|
|
|
1815
1864
|
filterMapper?: FilterMapper;
|
|
1816
1865
|
/** the total number of results */
|
|
1817
1866
|
totalResults?: number;
|
|
1867
|
+
/** whether data is currently loading */
|
|
1868
|
+
isLoading?: boolean;
|
|
1818
1869
|
/** Allow to bind dynamic inputs to the search term */
|
|
1819
1870
|
allowBindingSearchTerm?: boolean;
|
|
1820
1871
|
};
|
|
@@ -1830,6 +1881,8 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1830
1881
|
viewSwitchControls?: React$1.ReactNode;
|
|
1831
1882
|
/** The number of total results */
|
|
1832
1883
|
totalResults?: number;
|
|
1884
|
+
/** Whether data is currently loading */
|
|
1885
|
+
isLoading?: boolean;
|
|
1833
1886
|
/** The results container view
|
|
1834
1887
|
* @default '<SearchAndFilterResultContainer />'
|
|
1835
1888
|
*/
|
|
@@ -1847,7 +1900,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1847
1900
|
* Search and filter component
|
|
1848
1901
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
1849
1902
|
* */
|
|
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;
|
|
1903
|
+
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
1904
|
|
|
1852
1905
|
type FilterItemsProps = {
|
|
1853
1906
|
/** The text for the add button */
|
|
@@ -1957,6 +2010,12 @@ declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue,
|
|
|
1957
2010
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1958
2011
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1959
2012
|
|
|
2013
|
+
/**
|
|
2014
|
+
* Returns the current delegation session state.
|
|
2015
|
+
* Must be used within a `DelegationProvider`.
|
|
2016
|
+
*/
|
|
2017
|
+
declare function useDelegation(): DelegationContextValue;
|
|
2018
|
+
|
|
1960
2019
|
/** Converts dynamic inputs into VariablesProvider-format variables */
|
|
1961
2020
|
declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
|
|
1962
2021
|
|
|
@@ -2007,4 +2066,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2007
2066
|
};
|
|
2008
2067
|
declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
2009
2068
|
|
|
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 };
|
|
2069
|
+
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 };
|