@uniformdev/mesh-sdk-react 20.49.2 → 20.49.3-alpha.47
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 +190 -10
- package/dist/index.d.ts +190 -10
- package/dist/index.esm.js +860 -448
- package/dist/index.js +1111 -698
- package/dist/index.mjs +860 -448
- package/package.json +25 -25
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ 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,
|
|
5
|
+
import { DynamicInputs, SetValueOptions, MeshLocation, 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';
|
|
9
9
|
import { TDate } from 'timeago.js';
|
|
10
10
|
import * as lexical from 'lexical';
|
|
11
|
-
import { SerializedEditorState, SerializedLexicalNode,
|
|
11
|
+
import { SerializedEditorState, SerializedLexicalNode, DecoratorNode, Spread, NodeKey, DOMConversionMap, LexicalNode, LexicalEditor, SerializedRootNode, EditorState } from 'lexical';
|
|
12
12
|
import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
|
|
13
13
|
import { InputSelectProps, IconType } from '@uniformdev/design-system';
|
|
14
14
|
export { AddListButton, AddListButtonProps, Button, ButtonProps, Callout, CalloutProps, DrawerContent, Heading, HeadingProps, Input, InputComboBox, InputComboBoxProps, InputKeywordSearch, InputProps, InputSelect, InputToggle, InputToggleProps, Label, LabelProps, LoadingIndicator, LoadingOverlay, Menu, MenuItem, MenuItemProps, MenuProps, ParameterGroup, ParameterGroupProps, ParameterImage, ParameterImageInner, ParameterImageProps, ParameterInput, ParameterInputInner, ParameterInputProps, ParameterLabel, ParameterLabelProps, ParameterMenuButton, ParameterMenuButtonProps, ParameterSelect, ParameterSelectInner, ParameterSelectProps, ParameterShell, ParameterShellContext, ParameterShellProps, ParameterTextarea, ParameterTextareaInner, ParameterTextareaProps, ParameterToggle, ParameterToggleInner, ParameterToggleProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Switch, SwitchProps, Textarea, TextareaProps, Theme, ThemeProps, useParameterShell, utilityColors } from '@uniformdev/design-system';
|
|
@@ -82,6 +82,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
82
82
|
type: TLocationType;
|
|
83
83
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
84
84
|
type: TLocationType;
|
|
85
|
+
}> | Extract<_uniformdev_mesh_sdk.DataResourceSelectorLocation, {
|
|
86
|
+
type: TLocationType;
|
|
85
87
|
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorToolsLocation, {
|
|
86
88
|
type: TLocationType;
|
|
87
89
|
}> | Extract<_uniformdev_mesh_sdk.EmbeddedEditorLocation, {
|
|
@@ -113,6 +115,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
113
115
|
type: TLocationType;
|
|
114
116
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
115
117
|
type: TLocationType;
|
|
118
|
+
}> | Extract<_uniformdev_mesh_sdk.DataResourceSelectorLocation, {
|
|
119
|
+
type: TLocationType;
|
|
116
120
|
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorToolsLocation, {
|
|
117
121
|
type: TLocationType;
|
|
118
122
|
}> | Extract<_uniformdev_mesh_sdk.EmbeddedEditorLocation, {
|
|
@@ -143,6 +147,8 @@ declare function useMeshLocation<TLocationType extends MeshLocation['type'], TLo
|
|
|
143
147
|
type: TLocationType;
|
|
144
148
|
}> | Extract<_uniformdev_mesh_sdk.DataResourceLocation, {
|
|
145
149
|
type: TLocationType;
|
|
150
|
+
}> | Extract<_uniformdev_mesh_sdk.DataResourceSelectorLocation, {
|
|
151
|
+
type: TLocationType;
|
|
146
152
|
}> | Extract<_uniformdev_mesh_sdk.CanvasEditorToolsLocation, {
|
|
147
153
|
type: TLocationType;
|
|
148
154
|
}> | Extract<_uniformdev_mesh_sdk.EmbeddedEditorLocation, {
|
|
@@ -800,7 +806,7 @@ declare function serializeVariablesEditorSerializedState(serializedEditorState:
|
|
|
800
806
|
* If newValue is a string, it will be treated as a variable-reference-containing string, and parsed to a Lexical AST
|
|
801
807
|
* If newValue is a serialized Lexical AST, it will be used as-is. If the AST is invalid, the editor will be set to an empty state.
|
|
802
808
|
*/
|
|
803
|
-
declare function setVariablesEditorValue(editor: LexicalEditor, newValue: string | undefined | SerializedEditorState<SerializedLexicalNode>, tag?: string): void;
|
|
809
|
+
declare function setVariablesEditorValue(editor: LexicalEditor, newValue: string | undefined | null | SerializedEditorState<SerializedLexicalNode>, tag?: string): void;
|
|
804
810
|
|
|
805
811
|
declare function variableDefaultTextValue(defaultValue: unknown): string;
|
|
806
812
|
|
|
@@ -892,6 +898,119 @@ type DataTypeEditorProps = PropsWithChildren<{
|
|
|
892
898
|
*/
|
|
893
899
|
declare function DataTypeEditor({ onChange, children, editVariableComponent }: DataTypeEditorProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
894
900
|
|
|
901
|
+
/**
|
|
902
|
+
* Status of the delegation session as seen from the React provider.
|
|
903
|
+
*
|
|
904
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
905
|
+
*/
|
|
906
|
+
type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
|
|
907
|
+
/**
|
|
908
|
+
* Value provided by DelegationProvider via React context.
|
|
909
|
+
*
|
|
910
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
911
|
+
*/
|
|
912
|
+
interface DelegationContextValue {
|
|
913
|
+
status: DelegationStatus;
|
|
914
|
+
error: Error | null;
|
|
915
|
+
/**
|
|
916
|
+
* Re-runs session-token acquisition (checkActive → getSessionToken → onSessionToken).
|
|
917
|
+
* Concurrent callers share one in-flight attempt. Resolves when status is `active`;
|
|
918
|
+
* rejects when acquisition ends in `disabled` or `error`.
|
|
919
|
+
*/
|
|
920
|
+
reacquire: () => Promise<void>;
|
|
921
|
+
}
|
|
922
|
+
/** @deprecated This beta identity delegation API may change with breaking changes. */
|
|
923
|
+
declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
927
|
+
*/
|
|
928
|
+
interface DelegationGateProps {
|
|
929
|
+
children: React__default.ReactNode;
|
|
930
|
+
/** Shown while delegation is starting. Omit to use the default loading UI. */
|
|
931
|
+
loadingComponent?: React__default.ReactNode;
|
|
932
|
+
/** Shown when identity delegation is not enabled for this integration. Omit to use the default callout. */
|
|
933
|
+
disabledComponent?: React__default.ReactNode;
|
|
934
|
+
/** Shown when delegation fails. Pass a render function to surface error details; omit for a generic callout. */
|
|
935
|
+
errorComponent?: React__default.ReactNode | ((props: {
|
|
936
|
+
error: Error;
|
|
937
|
+
}) => React__default.ReactNode);
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Renders children only when the delegation session is active.
|
|
941
|
+
* Shows appropriate fallback UI for loading, disabled, and error states.
|
|
942
|
+
*
|
|
943
|
+
* Sensible defaults use the design system (loading overlay, callouts). Pass `loadingComponent`,
|
|
944
|
+
* `disabledComponent`, or `errorComponent` to customize; pass `null` to render nothing for that state.
|
|
945
|
+
*
|
|
946
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
947
|
+
*/
|
|
948
|
+
declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Thrown by `reacquire()` when `sdk.getSessionToken()` returns `undefined`,
|
|
952
|
+
* meaning identity delegation is not enabled for this integration.
|
|
953
|
+
* Distinct from transient errors so callers can avoid showing an error state.
|
|
954
|
+
*
|
|
955
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
956
|
+
*/
|
|
957
|
+
declare class DelegationDisabledError extends Error {
|
|
958
|
+
constructor();
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
962
|
+
*/
|
|
963
|
+
interface DelegationProviderProps {
|
|
964
|
+
/** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
|
|
965
|
+
sdk: UniformMeshSDK;
|
|
966
|
+
/**
|
|
967
|
+
* Called with the session token to exchange it for a delegation token on your backend.
|
|
968
|
+
* Resolve on success, throw on failure.
|
|
969
|
+
*/
|
|
970
|
+
onSessionToken: (sessionToken: string) => Promise<void>;
|
|
971
|
+
/**
|
|
972
|
+
* Called to check if a delegation session is already active (e.g. a valid cookie exists).
|
|
973
|
+
* Return `true` to skip the session-token exchange.
|
|
974
|
+
*/
|
|
975
|
+
checkActive: () => Promise<boolean>;
|
|
976
|
+
/**
|
|
977
|
+
* When `true`, re-checks the delegation session after the tab becomes visible again
|
|
978
|
+
* following a period of being hidden. If the server reports the session is no longer
|
|
979
|
+
* active (e.g. the access token expired and the refresh token is gone/invalid), the
|
|
980
|
+
* full session-token exchange is re-run; otherwise the check is silent and does not
|
|
981
|
+
* flip the status back to `acquiring`.
|
|
982
|
+
*
|
|
983
|
+
* Defaults to `true`.
|
|
984
|
+
*/
|
|
985
|
+
revalidateOnFocus?: boolean;
|
|
986
|
+
/**
|
|
987
|
+
* Minimum number of milliseconds the tab must have been hidden before a
|
|
988
|
+
* `revalidateOnFocus` check runs. Prevents hammering the server on rapid tab
|
|
989
|
+
* switches. Defaults to 30 seconds.
|
|
990
|
+
*/
|
|
991
|
+
revalidateAfterMs?: number;
|
|
992
|
+
children: React__default.ReactNode;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Manages the identity delegation lifecycle: checks for an existing session, acquires a
|
|
996
|
+
* session token from the dashboard parent if needed, and delegates exchange to the caller.
|
|
997
|
+
*
|
|
998
|
+
* Should ONLY be used to wrap locations which actually needed delegation and not the entire app like <MeshApp />.
|
|
999
|
+
*
|
|
1000
|
+
* Also handles stale-session recovery: when the tab becomes visible again after being
|
|
1001
|
+
* hidden for longer than `revalidateAfterMs`, the provider silently re-checks via
|
|
1002
|
+
* `checkActive` and re-runs the session exchange only if the server says the session is
|
|
1003
|
+
* no longer active. This covers the "returned after a long time" case where the stored
|
|
1004
|
+
* access token has expired and the refresh token is also gone or no longer valid.
|
|
1005
|
+
*
|
|
1006
|
+
* Mid-session expiry (visible tab, BFF returns `delegation_expired`) is recovered via
|
|
1007
|
+
* `reacquire()` — typically through `useDelegationFetch`, which awaits re-exchange and
|
|
1008
|
+
* retries the failed request once.
|
|
1009
|
+
*
|
|
1010
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
1011
|
+
*/
|
|
1012
|
+
declare function DelegationProvider({ sdk, onSessionToken, checkActive, revalidateOnFocus, revalidateAfterMs, children, }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1013
|
+
|
|
895
1014
|
type MeshAppProps = {
|
|
896
1015
|
loadingComponent?: React__default.ComponentType;
|
|
897
1016
|
errorComponent?: React__default.ComponentType<{
|
|
@@ -1555,7 +1674,7 @@ type FilterEditorRendererProps<TValue extends string | string[]> = Pick<FilterOp
|
|
|
1555
1674
|
};
|
|
1556
1675
|
|
|
1557
1676
|
/** 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';
|
|
1677
|
+
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
1678
|
type OperatorValueType = {
|
|
1560
1679
|
value: OperatorValue;
|
|
1561
1680
|
};
|
|
@@ -1714,9 +1833,11 @@ type FilterItemProps = {
|
|
|
1714
1833
|
initialCriteriaTitle?: string;
|
|
1715
1834
|
/** How multiple criteria are joined together */
|
|
1716
1835
|
criteriaGroupOperator?: 'and' | 'or';
|
|
1836
|
+
/** When provided, renders an interactive dropdown on the second row to switch between and/or */
|
|
1837
|
+
onCriteriaGroupOperatorChange?: (op: 'and' | 'or') => void;
|
|
1717
1838
|
};
|
|
1718
1839
|
/** A filter item component used to display filter options */
|
|
1719
|
-
declare const FilterItem: ({ index, operatorOptions, valueOptions, onFilterOptionChange, onFilterDynamicChange, onOperatorChange, onValueChange, initialCriteriaTitle, criteriaGroupOperator, }: FilterItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1840
|
+
declare const FilterItem: ({ index, operatorOptions, valueOptions, onFilterOptionChange, onFilterDynamicChange, onOperatorChange, onValueChange, initialCriteriaTitle, criteriaGroupOperator, onCriteriaGroupOperatorChange, }: FilterItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1720
1841
|
|
|
1721
1842
|
type FilterMapper = Record<string, ComponentType<any> | null>;
|
|
1722
1843
|
type SearchAndFilterProviderProps = {
|
|
@@ -1742,6 +1863,8 @@ type SearchAndFilterProviderProps = {
|
|
|
1742
1863
|
onResetFilterValues?: () => void;
|
|
1743
1864
|
/** the total number of results */
|
|
1744
1865
|
totalResults?: number;
|
|
1866
|
+
/** whether data is currently loading */
|
|
1867
|
+
isLoading?: boolean;
|
|
1745
1868
|
/** the filter mapper function */
|
|
1746
1869
|
filterMapper?: FilterMapper;
|
|
1747
1870
|
/** sets child components giving access to useSearchAndFilter context */
|
|
@@ -1776,6 +1899,8 @@ type SearchAndFilterContextProps = {
|
|
|
1776
1899
|
filterMapper?: FilterMapper;
|
|
1777
1900
|
/** the total number of results */
|
|
1778
1901
|
totalResults?: number;
|
|
1902
|
+
/** whether data is currently loading */
|
|
1903
|
+
isLoading?: boolean;
|
|
1779
1904
|
/** Allow to bind dynamic inputs to the search term */
|
|
1780
1905
|
allowBindingSearchTerm?: boolean;
|
|
1781
1906
|
};
|
|
@@ -1784,7 +1909,7 @@ declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProp
|
|
|
1784
1909
|
* Search and filter provider
|
|
1785
1910
|
* @example <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
1786
1911
|
* */
|
|
1787
|
-
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1912
|
+
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
1913
|
/** Search and filter hook
|
|
1789
1914
|
* @example const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
1790
1915
|
*/
|
|
@@ -1815,6 +1940,8 @@ declare const useSearchAndFilter: () => {
|
|
|
1815
1940
|
filterMapper?: FilterMapper;
|
|
1816
1941
|
/** the total number of results */
|
|
1817
1942
|
totalResults?: number;
|
|
1943
|
+
/** whether data is currently loading */
|
|
1944
|
+
isLoading?: boolean;
|
|
1818
1945
|
/** Allow to bind dynamic inputs to the search term */
|
|
1819
1946
|
allowBindingSearchTerm?: boolean;
|
|
1820
1947
|
};
|
|
@@ -1830,6 +1957,8 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1830
1957
|
viewSwitchControls?: React$1.ReactNode;
|
|
1831
1958
|
/** The number of total results */
|
|
1832
1959
|
totalResults?: number;
|
|
1960
|
+
/** Whether data is currently loading */
|
|
1961
|
+
isLoading?: boolean;
|
|
1833
1962
|
/** The results container view
|
|
1834
1963
|
* @default '<SearchAndFilterResultContainer />'
|
|
1835
1964
|
*/
|
|
@@ -1847,7 +1976,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1847
1976
|
* Search and filter component
|
|
1848
1977
|
* @example <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
1849
1978
|
* */
|
|
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;
|
|
1979
|
+
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
1980
|
|
|
1852
1981
|
type FilterItemsProps = {
|
|
1853
1982
|
/** The text for the add button */
|
|
@@ -1855,9 +1984,9 @@ type FilterItemsProps = {
|
|
|
1855
1984
|
additionalFiltersContainer: SearchAndFilterProps['additionalFiltersContainer'];
|
|
1856
1985
|
filterTitle?: string;
|
|
1857
1986
|
resetButtonText?: string;
|
|
1858
|
-
} & Pick<FilterItemProps, 'initialCriteriaTitle' | 'criteriaGroupOperator'>;
|
|
1987
|
+
} & Pick<FilterItemProps, 'initialCriteriaTitle' | 'criteriaGroupOperator' | 'onCriteriaGroupOperatorChange'>;
|
|
1859
1988
|
/** A filter items component used to display filter options */
|
|
1860
|
-
declare const FilterItems: ({ addButtonText, additionalFiltersContainer, filterTitle, resetButtonText, initialCriteriaTitle, criteriaGroupOperator, }: FilterItemsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1989
|
+
declare const FilterItems: ({ addButtonText, additionalFiltersContainer, filterTitle, resetButtonText, initialCriteriaTitle, criteriaGroupOperator, onCriteriaGroupOperatorChange, }: FilterItemsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1861
1990
|
|
|
1862
1991
|
type SearchAndFilterOptionsContainerProps = {
|
|
1863
1992
|
/** The button row to be displayed at the bottom of the container */
|
|
@@ -1954,9 +2083,60 @@ type SortItemsProps = {
|
|
|
1954
2083
|
*/
|
|
1955
2084
|
declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue, onSortChange, localeValue, localeOptions, onLocaleChange, disableSortBinding, }: SortItemsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1956
2085
|
|
|
2086
|
+
/**
|
|
2087
|
+
* Options for {@link createDelegationFetch}.
|
|
2088
|
+
*
|
|
2089
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2090
|
+
*/
|
|
2091
|
+
interface CreateDelegationFetchOptions {
|
|
2092
|
+
/**
|
|
2093
|
+
* Re-runs session-token exchange. Concurrent callers should share one in-flight
|
|
2094
|
+
* attempt (as `DelegationProvider.reacquire` does).
|
|
2095
|
+
*/
|
|
2096
|
+
reacquire: () => Promise<void>;
|
|
2097
|
+
/** Fetch implementation override (e.g. selective polyfill). */
|
|
2098
|
+
fetch?: typeof fetch;
|
|
2099
|
+
/**
|
|
2100
|
+
* Whether a failed response requires re-exchange.
|
|
2101
|
+
* Defaults to catching 401 with `{ code: 'delegation_expired' }`.
|
|
2102
|
+
*/
|
|
2103
|
+
isDelegationExpired?: (response: Response) => Promise<boolean>;
|
|
2104
|
+
}
|
|
2105
|
+
/**
|
|
2106
|
+
* Default expiry check: 401 whose JSON body has `code === DELEGATION_EXPIRED_CODE`.
|
|
2107
|
+
*
|
|
2108
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2109
|
+
*/
|
|
2110
|
+
declare function isDelegationExpiredResponse(response: Response): Promise<boolean>;
|
|
2111
|
+
/**
|
|
2112
|
+
* `fetch` wrapper that injects the Mesh CSRF header, and on a BFF
|
|
2113
|
+
* `delegation_expired` 401 calls `reacquire()` once then retries.
|
|
2114
|
+
* A second expiry after reacquire is returned as-is.
|
|
2115
|
+
*
|
|
2116
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2117
|
+
*/
|
|
2118
|
+
declare function createDelegationFetch(options: CreateDelegationFetchOptions): typeof fetch;
|
|
2119
|
+
|
|
1957
2120
|
/** Converts connected data map into VariablesProvider-format variables */
|
|
1958
2121
|
declare function useConnectedDataAsVariables(connectedData: Record<string, unknown> | undefined): Record<string, MeshDataVariableDefinition>;
|
|
1959
2122
|
|
|
2123
|
+
/**
|
|
2124
|
+
* Delegation session state (`status`, `error`, awaitable `reacquire`).
|
|
2125
|
+
* Requires `DelegationProvider`. Prefer {@link useDelegationFetch} for BFF calls.
|
|
2126
|
+
*
|
|
2127
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2128
|
+
*/
|
|
2129
|
+
declare function useDelegation(): DelegationContextValue;
|
|
2130
|
+
|
|
2131
|
+
/**
|
|
2132
|
+
* `fetch` for BFF calls: injects the Mesh CSRF header, and on `delegation_expired`
|
|
2133
|
+
* 401 reacquires via {@link useDelegation} then retries once.
|
|
2134
|
+
* Requires `DelegationProvider`. See {@link createDelegationFetch}.
|
|
2135
|
+
*
|
|
2136
|
+
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2137
|
+
*/
|
|
2138
|
+
declare function useDelegationFetch(options?: Omit<CreateDelegationFetchOptions, 'reacquire'>): typeof fetch;
|
|
2139
|
+
|
|
1960
2140
|
/** Converts dynamic inputs into VariablesProvider-format variables */
|
|
1961
2141
|
declare function useDynamicInputsAsVariables(dynamicInputs: DynamicInputs): Record<string, MeshDataVariableDefinition>;
|
|
1962
2142
|
|
|
@@ -2007,4 +2187,4 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2007
2187
|
};
|
|
2008
2188
|
declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|
|
2009
2189
|
|
|
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 };
|
|
2190
|
+
export { $createVariableNode, $isVariableNode, type BadgeThemeProps, type BaseRequestData, CHECKBOX_OPERATORS, type ContentDataResourceLocaleInfoProps, type ContentDataResourceLocaleInfoResult, ControlledValuePlugin, type CreateDelegationFetchOptions, 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, DelegationDisabledError, 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, createDelegationFetch, createLocationValidator, filterMapper, isDelegationExpiredResponse, prettifyBindExpression, readOnlyAttributes, serializeVariablesEditorSerializedState, serializeVariablesEditorState, setVariablesEditorValue, urlEncodeRequestParameter, urlEncodeRequestUrl, useConnectedDataAsVariables, useContentDataResourceLocaleInfo, useDelegation, useDelegationFetch, useDynamicInputsAsVariables, useMeshLocation, useObjectSearchContext, useRequest, useRequestHeader, useRequestParameter, useSearchAndFilter, useUniformMeshSdk, useVariableEditor, useVariables, useVariablesMenu, variableDefaultTextValue, variablePrefix, variableSuffix, variablesToGroupedList, variablesToList };
|