@uniformdev/mesh-sdk-react 20.74.6-alpha.5 → 20.74.6-alpha.7.sha-23d7a1d929
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 +218 -125
- package/dist/index.d.ts +218 -125
- package/dist/index.esm.js +25 -28
- package/dist/index.js +23 -26
- package/dist/index.mjs +25 -28
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -59,16 +59,27 @@ declare function DataResourceDynamicInputProvider(props: DataResourceDynamicInpu
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Provides convenient access to the current Uniform Mesh location via React hook.
|
|
62
|
-
* Intended to be used within
|
|
62
|
+
* Intended to be used within `MeshApp`.
|
|
63
63
|
*
|
|
64
64
|
* There are three primary ways to invoke this hook:
|
|
65
65
|
* 1. Without any arguments, this hook will return the current location regardless of its type. The result will be a union of all possible locations you can discriminate between i.e. with an if statement on the `type`
|
|
66
|
-
*
|
|
67
|
-
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* const location = useMeshLocation();
|
|
69
|
+
* if (location.type === 'paramType') {
|
|
70
|
+
* // location is now known to be a paramType
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
68
73
|
* 2. With a string argument, this hook will assert that the current location is the expected one and return the correct typings for that location.
|
|
69
|
-
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* const location = useMeshLocation('settings');
|
|
77
|
+
* ```
|
|
70
78
|
* 3. With an explicit generic to set the expected param type data or param type settings data. This is useful because (2) will return unknown as the value type for param types.
|
|
71
|
-
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* const location = useMeshLocation<'paramType', MyParamTypeValueType>();
|
|
82
|
+
* ```
|
|
72
83
|
*
|
|
73
84
|
* You can also combine (2) and (3) to get both explicit value typing and assertion of the location.
|
|
74
85
|
*/
|
|
@@ -514,7 +525,7 @@ type InputVariablesProps<TEditorContext = unknown> = {
|
|
|
514
525
|
* disable it with this prop.
|
|
515
526
|
*/
|
|
516
527
|
disableDismissEditorOnChange?: boolean;
|
|
517
|
-
/** Enables mutliple lines in the input (
|
|
528
|
+
/** Enables mutliple lines in the input (newline characters in the value) */
|
|
518
529
|
multiLine?: boolean;
|
|
519
530
|
/** Disables the inline variable selection menu when rendering a variables input */
|
|
520
531
|
disableInlineMenu?: boolean | 'by-label' | 'by-input';
|
|
@@ -629,7 +640,7 @@ type ParameterVariablesProps<TEditorContext = unknown> = {
|
|
|
629
640
|
/** Sets the test ID of the input */
|
|
630
641
|
'data-testid'?: string;
|
|
631
642
|
/**
|
|
632
|
-
* Enables mutliple lines in the input (
|
|
643
|
+
* Enables mutliple lines in the input (newline characters in the value).
|
|
633
644
|
* If a number is passed, the height of the editor is set to that number of lines and overflow scrolls.
|
|
634
645
|
* If a boolean true is passed, the editor auto-sizes to the content.
|
|
635
646
|
*/
|
|
@@ -804,7 +815,8 @@ declare function serializeVariablesEditorSerializedState(serializedEditorState:
|
|
|
804
815
|
*
|
|
805
816
|
* If newValue is undefined, the editor will be set to an empty state.
|
|
806
817
|
* If newValue is a string, it will be treated as a variable-reference-containing string, and parsed to a Lexical AST
|
|
807
|
-
* If newValue is a serialized Lexical AST,
|
|
818
|
+
* If newValue is a serialized Lexical AST, omitted Lexical defaults are restored before parse.
|
|
819
|
+
* If the AST is invalid, the editor will be set to an empty state.
|
|
808
820
|
*/
|
|
809
821
|
declare function setVariablesEditorValue(editor: LexicalEditor, newValue: string | undefined | null | SerializedEditorState<SerializedLexicalNode>, tag?: string): void;
|
|
810
822
|
|
|
@@ -812,12 +824,12 @@ declare function variableDefaultTextValue(defaultValue: unknown): string;
|
|
|
812
824
|
|
|
813
825
|
/**
|
|
814
826
|
* Expected prefix for variable expressions
|
|
815
|
-
* @deprecated
|
|
827
|
+
* @deprecated Use the variables binding API instead of string delimiters.
|
|
816
828
|
*/
|
|
817
829
|
declare const variablePrefix = "${";
|
|
818
830
|
/**
|
|
819
831
|
* Expected suffix for variable expressions
|
|
820
|
-
* @deprecated
|
|
832
|
+
* @deprecated Use the variables binding API instead of string delimiters.
|
|
821
833
|
*/
|
|
822
834
|
declare const variableSuffix = "}";
|
|
823
835
|
|
|
@@ -900,14 +912,10 @@ declare function DataTypeEditor({ onChange, children, editVariableComponent }: D
|
|
|
900
912
|
|
|
901
913
|
/**
|
|
902
914
|
* 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
915
|
*/
|
|
906
916
|
type DelegationStatus = 'idle' | 'acquiring' | 'active' | 'disabled' | 'error';
|
|
907
917
|
/**
|
|
908
918
|
* Value provided by DelegationProvider via React context.
|
|
909
|
-
*
|
|
910
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
911
919
|
*/
|
|
912
920
|
interface DelegationContextValue {
|
|
913
921
|
status: DelegationStatus;
|
|
@@ -919,12 +927,8 @@ interface DelegationContextValue {
|
|
|
919
927
|
*/
|
|
920
928
|
reacquire: () => Promise<void>;
|
|
921
929
|
}
|
|
922
|
-
/** @deprecated This beta identity delegation API may change with breaking changes. */
|
|
923
930
|
declare const DelegationContext: React$1.Context<DelegationContextValue | null>;
|
|
924
931
|
|
|
925
|
-
/**
|
|
926
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
927
|
-
*/
|
|
928
932
|
interface DelegationGateProps {
|
|
929
933
|
children: React__default.ReactNode;
|
|
930
934
|
/** Shown while delegation is starting. Omit to use the default loading UI. */
|
|
@@ -942,8 +946,6 @@ interface DelegationGateProps {
|
|
|
942
946
|
*
|
|
943
947
|
* Sensible defaults use the design system (loading overlay, callouts). Pass `loadingComponent`,
|
|
944
948
|
* `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
949
|
*/
|
|
948
950
|
declare function DelegationGate({ children, loadingComponent, disabledComponent, errorComponent, }: DelegationGateProps): _emotion_react_jsx_runtime.JSX.Element | null;
|
|
949
951
|
|
|
@@ -951,15 +953,10 @@ declare function DelegationGate({ children, loadingComponent, disabledComponent,
|
|
|
951
953
|
* Thrown by `reacquire()` when `sdk.getSessionToken()` returns `undefined`,
|
|
952
954
|
* meaning identity delegation is not enabled for this integration.
|
|
953
955
|
* 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
956
|
*/
|
|
957
957
|
declare class DelegationDisabledError extends Error {
|
|
958
958
|
constructor();
|
|
959
959
|
}
|
|
960
|
-
/**
|
|
961
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
962
|
-
*/
|
|
963
960
|
interface DelegationProviderProps {
|
|
964
961
|
/** `UniformMeshSDK` instance obtained from `useUniformMeshSdk()`. */
|
|
965
962
|
sdk: UniformMeshSDK;
|
|
@@ -1006,8 +1003,6 @@ interface DelegationProviderProps {
|
|
|
1006
1003
|
* Mid-session expiry (visible tab, BFF returns `delegation_expired`) is recovered via
|
|
1007
1004
|
* `reacquire()` — typically through `useDelegationFetch`, which awaits re-exchange and
|
|
1008
1005
|
* retries the failed request once.
|
|
1009
|
-
*
|
|
1010
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
1011
1006
|
*/
|
|
1012
1007
|
declare function DelegationProvider({ sdk, onSessionToken, checkActive, revalidateOnFocus, revalidateAfterMs, children, }: DelegationProviderProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
1013
1008
|
|
|
@@ -1028,8 +1023,11 @@ type DataRefreshButtonProps = HTMLAttributes<HTMLButtonElement> & {
|
|
|
1028
1023
|
onRefreshData: () => void;
|
|
1029
1024
|
};
|
|
1030
1025
|
/**
|
|
1031
|
-
*
|
|
1032
|
-
* @example
|
|
1026
|
+
* The data refresh button is a UI component to indicate to users a request for data is taking place
|
|
1027
|
+
* @example
|
|
1028
|
+
* ```tsx
|
|
1029
|
+
* <DataRefreshButton buttonText="my button" isLoading />
|
|
1030
|
+
* ```
|
|
1033
1031
|
* @deprecated this component is not recommended for use in new projects
|
|
1034
1032
|
*/
|
|
1035
1033
|
declare const DataRefreshButton: ({ buttonText, isLoading, onRefreshData, ...props }: DataRefreshButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1057,8 +1055,11 @@ type ObjectSearchContainerProps = {
|
|
|
1057
1055
|
children?: ReactNode;
|
|
1058
1056
|
};
|
|
1059
1057
|
/**
|
|
1060
|
-
*
|
|
1061
|
-
* @example
|
|
1058
|
+
* Object search container is an opinionated layout for search parameters and retrieved results
|
|
1059
|
+
* @example
|
|
1060
|
+
* ```tsx
|
|
1061
|
+
* <ObjectSearchContainer searchFilters={<>your component</>} resultList={<>your result list component<>} onSave={yourSaveAction} onCancel={yourCancelAction} />
|
|
1062
|
+
* ```
|
|
1062
1063
|
* @deprecated this component is not recommended for use in new projects
|
|
1063
1064
|
*/
|
|
1064
1065
|
declare const ObjectSearchContainer: ({ label, enableDynamicInputToResultId, searchFilters, resultList, children, }: ObjectSearchContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1067,11 +1068,11 @@ type ObjectSearchFilterProps = {
|
|
|
1067
1068
|
/** shows or hides the required content type select option */
|
|
1068
1069
|
requireContentType?: boolean;
|
|
1069
1070
|
/** sets the text for the required content type select option
|
|
1070
|
-
* @
|
|
1071
|
+
* @defaultValue 'All content types'
|
|
1071
1072
|
*/
|
|
1072
1073
|
typeSelectorAllTypesOptionText?: string;
|
|
1073
1074
|
/** sets the select input value label text
|
|
1074
|
-
* @
|
|
1075
|
+
* @defaultValue 'Content Type Select'
|
|
1075
1076
|
*/
|
|
1076
1077
|
selectLabel?: string;
|
|
1077
1078
|
/** sets the select input options, if empty - only keyword search field will be rendered */
|
|
@@ -1080,18 +1081,21 @@ type ObjectSearchFilterProps = {
|
|
|
1080
1081
|
value?: string;
|
|
1081
1082
|
}>;
|
|
1082
1083
|
/** sets the search input name value
|
|
1083
|
-
* @
|
|
1084
|
+
* @defaultValue 'searchText'
|
|
1084
1085
|
*/
|
|
1085
1086
|
searchInputName?: string;
|
|
1086
1087
|
/** sets the search input placeholder text
|
|
1087
|
-
* @
|
|
1088
|
+
* @defaultValue 'Enter keyword to narrow your results'
|
|
1088
1089
|
*/
|
|
1089
1090
|
searchInputPlaceholderText?: string;
|
|
1090
1091
|
};
|
|
1091
1092
|
/**
|
|
1092
|
-
*
|
|
1093
|
+
* Object search filter is an opinionated filter that has pre-defined query and setQuery functions
|
|
1093
1094
|
* that can be extended with custom functions
|
|
1094
|
-
* @example
|
|
1095
|
+
* @example
|
|
1096
|
+
* ```tsx
|
|
1097
|
+
* <ObjectSearchFilter selectOptions={[{ id: 'id value', name: 'name value'}]} />
|
|
1098
|
+
* ```
|
|
1095
1099
|
* @deprecated this component is not recommended for use in new projects
|
|
1096
1100
|
*/
|
|
1097
1101
|
declare const ObjectSearchFilter: ({ requireContentType, typeSelectorAllTypesOptionText, searchInputName, searchInputPlaceholderText, selectLabel, selectOptions, }: ObjectSearchFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1101,8 +1105,11 @@ type ObjectSearchFilterContainerProps = {
|
|
|
1101
1105
|
children?: React.ReactNode;
|
|
1102
1106
|
};
|
|
1103
1107
|
/**
|
|
1104
|
-
*
|
|
1105
|
-
* @example
|
|
1108
|
+
* an opinionated layout for search filters
|
|
1109
|
+
* @example
|
|
1110
|
+
* ```tsx
|
|
1111
|
+
* <ObjectSearchFilterContainer label="my label"><input type="text" aria-label="my input" /></ObjectSearchFilterContainer>
|
|
1112
|
+
* ```
|
|
1106
1113
|
* @deprecated this component is not recommended for use in new projects
|
|
1107
1114
|
*/
|
|
1108
1115
|
declare const ObjectSearchFilterContainer: ({ children }: ObjectSearchFilterContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1112,20 +1119,23 @@ type ObjectSearchResultItemProps = SelectedItemProps & {
|
|
|
1112
1119
|
/** sets additional remove functionality onto of default removal */
|
|
1113
1120
|
onRemove?: () => void;
|
|
1114
1121
|
/** sets whether to show or hide the remove button
|
|
1115
|
-
* @
|
|
1122
|
+
* @defaultValue false
|
|
1116
1123
|
*/
|
|
1117
1124
|
hideRemoveButton?: boolean;
|
|
1118
1125
|
/** sets user defined child nodes that are uncontrolled by Uniform */
|
|
1119
1126
|
children?: ReactNode;
|
|
1120
1127
|
/** disable or enable drag and drop functionality
|
|
1121
|
-
* @
|
|
1128
|
+
* @defaultValue false
|
|
1122
1129
|
*/
|
|
1123
1130
|
disableDnD?: boolean;
|
|
1124
1131
|
onClick?: () => void;
|
|
1125
1132
|
};
|
|
1126
1133
|
/**
|
|
1127
|
-
*
|
|
1128
|
-
* @example
|
|
1134
|
+
* An opinionated result item, best used for selected results
|
|
1135
|
+
* @example
|
|
1136
|
+
* ```tsx
|
|
1137
|
+
* <ObjectSearchResultItem id="my-result" title="title" />
|
|
1138
|
+
* ```
|
|
1129
1139
|
* @deprecated this component is not recommended for use in new projects
|
|
1130
1140
|
*/
|
|
1131
1141
|
declare const ObjectSearchResultItem: ({ id, title, contentType, popoverData, publishStatus, editLinkIcon, editLink, imageUrl, onRemove, createdAt, publishedAt, hideRemoveButton, disableDnD, children, onClick, }: ObjectSearchResultItemProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1162,7 +1172,7 @@ type SelectedItemProps<TExtraProps = unknown> = {
|
|
|
1162
1172
|
/** sets the text value of the publish badge */
|
|
1163
1173
|
text: string;
|
|
1164
1174
|
/** sets the theme value of the publish badge
|
|
1165
|
-
* @
|
|
1175
|
+
* @defaultValue 'unimportant'
|
|
1166
1176
|
*/
|
|
1167
1177
|
theme?: BadgeThemeProps;
|
|
1168
1178
|
};
|
|
@@ -1226,21 +1236,27 @@ type ObjectSearchListItemProps = SelectedItemProps & {
|
|
|
1226
1236
|
/** allows authors to add any child component that is not controlled by Uniform */
|
|
1227
1237
|
children?: React$1.ReactNode;
|
|
1228
1238
|
/** sets whether multiple entries can be added to the results list context
|
|
1229
|
-
* @
|
|
1239
|
+
* @defaultValue inherit from context or false
|
|
1230
1240
|
*/
|
|
1231
1241
|
isMulti?: boolean;
|
|
1232
1242
|
/** sets disabled state to the interactive element */
|
|
1233
1243
|
disabled?: boolean;
|
|
1234
1244
|
} & React$1.HTMLAttributes<HTMLDivElement>;
|
|
1235
1245
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
* @example
|
|
1246
|
+
* entry search list item is an opinionated UI component best used for initial retrieved results
|
|
1247
|
+
* @example
|
|
1248
|
+
* ```tsx
|
|
1249
|
+
* <ObjectSearchListItem id="my-result-item" title="title" popoverData={<p>some data info</p>}><div>example of uncontrolled content</div></ObjectSearchListItem>
|
|
1250
|
+
* ```
|
|
1238
1251
|
* @deprecated this component is not recommended for use in new projects
|
|
1239
1252
|
*/
|
|
1240
1253
|
declare const ObjectSearchListItem: ({ id, title, contentType, imageUrl, popoverData, onSelect, isMulti, disabled, children, ...props }: ObjectSearchListItemProps & React$1.HTMLAttributes<HTMLDivElement>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1241
1254
|
/**
|
|
1242
1255
|
* An opinionated loading skeleton component best used with ObjectSearchListItem
|
|
1243
|
-
* @example
|
|
1256
|
+
* @example
|
|
1257
|
+
* ```tsx
|
|
1258
|
+
* <ObjectSearchListItemLoadingSkeleton />
|
|
1259
|
+
* ```
|
|
1244
1260
|
*/
|
|
1245
1261
|
declare const ObjectSearchListItemLoadingSkeleton: () => _emotion_react_jsx_runtime.JSX.Element;
|
|
1246
1262
|
|
|
@@ -1253,22 +1269,28 @@ type ObjectSearchResultItemButtonProps<THtml extends HTMLAttributes<HTMLElement>
|
|
|
1253
1269
|
}>;
|
|
1254
1270
|
} & THtml;
|
|
1255
1271
|
/**
|
|
1256
|
-
*
|
|
1257
|
-
* @example
|
|
1272
|
+
* An opinionated button component best used within the ObjectSearchResultItem component
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```tsx
|
|
1275
|
+
* <ObjectSearchResultItemButton text="button text" icon="/my-image.png" onClick={() => myFunction()} />
|
|
1276
|
+
* ```
|
|
1258
1277
|
* @deprecated this component is not recommended for use in new projects
|
|
1259
1278
|
*/
|
|
1260
1279
|
declare const ObjectSearchResultItemButton: ({ text, icon, ...props }: ObjectSearchResultItemButtonProps<HTMLAttributes<HTMLButtonElement>>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1261
1280
|
/**
|
|
1262
|
-
*
|
|
1281
|
+
* An opinionated link component styled the same of the ObjectSearchResultItemButton component,
|
|
1263
1282
|
* that automatically sets the target and rel attributes. Best used within the ObjectSearchResultItem component
|
|
1264
|
-
* @example
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```tsx
|
|
1285
|
+
* <LinkButton text="link text" icon="/my-image.png" />
|
|
1286
|
+
* ```
|
|
1265
1287
|
* @deprecated this component is not recommended for use in new projects
|
|
1266
1288
|
*/
|
|
1267
1289
|
declare const LinkButton: ({ text, icon, ...props }: ObjectSearchResultItemButtonProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "rel">>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1268
1290
|
|
|
1269
1291
|
type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = SelectedItemProps> = {
|
|
1270
1292
|
/** sets the result label value
|
|
1271
|
-
* @
|
|
1293
|
+
* @defaultValue 'Selected'
|
|
1272
1294
|
*/
|
|
1273
1295
|
resultLabelText?: string;
|
|
1274
1296
|
/** sets and override react node replacing the whole HTML block for the result label and counter */
|
|
@@ -1276,11 +1298,11 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1276
1298
|
/** sets the on remove button click action */
|
|
1277
1299
|
onRemoveAllSelected?: () => void;
|
|
1278
1300
|
/** sets the remove button text
|
|
1279
|
-
* @
|
|
1301
|
+
* @defaultValue 'Remove all'
|
|
1280
1302
|
*/
|
|
1281
1303
|
removeButtonText?: string;
|
|
1282
1304
|
/** sets whether to show or hide the remove button
|
|
1283
|
-
* @
|
|
1305
|
+
* @defaultValue false
|
|
1284
1306
|
*/
|
|
1285
1307
|
hideRemoveButton?: boolean;
|
|
1286
1308
|
/** allows additional buttons to be added to the result title group */
|
|
@@ -1288,7 +1310,7 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1288
1310
|
/** allows placing child components within the result list area */
|
|
1289
1311
|
renderResultComponent?: (value: TRenderComponent) => React__default.ReactNode;
|
|
1290
1312
|
/** disable or enable drag and drop functionality
|
|
1291
|
-
* @
|
|
1313
|
+
* @defaultValue false
|
|
1292
1314
|
*/
|
|
1293
1315
|
disableDnD?: boolean;
|
|
1294
1316
|
/** sets the draggable id value */
|
|
@@ -1303,10 +1325,13 @@ type ObjectSearchResultListProps<TRenderComponent extends SelectedItemProps = Se
|
|
|
1303
1325
|
getContainerForDnDReparenting?: () => HTMLElement;
|
|
1304
1326
|
};
|
|
1305
1327
|
/**
|
|
1306
|
-
*
|
|
1307
|
-
* The result item component defaults to
|
|
1328
|
+
* An opinionated result list UI component that has built in drag and drop functionality and removal of all selected items from context.
|
|
1329
|
+
* The result item component defaults to `ObjectSearchResultItem`, however this can be overridden with any other UI component and still
|
|
1308
1330
|
* maintain drag and drop functionality
|
|
1309
|
-
* @example
|
|
1331
|
+
* @example
|
|
1332
|
+
* ```tsx
|
|
1333
|
+
* <ObjectSearchResultList id="my-id" title="title" renderResultComponent={(values) => <CustomComponent {...values} />} />
|
|
1334
|
+
* ```
|
|
1310
1335
|
* @deprecated this component is not recommended for use in new projects
|
|
1311
1336
|
*/
|
|
1312
1337
|
declare function ObjectSearchResultList<TRenderComponent extends SelectedItemProps = SelectedItemProps>({ resultLabelText, removeButtonText, onRemoveAllSelected, hideRemoveButton, resultLabelOverride, additionalButtons, renderResultComponent, multiSelectId, disableDnD, getContainerForDnDReparenting, whenNothingSelected, }: ObjectSearchResultListProps<TRenderComponent>): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1320,23 +1345,22 @@ type QueryFilterSearchProps = {
|
|
|
1320
1345
|
sortOrder: string;
|
|
1321
1346
|
};
|
|
1322
1347
|
type QueryFilterSelectionOptionProps = Array<{
|
|
1323
|
-
/** contains id or machine values
|
|
1348
|
+
/** contains id or machine values; used as the value attribute on HTML option elements */
|
|
1324
1349
|
value?: string;
|
|
1325
|
-
/** Contains human-readable display name for select options.
|
|
1326
|
-
* Used as value in case value is not present <option> */
|
|
1350
|
+
/** Contains human-readable display name for select options. Used as the option label when value is not present. */
|
|
1327
1351
|
label: string;
|
|
1328
1352
|
}>;
|
|
1329
1353
|
type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = QueryFilterSelectionOptionProps> = {
|
|
1330
1354
|
/** sets the query filter title
|
|
1331
|
-
* @
|
|
1355
|
+
* @defaultValue 'Configure Query'
|
|
1332
1356
|
*/
|
|
1333
1357
|
queryFilterTitle?: string;
|
|
1334
1358
|
/** sets the content type all selected options label
|
|
1335
|
-
* @
|
|
1359
|
+
* @defaultValue 'All content types'
|
|
1336
1360
|
*/
|
|
1337
1361
|
typeSelectorAllTypesOptionText?: string;
|
|
1338
1362
|
/** sets the content type label value
|
|
1339
|
-
* @
|
|
1363
|
+
* @defaultValue 'Filter by content type'
|
|
1340
1364
|
*/
|
|
1341
1365
|
contentTypeLabel?: string;
|
|
1342
1366
|
/** sets the content type select options */
|
|
@@ -1344,39 +1368,42 @@ type QueryFilterProps<TSelectOptions extends QueryFilterSelectionOptionProps = Q
|
|
|
1344
1368
|
/** sets whether the content type filter is required */
|
|
1345
1369
|
requireContentType?: boolean;
|
|
1346
1370
|
/** sets the count label value
|
|
1347
|
-
* @
|
|
1371
|
+
* @defaultValue 'Count'
|
|
1348
1372
|
*/
|
|
1349
1373
|
countLabel?: string;
|
|
1350
1374
|
/** sets the sort label text
|
|
1351
|
-
* @
|
|
1375
|
+
* @defaultValue 'Sort'
|
|
1352
1376
|
*/
|
|
1353
1377
|
sortLabel?: string;
|
|
1354
1378
|
/** sets the sort select options value */
|
|
1355
1379
|
sortOptions: TSelectOptions;
|
|
1356
1380
|
/** sets the sort order lable value
|
|
1357
|
-
* @
|
|
1381
|
+
* @defaultValue 'Sort Order'
|
|
1358
1382
|
*/
|
|
1359
1383
|
sortOrderLabel?: string;
|
|
1360
1384
|
/** sets the sort order select options value */
|
|
1361
1385
|
sortOrderOptions: TSelectOptions;
|
|
1362
1386
|
/** sets the search input name value
|
|
1363
|
-
* @
|
|
1387
|
+
* @defaultValue 'searchText'
|
|
1364
1388
|
*/
|
|
1365
1389
|
searchInputName?: string;
|
|
1366
1390
|
/** sets the search input placeholder text
|
|
1367
|
-
* @
|
|
1391
|
+
* @defaultValue 'Enter keyword to narrow your results'
|
|
1368
1392
|
*/
|
|
1369
1393
|
searchInputPlaceholderText?: string;
|
|
1370
1394
|
/** sets the label for the search input
|
|
1371
|
-
* @
|
|
1395
|
+
* @defaultValue 'Query'
|
|
1372
1396
|
*/
|
|
1373
1397
|
searchInputLabel?: string;
|
|
1374
1398
|
/** allows for additional child components, for example more input components */
|
|
1375
1399
|
children?: ReactNode;
|
|
1376
1400
|
};
|
|
1377
1401
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
* @example
|
|
1402
|
+
* An opinionated multi query filter UI component, best used for querying product data or more complex scenarios
|
|
1403
|
+
* @example
|
|
1404
|
+
* ```tsx
|
|
1405
|
+
* <QueryFilter contentTypeOptions={[{ id: 'id', name: 'name' }]} sortOptions={[{ id: 'id', name: 'name' }]} sortOrderOptions={[{ id: 'id', name: 'name' }]} />
|
|
1406
|
+
* ```
|
|
1380
1407
|
* @deprecated this component is not recommended for use in new projects
|
|
1381
1408
|
*/
|
|
1382
1409
|
declare const QueryFilter: ({ requireContentType, queryFilterTitle, contentTypeLabel, typeSelectorAllTypesOptionText, contentTypeOptions, searchInputName, searchInputPlaceholderText, searchInputLabel, countLabel, sortLabel, sortOptions, sortOrderLabel, sortOrderOptions, children, }: QueryFilterProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -1480,17 +1507,21 @@ declare function useRequest(): RequestContext;
|
|
|
1480
1507
|
|
|
1481
1508
|
type RequestTypeContainerProps = React$1.HTMLAttributes<HTMLDivElement> & {
|
|
1482
1509
|
/**sets the background color of the container
|
|
1483
|
-
* @
|
|
1510
|
+
* @defaultValue 'transparent'
|
|
1484
1511
|
*/
|
|
1485
1512
|
bgColor?: 'transparent' | 'var(--gray-100)';
|
|
1486
1513
|
children: React$1.ReactNode;
|
|
1487
1514
|
};
|
|
1488
1515
|
/**
|
|
1489
|
-
*
|
|
1490
|
-
* @example
|
|
1491
|
-
*
|
|
1492
|
-
* <
|
|
1493
|
-
*
|
|
1516
|
+
* a container to layout content in a 2 column grid format = 12ch 1fr
|
|
1517
|
+
* @example
|
|
1518
|
+
* ```tsx
|
|
1519
|
+
* <RequestTypeContainer bgColor="var(--gray-100)">
|
|
1520
|
+
* <label>Name <input type="text" /></label>
|
|
1521
|
+
* <label>Name <input type="text" /></label>
|
|
1522
|
+
* </RequestTypeContainer>
|
|
1523
|
+
* ```
|
|
1524
|
+
*/
|
|
1494
1525
|
declare const RequestTypeContainer: ({ bgColor, children, ...props }: RequestTypeContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1495
1526
|
|
|
1496
1527
|
/**
|
|
@@ -1607,6 +1638,8 @@ type FilterOptionLeftHandComponentProps = {
|
|
|
1607
1638
|
type FilterOption = {
|
|
1608
1639
|
/** The label for the option */
|
|
1609
1640
|
label: string;
|
|
1641
|
+
/** Secondary context shown under the label in the filter menu */
|
|
1642
|
+
secondaryLabel?: string;
|
|
1610
1643
|
/** The value for the option */
|
|
1611
1644
|
value: string;
|
|
1612
1645
|
/** The operator options for the option */
|
|
@@ -1617,6 +1650,13 @@ type FilterOption = {
|
|
|
1617
1650
|
readOnly?: boolean;
|
|
1618
1651
|
/** Set a disabled state on the input */
|
|
1619
1652
|
disabled?: boolean;
|
|
1653
|
+
/**
|
|
1654
|
+
* Marks a criteria that may only appear once across the whole filter set (e.g. content/composition
|
|
1655
|
+
* type, workflow). Consumers that build filters interactively (e.g. the modern filter bar) use this
|
|
1656
|
+
* to disable the criteria in "add"/"change" menus while it is already occupied by another row,
|
|
1657
|
+
* deriving occupancy from their live working rows rather than the applied filters.
|
|
1658
|
+
*/
|
|
1659
|
+
singleUse?: boolean;
|
|
1620
1660
|
/**
|
|
1621
1661
|
* Controls whether the filter's right-hand-side allows bound dynamic tokens.
|
|
1622
1662
|
*
|
|
@@ -1644,7 +1684,13 @@ type FilterOptionGroup = {
|
|
|
1644
1684
|
/** The options for the option */
|
|
1645
1685
|
options?: FilterOption[];
|
|
1646
1686
|
};
|
|
1647
|
-
/**
|
|
1687
|
+
/**
|
|
1688
|
+
* Filter selected and query value props.
|
|
1689
|
+
*
|
|
1690
|
+
* @deprecated Frozen for legacy SearchAndFilter UI compatibility. New dashboard
|
|
1691
|
+
* code should use the Filter type from the views API; this mesh export is not a
|
|
1692
|
+
* published replacement and will not gain new fields.
|
|
1693
|
+
*/
|
|
1648
1694
|
type Filter = {
|
|
1649
1695
|
/** The field value selected */
|
|
1650
1696
|
field: string;
|
|
@@ -1707,37 +1753,55 @@ declare const MULTI_SELECT_OPERATORS: OperatorType;
|
|
|
1707
1753
|
|
|
1708
1754
|
/**
|
|
1709
1755
|
* Renders a date input field for filtering
|
|
1710
|
-
* @example
|
|
1756
|
+
* @example
|
|
1757
|
+
* ```tsx
|
|
1758
|
+
* <DateEditor ariaLabel="Date" value={value} onChange={onChange} />
|
|
1759
|
+
* ```
|
|
1711
1760
|
*/
|
|
1712
1761
|
declare const DateEditor: ({ onChange, ariaLabel, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1713
1762
|
|
|
1714
1763
|
/**
|
|
1715
1764
|
* Renders a date range input field for filtering
|
|
1716
|
-
* @example
|
|
1765
|
+
* @example
|
|
1766
|
+
* ```tsx
|
|
1767
|
+
* <DateRangeEditor ariaLabel="Date Range" value={value} onChange={onChange} />
|
|
1768
|
+
* ```
|
|
1717
1769
|
*/
|
|
1718
1770
|
declare const DateRangeEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1719
1771
|
|
|
1720
1772
|
/**
|
|
1721
1773
|
* Multi select filter component
|
|
1722
|
-
* @example
|
|
1774
|
+
* @example
|
|
1775
|
+
* ```tsx
|
|
1776
|
+
* <FilterMultiChoiceEditor options={options} value={options.filter((option) => values.includes(option.value)} onChange={(e) => onChange(e.map((option) => option.value))} />
|
|
1777
|
+
* ```
|
|
1723
1778
|
*/
|
|
1724
1779
|
declare const FilterMultiChoiceEditor: ({ value, options, disabled, readOnly, valueTestId, ...props }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1725
1780
|
|
|
1726
1781
|
/**
|
|
1727
1782
|
* Single select filter component
|
|
1728
|
-
* @example
|
|
1783
|
+
* @example
|
|
1784
|
+
* ```tsx
|
|
1785
|
+
* <FilterSingleChoiceEditor options={options} value={options.find((option) => values.includes(option.value)} onChange={(e) => onChange(e.value)} />
|
|
1786
|
+
* ```
|
|
1729
1787
|
*/
|
|
1730
1788
|
declare const FilterSingleChoiceEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1731
1789
|
|
|
1732
1790
|
/**
|
|
1733
1791
|
* Renders a number input field for filtering
|
|
1734
|
-
* @example
|
|
1792
|
+
* @example
|
|
1793
|
+
* ```tsx
|
|
1794
|
+
* <NumberEditor ariaLabel="Number" value={value} onChange={onChange} />
|
|
1795
|
+
* ```
|
|
1735
1796
|
*/
|
|
1736
1797
|
declare const NumberEditor: ({ ariaLabel, onChange, disabled, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1737
1798
|
|
|
1738
1799
|
/**
|
|
1739
1800
|
* Renders a number range input field for filtering
|
|
1740
|
-
* @example
|
|
1801
|
+
* @example
|
|
1802
|
+
* ```tsx
|
|
1803
|
+
* <NumberRangeEditor ariaLabel="Number Range" value={value} onChange={onChange} />
|
|
1804
|
+
* ```
|
|
1741
1805
|
*/
|
|
1742
1806
|
declare const NumberRangeEditor: ({ onChange, disabled, ariaLabel, value, readOnly, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1743
1807
|
|
|
@@ -1749,19 +1813,28 @@ declare const readOnlyAttributes: {
|
|
|
1749
1813
|
|
|
1750
1814
|
/**
|
|
1751
1815
|
* Status multi select filter component that renders a custom dropdown menu
|
|
1752
|
-
* @example
|
|
1816
|
+
* @example
|
|
1817
|
+
* ```tsx
|
|
1818
|
+
* <StatusMultiEditor options={options} value={value} onChange={onChange} />
|
|
1819
|
+
* ```
|
|
1753
1820
|
*/
|
|
1754
1821
|
declare const StatusMultiEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string[]>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1755
1822
|
|
|
1756
1823
|
/**
|
|
1757
1824
|
* Status single select filter component that renders a custom dropdown menu
|
|
1758
|
-
* @example
|
|
1825
|
+
* @example
|
|
1826
|
+
* ```tsx
|
|
1827
|
+
* <StatusSingleEditor options={options} value={value} onChange={onChange} />
|
|
1828
|
+
* ```
|
|
1759
1829
|
*/
|
|
1760
1830
|
declare const StatusSingleEditor: ({ options, value, disabled, readOnly, onChange, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1761
1831
|
|
|
1762
1832
|
/**
|
|
1763
1833
|
* Renders a text input field for filtering
|
|
1764
|
-
* @example
|
|
1834
|
+
* @example
|
|
1835
|
+
* ```tsx
|
|
1836
|
+
* <TextEditor ariaLabel="Search" value={value} onChange={onChange} />
|
|
1837
|
+
* ```
|
|
1765
1838
|
*/
|
|
1766
1839
|
declare const TextEditor: ({ onChange, ariaLabel, value, readOnly, valueTestId, }: FilterEditorRendererProps<string>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1767
1840
|
|
|
@@ -1772,11 +1845,11 @@ declare const TextMultiChoiceEditor: ({ value, disabled, readOnly, valueTestId,
|
|
|
1772
1845
|
|
|
1773
1846
|
type FilterButtonProps = {
|
|
1774
1847
|
/** text to display on the button
|
|
1775
|
-
* @
|
|
1848
|
+
* @defaultValue "Filters"
|
|
1776
1849
|
*/
|
|
1777
1850
|
text?: string;
|
|
1778
1851
|
/** icon to display on the button
|
|
1779
|
-
* @
|
|
1852
|
+
* @defaultValue "filter-add"
|
|
1780
1853
|
*/
|
|
1781
1854
|
icon?: IconType;
|
|
1782
1855
|
/** number of filters to display on the button and sets the styles on the button */
|
|
@@ -1790,13 +1863,19 @@ type FilterButtonProps = {
|
|
|
1790
1863
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
1791
1864
|
/**
|
|
1792
1865
|
* A filter button component used to display filter menu options
|
|
1793
|
-
* @example
|
|
1866
|
+
* @example
|
|
1867
|
+
* ```tsx
|
|
1868
|
+
* <FilterButton text="Filters" filterCount={3} />
|
|
1869
|
+
* ```
|
|
1794
1870
|
*/
|
|
1795
1871
|
declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1796
1872
|
|
|
1797
1873
|
/**
|
|
1798
1874
|
* Default filter controls for search and filter
|
|
1799
|
-
* @example
|
|
1875
|
+
* @example
|
|
1876
|
+
* ```tsx
|
|
1877
|
+
* <FilterControls />
|
|
1878
|
+
* ```
|
|
1800
1879
|
*/
|
|
1801
1880
|
declare const FilterControls: ({ children, hideSearchInput, }: {
|
|
1802
1881
|
/** optional param to allow you to add your own controls */
|
|
@@ -1807,7 +1886,10 @@ declare const FilterControls: ({ children, hideSearchInput, }: {
|
|
|
1807
1886
|
|
|
1808
1887
|
/**
|
|
1809
1888
|
* Renders a filter editor component
|
|
1810
|
-
* @example
|
|
1889
|
+
* @example
|
|
1890
|
+
* ```tsx
|
|
1891
|
+
* <FilterEditorRenderer editorType="multiChoice" options={options} value={value} onChange={onChange} />
|
|
1892
|
+
* ```
|
|
1811
1893
|
*/
|
|
1812
1894
|
declare const FilterEditorRenderer: ({ editorType, ...props }: FilterEditorRendererProps<never>) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1813
1895
|
/** A mapper for filter editor components */
|
|
@@ -1853,9 +1935,7 @@ type SearchAndFilterProviderProps = {
|
|
|
1853
1935
|
onChange: (filters: Filter[]) => void;
|
|
1854
1936
|
/** Sets default value for full text search input, useful for bindable search */
|
|
1855
1937
|
defaultSearchTerm?: string;
|
|
1856
|
-
/** sets the reset filter values
|
|
1857
|
-
* @default "[{ field: '', operator: '', value: '' }]"
|
|
1858
|
-
*/
|
|
1938
|
+
/** sets the reset filter values */
|
|
1859
1939
|
resetFilterValues?: Filter[];
|
|
1860
1940
|
/** sets the list of filter options for each filter row */
|
|
1861
1941
|
filterOptions: FilterOptionGroup[];
|
|
@@ -1907,11 +1987,17 @@ type SearchAndFilterContextProps = {
|
|
|
1907
1987
|
declare const SearchAndFilterContext: React$1.Context<SearchAndFilterContextProps>;
|
|
1908
1988
|
/**
|
|
1909
1989
|
* Search and filter provider
|
|
1910
|
-
* @example
|
|
1990
|
+
* @example
|
|
1991
|
+
* ```tsx
|
|
1992
|
+
* <SearchAndFilterProvider filters={filters} filterOptions={filterOptions} onSearchChange={onSearchChange} onChange={onChange}>Children</SearchAndFilterProvider>
|
|
1993
|
+
* ```
|
|
1911
1994
|
* */
|
|
1912
1995
|
declare const SearchAndFilterProvider: ({ filters, filterOptions, filterVisible, alwaysVisible, defaultSearchTerm, onSearchChange, onChange, resetFilterValues, onResetFilterValues, totalResults, isLoading, filterMapper, children, allowBindingSearchTerm, }: SearchAndFilterProviderProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
1913
1996
|
/** Search and filter hook
|
|
1914
|
-
* @example
|
|
1997
|
+
* @example
|
|
1998
|
+
* ```tsx
|
|
1999
|
+
* const { searchTerm, setSearchTerm, filterVisibility, setFilterVisibility, filters, setFilters, handleAddFilter, handleResetFilters, handleDeleteFilter, filterOptions, validFilterQuery } = useSearchAndFilter();
|
|
2000
|
+
* ```
|
|
1915
2001
|
*/
|
|
1916
2002
|
declare const useSearchAndFilter: () => {
|
|
1917
2003
|
/** the search term value */
|
|
@@ -1948,7 +2034,7 @@ declare const useSearchAndFilter: () => {
|
|
|
1948
2034
|
|
|
1949
2035
|
type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
1950
2036
|
/** The filter controls to be displayed
|
|
1951
|
-
* @
|
|
2037
|
+
* @defaultValue '<FilterControls />'
|
|
1952
2038
|
*/
|
|
1953
2039
|
filterControls?: React$1.ReactNode;
|
|
1954
2040
|
/** sets the filter mode */
|
|
@@ -1960,7 +2046,7 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1960
2046
|
/** Whether data is currently loading */
|
|
1961
2047
|
isLoading?: boolean;
|
|
1962
2048
|
/** The results container view
|
|
1963
|
-
* @
|
|
2049
|
+
* @defaultValue '<SearchAndFilterResultContainer />'
|
|
1964
2050
|
*/
|
|
1965
2051
|
resultsContainerView?: React$1.ReactNode;
|
|
1966
2052
|
/** sets the reset filter values */
|
|
@@ -1974,7 +2060,10 @@ type SearchAndFilterProps = Omit<SearchAndFilterProviderProps, 'children'> & {
|
|
|
1974
2060
|
};
|
|
1975
2061
|
/**
|
|
1976
2062
|
* Search and filter component
|
|
1977
|
-
* @example
|
|
2063
|
+
* @example
|
|
2064
|
+
* ```tsx
|
|
2065
|
+
* <SearchAndFilter filters={filters} filterOptions={filterOptions} onChange={onChange} onSearchChange={onSearchChange} onSearchReset={onSearchReset} totalResults={totalResults} />
|
|
2066
|
+
* ```
|
|
1978
2067
|
* */
|
|
1979
2068
|
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;
|
|
1980
2069
|
|
|
@@ -1997,7 +2086,10 @@ type SearchAndFilterOptionsContainerProps = {
|
|
|
1997
2086
|
};
|
|
1998
2087
|
/**
|
|
1999
2088
|
* A container component for search and filter options
|
|
2000
|
-
* @example
|
|
2089
|
+
* @example
|
|
2090
|
+
* ```tsx
|
|
2091
|
+
* <SearchAndFilterOptionsContainer buttonRow={<button>Button</button>}>Children</SearchAndFilterOptionsContainer>
|
|
2092
|
+
* ```
|
|
2001
2093
|
* */
|
|
2002
2094
|
declare const SearchAndFilterOptionsContainer: ({ buttonRow, additionalFiltersContainer, children, }: SearchAndFilterOptionsContainerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2003
2095
|
type FiltersProps = {
|
|
@@ -2012,20 +2104,23 @@ type FiltersProps = {
|
|
|
2012
2104
|
/** Sets the data-test-id attribute for the filter menu */
|
|
2013
2105
|
dataTestId?: string;
|
|
2014
2106
|
/** The text for the reset button
|
|
2015
|
-
* @
|
|
2107
|
+
* @defaultValue 'reset'
|
|
2016
2108
|
*/
|
|
2017
2109
|
resetButtonText?: string;
|
|
2018
2110
|
additionalFiltersContainer?: SearchAndFilterProps['additionalFiltersContainer'];
|
|
2019
2111
|
};
|
|
2020
2112
|
/**
|
|
2021
2113
|
* A filter menu component used to display filter options
|
|
2022
|
-
* @example
|
|
2114
|
+
* @example
|
|
2115
|
+
* ```tsx
|
|
2116
|
+
* <FilterMenu id="search-and-filter-options">Children</FilterMenu>
|
|
2117
|
+
* ```
|
|
2023
2118
|
* */
|
|
2024
2119
|
declare const FilterMenu: ({ id, filterTitle, menuControls, additionalFiltersContainer, children, dataTestId, resetButtonText, }: FiltersProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2025
2120
|
|
|
2026
2121
|
type SearchAndFilterResultContainerProps = {
|
|
2027
2122
|
/** The label for the clear button
|
|
2028
|
-
* @
|
|
2123
|
+
* @defaultValue 'Clear'
|
|
2029
2124
|
*/
|
|
2030
2125
|
clearButtonLabel?: string;
|
|
2031
2126
|
/** The text for the button */
|
|
@@ -2040,12 +2135,12 @@ type SearchAndFilterResultContainerProps = {
|
|
|
2040
2135
|
hideClearButton?: boolean;
|
|
2041
2136
|
};
|
|
2042
2137
|
/** Search and filter results container */
|
|
2043
|
-
declare const SearchAndFilterResultContainer: ({ buttonText,
|
|
2138
|
+
declare const SearchAndFilterResultContainer: ({ buttonText, calloutTitle, calloutText, onHandleClear, hideClearButton, }: SearchAndFilterResultContainerProps) => _emotion_react_jsx_runtime.JSX.Element | null;
|
|
2044
2139
|
|
|
2045
2140
|
declare const SearchOnlyContext: React$1.Context<Pick<SearchAndFilterContextProps, "searchTerm" | "setSearchTerm">>;
|
|
2046
2141
|
type SearchOnlyProviderProps = Pick<SearchAndFilterProviderProps, 'onSearchChange'> & {
|
|
2047
2142
|
/** sets the max width of input wrapper
|
|
2048
|
-
* @
|
|
2143
|
+
* @defaultValue '712px'
|
|
2049
2144
|
*/
|
|
2050
2145
|
maxWidth?: string;
|
|
2051
2146
|
};
|
|
@@ -2053,11 +2148,11 @@ declare const SearchOnlyFilter: ({ onSearchChange, maxWidth }: SearchOnlyProvide
|
|
|
2053
2148
|
|
|
2054
2149
|
type SortItemsProps = {
|
|
2055
2150
|
/** The label for the sort by field
|
|
2056
|
-
* @
|
|
2151
|
+
* @defaultValue 'Sort by'
|
|
2057
2152
|
*/
|
|
2058
2153
|
sortByLabel?: string;
|
|
2059
2154
|
/** The label for the locale returned field
|
|
2060
|
-
* @
|
|
2155
|
+
* @defaultValue 'Enabled locale'
|
|
2061
2156
|
*/
|
|
2062
2157
|
localeLabel?: string;
|
|
2063
2158
|
/** sets the list of sort options */
|
|
@@ -2085,8 +2180,6 @@ declare const SortItems: ({ sortByLabel, localeLabel, sortOptions, sortByValue,
|
|
|
2085
2180
|
|
|
2086
2181
|
/**
|
|
2087
2182
|
* Options for {@link createDelegationFetch}.
|
|
2088
|
-
*
|
|
2089
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2090
2183
|
*/
|
|
2091
2184
|
interface CreateDelegationFetchOptions {
|
|
2092
2185
|
/**
|
|
@@ -2104,16 +2197,12 @@ interface CreateDelegationFetchOptions {
|
|
|
2104
2197
|
}
|
|
2105
2198
|
/**
|
|
2106
2199
|
* 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
2200
|
*/
|
|
2110
2201
|
declare function isDelegationExpiredResponse(response: Response): Promise<boolean>;
|
|
2111
2202
|
/**
|
|
2112
2203
|
* `fetch` wrapper that injects the Mesh CSRF header, and on a BFF
|
|
2113
2204
|
* `delegation_expired` 401 calls `reacquire()` once then retries.
|
|
2114
2205
|
* A second expiry after reacquire is returned as-is.
|
|
2115
|
-
*
|
|
2116
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2117
2206
|
*/
|
|
2118
2207
|
declare function createDelegationFetch(options: CreateDelegationFetchOptions): typeof fetch;
|
|
2119
2208
|
|
|
@@ -2123,8 +2212,6 @@ declare function useConnectedDataAsVariables(connectedData: Record<string, unkno
|
|
|
2123
2212
|
/**
|
|
2124
2213
|
* Delegation session state (`status`, `error`, awaitable `reacquire`).
|
|
2125
2214
|
* Requires `DelegationProvider`. Prefer {@link useDelegationFetch} for BFF calls.
|
|
2126
|
-
*
|
|
2127
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2128
2215
|
*/
|
|
2129
2216
|
declare function useDelegation(): DelegationContextValue;
|
|
2130
2217
|
|
|
@@ -2132,8 +2219,6 @@ declare function useDelegation(): DelegationContextValue;
|
|
|
2132
2219
|
* `fetch` for BFF calls: injects the Mesh CSRF header, and on `delegation_expired`
|
|
2133
2220
|
* 401 reacquires via {@link useDelegation} then retries once.
|
|
2134
2221
|
* Requires `DelegationProvider`. See {@link createDelegationFetch}.
|
|
2135
|
-
*
|
|
2136
|
-
* @deprecated This beta identity delegation API may change with breaking changes.
|
|
2137
2222
|
*/
|
|
2138
2223
|
declare function useDelegationFetch(options?: Omit<CreateDelegationFetchOptions, 'reacquire'>): typeof fetch;
|
|
2139
2224
|
|
|
@@ -2149,8 +2234,8 @@ declare function useUniformMeshSdk(): _uniformdev_mesh_sdk.UniformMeshSDK;
|
|
|
2149
2234
|
/**
|
|
2150
2235
|
* Creates a validation interceptor between useMeshLocation's setValue function and your code.
|
|
2151
2236
|
* You can use this utility to write cleaner validation logic for your Mesh Location UIs.
|
|
2152
|
-
* @param setValue The location's raw setValue function
|
|
2153
|
-
* @param validate A function to validate the new location's value.
|
|
2237
|
+
* @param setValue - The location's raw setValue function
|
|
2238
|
+
* @param validate - A function to validate the new location's value.
|
|
2154
2239
|
* @returns An equivalent to the setValue function that intercepts sets, performs validation, and emits the result with the new value.
|
|
2155
2240
|
*/
|
|
2156
2241
|
declare function createLocationValidator<TSetValue>(setValue: SetLocationValueDispatch<TSetValue>, validate: (newValue: TSetValue, currentResult: SetValueOptions | undefined) => SetValueOptions): SetLocationValueDispatch<TSetValue>;
|
|
@@ -2159,7 +2244,11 @@ type ContentDataResourceLocaleInfoResult = {
|
|
|
2159
2244
|
/**
|
|
2160
2245
|
* Effective locale for data resource. It can be one of two types:
|
|
2161
2246
|
* - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
|
|
2162
|
-
* - variable reference - locale stored in mesh data type/resource as a variable reference
|
|
2247
|
+
* - variable reference - locale stored in mesh data type/resource as a variable reference
|
|
2248
|
+
* @example
|
|
2249
|
+
* ```
|
|
2250
|
+
* ${locale}
|
|
2251
|
+
* ```
|
|
2163
2252
|
*/
|
|
2164
2253
|
effectiveLocale: string;
|
|
2165
2254
|
/** Bound locale value. It can be one of two types:
|
|
@@ -2173,7 +2262,11 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2173
2262
|
* It can be one of tree types:
|
|
2174
2263
|
* - undefined - no locale stored in mesh data type/resource yet or it is not localized
|
|
2175
2264
|
* - raw locale string - locale stored in mesh data type/resource (e.g. 'en-US')
|
|
2176
|
-
* - variable reference - locale stored in mesh data type/resource as a variable reference
|
|
2265
|
+
* - variable reference - locale stored in mesh data type/resource as a variable reference
|
|
2266
|
+
* @example
|
|
2267
|
+
* ```
|
|
2268
|
+
* ${locale}
|
|
2269
|
+
* ```
|
|
2177
2270
|
*
|
|
2178
2271
|
* If locale is empty, fallback to dynamic locale value if it is available.
|
|
2179
2272
|
*/
|
|
@@ -2182,7 +2275,7 @@ type ContentDataResourceLocaleInfoProps = {
|
|
|
2182
2275
|
defaultLocale: string | undefined;
|
|
2183
2276
|
/** Map of dynamic inputs for current composition. Should be passed down from DataResource metadata */
|
|
2184
2277
|
dynamicInputs: DynamicInputs;
|
|
2185
|
-
/** In case of empty locale value, this method is called to bind dynamic locale
|
|
2278
|
+
/** In case of empty locale value, this method is called to bind dynamic locale */
|
|
2186
2279
|
setLocale?: (locale: string) => void;
|
|
2187
2280
|
};
|
|
2188
2281
|
declare function useContentDataResourceLocaleInfo({ locale, defaultLocale, setLocale, dynamicInputs, }: ContentDataResourceLocaleInfoProps): ContentDataResourceLocaleInfoResult;
|